PPP, adding const pragma to struct protent, saving about 200 bytes in .data segment

This commit is contained in:
Sylvain Rochet
2012-10-13 18:38:18 +02:00
parent a0298728df
commit 9e4aa79278
21 changed files with 31 additions and 31 deletions

View File

@@ -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 */

View File

@@ -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 */

View File

@@ -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
}

View File

@@ -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 */

View File

@@ -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 */

View File

@@ -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 */

View File

@@ -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. */

View File

@@ -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 */

View File

@@ -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 */