Name fix on uip_all_zeroes_addr
This commit is contained in:
parent
d407fe2e9f
commit
2187212703
2 changed files with 9 additions and 13 deletions
|
@ -46,7 +46,7 @@
|
|||
*
|
||||
* This file is part of the uIP TCP/IP stack.
|
||||
*
|
||||
* $Id: uip.h,v 1.14 2008/01/24 23:08:58 adamdunkels Exp $
|
||||
* $Id: uip.h,v 1.15 2008/02/07 01:35:00 adamdunkels Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -62,14 +62,13 @@
|
|||
typedef union uip_ip4addr_t {
|
||||
u8_t u8[4]; /* Initializer, must come first!!! */
|
||||
u16_t u16[2];
|
||||
#if 0
|
||||
u32_t u32;
|
||||
#endif
|
||||
u32_t u32[1];
|
||||
} uip_ip4addr_t;
|
||||
|
||||
typedef union uip_ip6addr_t {
|
||||
u8_t u8[16]; /* Initializer, must come first!!! */
|
||||
u16_t u16[8];
|
||||
u32_t u32[4];
|
||||
} uip_ip6addr_t;
|
||||
|
||||
#if UIP_CONF_IPV6
|
||||
|
@ -1584,7 +1583,7 @@ CCIF extern const uip_ipaddr_t uip_hostaddr, uip_netmask, uip_draddr;
|
|||
CCIF extern uip_ipaddr_t uip_hostaddr, uip_netmask, uip_draddr;
|
||||
#endif /* UIP_FIXEDADDR */
|
||||
CCIF extern const uip_ipaddr_t uip_broadcast_addr;
|
||||
CCIF extern const uip_ipaddr_t all_zeroes_addr;
|
||||
CCIF extern const uip_ipaddr_t uip_all_zeroes_addr;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
*
|
||||
* This file is part of the uIP TCP/IP stack.
|
||||
*
|
||||
* $Id: uip_arp.c,v 1.4 2007/08/30 14:39:17 matsutsuka Exp $
|
||||
* $Id: uip_arp.c,v 1.5 2008/02/07 01:35:00 adamdunkels Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -154,7 +154,7 @@ uip_arp_timer(void)
|
|||
++arptime;
|
||||
for(i = 0; i < UIP_ARPTAB_SIZE; ++i) {
|
||||
tabptr = &arp_table[i];
|
||||
if(uip_ipaddr_cmp(&tabptr->ipaddr, &all_zeroes_addr) &&
|
||||
if(uip_ipaddr_cmp(&tabptr->ipaddr, &uip_all_zeroes_addr) &&
|
||||
arptime - tabptr->time >= UIP_ARP_MAXAGE) {
|
||||
memset(&tabptr->ipaddr, 0, 4);
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ uip_arp_update(uip_ipaddr_t *ipaddr, struct uip_eth_addr *ethaddr)
|
|||
|
||||
tabptr = &arp_table[i];
|
||||
/* Only check those entries that are actually in use. */
|
||||
if(!uip_ipaddr_cmp(&tabptr->ipaddr, &all_zeroes_addr)) {
|
||||
if(!uip_ipaddr_cmp(&tabptr->ipaddr, &uip_all_zeroes_addr)) {
|
||||
|
||||
/* Check if the source IP address of the incoming packet matches
|
||||
the IP address in this ARP table entry. */
|
||||
|
@ -194,7 +194,7 @@ uip_arp_update(uip_ipaddr_t *ipaddr, struct uip_eth_addr *ethaddr)
|
|||
/* First, we try to find an unused entry in the ARP table. */
|
||||
for(i = 0; i < UIP_ARPTAB_SIZE; ++i) {
|
||||
tabptr = &arp_table[i];
|
||||
if(uip_ipaddr_cmp(&tabptr->ipaddr, &all_zeroes_addr)) {
|
||||
if(uip_ipaddr_cmp(&tabptr->ipaddr, &uip_all_zeroes_addr)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -306,8 +306,7 @@ uip_arp_arpin(void)
|
|||
with this host in the future. */
|
||||
uip_arp_update(&BUF->sipaddr, &BUF->shwaddr);
|
||||
|
||||
/* The reply opcode is 2. */
|
||||
BUF->opcode = HTONS(2);
|
||||
BUF->opcode = HTONS(ARP_REPLY);
|
||||
|
||||
memcpy(BUF->dhwaddr.addr, BUF->shwaddr.addr, 6);
|
||||
memcpy(BUF->shwaddr.addr, uip_ethaddr.addr, 6);
|
||||
|
@ -324,8 +323,6 @@ uip_arp_arpin(void)
|
|||
case HTONS(ARP_REPLY):
|
||||
/* ARP reply. We insert or update the ARP table if it was meant
|
||||
for us. */
|
||||
/* if(BUF->dipaddr[0] == uip_hostaddr[0] &&
|
||||
BUF->dipaddr[1] == uip_hostaddr[1]) {*/
|
||||
if(uip_ipaddr_cmp(&BUF->dipaddr, &uip_hostaddr)) {
|
||||
uip_arp_update(&BUF->sipaddr, &BUF->shwaddr);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue