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

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

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

revision 1.2 by jani, Wed Dec 18 10:40:01 2002 UTC revision 1.3 by jani, Wed Dec 18 12:49:02 2002 UTC
# Line 53  icmp_input(struct pbuf *p, struct netif Line 53  icmp_input(struct pbuf *p, struct netif
53        
54    
55  #ifdef ICMP_STATS  #ifdef ICMP_STATS
56    ++stats.icmp.recv;    ++lwip_stats.icmp.recv;
57  #endif /* ICMP_STATS */  #endif /* ICMP_STATS */
58    
59    type = ((char *)p->payload)[0];    type = ((char *)p->payload)[0];
# Line 67  icmp_input(struct pbuf *p, struct netif Line 67  icmp_input(struct pbuf *p, struct netif
67    
68        pbuf_free(p);        pbuf_free(p);
69  #ifdef ICMP_STATS  #ifdef ICMP_STATS
70        ++stats.icmp.lenerr;        ++lwip_stats.icmp.lenerr;
71  #endif /* ICMP_STATS */  #endif /* ICMP_STATS */
72    
73        return;              return;      
# Line 78  icmp_input(struct pbuf *p, struct netif Line 78  icmp_input(struct pbuf *p, struct netif
78        DEBUGF(ICMP_DEBUG, ("icmp_input: checksum failed for received ICMP echo (%x)\n", inet_chksum_pseudo(p, &(iphdr->src), &(iphdr->dest), IP_PROTO_ICMP, p->tot_len)));        DEBUGF(ICMP_DEBUG, ("icmp_input: checksum failed for received ICMP echo (%x)\n", inet_chksum_pseudo(p, &(iphdr->src), &(iphdr->dest), IP_PROTO_ICMP, p->tot_len)));
79    
80  #ifdef ICMP_STATS  #ifdef ICMP_STATS
81        ++stats.icmp.chkerr;        ++lwip_stats.icmp.chkerr;
82  #endif /* ICMP_STATS */  #endif /* ICMP_STATS */
83      /*      return;*/      /*      return;*/
84      }      }
# Line 95  icmp_input(struct pbuf *p, struct netif Line 95  icmp_input(struct pbuf *p, struct netif
95      }      }
96      DEBUGF(ICMP_DEBUG, ("icmp_input: checksum failed for received ICMP echo (%x)\n", inet_chksum_pseudo(p, &(iphdr->src), &(iphdr->dest), IP_PROTO_ICMP, p->tot_len)));      DEBUGF(ICMP_DEBUG, ("icmp_input: checksum failed for received ICMP echo (%x)\n", inet_chksum_pseudo(p, &(iphdr->src), &(iphdr->dest), IP_PROTO_ICMP, p->tot_len)));
97  #ifdef ICMP_STATS  #ifdef ICMP_STATS
98      ++stats.icmp.xmit;      ++lwip_stats.icmp.xmit;
99  #endif /* ICMP_STATS */  #endif /* ICMP_STATS */
100    
101      /*    DEBUGF("icmp: p->len %d p->tot_len %d\n", p->len, p->tot_len);*/      /*    DEBUGF("icmp: p->len %d p->tot_len %d\n", p->len, p->tot_len);*/
# Line 106  icmp_input(struct pbuf *p, struct netif Line 106  icmp_input(struct pbuf *p, struct netif
106      DEBUGF(ICMP_DEBUG, ("icmp_input: ICMP type not supported.\n"));      DEBUGF(ICMP_DEBUG, ("icmp_input: ICMP type not supported.\n"));
107    
108  #ifdef ICMP_STATS  #ifdef ICMP_STATS
109      ++stats.icmp.proterr;      ++lwip_stats.icmp.proterr;
110      ++stats.icmp.drop;      ++lwip_stats.icmp.drop;
111  #endif /* ICMP_STATS */  #endif /* ICMP_STATS */
112    }    }
113    
# Line 136  icmp_dest_unreach(struct pbuf *p, enum i Line 136  icmp_dest_unreach(struct pbuf *p, enum i
136    idur->chksum = 0;    idur->chksum = 0;
137    idur->chksum = inet_chksum(idur, q->len);    idur->chksum = inet_chksum(idur, q->len);
138  #ifdef ICMP_STATS  #ifdef ICMP_STATS
139    ++stats.icmp.xmit;    ++lwip_stats.icmp.xmit;
140  #endif /* ICMP_STATS */  #endif /* ICMP_STATS */
141    
142    ip_output(q, NULL,    ip_output(q, NULL,
# Line 168  icmp_time_exceeded(struct pbuf *p, enum Line 168  icmp_time_exceeded(struct pbuf *p, enum
168    tehdr->chksum = 0;    tehdr->chksum = 0;
169    tehdr->chksum = inet_chksum(tehdr, q->len);    tehdr->chksum = inet_chksum(tehdr, q->len);
170  #ifdef ICMP_STATS  #ifdef ICMP_STATS
171    ++stats.icmp.xmit;    ++lwip_stats.icmp.xmit;
172  #endif /* ICMP_STATS */  #endif /* ICMP_STATS */
173    ip_output(q, NULL,    ip_output(q, NULL,
174              (struct ip_addr *)&(iphdr->src), ICMP_TTL, IP_PROTO_ICMP);              (struct ip_addr *)&(iphdr->src), ICMP_TTL, IP_PROTO_ICMP);

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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