mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
PPP, adding const pragma to FSM callbacks, saving about 350 bytes in .data segment
This commit is contained in:
parent
9e4aa79278
commit
e5a554f0b5
@ -73,7 +73,7 @@
|
||||
*/
|
||||
typedef struct fsm {
|
||||
ppp_pcb *pcb; /* PPP Interface */
|
||||
struct fsm_callbacks *callbacks; /* Callback routines */
|
||||
const struct fsm_callbacks *callbacks; /* Callback routines */
|
||||
char *term_reason; /* Reason for closing protocol */
|
||||
u8_t seen_ack; /* Have received valid Ack/Nak/Rej to Req */
|
||||
/* -- This is our only flag, we might use u_int :1 if we have more flags */
|
||||
|
@ -230,7 +230,7 @@ static int ccp_extcode (fsm *, int, int, u_char *, int);
|
||||
static void ccp_rack_timeout (void *);
|
||||
static char *method_name (ccp_options *, ccp_options *);
|
||||
|
||||
static fsm_callbacks ccp_callbacks = {
|
||||
static const fsm_callbacks ccp_callbacks = {
|
||||
ccp_resetci,
|
||||
ccp_cilen,
|
||||
ccp_addci,
|
||||
|
@ -133,7 +133,7 @@ ecp_options ecp_gotoptions[NUM_PPP]; /* what the peer agreed to do */
|
||||
ecp_options ecp_allowoptions[NUM_PPP]; /* what we'll agree to do */
|
||||
ecp_options ecp_hisoptions[NUM_PPP]; /* what we agreed to do */
|
||||
|
||||
static fsm_callbacks ecp_callbacks = {
|
||||
static const fsm_callbacks ecp_callbacks = {
|
||||
NULL, /* ecp_resetci, */
|
||||
NULL, /* ecp_cilen, */
|
||||
NULL, /* ecp_addci, */
|
||||
|
@ -121,7 +121,7 @@ static void ipcp_up(fsm *f); /* We're UP */
|
||||
static void ipcp_down(fsm *f); /* We're DOWN */
|
||||
static void ipcp_finished(fsm *f); /* Don't need lower layer */
|
||||
|
||||
static fsm_callbacks ipcp_callbacks = { /* IPCP callback routines */
|
||||
static const fsm_callbacks ipcp_callbacks = { /* IPCP callback routines */
|
||||
ipcp_resetci, /* Reset our Configuration Information */
|
||||
ipcp_cilen, /* Length of our Configuration Information */
|
||||
ipcp_addci, /* Add our Configuration Information */
|
||||
|
@ -188,7 +188,7 @@ static void ipv6cp_up(fsm *f); /* We're UP */
|
||||
static void ipv6cp_down(fsm *f); /* We're DOWN */
|
||||
static void ipv6cp_finished(fsm *f); /* Don't need lower layer */
|
||||
|
||||
static fsm_callbacks ipv6cp_callbacks = { /* IPV6CP callback routines */
|
||||
static const fsm_callbacks ipv6cp_callbacks = { /* IPV6CP callback routines */
|
||||
ipv6cp_resetci, /* Reset our Configuration Information */
|
||||
ipv6cp_cilen, /* Length of our Configuration Information */
|
||||
ipv6cp_addci, /* Add our Configuration Information */
|
||||
|
@ -241,7 +241,7 @@ static void LcpSendEchoRequest(fsm *f);
|
||||
static void LcpLinkFailure(fsm *f);
|
||||
static void LcpEchoCheck(fsm *f);
|
||||
|
||||
static fsm_callbacks lcp_callbacks = { /* LCP callback routines */
|
||||
static const fsm_callbacks lcp_callbacks = { /* LCP callback routines */
|
||||
lcp_resetci, /* Reset our Configuration Information */
|
||||
lcp_cilen, /* Length of our Configuration Information */
|
||||
lcp_addci, /* Add our Configuration Information */
|
||||
|
@ -106,6 +106,7 @@
|
||||
#define IFF_PASSIVE IFF_LINK0 /* wait passively for connection */
|
||||
#endif
|
||||
|
||||
/* FIXME: we should probably remove that, this is only used for debug purposes */
|
||||
#ifndef PPPOE_ERRORSTRING_LEN
|
||||
#define PPPOE_ERRORSTRING_LEN 64
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user