mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-23 00:27:09 +08:00
PPP, adding const pragma to struct protent, saving about 200 bytes in .data segment
This commit is contained in:
@@ -52,6 +52,6 @@ extern ccp_options ccp_gotoptions[];
|
||||
extern ccp_options ccp_allowoptions[];
|
||||
extern ccp_options ccp_hisoptions[];
|
||||
|
||||
extern struct protent ccp_protent;
|
||||
extern const struct protent ccp_protent;
|
||||
|
||||
#endif /* PPP_SUPPORT && CCP_SUPPORT */
|
||||
|
||||
@@ -192,7 +192,7 @@ extern void chap_auth_peer(ppp_pcb *pcb, char *our_name, int digest_code);
|
||||
extern void chap_auth_with_peer(ppp_pcb *pcb, char *our_name, int digest_code);
|
||||
|
||||
/* Represents the CHAP protocol to the main pppd code */
|
||||
extern struct protent chap_protent;
|
||||
extern const struct protent chap_protent;
|
||||
|
||||
#endif /* CHAP_H */
|
||||
#endif /* PPP_SUPPORT && CHAP_SUPPORT */
|
||||
|
||||
@@ -157,7 +157,7 @@ typedef struct eap_state {
|
||||
void eap_authwithpeer(ppp_pcb *pcb, char *localname);
|
||||
void eap_authpeer(ppp_pcb *pcb, char *localname);
|
||||
|
||||
extern struct protent eap_protent;
|
||||
extern const struct protent eap_protent;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -45,6 +45,6 @@ extern ecp_options ecp_gotoptions[];
|
||||
extern ecp_options ecp_allowoptions[];
|
||||
extern ecp_options ecp_hisoptions[];
|
||||
|
||||
extern struct protent ecp_protent;
|
||||
extern const struct protent ecp_protent;
|
||||
|
||||
#endif /* PPP_SUPPORT && ECP_SUPPORT */
|
||||
|
||||
@@ -101,7 +101,7 @@ typedef struct ipcp_options {
|
||||
char *ip_ntoa (u32_t);
|
||||
#endif /* UNUSED, already defined by lwIP */
|
||||
|
||||
extern struct protent ipcp_protent;
|
||||
extern const struct protent ipcp_protent;
|
||||
|
||||
#endif /* IPCP_H */
|
||||
#endif /* PPP_SUPPORT */
|
||||
|
||||
@@ -173,7 +173,7 @@ typedef struct ipv6cp_options {
|
||||
eui64_t ourid, hisid; /* Interface identifiers */
|
||||
} ipv6cp_options;
|
||||
|
||||
extern struct protent ipv6cp_protent;
|
||||
extern const struct protent ipv6cp_protent;
|
||||
|
||||
#endif /* IPV6CP_H */
|
||||
#endif /* PPP_SUPPORT && PPP_IPV6_SUPPORT */
|
||||
|
||||
@@ -164,7 +164,7 @@ void lcp_lowerup(ppp_pcb *pcb);
|
||||
void lcp_lowerdown(ppp_pcb *pcb);
|
||||
void lcp_sprotrej(ppp_pcb *pcb, u_char *p, int len); /* send protocol reject */
|
||||
|
||||
extern struct protent lcp_protent;
|
||||
extern const struct protent lcp_protent;
|
||||
|
||||
/* Default number of times we receive our magic number from the peer
|
||||
before deciding the link is looped-back. */
|
||||
|
||||
@@ -295,7 +295,7 @@ struct protent {
|
||||
};
|
||||
|
||||
/* Table of pointers to supported protocols */
|
||||
extern struct protent *protocols[];
|
||||
extern const struct protent* const protocols[];
|
||||
|
||||
|
||||
/* Values for auth_pending, auth_done */
|
||||
|
||||
@@ -120,7 +120,7 @@ void upap_authwithpeer(ppp_pcb *pcb, char *user, char *password);
|
||||
void upap_authpeer(ppp_pcb *pcb);
|
||||
#endif /* PPP_SERVER */
|
||||
|
||||
extern struct protent pap_protent;
|
||||
extern const struct protent pap_protent;
|
||||
|
||||
#endif /* UPAP_H */
|
||||
#endif /* PPP_SUPPORT && PAP_SUPPORT */
|
||||
|
||||
Reference in New Issue
Block a user