Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
Additional data storage per tcp pcb
.
More...
Functions | |
u8_t | tcp_ext_arg_alloc_id (void) |
Allocate an index to store data in ext_args member of struct tcp_pcb. | |
void | tcp_ext_arg_set_callbacks (struct tcp_pcb *pcb, uint8_t id, const struct tcp_ext_arg_callbacks *const callbacks) |
Set callbacks for a given index of ext_args on the specified pcb. | |
void | tcp_ext_arg_set (struct tcp_pcb *pcb, uint8_t id, void *arg) |
Set data for a given index of ext_args on the specified pcb. | |
void * | tcp_ext_arg_get (const struct tcp_pcb *pcb, uint8_t id) |
Set data for a given index of ext_args on the specified pcb. |
Detailed Description
Additional data storage per tcp pcb
.
- See also:
- TCP
When LWIP_TCP_PCB_NUM_EXT_ARGS is > 0, every tcp pcb (including listen pcb) includes a number of additional argument entries in an array.
To support memory management, in addition to a 'void *', callbacks can be provided to manage transition from listening pcbs to connections and to deallocate memory when a pcb is deallocated (see struct tcp_ext_arg_callbacks).
After allocating this index, use tcp_ext_arg_set and tcp_ext_arg_get to store and load arguments from this index for a given pcb.
Function Documentation
u8_t tcp_ext_arg_alloc_id | ( | void | ) |
Allocate an index to store data in ext_args member of struct tcp_pcb.
Returned value is an index in mentioned array. The index is *global* over all pcbs!
When LWIP_TCP_PCB_NUM_EXT_ARGS is > 0, every tcp pcb (including listen pcb) includes a number of additional argument entries in an array.
To support memory management, in addition to a 'void *', callbacks can be provided to manage transition from listening pcbs to connections and to deallocate memory when a pcb is deallocated (see struct tcp_ext_arg_callbacks).
After allocating this index, use tcp_ext_arg_set and tcp_ext_arg_get to store and load arguments from this index for a given pcb.
- Returns:
- a unique index into struct tcp_pcb.ext_args
Definition at line 2571 of file lwip_tcp.c.
void* tcp_ext_arg_get | ( | const struct tcp_pcb * | pcb, |
uint8_t | id | ||
) |
Set data for a given index of ext_args on the specified pcb.
- Parameters:
-
pcb tcp_pcb for which to set the data id ext_args index to set (allocated via tcp_ext_arg_alloc_id)
- Returns:
- data pointer at the given index
Definition at line 2631 of file lwip_tcp.c.
void tcp_ext_arg_set | ( | struct tcp_pcb * | pcb, |
uint8_t | id, | ||
void * | arg | ||
) |
Set data for a given index of ext_args on the specified pcb.
- Parameters:
-
pcb tcp_pcb for which to set the data id ext_args index to set (allocated via tcp_ext_arg_alloc_id) arg data pointer to set
Definition at line 2613 of file lwip_tcp.c.
void tcp_ext_arg_set_callbacks | ( | struct tcp_pcb * | pcb, |
uint8_t | id, | ||
const struct tcp_ext_arg_callbacks *const | callbacks | ||
) |
Set callbacks for a given index of ext_args on the specified pcb.
- Parameters:
-
pcb tcp_pcb for which to set the callback id ext_args index to set (allocated via tcp_ext_arg_alloc_id) callbacks callback table (const since it is referenced, not copied!)
Definition at line 2594 of file lwip_tcp.c.
Generated on Tue Jul 12 2022 13:55:23 by
