diff options
Diffstat (limited to 'nuttx/net/uip')
-rw-r--r-- | nuttx/net/uip/uip-icmpinput.c | 4 | ||||
-rw-r--r-- | nuttx/net/uip/uip-input.c | 16 | ||||
-rw-r--r-- | nuttx/net/uip/uip-internal.h | 12 | ||||
-rw-r--r-- | nuttx/net/uip/uip-tcpinput.c | 7 | ||||
-rw-r--r-- | nuttx/net/uip/uip-udpinput.c | 4 |
5 files changed, 15 insertions, 28 deletions
diff --git a/nuttx/net/uip/uip-icmpinput.c b/nuttx/net/uip/uip-icmpinput.c index c3d30dd4e..b6eace772 100644 --- a/nuttx/net/uip/uip-icmpinput.c +++ b/nuttx/net/uip/uip-icmpinput.c @@ -110,7 +110,7 @@ void uip_icmpinput(struct uip_driver_s *dev) if (ICMPBUF->type != ICMP_ECHO) { - uip_log("icmp: not ICMP echo."); + dbg("Unknown ICMP cmd: %d\n", ICMPBUF->type); goto typeerr; } @@ -213,7 +213,7 @@ typeerr: } else { - uip_log("icmp: unknown ICMP6 message."); + dbg("Unknown ICMP6 cmd: %d\n", ICMPBUF->type); goto typeerr; } diff --git a/nuttx/net/uip/uip-input.c b/nuttx/net/uip/uip-input.c index 660927d38..1c3de79e6 100644 --- a/nuttx/net/uip/uip-input.c +++ b/nuttx/net/uip/uip-input.c @@ -316,7 +316,7 @@ void uip_input(struct uip_driver_s *dev) uip_stat.ip.drop++; uip_stat.ip.vhlerr++; #endif - uip_log("ipv6: invalid version."); + dbg("Invalid IPv6 version: %d\n", BUF->vtc >> 4); goto drop; } #else /* CONFIG_NET_IPv6 */ @@ -330,7 +330,7 @@ void uip_input(struct uip_driver_s *dev) uip_stat.ip.drop++; uip_stat.ip.vhlerr++; #endif - uip_log("ip: invalid version or header length."); + dbg("Invalid IP version or header length: %02x\n", BUF->vhl); goto drop; } #endif /* CONFIG_NET_IPv6 */ @@ -359,7 +359,7 @@ void uip_input(struct uip_driver_s *dev) } else { - uip_log("ip: packet shorter than reported in IP header."); + dbg("IP packet shorter than length in IP header\n"); goto drop; } @@ -379,7 +379,7 @@ void uip_input(struct uip_driver_s *dev) uip_stat.ip.drop++; uip_stat.ip.fragerr++; #endif - uip_log("ip: fragment dropped."); + dbg("IP fragment dropped\n"); goto drop; #endif /* UIP_REASSEMBLY */ } @@ -395,14 +395,14 @@ void uip_input(struct uip_driver_s *dev) #if UIP_PINGADDRCONF && !CONFIG_NET_IPv6 if (BUF->proto == UIP_PROTO_ICMP) { - uip_log("ip: possible ping config packet received."); + dbg("Possible ping config packet received\n"); uip_icmpinput(dev); goto done; } else #endif /* UIP_PINGADDRCONF */ { - uip_log("ip: packet dropped since no address assigned."); + dbg("No IP address assigned\n"); goto drop; } } @@ -457,7 +457,7 @@ void uip_input(struct uip_driver_s *dev) uip_stat.ip.drop++; uip_stat.ip.chkerr++; #endif - uip_log("ip: bad checksum."); + dbg("Bad IP checksum\n"); goto drop; } #endif /* CONFIG_NET_IPv6 */ @@ -494,7 +494,7 @@ void uip_input(struct uip_driver_s *dev) uip_stat.ip.protoerr++; #endif - uip_log("ip: Unrecognized IP protocol."); + dbg("Unrecognized IP protocol\n"); goto drop; } diff --git a/nuttx/net/uip/uip-internal.h b/nuttx/net/uip/uip-internal.h index c463d6ae0..4d7309f29 100644 --- a/nuttx/net/uip/uip-internal.h +++ b/nuttx/net/uip/uip-internal.h @@ -192,18 +192,6 @@ EXTERN void uip_udpcallback(struct uip_driver_s *dev); EXTERN void uip_icmpinput(struct uip_driver_s *dev); -/* UIP logging **************************************************************/ - -/* This function must be provided by the application if CONFIG_NET_LOGGING - * is defined. - */ - -#ifdef CONFIG_NET_LOGGING -EXTERN void uip_log(char *msg); -#else -# define uip_log(m) -#endif - #undef EXTERN #ifdef __cplusplus } diff --git a/nuttx/net/uip/uip-tcpinput.c b/nuttx/net/uip/uip-tcpinput.c index b8a225dbc..71cd54d9e 100644 --- a/nuttx/net/uip/uip-tcpinput.c +++ b/nuttx/net/uip/uip-tcpinput.c @@ -115,7 +115,7 @@ void uip_tcpinput(struct uip_driver_s *dev) uip_stat.tcp.drop++; uip_stat.tcp.chkerr++; #endif - uip_log("tcp: bad checksum."); + dbg("Bad TCP checksum\n"); goto drop; } @@ -179,7 +179,7 @@ void uip_tcpinput(struct uip_driver_s *dev) #ifdef CONFIG_NET_STATISTICS uip_stat.tcp.syndrop++; #endif - uip_log("tcp: found no unused connections."); + dbg("No free TCP connections\n"); goto drop; } @@ -276,8 +276,7 @@ found: if (BUF->flags & TCP_RST) { uip_connr->tcpstateflags = UIP_CLOSED; - vdbg("TCP state: UIP_CLOSED\n"); - uip_log("tcp: got reset, aborting connection."); + dbg("Recvd reset - TCP state: UIP_CLOSED\n"); uip_flags = UIP_ABORT; uip_tcpcallback(dev); diff --git a/nuttx/net/uip/uip-udpinput.c b/nuttx/net/uip/uip-udpinput.c index d3b1aa2d8..6bd347355 100644 --- a/nuttx/net/uip/uip-udpinput.c +++ b/nuttx/net/uip/uip-udpinput.c @@ -109,7 +109,7 @@ void uip_udpinput(struct uip_driver_s *dev) uip_stat.udp.drop++; uip_stat.udp.chkerr++; #endif - uip_log("udp: bad checksum."); + dbg("Bad UDP checksum\n"); dev->d_len = 0; } else @@ -145,7 +145,7 @@ void uip_udpinput(struct uip_driver_s *dev) } else { - uip_log("udp: no matching connection found"); + dbg("No listener on UDP port\n"); dev->d_len = 0; } } |