mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-04 02:39:15 +00:00
PPP, code cleaning, u_char to u8_t
Replaced u_char to u8_t in our PPP files.
This commit is contained in:
parent
5097ac05bf
commit
59d8e76081
@ -58,7 +58,7 @@ enum {
|
||||
/*
|
||||
* Extended asyncmap - allows any character to be escaped.
|
||||
*/
|
||||
typedef u_char ext_accm[32];
|
||||
typedef u8_t ext_accm[32];
|
||||
|
||||
/*
|
||||
* PPPoS interface control block.
|
||||
@ -106,11 +106,11 @@ ppp_pcb *pppos_create(struct netif *pppif, sio_fd_t fd,
|
||||
|
||||
#if !NO_SYS && !PPP_INPROC_MULTITHREADED
|
||||
/* Pass received raw characters to PPPoS to be decoded through lwIP TCPIP thread. */
|
||||
err_t pppos_input_tcpip(ppp_pcb *ppp, u_char *s, int l);
|
||||
err_t pppos_input_tcpip(ppp_pcb *ppp, u8_t *s, int l);
|
||||
#endif /* !NO_SYS && !PPP_INPROC_MULTITHREADED */
|
||||
|
||||
/* PPP over Serial: this is the input function to be called for received data. */
|
||||
void pppos_input(ppp_pcb *ppp, u_char* data, int len);
|
||||
void pppos_input(ppp_pcb *ppp, u8_t* data, int len);
|
||||
|
||||
#endif /* PPPOS_H */
|
||||
#endif /* PPP_SUPPORT && PPPOL2TP_SUPPORT */
|
||||
|
@ -704,7 +704,7 @@ void ppp_input(ppp_pcb *pcb, struct pbuf *pb) {
|
||||
for (i = 0; (protp = protocols[i]) != NULL; ++i) {
|
||||
if (protp->protocol == protocol) {
|
||||
pb = ppp_singlebuf(pb);
|
||||
(*protp->input)(pcb, (u_char*)pb->payload, pb->len);
|
||||
(*protp->input)(pcb, (u8_t*)pb->payload, pb->len);
|
||||
goto out;
|
||||
}
|
||||
#if 0 /* UNUSED
|
||||
@ -737,7 +737,7 @@ void ppp_input(ppp_pcb *pcb, struct pbuf *pb) {
|
||||
LWIP_ASSERT("pbuf_header failed\n", 0);
|
||||
goto drop;
|
||||
}
|
||||
lcp_sprotrej(pcb, (u_char*)pb->payload, pb->len);
|
||||
lcp_sprotrej(pcb, (u8_t*)pb->payload, pb->len);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -755,7 +755,7 @@ out:
|
||||
/* merge a pbuf chain into one pbuf */
|
||||
struct pbuf *ppp_singlebuf(struct pbuf *p) {
|
||||
struct pbuf *q, *b;
|
||||
u_char *pl;
|
||||
u8_t *pl;
|
||||
|
||||
if(p->tot_len == p->len) {
|
||||
return p;
|
||||
@ -768,7 +768,7 @@ struct pbuf *ppp_singlebuf(struct pbuf *p) {
|
||||
return p; /* live dangerously */
|
||||
}
|
||||
|
||||
for(b = p, pl = (u_char*)q->payload; b != NULL; b = b->next) {
|
||||
for(b = p, pl = (u8_t*)q->payload; b != NULL; b = b->next) {
|
||||
MEMCPY(pl, b->payload, b->len);
|
||||
pl += b->len;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user