/[lwip]/lwip/src/core/udp.c
ViewVC logotype

Diff of /lwip/src/core/udp.c

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

revision 1.4 by jani, Wed Dec 18 10:40:01 2002 UTC revision 1.5 by jani, Wed Dec 18 12:49:02 2002 UTC
# Line 156  udp_input(struct pbuf *p, struct netif * Line 156  udp_input(struct pbuf *p, struct netif *
156    PERF_START;    PERF_START;
157        
158  #ifdef UDP_STATS  #ifdef UDP_STATS
159    ++stats.udp.recv;    ++lwip_stats.udp.recv;
160  #endif /* UDP_STATS */  #endif /* UDP_STATS */
161    
162    iphdr = p->payload;    iphdr = p->payload;
# Line 220  udp_input(struct pbuf *p, struct netif * Line 220  udp_input(struct pbuf *p, struct netif *
220                              IP_PROTO_UDPLITE, ntohs(udphdr->len)) != 0) {                              IP_PROTO_UDPLITE, ntohs(udphdr->len)) != 0) {
221          DEBUGF(UDP_DEBUG, ("udp_input: UDP Lite datagram discarded due to failing checksum\n"));          DEBUGF(UDP_DEBUG, ("udp_input: UDP Lite datagram discarded due to failing checksum\n"));
222  #ifdef UDP_STATS  #ifdef UDP_STATS
223          ++stats.udp.chkerr;          ++lwip_stats.udp.chkerr;
224          ++stats.udp.drop;          ++lwip_stats.udp.drop;
225  #endif /* UDP_STATS */  #endif /* UDP_STATS */
226  #if LWIP_SNMP > 0  #if LWIP_SNMP > 0
227      snmp_inc_udpinerrors();      snmp_inc_udpinerrors();
# Line 237  udp_input(struct pbuf *p, struct netif * Line 237  udp_input(struct pbuf *p, struct netif *
237            DEBUGF(UDP_DEBUG, ("udp_input: UDP datagram discarded due to failing checksum\n"));            DEBUGF(UDP_DEBUG, ("udp_input: UDP datagram discarded due to failing checksum\n"));
238                        
239  #ifdef UDP_STATS  #ifdef UDP_STATS
240            ++stats.udp.chkerr;            ++lwip_stats.udp.chkerr;
241            ++stats.udp.drop;            ++lwip_stats.udp.drop;
242  #endif /* UDP_STATS */  #endif /* UDP_STATS */
243  #if LWIP_SNMP > 0  #if LWIP_SNMP > 0
244      snmp_inc_udpinerrors();      snmp_inc_udpinerrors();
# Line 272  udp_input(struct pbuf *p, struct netif * Line 272  udp_input(struct pbuf *p, struct netif *
272          icmp_dest_unreach(p, ICMP_DUR_PORT);          icmp_dest_unreach(p, ICMP_DUR_PORT);
273        }        }
274  #ifdef UDP_STATS  #ifdef UDP_STATS
275        ++stats.udp.proterr;        ++lwip_stats.udp.proterr;
276        ++stats.udp.drop;        ++lwip_stats.udp.drop;
277  #endif /* UDP_STATS */  #endif /* UDP_STATS */
278  #if LWIP_SNMP > 0  #if LWIP_SNMP > 0
279      snmp_inc_udpnoports();      snmp_inc_udpnoports();
# Line 321  udp_send(struct udp_pcb *pcb, struct pbu Line 321  udp_send(struct udp_pcb *pcb, struct pbu
321    if((netif = ip_route(&(pcb->remote_ip))) == NULL) {    if((netif = ip_route(&(pcb->remote_ip))) == NULL) {
322      DEBUGF(UDP_DEBUG, ("udp_send: No route to 0x%lx\n", pcb->remote_ip.addr));      DEBUGF(UDP_DEBUG, ("udp_send: No route to 0x%lx\n", pcb->remote_ip.addr));
323  #ifdef UDP_STATS  #ifdef UDP_STATS
324      ++stats.udp.rterr;      ++lwip_stats.udp.rterr;
325  #endif /* UDP_STATS */  #endif /* UDP_STATS */
326      return ERR_RTE;      return ERR_RTE;
327    }    }
# Line 372  udp_send(struct udp_pcb *pcb, struct pbu Line 372  udp_send(struct udp_pcb *pcb, struct pbu
372    }    }
373        
374  #ifdef UDP_STATS  #ifdef UDP_STATS
375    ++stats.udp.xmit;    ++lwip_stats.udp.xmit;
376  #endif /* UDP_STATS */  #endif /* UDP_STATS */
377    return err;    return err;
378  }  }

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

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