summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-11-07 23:26:29 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-11-07 23:26:29 +0000
commit4bbf891c9446414a9a1641a70bc90d294115bd6f (patch)
treec06746c261c123ed9ca24ff0f4ebd1a8d0db02da
parentfae6085d5734cb000bcd6a40eb0b5bd369772d4f (diff)
downloadnuttx-4bbf891c9446414a9a1641a70bc90d294115bd6f.tar.gz
nuttx-4bbf891c9446414a9a1641a70bc90d294115bd6f.tar.bz2
nuttx-4bbf891c9446414a9a1641a70bc90d294115bd6f.zip
Remove uIP logging
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@377 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--nuttx/Documentation/NuttxPortingGuide.html3
-rw-r--r--nuttx/configs/README.txt1
-rw-r--r--nuttx/configs/c5471evm/defconfig2
-rw-r--r--nuttx/configs/m68332evb/defconfig2
-rw-r--r--nuttx/configs/mcu123-lpc214x/defconfig2
-rw-r--r--nuttx/configs/ntosd-dm320/defconfig4
-rw-r--r--nuttx/configs/ntosd-dm320/netconfig4
-rw-r--r--nuttx/configs/pjrc-8051/defconfig2
-rw-r--r--nuttx/configs/sim/defconfig2
-rw-r--r--nuttx/configs/sim/netconfig2
-rw-r--r--nuttx/examples/nettest/nettest.c13
-rw-r--r--nuttx/examples/uip/main.c9
-rw-r--r--nuttx/include/net/uip/uip.h8
-rw-r--r--nuttx/net/uip/uip-icmpinput.c4
-rw-r--r--nuttx/net/uip/uip-input.c16
-rw-r--r--nuttx/net/uip/uip-internal.h12
-rw-r--r--nuttx/net/uip/uip-tcpinput.c7
-rw-r--r--nuttx/net/uip/uip-udpinput.c4
18 files changed, 17 insertions, 80 deletions
diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html
index e97b6c69f..923f08e84 100644
--- a/nuttx/Documentation/NuttxPortingGuide.html
+++ b/nuttx/Documentation/NuttxPortingGuide.html
@@ -1365,9 +1365,6 @@ The system can be re-made subsequently by just typing <code>make</code>.
<code>CONFIG_NET_BUFFER_SIZE</code>: uIP buffer size
</li>
<li>
- <code>CONFIG_NET_LOGGING</code>: Logging on or off
- </li>
- <li>
<code>CONFIG_NET_UDP</code>: UDP support on or off
</li>
<li>
diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt
index 0a1b42310..cc8643068 100644
--- a/nuttx/configs/README.txt
+++ b/nuttx/configs/README.txt
@@ -218,7 +218,6 @@ defconfig -- This is a configuration file similar to the Linux
CONFIG_NET_SOCKOPTS - Enable or disable support for socket options
CONFIG_NET_BUFFER_SIZE - uIP buffer size
- CONFIG_NET_LOGGING - Logging on or off
CONFIG_NET_UDP - UDP support on or off
CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off
CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP
diff --git a/nuttx/configs/c5471evm/defconfig b/nuttx/configs/c5471evm/defconfig
index 86c8126ec..db582e93b 100644
--- a/nuttx/configs/c5471evm/defconfig
+++ b/nuttx/configs/c5471evm/defconfig
@@ -258,7 +258,6 @@ CONFIG_PREALLOC_TIMERS=8
# CONFIG_NET_MAX_LISTENPORTS - Maximum number of listening TCP ports (all tasks)
# CONFIG_NET_SOCKOPTS - Enable or disable support for socket options
# CONFIG_NET_BUFFER_SIZE - uIP buffer size
-# CONFIG_NET_LOGGING - Logging on or off
# CONFIG_NET_UDP - UDP support on or off
# CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off
# CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections
@@ -276,7 +275,6 @@ CONFIG_NET_MAX_CONNECTIONS=40
CONFIG_NET_MAX_LISTENPORTS=40
CONFIG_NET_SOCKOPTS=y
CONFIG_NET_BUFFER_SIZE=420
-CONFIG_NET_LOGGING=y
CONFIG_NET_UDP=n
CONFIG_NET_UDP_CHECKSUMS=y
#CONFIG_NET_UDP_CONNS=10
diff --git a/nuttx/configs/m68332evb/defconfig b/nuttx/configs/m68332evb/defconfig
index 4e6d22441..700bcbb0f 100644
--- a/nuttx/configs/m68332evb/defconfig
+++ b/nuttx/configs/m68332evb/defconfig
@@ -247,7 +247,6 @@ CONFIG_PREALLOC_TIMERS=8
# CONFIG_NET_MAX_LISTENPORTS - Maximum number of listening TCP ports (all tasks)
# CONFIG_NET_SOCKOPTS - Enable or disable support for socket options
# CONFIG_NET_BUFFER_SIZE - uIP buffer size
-# CONFIG_NET_LOGGING - Logging on or off
# CONFIG_NET_UDP - UDP support on or off
# CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off
# CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections
@@ -265,7 +264,6 @@ CONFIG_NET_MAX_CONNECTIONS=40
CONFIG_NET_MAX_LISTENPORTS=40
CONFIG_NET_SOCKOPTS=y
CONFIG_NET_BUFFER_SIZE=420
-CONFIG_NET_LOGGING=y
CONFIG_NET_UDP=n
CONFIG_NET_UDP_CHECKSUMS=y
#CONFIG_NET_UDP_CONNS=10
diff --git a/nuttx/configs/mcu123-lpc214x/defconfig b/nuttx/configs/mcu123-lpc214x/defconfig
index e9ac4317f..aa6352420 100644
--- a/nuttx/configs/mcu123-lpc214x/defconfig
+++ b/nuttx/configs/mcu123-lpc214x/defconfig
@@ -271,7 +271,6 @@ CONFIG_PREALLOC_TIMERS=8
# CONFIG_NET_MAX_LISTENPORTS - Maximum number of listening TCP ports (all tasks)
# CONFIG_NET_SOCKOPTS - Enable or disable support for socket options
# CONFIG_NET_BUFFER_SIZE - uIP buffer size
-# CONFIG_NET_LOGGING - Logging on or off
# CONFIG_NET_UDP - UDP support on or off
# CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off
# CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections
@@ -289,7 +288,6 @@ CONFIG_NET_MAX_CONNECTIONS=40
CONFIG_NET_MAX_LISTENPORTS=40
CONFIG_NET_SOCKOPTS=y
CONFIG_NET_BUFFER_SIZE=420
-CONFIG_NET_LOGGING=y
CONFIG_NET_UDP=n
CONFIG_NET_UDP_CHECKSUMS=y
#CONFIG_NET_UDP_CONNS=10
diff --git a/nuttx/configs/ntosd-dm320/defconfig b/nuttx/configs/ntosd-dm320/defconfig
index 23dd47692..0679f5dd8 100644
--- a/nuttx/configs/ntosd-dm320/defconfig
+++ b/nuttx/configs/ntosd-dm320/defconfig
@@ -256,7 +256,6 @@ CONFIG_PREALLOC_TIMERS=8
# CONFIG_NET_MAX_LISTENPORTS - Maximum number of listening TCP ports (all tasks)
# CONFIG_NET_SOCKOPTS - Enable or disable support for socket options
# CONFIG_NET_BUFFER_SIZE - uIP buffer size
-# CONFIG_NET_LOGGING - Logging on or off
# CONFIG_NET_UDP - UDP support on or off
# CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off
# CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections
@@ -274,7 +273,6 @@ CONFIG_NET_MAX_CONNECTIONS=40
CONFIG_NET_MAX_LISTENPORTS=40
CONFIG_NET_SOCKOPTS=y
CONFIG_NET_BUFFER_SIZE=420
-CONFIG_NET_LOGGING=y
CONFIG_NET_UDP=n
CONFIG_NET_UDP_CHECKSUMS=y
#CONFIG_NET_UDP_CONNS=10
@@ -304,7 +302,7 @@ CONFIG_EXAMPLE_NETTEST_CLIENTIP=(10<<24|0<<16|0<<8|1)
# DM90x0 Driver Settings
CONFIG_NET_DM90x0=n
CONFIG_DM9X_NINTERFACES=1
-CONFIG_DM9X_STATS=1
+CONFIG_DM9X_STATS=n
CONFIG_DM9X_BASE=0xd0000300
CONFIG_DM9X_IRQ=27
CONFIG_DM9X_BUSWIDTH8=n
diff --git a/nuttx/configs/ntosd-dm320/netconfig b/nuttx/configs/ntosd-dm320/netconfig
index 10cca587f..e77eb15ed 100644
--- a/nuttx/configs/ntosd-dm320/netconfig
+++ b/nuttx/configs/ntosd-dm320/netconfig
@@ -257,7 +257,6 @@ CONFIG_PREALLOC_TIMERS=8
# CONFIG_NET_MAX_LISTENPORTS - Maximum number of listening TCP ports (all tasks)
# CONFIG_NET_SOCKOPTS - Enable or disable support for socket options
# CONFIG_NET_BUFFER_SIZE - uIP buffer size
-# CONFIG_NET_LOGGING - Logging on or off
# CONFIG_NET_UDP - UDP support on or off
# CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off
# CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections
@@ -275,7 +274,6 @@ CONFIG_NET_MAX_CONNECTIONS=40
CONFIG_NET_MAX_LISTENPORTS=40
CONFIG_NET_SOCKOPTS=y
CONFIG_NET_BUFFER_SIZE=420
-CONFIG_NET_LOGGING=y
CONFIG_NET_UDP=y
CONFIG_NET_UDP_CHECKSUMS=y
#CONFIG_NET_UDP_CONNS=10
@@ -305,7 +303,7 @@ CONFIG_EXAMPLE_NETTEST_CLIENTIP=(10<<24|0<<16|0<<8|1)
# DM90x0 Driver Settings
CONFIG_NET_DM90x0=y
CONFIG_DM9X_NINTERFACES=1
-CONFIG_DM9X_STATS=1
+CONFIG_DM9X_STATS=n
CONFIG_DM9X_BASE=0xd0000300
CONFIG_DM9X_IRQ=27
CONFIG_DM9X_BUSWIDTH8=n
diff --git a/nuttx/configs/pjrc-8051/defconfig b/nuttx/configs/pjrc-8051/defconfig
index 437972266..61ad5c12c 100644
--- a/nuttx/configs/pjrc-8051/defconfig
+++ b/nuttx/configs/pjrc-8051/defconfig
@@ -244,7 +244,6 @@ CONFIG_PREALLOC_TIMERS=0
# CONFIG_NET_MAX_LISTENPORTS - Maximum number of listening TCP ports (all tasks)
# CONFIG_NET_SOCKOPTS - Enable or disable support for socket options
# CONFIG_NET_BUFFER_SIZE - uIP buffer size
-# CONFIG_NET_LOGGING - Logging on or off
# CONFIG_NET_UDP - UDP support on or off
# CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off
# CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections
@@ -262,7 +261,6 @@ CONFIG_NET_MAX_CONNECTIONS=40
CONFIG_NET_MAX_LISTENPORTS=40
CONFIG_NET_SOCKOPTS=y
CONFIG_NET_BUFFER_SIZE=420
-CONFIG_NET_LOGGING=y
CONFIG_NET_UDP=n
CONFIG_NET_UDP_CHECKSUMS=y
#CONFIG_NET_UDP_CONNS=10
diff --git a/nuttx/configs/sim/defconfig b/nuttx/configs/sim/defconfig
index 9bfe03c9d..ecb96f224 100644
--- a/nuttx/configs/sim/defconfig
+++ b/nuttx/configs/sim/defconfig
@@ -218,7 +218,6 @@ CONFIG_FS_FAT=y
# CONFIG_NET_MAX_LISTENPORTS - Maximum number of listening TCP ports (all tasks)
# CONFIG_NET_SOCKOPTS - Enable or disable support for socket options
# CONFIG_NET_BUFFER_SIZE - uIP buffer size
-# CONFIG_NET_LOGGING - Logging on or off
# CONFIG_NET_UDP - UDP support on or off
# CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off
# CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections
@@ -236,7 +235,6 @@ CONFIG_NET_MAX_CONNECTIONS=40
CONFIG_NET_MAX_LISTENPORTS=40
CONFIG_NET_SOCKOPTS=y
CONFIG_NET_BUFFER_SIZE=420
-CONFIG_NET_LOGGING=y
CONFIG_NET_UDP=n
CONFIG_NET_UDP_CHECKSUMS=y
#CONFIG_NET_UDP_CONNS=10
diff --git a/nuttx/configs/sim/netconfig b/nuttx/configs/sim/netconfig
index c7fb10aa2..5c4f09fbc 100644
--- a/nuttx/configs/sim/netconfig
+++ b/nuttx/configs/sim/netconfig
@@ -219,7 +219,6 @@ CONFIG_FS_FAT=y
# CONFIG_NET_MAX_LISTENPORTS - Maximum number of listening TCP ports (all tasks)
# CONFIG_NET_SOCKOPTS - Enable or disable support for socket options
# CONFIG_NET_BUFFER_SIZE - uIP buffer size
-# CONFIG_NET_LOGGING - Logging on or off
# CONFIG_NET_UDP - UDP support on or off
# CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off
# CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections
@@ -237,7 +236,6 @@ CONFIG_NET_MAX_CONNECTIONS=40
CONFIG_NET_MAX_LISTENPORTS=40
CONFIG_NET_SOCKOPTS=y
CONFIG_NET_BUFFER_SIZE=420
-CONFIG_NET_LOGGING=y
CONFIG_NET_UDP=y
CONFIG_NET_UDP_CHECKSUMS=y
#CONFIG_NET_UDP_CONNS=10
diff --git a/nuttx/examples/nettest/nettest.c b/nuttx/examples/nettest/nettest.c
index 9bcee01ff..c015696f1 100644
--- a/nuttx/examples/nettest/nettest.c
+++ b/nuttx/examples/nettest/nettest.c
@@ -102,16 +102,3 @@ int user_start(int argc, char *argv[])
return 0;
}
-
-/****************************************************************************
- * uip_log
- ****************************************************************************/
-
-void uip_log(char *m)
-{
- /* Since uip_log is called from interrupt handling logic, it cannot use
- * or other standard I/O. This should work from an interrupt handler:
- */
-
- lib_rawprintf("uIP log message: %s\n", m);
-}
diff --git a/nuttx/examples/uip/main.c b/nuttx/examples/uip/main.c
index eaac73a99..e78634a5a 100644
--- a/nuttx/examples/uip/main.c
+++ b/nuttx/examples/uip/main.c
@@ -208,15 +208,6 @@ int user_start(int argc, char *argv[])
return 0;
}
-void uip_log(char *m)
-{
- /* Since uip_log is called from interrupt handling logic, it cannot use
- * or other standard I/O. This should work from an interrupt handler:
- */
-
- lib_rawprintf("uIP log message: %s\n", m);
-}
-
#if defined(CONFIG_EXAMPLE_UIP_WEBCLIENT)
void webclient_closed(void)
{
diff --git a/nuttx/include/net/uip/uip.h b/nuttx/include/net/uip/uip.h
index 4a3afd324..15c72b22c 100644
--- a/nuttx/include/net/uip/uip.h
+++ b/nuttx/include/net/uip/uip.h
@@ -960,12 +960,4 @@ extern void uip_udpdisable(struct uip_udp_conn *conn);
(in_addr_t)(dest) = (in_addr_t)(src) & (in_addr_t)(mask); \
} while(0)
-/* Print out a uIP log message.
- *
- * This function must be implemented by the module that uses uIP, and
- * is called by uIP whenever a log message is generated.
- */
-
-extern void uip_log(char *msg);
-
#endif /* __NET_UIP_UIP_H */
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;
}
}