mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-09-13 02:05:43 +00:00
don't add ppp_pcb_rx to ppp_pcb struct if PPPOS support is disabled
This commit is contained in:
parent
a226099b04
commit
8694deaabb
@ -200,6 +200,7 @@ struct protent *protocols[] = {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if PPPOS_SUPPORT
|
||||||
/* 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 {
|
typedef enum {
|
||||||
@ -212,7 +213,6 @@ typedef enum {
|
|||||||
PDDATA /* Process data byte. */
|
PDDATA /* Process data byte. */
|
||||||
} ppp_dev_states;
|
} ppp_dev_states;
|
||||||
|
|
||||||
#if PPPOS_SUPPORT
|
|
||||||
#define ESCAPE_P(accm, c) ((accm)[(c) >> 3] & ppp_accm_mask[c & 0x07])
|
#define ESCAPE_P(accm, c) ((accm)[(c) >> 3] & ppp_accm_mask[c & 0x07])
|
||||||
|
|
||||||
/** RX buffer size: this may be configured smaller! */
|
/** RX buffer size: this may be configured smaller! */
|
||||||
|
@ -135,6 +135,7 @@ struct ppp_addrs {
|
|||||||
ip_addr_t our_ipaddr, his_ipaddr, netmask, dns1, dns2;
|
ip_addr_t our_ipaddr, his_ipaddr, netmask, dns1, dns2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if PPPOS_SUPPORT
|
||||||
/*
|
/*
|
||||||
* PPP interface RX control block.
|
* PPP interface RX control block.
|
||||||
*/
|
*/
|
||||||
@ -144,11 +145,10 @@ typedef struct ppp_pcb_rx_s {
|
|||||||
/** the rx file descriptor */
|
/** the rx file descriptor */
|
||||||
sio_fd_t fd;
|
sio_fd_t fd;
|
||||||
/** receive buffer - encoded data is stored here */
|
/** receive buffer - encoded data is stored here */
|
||||||
#if PPPOS_SUPPORT && PPP_INPROC_OWNTHREAD
|
#if PPP_INPROC_OWNTHREAD
|
||||||
u_char rxbuf[PPPOS_RX_BUFSIZE];
|
u_char rxbuf[PPPOS_RX_BUFSIZE];
|
||||||
#endif /* PPPOS_SUPPORT && PPP_INPROC_OWNTHREAD */
|
#endif /* PPPOS_SUPPORT && PPP_INPROC_OWNTHREAD */
|
||||||
|
|
||||||
#if PPPOS_SUPPORT
|
|
||||||
/* The input packet. */
|
/* The input packet. */
|
||||||
struct pbuf *in_head, *in_tail;
|
struct pbuf *in_head, *in_tail;
|
||||||
|
|
||||||
@ -157,8 +157,8 @@ typedef struct ppp_pcb_rx_s {
|
|||||||
ppp_dev_states in_state; /* The input process state. */
|
ppp_dev_states in_state; /* The input process state. */
|
||||||
char in_escaped; /* Escape next character. */
|
char in_escaped; /* Escape next character. */
|
||||||
ext_accm in_accm; /* Async-Ctl-Char-Map for input. */
|
ext_accm in_accm; /* Async-Ctl-Char-Map for input. */
|
||||||
#endif /* PPPOS_SUPPORT */
|
|
||||||
} ppp_pcb_rx;
|
} ppp_pcb_rx;
|
||||||
|
#endif /* PPPOS_SUPPORT */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PPP interface control block.
|
* PPP interface control block.
|
||||||
@ -166,8 +166,9 @@ typedef struct ppp_pcb_rx_s {
|
|||||||
typedef struct ppp_pcb_s {
|
typedef struct ppp_pcb_s {
|
||||||
ppp_settings settings;
|
ppp_settings settings;
|
||||||
int unit;
|
int unit;
|
||||||
|
#if PPPOS_SUPPORT
|
||||||
ppp_pcb_rx rx;
|
ppp_pcb_rx rx;
|
||||||
|
#endif /* PPPOS_SUPPORT */
|
||||||
char open_flag; /* True when in use. */
|
char open_flag; /* True when in use. */
|
||||||
u8_t phase; /* where the link is at */
|
u8_t phase; /* where the link is at */
|
||||||
u8_t status; /* exit status */
|
u8_t status; /* exit status */
|
||||||
|
Loading…
Reference in New Issue
Block a user