mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-01 03:16:03 +00:00
PPP, PPPoS, structure size optimisation
Reordered PPPoS structure so there is no alignment hole for 32 and 64 bits systems. Reduced types which were too large.
This commit is contained in:
parent
69469496e2
commit
4ad60b477c
@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
/* PPP packet parser states. Current state indicates operation yet to be
|
/* PPP packet parser states. Current state indicates operation yet to be
|
||||||
* completed. */
|
* completed. */
|
||||||
typedef enum {
|
enum {
|
||||||
PDIDLE = 0, /* Idle state - waiting. */
|
PDIDLE = 0, /* Idle state - waiting. */
|
||||||
PDSTART, /* Process start flag. */
|
PDSTART, /* Process start flag. */
|
||||||
PDADDRESS, /* Process address field. */
|
PDADDRESS, /* Process address field. */
|
||||||
@ -53,7 +53,7 @@ typedef enum {
|
|||||||
PDPROTOCOL1, /* Process protocol field 1. */
|
PDPROTOCOL1, /* Process protocol field 1. */
|
||||||
PDPROTOCOL2, /* Process protocol field 2. */
|
PDPROTOCOL2, /* Process protocol field 2. */
|
||||||
PDDATA /* Process data byte. */
|
PDDATA /* Process data byte. */
|
||||||
} pppos_rx_state;
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Extended asyncmap - allows any character to be escaped.
|
* Extended asyncmap - allows any character to be escaped.
|
||||||
@ -80,13 +80,13 @@ struct pppos_pcb_s {
|
|||||||
/* PPPoS rx */
|
/* PPPoS rx */
|
||||||
ext_accm in_accm; /* Async-Ctl-Char-Map for input. */
|
ext_accm in_accm; /* Async-Ctl-Char-Map for input. */
|
||||||
struct pbuf *in_head, *in_tail; /* The input packet. */
|
struct pbuf *in_head, *in_tail; /* The input packet. */
|
||||||
u16_t in_protocol; /* The input protocol code. */
|
|
||||||
u16_t in_fcs; /* Input Frame Check Sequence value. */
|
|
||||||
pppos_rx_state in_state; /* The input process state. */
|
|
||||||
char in_escaped; /* Escape next character. */
|
|
||||||
#if VJ_SUPPORT
|
#if VJ_SUPPORT
|
||||||
struct vjcompress vj_comp; /* Van Jacobson compression header. */
|
struct vjcompress vj_comp; /* Van Jacobson compression header. */
|
||||||
#endif /* VJ_SUPPORT */
|
#endif /* VJ_SUPPORT */
|
||||||
|
u16_t in_protocol; /* The input protocol code. */
|
||||||
|
u16_t in_fcs; /* Input Frame Check Sequence value. */
|
||||||
|
u8_t in_state; /* The input process state. */
|
||||||
|
u8_t in_escaped; /* Escape next character. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Create a new PPPoS session. */
|
/* Create a new PPPoS session. */
|
||||||
|
Loading…
Reference in New Issue
Block a user