Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
openapi_routing_arptable.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2016-2018 Broadcom.
12 *
13 * Licensed under the Apache License, Version 2.0 (the "License");
14 * you may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at
16 *
17 * http://www.apache.org/licenses/LICENSE-2.0
18 *
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
24 *
25 * Licensed under the Apache License, Version 2.0 (the "License");
26 * you may not use this file except in compliance with the License.
27 * You may obtain a copy of the License at
28 *
29 * http://www.apache.org/licenses/LICENSE-2.0
30 *
31 * Unless required by applicable law or agreed to in writing, software
32 * distributed under the License is distributed on an "AS IS" BASIS,
33 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
34 * See the License for the specific language governing permissions and
35 * limitations under the License.
36 *
37 **********************************************************************
38 *
39 * @filename openapi_routing_arptable.h
40 *
41 * @purpose Routing ARP table configuration and status.
42 *
43 * @component OPEN
44 *
45 * @create 12/02/2016
46 *
47 * @end
48 *
49 **********************************************************************/
50 #ifndef OPENAPI_ROUTING_ARPTABLE_H_INCLUDED
51 #define OPENAPI_ROUTING_ARPTABLE_H_INCLUDED
52 
53 #include <stdio.h>
54 #include <stddef.h>
55 #include <sys/un.h>
56 
57 #include "openapi_common.h"
58 #include "openapi_routing_config.h"
59 
60 typedef enum
61 {
62  OPEN_ARP_LOCAL = 0x01,
67  OPEN_ARP_STATIC = 0x20,
71 
72 typedef struct
73 {
75  uint32_t age;
77  uint16_t vrfId;
78  unsigned char macAddr[OPEN_MAC_ADDR_LEN];
79  uint16_t vlanId;
80  uint32_t intIfNum;
81  uint32_t hits;
83 
84 /*****************************************************************/
98  uint32_t *val);
99 
100 /*****************************************************************/
114  uint32_t *val);
115 
116 /*****************************************************************/
130  uint32_t *val);
131 
132 /*****************************************************************/
146  uint32_t *val);
147 
148 /*****************************************************************/
162  OPEN_CONTROL_t *val);
163 
164 /*****************************************************************/
179  uint32_t *current,
180  uint32_t *peak);
181 
182 /*****************************************************************/
198  uint32_t *configured,
199  uint32_t *active,
200  uint32_t *max);
201 
202 /*****************************************************************/
225  open_buffdesc *vrfName,
226  uint32_t *intf,
227  open_inet_addr_t *ipAddr);
228 
229 /*****************************************************************/
247  open_buffdesc *vrfName,
248  uint32_t intf,
249  open_inet_addr_t ipAddr,
250  OPEN_ARP_ENTRY_t *entry);
251 
252 #endif /* OPENAPI_ROUTING_ARPTABLE_H_INCLUDED */
253 
open_error_t openapiArpStaticEntryCountInfoGet(openapiClientHandle_t *client_handle, uint32_t *configured, uint32_t *active, uint32_t *max)
API to get the ARP static entry count info.
open_error_t openapiArpEntryInfoGet(openapiClientHandle_t *client_handle, open_buffdesc *vrfName, uint32_t intf, open_inet_addr_t ipAddr, OPEN_ARP_ENTRY_t *entry)
Get the ARP data for a given vrfName, ipAddr, and interface.
Static ARP entry.
open_error_t openapiArpCacheSizeGet(openapiClientHandle_t *client_handle, uint32_t *val)
API to get the ARP cache size.
IP address is one of switch's MAC addresses.
open_error_t openapiArpTotalEntryCountInfoGet(openapiClientHandle_t *client_handle, uint32_t *current, uint32_t *peak)
API to get the ARP total current entry count info.
uint16_t vrfId
VRF ID of the ARP table entry.
open_error_t openapiArpEntryVrfNextGet(openapiClientHandle_t *client_handle, open_buffdesc *vrfName, uint32_t *intf, open_inet_addr_t *ipAddr)
Get the next VRF ARP entry.
OPEN_ARP_TYPE_t type
ARP entry type bitmask.
Discard when seen as source.
open_error_t openapiArpResponseTimeGet(openapiClientHandle_t *client_handle, uint32_t *val)
API to get the ARP response time in seconds.
Kernel ARP entry.
open_error_t
OPEN uses these enumerators to indicate the error codes.
Destination is a router.
open_error_t openapiArpDynamicRenewModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *val)
API to get if ARP dynamic renew mode is enabled or not.
uint32_t age
ARP entry age in seconds.
uint16_t vlanId
VLAN id of the ARP table entry.
OPEN_CONTROL_t
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter...
Net directed broadcast addr.
Unnumbered intf ARP entry.
uint32_t intIfNum
Outgoing internal interface number of the ARP table entry.
open_inet_addr_t ipAddr
IP Address of the ARP table entry.
open_error_t openapiArpNumRetriesGet(openapiClientHandle_t *client_handle, uint32_t *val)
API to get the ARP number of retries.
Resolved ARP entry, dest MAC address known.
uint32_t hits
Non-zero count of the ARP table entry, if resolved.
open_error_t openapiArpAgeTimeGet(openapiClientHandle_t *client_handle, uint32_t *val)
API to get the ARP age time in seconds.