mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-03-20 01:20:59 +00:00
Slightly reorderd fields of struct tcp_pcb to plug holes introduced by member alignment (to reduce RAM usage)
This commit is contained in:
parent
211b8be07d
commit
859fd87600
@ -155,11 +155,11 @@ enum tcp_state {
|
|||||||
*/
|
*/
|
||||||
#define TCP_PCB_COMMON(type) \
|
#define TCP_PCB_COMMON(type) \
|
||||||
type *next; /* for the linked list */ \
|
type *next; /* for the linked list */ \
|
||||||
enum tcp_state state; /* TCP state */ \
|
|
||||||
u8_t prio; \
|
|
||||||
void *callback_arg; \
|
void *callback_arg; \
|
||||||
/* the accept callback for listen- and normal pcbs, if LWIP_CALLBACK_API */ \
|
/* the accept callback for listen- and normal pcbs, if LWIP_CALLBACK_API */ \
|
||||||
DEF_ACCEPT_CALLBACK \
|
DEF_ACCEPT_CALLBACK \
|
||||||
|
enum tcp_state state; /* TCP state */ \
|
||||||
|
u8_t prio; \
|
||||||
/* ports are in host byte order */ \
|
/* ports are in host byte order */ \
|
||||||
u16_t local_port
|
u16_t local_port
|
||||||
|
|
||||||
@ -186,16 +186,17 @@ struct tcp_pcb {
|
|||||||
|
|
||||||
/* the rest of the fields are in host byte order
|
/* the rest of the fields are in host byte order
|
||||||
as we have to do some math with them */
|
as we have to do some math with them */
|
||||||
|
|
||||||
|
/* Timers */
|
||||||
|
u8_t polltmr, pollinterval;
|
||||||
|
u32_t tmr;
|
||||||
|
|
||||||
/* receiver variables */
|
/* receiver variables */
|
||||||
u32_t rcv_nxt; /* next seqno expected */
|
u32_t rcv_nxt; /* next seqno expected */
|
||||||
u16_t rcv_wnd; /* receiver window available */
|
u16_t rcv_wnd; /* receiver window available */
|
||||||
u16_t rcv_ann_wnd; /* receiver window to announce */
|
u16_t rcv_ann_wnd; /* receiver window to announce */
|
||||||
u32_t rcv_ann_right_edge; /* announced right edge of window */
|
u32_t rcv_ann_right_edge; /* announced right edge of window */
|
||||||
|
|
||||||
/* Timers */
|
|
||||||
u32_t tmr;
|
|
||||||
u8_t polltmr, pollinterval;
|
|
||||||
|
|
||||||
/* Retransmission timer. */
|
/* Retransmission timer. */
|
||||||
s16_t rtime;
|
s16_t rtime;
|
||||||
|
|
||||||
@ -210,8 +211,8 @@ struct tcp_pcb {
|
|||||||
u8_t nrtx; /* number of retransmissions */
|
u8_t nrtx; /* number of retransmissions */
|
||||||
|
|
||||||
/* fast retransmit/recovery */
|
/* fast retransmit/recovery */
|
||||||
u32_t lastack; /* Highest acknowledged seqno. */
|
|
||||||
u8_t dupacks;
|
u8_t dupacks;
|
||||||
|
u32_t lastack; /* Highest acknowledged seqno. */
|
||||||
|
|
||||||
/* congestion avoidance/control variables */
|
/* congestion avoidance/control variables */
|
||||||
u16_t cwnd;
|
u16_t cwnd;
|
||||||
@ -219,10 +220,10 @@ struct tcp_pcb {
|
|||||||
|
|
||||||
/* sender variables */
|
/* sender variables */
|
||||||
u32_t snd_nxt; /* next new seqno to be sent */
|
u32_t snd_nxt; /* next new seqno to be sent */
|
||||||
u16_t snd_wnd; /* sender window */
|
|
||||||
u32_t snd_wl1, snd_wl2; /* Sequence and acknowledgement numbers of last
|
u32_t snd_wl1, snd_wl2; /* Sequence and acknowledgement numbers of last
|
||||||
window update. */
|
window update. */
|
||||||
u32_t snd_lbb; /* Sequence number of next byte to be buffered. */
|
u32_t snd_lbb; /* Sequence number of next byte to be buffered. */
|
||||||
|
u16_t snd_wnd; /* sender window */
|
||||||
|
|
||||||
u16_t acked;
|
u16_t acked;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user