mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
PPP, code cleaning, fixed ppp_input() indentation
This commit is contained in:
parent
662f1355de
commit
e241f880e8
@ -722,39 +722,39 @@ void ppp_input(ppp_pcb *pcb, struct pbuf *pb) {
|
|||||||
(*protp->input)(pcb, (u8_t*)pb->payload, pb->len);
|
(*protp->input)(pcb, (u8_t*)pb->payload, pb->len);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
#if 0 /* UNUSED
|
#if 0 /* UNUSED
|
||||||
*
|
*
|
||||||
* This is actually a (hacked?) way for the PPP kernel implementation to pass a
|
* This is actually a (hacked?) way for the PPP kernel implementation to pass a
|
||||||
* data packet to the PPP daemon. The PPP daemon normally only do signaling
|
* data packet to the PPP daemon. The PPP daemon normally only do signaling
|
||||||
* (LCP, PAP, CHAP, IPCP, ...) and does not handle any data packet at all.
|
* (LCP, PAP, CHAP, IPCP, ...) and does not handle any data packet at all.
|
||||||
*
|
*
|
||||||
* This is only used by CCP, which we cannot support until we have a CCP data
|
* This is only used by CCP, which we cannot support until we have a CCP data
|
||||||
* implementation.
|
* implementation.
|
||||||
*/
|
*/
|
||||||
if (protocol == (protp->protocol & ~0x8000)
|
if (protocol == (protp->protocol & ~0x8000)
|
||||||
&& protp->datainput != NULL) {
|
&& protp->datainput != NULL) {
|
||||||
(*protp->datainput)(pcb, pb->payload, pb->len);
|
(*protp->datainput)(pcb, pb->payload, pb->len);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
#endif /* UNUSED */
|
#endif /* UNUSED */
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PPP_DEBUG
|
#if PPP_DEBUG
|
||||||
#if PPP_PROTOCOLNAME
|
#if PPP_PROTOCOLNAME
|
||||||
pname = protocol_name(protocol);
|
pname = protocol_name(protocol);
|
||||||
if (pname != NULL) {
|
if (pname != NULL) {
|
||||||
ppp_warn("Unsupported protocol '%s' (0x%x) received", pname, protocol);
|
ppp_warn("Unsupported protocol '%s' (0x%x) received", pname, protocol);
|
||||||
} else
|
} else
|
||||||
#endif /* PPP_PROTOCOLNAME */
|
#endif /* PPP_PROTOCOLNAME */
|
||||||
ppp_warn("Unsupported protocol 0x%x received", protocol);
|
ppp_warn("Unsupported protocol 0x%x received", protocol);
|
||||||
#endif /* PPP_DEBUG */
|
#endif /* PPP_DEBUG */
|
||||||
if (pbuf_header(pb, (s16_t)sizeof(protocol))) {
|
if (pbuf_header(pb, (s16_t)sizeof(protocol))) {
|
||||||
LWIP_ASSERT("pbuf_header failed\n", 0);
|
LWIP_ASSERT("pbuf_header failed\n", 0);
|
||||||
goto drop;
|
goto drop;
|
||||||
|
}
|
||||||
|
lcp_sprotrej(pcb, (u8_t*)pb->payload, pb->len);
|
||||||
}
|
}
|
||||||
lcp_sprotrej(pcb, (u8_t*)pb->payload, pb->len);
|
break;
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
drop:
|
drop:
|
||||||
|
Loading…
Reference in New Issue
Block a user