mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-04 05:39:53 +00:00
Moved members common to structures tcp_pcp and tcp_listen_pcb into define TCP_PCB_COMMON (like IP_PCB) to keep (possible) code changes consistent.
This commit is contained in:
parent
75adf4bac6
commit
a14bc9ed44
@ -219,18 +219,25 @@ enum tcp_state {
|
|||||||
TIME_WAIT = 10
|
TIME_WAIT = 10
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* members common to struct tcp_pcb and struct tcp_listen_pcb
|
||||||
|
*/
|
||||||
|
#define TCP_PCB_COMMON \
|
||||||
|
struct tcp_pcb *next; /* for the linked list */ \
|
||||||
|
enum tcp_state state; /* TCP state */ \
|
||||||
|
u8_t prio; \
|
||||||
|
void *callback_arg; \
|
||||||
|
/* ports are in host byte order */ \
|
||||||
|
u16_t local_port
|
||||||
|
|
||||||
/* the TCP protocol control block */
|
/* the TCP protocol control block */
|
||||||
struct tcp_pcb {
|
struct tcp_pcb {
|
||||||
/** common PCB members */
|
/** common PCB members */
|
||||||
IP_PCB;
|
IP_PCB;
|
||||||
/** protocol specific PCB members */
|
/** protocol specific PCB members */
|
||||||
struct tcp_pcb *next; /* for the linked list */
|
TCP_PCB_COMMON;
|
||||||
enum tcp_state state; /* TCP state */
|
|
||||||
u8_t prio;
|
|
||||||
void *callback_arg;
|
|
||||||
|
|
||||||
/* ports are in host byte order */
|
/* ports are in host byte order */
|
||||||
u16_t local_port;
|
|
||||||
u16_t remote_port;
|
u16_t remote_port;
|
||||||
|
|
||||||
u8_t flags;
|
u8_t flags;
|
||||||
@ -328,20 +335,8 @@ struct tcp_pcb {
|
|||||||
struct tcp_pcb_listen {
|
struct tcp_pcb_listen {
|
||||||
/* Common members of all PCB types */
|
/* Common members of all PCB types */
|
||||||
IP_PCB;
|
IP_PCB;
|
||||||
|
|
||||||
/* Protocol specific PCB members */
|
/* Protocol specific PCB members */
|
||||||
struct tcp_pcb_listen *next; /* for the linked list */
|
TCP_PCB_COMMON;
|
||||||
|
|
||||||
/* Even if state is obviously LISTEN this is here for
|
|
||||||
* field compatibility with tpc_pcb to which it is cast sometimes
|
|
||||||
* Until a cleaner solution emerges this is here.FIXME
|
|
||||||
*/
|
|
||||||
enum tcp_state state; /* TCP state */
|
|
||||||
|
|
||||||
u8_t prio;
|
|
||||||
void *callback_arg;
|
|
||||||
|
|
||||||
u16_t local_port;
|
|
||||||
|
|
||||||
#if LWIP_CALLBACK_API
|
#if LWIP_CALLBACK_API
|
||||||
/* Function to call when a listener has been connected. */
|
/* Function to call when a listener has been connected. */
|
||||||
|
Loading…
Reference in New Issue
Block a user