235 |
iphdr = p->payload; |
iphdr = p->payload; |
236 |
if (IPH_V(iphdr) != 4) { |
if (IPH_V(iphdr) != 4) { |
237 |
LWIP_DEBUGF(IP_DEBUG | 1, ("IP packet dropped due to bad version number %u\n", IPH_V(iphdr))); |
LWIP_DEBUGF(IP_DEBUG | 1, ("IP packet dropped due to bad version number %u\n", IPH_V(iphdr))); |
|
#if IP_DEBUG |
|
238 |
ip_debug_print(p); |
ip_debug_print(p); |
|
#endif /* IP_DEBUG */ |
|
239 |
pbuf_free(p); |
pbuf_free(p); |
240 |
IP_STATS_INC(ip.err); |
IP_STATS_INC(ip.err); |
241 |
IP_STATS_INC(ip.drop); |
IP_STATS_INC(ip.drop); |
263 |
if (inet_chksum(iphdr, iphdrlen) != 0) { |
if (inet_chksum(iphdr, iphdrlen) != 0) { |
264 |
|
|
265 |
LWIP_DEBUGF(IP_DEBUG | 2, ("Checksum (0x%x) failed, IP packet dropped.\n", inet_chksum(iphdr, iphdrlen))); |
LWIP_DEBUGF(IP_DEBUG | 2, ("Checksum (0x%x) failed, IP packet dropped.\n", inet_chksum(iphdr, iphdrlen))); |
|
#if IP_DEBUG |
|
266 |
ip_debug_print(p); |
ip_debug_print(p); |
|
#endif /* IP_DEBUG */ |
|
267 |
pbuf_free(p); |
pbuf_free(p); |
268 |
IP_STATS_INC(ip.chkerr); |
IP_STATS_INC(ip.chkerr); |
269 |
IP_STATS_INC(ip.drop); |
IP_STATS_INC(ip.drop); |
370 |
#endif /* IP_OPTIONS == 0 */ |
#endif /* IP_OPTIONS == 0 */ |
371 |
|
|
372 |
/* send to upper layers */ |
/* send to upper layers */ |
|
#if IP_DEBUG |
|
373 |
LWIP_DEBUGF(IP_DEBUG, ("ip_input: \n")); |
LWIP_DEBUGF(IP_DEBUG, ("ip_input: \n")); |
374 |
ip_debug_print(p); |
ip_debug_print(p); |
375 |
LWIP_DEBUGF(IP_DEBUG, ("ip_input: p->len %d p->tot_len %d\n", p->len, p->tot_len)); |
LWIP_DEBUGF(IP_DEBUG, ("ip_input: p->len %d p->tot_len %d\n", p->len, p->tot_len)); |
|
#endif /* IP_DEBUG */ |
|
376 |
|
|
377 |
#if LWIP_RAW |
#if LWIP_RAW |
378 |
if (!raw_input(p, inp)) { |
if (!raw_input(p, inp)) { |
481 |
IP_STATS_INC(ip.xmit); |
IP_STATS_INC(ip.xmit); |
482 |
|
|
483 |
LWIP_DEBUGF(IP_DEBUG, ("ip_output_if: %c%c%u\n", netif->name[0], netif->name[1], netif->num)); |
LWIP_DEBUGF(IP_DEBUG, ("ip_output_if: %c%c%u\n", netif->name[0], netif->name[1], netif->num)); |
|
#if IP_DEBUG |
|
484 |
ip_debug_print(p); |
ip_debug_print(p); |
|
#endif /* IP_DEBUG */ |
|
485 |
|
|
486 |
LWIP_DEBUGF(IP_DEBUG, ("netif->output()")); |
LWIP_DEBUGF(IP_DEBUG, ("netif->output()")); |
487 |
|
|