tcp: introduce ext_args per pcb

This introduces the concept of ext (external/extended) arguments per
tcp_pcb (also for listening pcbs) to store more data than just one
"void *arg" per pcb. The "arg" is for use to applications, whereas
the ext_args may be used by frameworks and leave "arg" untouched.

In addition to a void pointer, callbacks are added to help frameworks
migrate arguments from listen pcb to connection pcb and to free args
when the pcb is freed.

Signed-off-by: goldsimon <goldsimon@gmx.de>
This commit is contained in:
goldsimon
2018-01-24 22:01:39 +01:00
parent ebe782ba16
commit 0e85582bc0
6 changed files with 238 additions and 2 deletions

View File

@@ -2136,7 +2136,8 @@ PREDEFINED = __DOXYGEN__=1 \
SO_REUSE=1 \
SO_REUSE_RXTOALL=1 \
LWIP_HAVE_SLIPIF=1 \
LWIP_6LOWPAN=1
LWIP_6LOWPAN=1 \
LWIP_TCP_PCB_NUM_EXT_ARGS=1
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The