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; |
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(); |
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(); |
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(); |
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 |
} |
} |
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 |
} |
} |