diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-11-06 16:17:50 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-11-06 16:17:50 +0000 |
commit | 4fc87116d818f5285403dbb37d2aa60d33e4203a (patch) | |
tree | 8e2327f902c41cf79ffab0997a6754d8e78b012a /nuttx/net/uip/uip-arp.c | |
parent | 13a1d731ec51a27983bc9e6fcaa841607a090764 (diff) | |
download | px4-nuttx-4fc87116d818f5285403dbb37d2aa60d33e4203a.tar.gz px4-nuttx-4fc87116d818f5285403dbb37d2aa60d33e4203a.tar.bz2 px4-nuttx-4fc87116d818f5285403dbb37d2aa60d33e4203a.zip |
Reduce debug output; calibrate DM320 timer
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@372 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/net/uip/uip-arp.c')
-rw-r--r-- | nuttx/net/uip/uip-arp.c | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/nuttx/net/uip/uip-arp.c b/nuttx/net/uip/uip-arp.c index fa64f9876..13dd1ba03 100644 --- a/nuttx/net/uip/uip-arp.c +++ b/nuttx/net/uip/uip-arp.c @@ -137,23 +137,23 @@ static uint8 g_arptime; * Private Functions ****************************************************************************/ -#ifdef CONFIG_DEBUG_VERBOSE +#if defined(CONFIG_NET_DUMPARP) && defined(CONFIG_DEBUG) static void uip_arp_dump(struct arp_hdr *arp) { - vdbg(" HW type: %04x Protocol: %04x\n", - arp->ah_hwtype, arp->ah_protocol);\ - vdbg(" HW len: %02x Proto len: %02x Operation: %04x\n", - arp->ah_hwlen, arp->ah_protolen, arp->ah_opcode); - vdbg(" Sender MAC: %02x:%02x:%02x:%02x:%02x:%02x IP: %d.%d.%d.%d\n", - arp->ah_shwaddr[0], arp->ah_shwaddr[1], arp->ah_shwaddr[2], - arp->ah_shwaddr[3], arp->ah_shwaddr[4], arp->ah_shwaddr[5], - arp->ah_sipaddr[0] & 0xff, arp->ah_sipaddr[0] >> 8, - arp->ah_sipaddr[1] & 0xff, arp->ah_sipaddr[1] >> 8); - vdbg(" Dest MAC: %02x:%02x:%02x:%02x:%02x:%02x IP: %d.%d.%d.%d\n", - arp->ah_dhwaddr[0], arp->ah_dhwaddr[1], arp->ah_dhwaddr[2], - arp->ah_dhwaddr[3], arp->ah_dhwaddr[4], arp->ah_dhwaddr[5], - arp->ah_dipaddr[0] & 0xff, arp->ah_dipaddr[0] >> 8, - arp->ah_dipaddr[1] & 0xff, arp->ah_dipaddr[1] >> 8); + dbg(" HW type: %04x Protocol: %04x\n", + arp->ah_hwtype, arp->ah_protocol);\ + dbg(" HW len: %02x Proto len: %02x Operation: %04x\n", + arp->ah_hwlen, arp->ah_protolen, arp->ah_opcode); + dbg(" Sender MAC: %02x:%02x:%02x:%02x:%02x:%02x IP: %d.%d.%d.%d\n", + arp->ah_shwaddr[0], arp->ah_shwaddr[1], arp->ah_shwaddr[2], + arp->ah_shwaddr[3], arp->ah_shwaddr[4], arp->ah_shwaddr[5], + arp->ah_sipaddr[0] & 0xff, arp->ah_sipaddr[0] >> 8, + arp->ah_sipaddr[1] & 0xff, arp->ah_sipaddr[1] >> 8); + dbg(" Dest MAC: %02x:%02x:%02x:%02x:%02x:%02x IP: %d.%d.%d.%d\n", + arp->ah_dhwaddr[0], arp->ah_dhwaddr[1], arp->ah_dhwaddr[2], + arp->ah_dhwaddr[3], arp->ah_dhwaddr[4], arp->ah_dhwaddr[5], + arp->ah_dipaddr[0] & 0xff, arp->ah_dipaddr[0] >> 8, + arp->ah_dipaddr[1] & 0xff, arp->ah_dipaddr[1] >> 8); } #else # define uip_arp_dump(arp) @@ -449,12 +449,6 @@ void uip_arp_out(struct uip_driver_s *dev) uip_ipaddr_copy(ipaddr, destipaddr); } - vdbg("Dest IP addr: %d.%d.%d.%d -> ARP IP addr: %d.%d.%d.%d\n", - (destipaddr >> 24) & 0xff, (destipaddr >> 16) & 0xff, - (destipaddr >> 8) & 0xff, destipaddr & 0xff, - (ipaddr >> 24) & 0xff, (ipaddr >> 16) & 0xff, - (ipaddr >> 8) & 0xff, ipaddr & 0xff); - /* Check if we already have this destination address in the ARP table */ for (i = 0; i < UIP_ARPTAB_SIZE; ++i) @@ -462,7 +456,6 @@ void uip_arp_out(struct uip_driver_s *dev) tabptr = &arp_table[i]; if (uip_ipaddr_cmp(ipaddr, tabptr->at_ipaddr)) { - vdbg("Dest IP found in ARP table\n"); break; } } |