217 |
#if IP_DEBUG |
#if IP_DEBUG |
218 |
/* DEBUGF("ip_input: \n"); |
/* DEBUGF("ip_input: \n"); |
219 |
ip_debug_print(p); |
ip_debug_print(p); |
220 |
DEBUGF("ip_input: p->len %d p->tot_len %d\n", p->len, p->tot_len);*/ |
DEBUGF("ip_input: p->len %u p->tot_len %u\n", p->len, p->tot_len);*/ |
221 |
#endif /* IP_DEBUG */ |
#endif /* IP_DEBUG */ |
222 |
|
|
223 |
|
|
237 |
/* send ICMP destination protocol unreachable */ |
/* send ICMP destination protocol unreachable */ |
238 |
icmp_dest_unreach(p, ICMP_DUR_PROTO); |
icmp_dest_unreach(p, ICMP_DUR_PROTO); |
239 |
pbuf_free(p); |
pbuf_free(p); |
240 |
DEBUGF(IP_DEBUG, ("Unsupported transportation protocol %d\n", |
DEBUGF(IP_DEBUG, ("Unsupported transportation protocol %u\n", |
241 |
iphdr->nexthdr)); |
iphdr->nexthdr)); |
242 |
|
|
243 |
#ifdef IP_STATS |
#ifdef IP_STATS |
266 |
|
|
267 |
PERF_START; |
PERF_START; |
268 |
|
|
269 |
printf("len %d tot_len %d\n", p->len, p->tot_len); |
printf("len %u tot_len %u\n", p->len, p->tot_len); |
270 |
if(pbuf_header(p, IP_HLEN)) { |
if(pbuf_header(p, IP_HLEN)) { |
271 |
DEBUGF(IP_DEBUG, ("ip_output: not enough room for IP header in pbuf\n")); |
DEBUGF(IP_DEBUG, ("ip_output: not enough room for IP header in pbuf\n")); |
272 |
#ifdef IP_STATS |
#ifdef IP_STATS |
275 |
|
|
276 |
return ERR_BUF; |
return ERR_BUF; |
277 |
} |
} |
278 |
printf("len %d tot_len %d\n", p->len, p->tot_len); |
printf("len %u tot_len %u\n", p->len, p->tot_len); |
279 |
|
|
280 |
iphdr = p->payload; |
iphdr = p->payload; |
281 |
|
|
303 |
++lwip_stats.ip.xmit; |
++lwip_stats.ip.xmit; |
304 |
#endif /* IP_STATS */ |
#endif /* IP_STATS */ |
305 |
|
|
306 |
DEBUGF(IP_DEBUG, ("ip_output_if: %c%c (len %d)\n", netif->name[0], netif->name[1], p->tot_len)); |
DEBUGF(IP_DEBUG, ("ip_output_if: %c%c (len %u)\n", netif->name[0], netif->name[1], p->tot_len)); |
307 |
#if IP_DEBUG |
#if IP_DEBUG |
308 |
ip_debug_print(p); |
ip_debug_print(p); |
309 |
#endif /* IP_DEBUG */ |
#endif /* IP_DEBUG */ |
350 |
iphdr->tclass1, iphdr->tclass2, |
iphdr->tclass1, iphdr->tclass2, |
351 |
iphdr->flow1, iphdr->flow2)); |
iphdr->flow1, iphdr->flow2)); |
352 |
DEBUGF(IP_DEBUG, ("+-------------------------------+\n")); |
DEBUGF(IP_DEBUG, ("+-------------------------------+\n")); |
353 |
DEBUGF(IP_DEBUG, ("| %5d | %2d | %2d | (len, nexthdr, hoplim)\n", |
DEBUGF(IP_DEBUG, ("| %5u | %2u | %2u | (len, nexthdr, hoplim)\n", |
354 |
ntohs(iphdr->len), |
ntohs(iphdr->len), |
355 |
iphdr->nexthdr, |
iphdr->nexthdr, |
356 |
iphdr->hoplim)); |
iphdr->hoplim)); |