Debugging added, whitespace removed
This commit is contained in:
parent
1ab044e319
commit
4328947d26
@ -54,7 +54,7 @@
|
|||||||
*
|
*
|
||||||
* This file is part of the uIP TCP/IP stack.
|
* This file is part of the uIP TCP/IP stack.
|
||||||
*
|
*
|
||||||
* $Id: uip_arp.c,v 1.2 2006/08/09 16:13:40 bg- Exp $
|
* $Id: uip_arp.c,v 1.3 2007/03/21 23:19:52 adamdunkels Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -114,6 +114,15 @@ static u8_t tmpage;
|
|||||||
|
|
||||||
#define BUF ((struct arp_hdr *)&uip_buf[0])
|
#define BUF ((struct arp_hdr *)&uip_buf[0])
|
||||||
#define IPBUF ((struct ethip_hdr *)&uip_buf[0])
|
#define IPBUF ((struct ethip_hdr *)&uip_buf[0])
|
||||||
|
|
||||||
|
#define DEBUG 0
|
||||||
|
#if DEBUG
|
||||||
|
#include <stdio.h>
|
||||||
|
#define PRINTF(...) printf(__VA_ARGS__)
|
||||||
|
#else
|
||||||
|
#define PRINTF(...)
|
||||||
|
#endif
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------------*/
|
||||||
/**
|
/**
|
||||||
* Initialize the ARP module.
|
* Initialize the ARP module.
|
||||||
@ -286,6 +295,11 @@ uip_arp_arpin(void)
|
|||||||
reply. */
|
reply. */
|
||||||
/* if(BUF->dipaddr[0] == uip_hostaddr[0] &&
|
/* if(BUF->dipaddr[0] == uip_hostaddr[0] &&
|
||||||
BUF->dipaddr[1] == uip_hostaddr[1]) {*/
|
BUF->dipaddr[1] == uip_hostaddr[1]) {*/
|
||||||
|
PRINTF("uip_arp_arpin: request for %d.%d.%d.%d (we are %d.%d.%d.%d)\n",
|
||||||
|
BUF->dipaddr.u8[0], BUF->dipaddr.u8[1],
|
||||||
|
BUF->dipaddr.u8[2], BUF->dipaddr.u8[3],
|
||||||
|
uip_hostaddr.u8[0], uip_hostaddr.u8[1],
|
||||||
|
uip_hostaddr.u8[2], uip_hostaddr.u8[3]);
|
||||||
if(uip_ipaddr_cmp(&BUF->dipaddr, &uip_hostaddr)) {
|
if(uip_ipaddr_cmp(&BUF->dipaddr, &uip_hostaddr)) {
|
||||||
/* First, we register the one who made the request in our ARP
|
/* First, we register the one who made the request in our ARP
|
||||||
table, since it is likely that we will do more communication
|
table, since it is likely that we will do more communication
|
||||||
|
Loading…
Reference in New Issue
Block a user