PPP: more const and mixed u_char/char types fixes

This commit is contained in:
Sylvain Rochet
2015-09-18 20:11:09 +02:00
parent e8c0ba2a47
commit 83cddd8941
14 changed files with 28 additions and 28 deletions

View File

@@ -85,7 +85,7 @@ struct pppapi_msg_msg {
ip_addr_t *ipaddr;
u16_t port;
#if PPPOL2TP_AUTH_SUPPORT
u8_t *secret;
const u8_t *secret;
u8_t secret_len;
#endif /* PPPOL2TP_AUTH_SUPPORT */
ppp_link_status_cb_fn link_status_cb;
@@ -131,7 +131,7 @@ ppp_pcb *pppapi_pppoe_create(struct netif *pppif, struct netif *ethif, const cha
#endif /* PPPOE_SUPPORT */
#if PPPOL2TP_SUPPORT
ppp_pcb *pppapi_pppol2tp_create(struct netif *pppif, struct netif *netif, ip_addr_t *ipaddr, u16_t port,
u8_t *secret, u8_t secret_len,
const u8_t *secret, u8_t secret_len,
ppp_link_status_cb_fn link_status_cb, void *ctx_cb);
#endif /* PPPOL2TP_SUPPORT */
err_t pppapi_connect(ppp_pcb *pcb, u16_t holdoff);

View File

@@ -607,7 +607,7 @@ int str_to_epdisc (struct epdisc *, char *); /* endpt disc. from str */
#endif
/* Procedures exported from utils.c. */
void ppp_print_string(char *p, int len, void (*printer) (void *, const char *, ...), void *arg); /* Format a string for output */
void ppp_print_string(const u_char *p, int len, void (*printer) (void *, const char *, ...), void *arg); /* Format a string for output */
int ppp_slprintf(char *buf, int buflen, const char *fmt, ...); /* sprintf++ */
int ppp_vslprintf(char *buf, int buflen, const char *fmt, va_list args); /* vsprintf++ */
size_t ppp_strlcpy(char *dest, const char *src, size_t len); /* safe strcpy */

View File

@@ -169,7 +169,7 @@ struct pppol2tp_pcb_s {
ip_addr_t remote_ip; /* LNS IP Address */
u16_t remote_port; /* LNS port */
#if PPPOL2TP_AUTH_SUPPORT
u8_t *secret; /* Secret string */
const u8_t *secret; /* Secret string */
u8_t secret_len; /* Secret string length */
u8_t secret_rv[16]; /* Random vector */
u8_t challenge_hash[16]; /* Challenge response */
@@ -194,7 +194,7 @@ struct pppol2tp_pcb_s {
/* Create a new L2TP session. */
ppp_pcb *pppol2tp_create(struct netif *pppif,
struct netif *netif, ip_addr_t *ipaddr, u16_t port,
u8_t *secret, u8_t secret_len,
const u8_t *secret, u8_t secret_len,
ppp_link_status_cb_fn link_status_cb, void *ctx_cb);
#endif /* PPPOL2TP_H_ */