diff options
Diffstat (limited to 'nuttx/net/arp/arp_out.c')
-rw-r--r-- | nuttx/net/arp/arp_out.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/nuttx/net/arp/arp_out.c b/nuttx/net/arp/arp_out.c index 6b5b038c7..b5d5af755 100644 --- a/nuttx/net/arp/arp_out.c +++ b/nuttx/net/arp/arp_out.c @@ -92,7 +92,7 @@ static const uint16_t g_broadcast_ipaddr[2] = {0xffff, 0xffff}; * The following is the first three octects of the IGMP address: */ -#if defined(CONFIG_NET_IGMP) && !defined(CONFIG_NET_IPv6) +#ifdef CONFIG_NET_IGMP static const uint8_t g_multicast_ethaddr[3] = {0x01, 0x00, 0x5e}; #endif @@ -163,12 +163,12 @@ void arp_out(FAR struct net_driver_s *dev) /* First check if destination is a local broadcast. */ - if (net_ipaddr_hdrcmp(pip->eh_destipaddr, g_broadcast_ipaddr)) + if (net_ipv4addr_hdrcmp(pip->eh_destipaddr, g_broadcast_ipaddr)) { memcpy(peth->dest, g_broadcast_ethaddr.ether_addr_octet, ETHER_ADDR_LEN); } -#if defined(CONFIG_NET_IGMP) && !defined(CONFIG_NET_IPv6) +#ifdef CONFIG_NET_IGMP /* Check if the destination address is a multicast address * * - IPv4: multicast addresses lie in the class D group -- The address range @@ -196,7 +196,7 @@ void arp_out(FAR struct net_driver_s *dev) /* Check if the destination address is on the local network. */ destipaddr = net_ip4addr_conv32(pip->eh_destipaddr); - if (!net_ipaddr_maskcmp(destipaddr, dev->d_ipaddr, dev->d_netmask)) + if (!net_ipv4addr_maskcmp(destipaddr, dev->d_ipaddr, dev->d_netmask)) { /* Destination address is not on the local network */ @@ -213,14 +213,14 @@ void arp_out(FAR struct net_driver_s *dev) * destination address when determining the MAC address. */ - net_ipaddr_copy(ipaddr, dev->d_draddr); + net_ipv4addr_copy(ipaddr, dev->d_draddr); #endif } else { /* Else, we use the destination IP address. */ - net_ipaddr_copy(ipaddr, destipaddr); + net_ipv4addr_copy(ipaddr, destipaddr); } /* Check if we already have this destination address in the ARP table */ |