diff options
author | Joe Hershberger | 2012-05-23 08:01:04 +0000 |
---|---|---|
committer | Joe Hershberger | 2012-05-23 17:53:08 -0500 |
commit | 4ef8d53caadbab5585ccb4df2d087183b1383b86 (patch) | |
tree | 5e4aeca8a2c86a983f08d573405594c68691db7e /net/ping.c | |
parent | c697576262be11ddab48e1890428495e2fef1751 (diff) |
net: Allow filtering on debug traces in the net subsystem
Add several levels of DEBUG prints so that you can limit the noise to
the severety of your problem.
DEBUG_LL_STATE = Link local state machine changes
DEBUG_DEV_PKT = Packets or info directed to the device
DEBUG_NET_PKT = Packets on info on the network at large
DEBUG_INT_STATE = Internal network state changes
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'net/ping.c')
-rw-r--r-- | net/ping.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ping.c b/net/ping.c index 2ba9f76e5a5..0710b9228d1 100644 --- a/net/ping.c +++ b/net/ping.c @@ -45,7 +45,7 @@ static int ping_send(void) /* XXX always send arp request */ - debug("sending ARP for %pI4\n", &NetPingIP); + debug_cond(DEBUG_DEV_PKT, "sending ARP for %pI4\n", &NetPingIP); NetArpWaitPacketIP = NetPingIP; @@ -93,7 +93,7 @@ void ping_receive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len) case ICMP_ECHO_REQUEST: eth_hdr_size = net_update_ether(et, et->et_src, PROT_IP); - debug("Got ICMP ECHO REQUEST, return " + debug_cond(DEBUG_DEV_PKT, "Got ICMP ECHO REQUEST, return " "%d bytes\n", eth_hdr_size + len); ip->ip_sum = 0; |