Embedded TCP/IP stack: fnet_arp_get_mac

FNET

fnet_bool_t fnet_arp_get_mac ( fnet_netif_desc_t  netif_desc,
fnet_ip4_addr_t  ip_addr,
fnet_mac_addr_t  mac_addr 
)

Gets MAC address of valid ARP cache entry.

Parameters
[in]netif_descNetwork interface descriptor.
[in]ip_addrIPv4 address to search for.
[out]mac_addrBuffer will contain a MAC address corresponding ipaddr.
This parameter is optional.
Returns
This function returns:
  • FNET_TRUE if no error occurs and entry corresponding to ip_addr exists.
  • FNET_FALSE in case of error or entry corresponding to ip_addr does not exist.

This function searches for an entry corresponding to the provided IPv4 address.
If mac_addr parameter is present, it will contain a valid MAC address corresponding to ip_addr.


© 2005-2018 by Andrey Butok. http://fnet.sourceforge.net