Gleb Klochkov / Mbed OS Climatcontroll_Main

Dependencies:   esp8266-driver

Embed: (wiki syntax)

« Back to documentation index

Fnet_arp

Data Structures

struct  fnet_arp_entry_info
 ARP cache entry information structure. More...

Typedefs

typedef FNET_COMP_PACKED_BEGIN
struct fnet_arp_entry_info 
fnet_arp_entry_info_t
 ARP cache entry information structure.

Functions

FNET_COMP_PACKED_END fnet_bool_t fnet_arp_get_entry (fnet_netif_desc_t netif_desc, fnet_index_t n, fnet_arp_entry_info_t *entry_info)
 Retrieves ARP cache entry of the specified network interface.
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.
void fnet_arp_send_request (fnet_netif_desc_t netif_desc, fnet_ip4_addr_t ip_addr)
 Sends ARP request.

Detailed Description

Address Resolution Protocol (ARP)


Typedef Documentation

typedef FNET_COMP_PACKED_BEGIN struct fnet_arp_entry_info fnet_arp_entry_info_t

ARP cache entry information structure.

See also:
fnet_arp_get_entry()

Function Documentation

FNET_COMP_PACKED_END fnet_bool_t fnet_arp_get_entry ( fnet_netif_desc_t  netif_desc,
fnet_index_t  n,
fnet_arp_entry_info_t entry_info 
)

Retrieves ARP cache entry of the specified network interface.

Parameters:
[in]netif_descNetwork interface descriptor.
[in]nSequence number of ARP cache entry to retrieve (from 0).
[out]entry_infoPointer to the ARP cache entry information structure will contain the result.
Returns:
This function returns:
  • FNET_TRUE if no error occurs and data structure is filled.
  • FNET_FALSE in case of error or n-th entry is not available.

This function is used to retrieve ARP cache entries assigned the given interface.

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:

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.

void fnet_arp_send_request ( fnet_netif_desc_t  netif_desc,
fnet_ip4_addr_t  ip_addr 
)

Sends ARP request.

Parameters:
[in]netif_descNetwork interface descriptor.
[in]ip_addrTarget protocol address.

This function sends a broadcast ARP message, requesting an answer for ipaddr.
It can be used for ARP probing of IPv4 address before beginning to use.
Also, it can be used for a gratuitous ARP message when sender's IP address or MAC address has changed.