Embedded TCP/IP stack: fnet_arp.h Source File

FNET

fnet_arp.h
1 /**************************************************************************
2 *
3 * Copyright 2016 by Andrey Butok. FNET Community.
4 *
5 ***************************************************************************
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License"); you may
8 * not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 *
19 ***************************************************************************
20 *
21 * ARP protocol Public API
22 *
23 ***************************************************************************/
24 
25 #ifndef _FNET_ARP_H_
26 
27 #define _FNET_ARP_H_
28 
29 #if FNET_CFG_IP4 || defined(__DOXYGEN__)
30 
36 /**************************************************************************/
40 FNET_COMP_PACKED_BEGIN
41 typedef struct fnet_arp_entry_info
42 {
46 FNET_COMP_PACKED_END
47 
48 /************************************************************************
49 * Function Prototypes
50 *************************************************************************/
51 #if defined(__cplusplus)
52 extern "C" {
53 #endif
54 
55 /***************************************************************************/
76 
77 /***************************************************************************/
100 
101 /***************************************************************************/
117 void fnet_arp_send_request( fnet_netif_desc_t netif_desc, fnet_ip4_addr_t ip_addr );
118 
119 #if defined(__cplusplus)
120 }
121 #endif
122 
125 #endif /* FNET_CFG_IP4 */
126 
127 #endif /* _FNET_ARP_H_ */
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.
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_ip4_addr_t ip_addr
ARP cache entry IPv4 address.
Definition: fnet_arp.h:44
ARP cache entry information structure.
Definition: fnet_arp.h:41
fnet_mac_addr_t mac_addr
ARP cache entry Physical (MAC) address.
Definition: fnet_arp.h:43
fnet_bool_t
Boolean type.
Definition: fnet_stdlib.h:81
unsigned int fnet_index_t
Unsigned integer type representing the index.
Definition: fnet_stdlib.h:71
fnet_uint32_t fnet_ip4_addr_t
32-bit IPv4 address type.
Definition: fnet_ip4.h:36
FNET_COMP_PACKED_BEGIN struct fnet_arp_entry_info fnet_arp_entry_info_t
ARP cache entry information structure.
void * fnet_netif_desc_t
Network interface descriptor.
Definition: fnet_netif.h:71
fnet_uint8_t fnet_mac_addr_t[6]
Media Access Control (MAC) address type.
Definition: fnet_eth.h:58
void fnet_arp_send_request(fnet_netif_desc_t netif_desc, fnet_ip4_addr_t ip_addr)
Sends ARP request.

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