/[lwip]/lwip/src/core/ipv6/ip6.c
ViewVC logotype

Diff of /lwip/src/core/ipv6/ip6.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by likewise, Thu Nov 25 13:33:07 2004 UTC revision 1.14 by christiaans, Fri Nov 25 12:03:39 2005 UTC
# Line 217  ip_input(struct pbuf *p, struct netif *i Line 217  ip_input(struct pbuf *p, struct netif *i
217  #if IP_DEBUG  #if IP_DEBUG
218    /*  LWIP_DEBUGF("ip_input: \n");    /*  LWIP_DEBUGF("ip_input: \n");
219    ip_debug_print(p);    ip_debug_print(p);
220    LWIP_DEBUGF("ip_input: p->len %u p->tot_len %u\n", p->len, p->tot_len);*/    LWIP_DEBUGF("ip_input: p->len %"U16_F" p->tot_len %"U16_F"\n", p->len, p->tot_len);*/
221  #endif /* IP_DEBUG */  #endif /* IP_DEBUG */
222    
223    
# Line 237  ip_input(struct pbuf *p, struct netif *i Line 237  ip_input(struct pbuf *p, struct netif *i
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      LWIP_DEBUGF(IP_DEBUG, ("Unsupported transport protocol %u\n",      LWIP_DEBUGF(IP_DEBUG, ("Unsupported transport protocol %"U16_F"\n",
241            iphdr->nexthdr));            iphdr->nexthdr));
242    
243  #ifdef IP_STATS  #ifdef IP_STATS
# Line 266  ip_output_if (struct pbuf *p, struct ip_ Line 266  ip_output_if (struct pbuf *p, struct ip_
266    
267    PERF_START;    PERF_START;
268    
269    printf("len %u tot_len %u\n", p->len, p->tot_len);    printf("len %"U16_F" tot_len %"U16_F"\n", p->len, p->tot_len);
270    if (pbuf_header(p, IP_HLEN)) {    if (pbuf_header(p, IP_HLEN)) {
271      LWIP_DEBUGF(IP_DEBUG, ("ip_output: not enough room for IP header in pbuf\n"));      LWIP_DEBUGF(IP_DEBUG, ("ip_output: not enough room for IP header in pbuf\n"));
272  #ifdef IP_STATS  #ifdef IP_STATS
# Line 275  ip_output_if (struct pbuf *p, struct ip_ Line 275  ip_output_if (struct pbuf *p, struct ip_
275    
276      return ERR_BUF;      return ERR_BUF;
277    }    }
278    printf("len %u tot_len %u\n", p->len, p->tot_len);    printf("len %"U16_F" tot_len %"U16_F"\n", p->len, p->tot_len);
279    
280    iphdr = p->payload;    iphdr = p->payload;
281    
# Line 303  ip_output_if (struct pbuf *p, struct ip_ Line 303  ip_output_if (struct pbuf *p, struct ip_
303    ++lwip_stats.ip.xmit;    ++lwip_stats.ip.xmit;
304  #endif /* IP_STATS */  #endif /* IP_STATS */
305    
306    LWIP_DEBUGF(IP_DEBUG, ("ip_output_if: %c%c (len %u)\n", netif->name[0], netif->name[1], p->tot_len));    LWIP_DEBUGF(IP_DEBUG, ("ip_output_if: %c%c (len %"U16_F")\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 */
# Line 324  ip_output(struct pbuf *p, struct ip_addr Line 324  ip_output(struct pbuf *p, struct ip_addr
324  {  {
325    struct netif *netif;    struct netif *netif;
326    if ((netif = ip_route(dest)) == NULL) {    if ((netif = ip_route(dest)) == NULL) {
327      LWIP_DEBUGF(IP_DEBUG, ("ip_output: No route to 0x%lx\n", dest->addr));      LWIP_DEBUGF(IP_DEBUG, ("ip_output: No route to 0x%"X32_F"\n", dest->addr));
328  #ifdef IP_STATS  #ifdef IP_STATS
329      ++lwip_stats.ip.rterr;      ++lwip_stats.ip.rterr;
330  #endif /* IP_STATS */  #endif /* IP_STATS */
# Line 339  void Line 339  void
339  ip_debug_print(struct pbuf *p)  ip_debug_print(struct pbuf *p)
340  {  {
341    struct ip_hdr *iphdr = p->payload;    struct ip_hdr *iphdr = p->payload;
342    char *payload;    u8_t *payload;
343    
344    payload = (char *)iphdr + IP_HLEN;    payload = (u8_t *)iphdr + IP_HLEN;
345    
346    LWIP_DEBUGF(IP_DEBUG, ("IP header:\n"));    LWIP_DEBUGF(IP_DEBUG, ("IP header:\n"));
347    LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));    LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));
348    LWIP_DEBUGF(IP_DEBUG, ("|%2d |  %x%x  |      %x%x           | (v, traffic class, flow label)\n",    LWIP_DEBUGF(IP_DEBUG, ("|%2"S16_F" |  %"X16_F"%"X16_F"  |      %"X16_F"%"X16_F"           | (v, traffic class, flow label)\n",
349          iphdr->v,          iphdr->v,
350          iphdr->tclass1, iphdr->tclass2,          iphdr->tclass1, iphdr->tclass2,
351          iphdr->flow1, iphdr->flow2));          iphdr->flow1, iphdr->flow2));
352    LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));    LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));
353    LWIP_DEBUGF(IP_DEBUG, ("|    %5u      | %2u  |  %2u   | (len, nexthdr, hoplim)\n",    LWIP_DEBUGF(IP_DEBUG, ("|    %5"U16_F"      | %2"U16_F"  |  %2"U16_F"   | (len, nexthdr, hoplim)\n",
354          ntohs(iphdr->len),          ntohs(iphdr->len),
355          iphdr->nexthdr,          iphdr->nexthdr,
356          iphdr->hoplim));          iphdr->hoplim));
357    LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));    LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));
358    LWIP_DEBUGF(IP_DEBUG, ("|       %4lx      |       %4lx     | (src)\n",    LWIP_DEBUGF(IP_DEBUG, ("|       %4"X32_F"      |       %4"X32_F"     | (src)\n",
359          ntohl(iphdr->src.addr[0]) >> 16 & 0xffff,          ntohl(iphdr->src.addr[0]) >> 16 & 0xffff,
360          ntohl(iphdr->src.addr[0]) & 0xffff));          ntohl(iphdr->src.addr[0]) & 0xffff));
361    LWIP_DEBUGF(IP_DEBUG, ("|       %4lx      |       %4lx     | (src)\n",    LWIP_DEBUGF(IP_DEBUG, ("|       %4"X32_F"      |       %4"X32_F"     | (src)\n",
362          ntohl(iphdr->src.addr[1]) >> 16 & 0xffff,          ntohl(iphdr->src.addr[1]) >> 16 & 0xffff,
363          ntohl(iphdr->src.addr[1]) & 0xffff));          ntohl(iphdr->src.addr[1]) & 0xffff));
364    LWIP_DEBUGF(IP_DEBUG, ("|       %4lx      |       %4lx     | (src)\n",    LWIP_DEBUGF(IP_DEBUG, ("|       %4"X32_F"      |       %4"X32_F"     | (src)\n",
365          ntohl(iphdr->src.addr[2]) >> 16 & 0xffff,          ntohl(iphdr->src.addr[2]) >> 16 & 0xffff,
366          ntohl(iphdr->src.addr[2]) & 0xffff));          ntohl(iphdr->src.addr[2]) & 0xffff));
367    LWIP_DEBUGF(IP_DEBUG, ("|       %4lx      |       %4lx     | (src)\n",    LWIP_DEBUGF(IP_DEBUG, ("|       %4"X32_F"      |       %4"X32_F"     | (src)\n",
368          ntohl(iphdr->src.addr[3]) >> 16 & 0xffff,          ntohl(iphdr->src.addr[3]) >> 16 & 0xffff,
369          ntohl(iphdr->src.addr[3]) & 0xffff));          ntohl(iphdr->src.addr[3]) & 0xffff));
370    LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));    LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));
371    LWIP_DEBUGF(IP_DEBUG, ("|       %4lx      |       %4lx     | (dest)\n",    LWIP_DEBUGF(IP_DEBUG, ("|       %4"X32_F"      |       %4"X32_F"     | (dest)\n",
372          ntohl(iphdr->dest.addr[0]) >> 16 & 0xffff,          ntohl(iphdr->dest.addr[0]) >> 16 & 0xffff,
373          ntohl(iphdr->dest.addr[0]) & 0xffff));          ntohl(iphdr->dest.addr[0]) & 0xffff));
374    LWIP_DEBUGF(IP_DEBUG, ("|       %4lx      |       %4lx     | (dest)\n",    LWIP_DEBUGF(IP_DEBUG, ("|       %4"X32_F"      |       %4"X32_F"     | (dest)\n",
375          ntohl(iphdr->dest.addr[1]) >> 16 & 0xffff,          ntohl(iphdr->dest.addr[1]) >> 16 & 0xffff,
376          ntohl(iphdr->dest.addr[1]) & 0xffff));          ntohl(iphdr->dest.addr[1]) & 0xffff));
377    LWIP_DEBUGF(IP_DEBUG, ("|       %4lx      |       %4lx     | (dest)\n",    LWIP_DEBUGF(IP_DEBUG, ("|       %4"X32_F"      |       %4"X32_F"     | (dest)\n",
378          ntohl(iphdr->dest.addr[2]) >> 16 & 0xffff,          ntohl(iphdr->dest.addr[2]) >> 16 & 0xffff,
379          ntohl(iphdr->dest.addr[2]) & 0xffff));          ntohl(iphdr->dest.addr[2]) & 0xffff));
380    LWIP_DEBUGF(IP_DEBUG, ("|       %4lx      |       %4lx     | (dest)\n",    LWIP_DEBUGF(IP_DEBUG, ("|       %4"X32_F"      |       %4"X32_F"     | (dest)\n",
381          ntohl(iphdr->dest.addr[3]) >> 16 & 0xffff,          ntohl(iphdr->dest.addr[3]) >> 16 & 0xffff,
382          ntohl(iphdr->dest.addr[3]) & 0xffff));          ntohl(iphdr->dest.addr[3]) & 0xffff));
383    LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));    LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26