Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
openapi_ipv4_device_tracking.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_ipv4_device_tracking.h
40 *
41 * @purpose IPv4 Device Tracking configuration and status.
42 *
43 * @component OPEN
44 *
45 * @create 11/21/2018
46 *
47 * @end
48 *
49 **********************************************************************/
50 #ifndef OPENAPI_IPV4_DEVICE_TRACKING_H_INCLUDED
51 #define OPENAPI_IPV4_DEVICE_TRACKING_H_INCLUDED
52 
53 #include <stdio.h>
54 #include <stddef.h>
55 #include <sys/un.h>
56 
57 #include "openapi_common.h"
58 
59 typedef enum OPEN_IPV4DT_CLEAR_s
60 {
61  OPEN_IPV4DT_CLEAR_ALL, /* clear all entries */
62  OPEN_IPV4DT_CLEAR_HOST_IP, /* clear only the entries matching a specific IP address */
63  OPEN_IPV4DT_CLEAR_HOST_MAC, /* clear only the entries matching a specific MAC address */
64  OPEN_IPV4DT_CLEAR_INTERFACE, /* clear only the entries related to a specific interface */
65 } OPEN_IPV4DT_CLEAR_t;
66 
68 {
69  OPEN_IPV4DT_CLEAR_t clear;
70  uint32_t hostIpAddr;
71  unsigned char hostMacAddr[OPEN_MAC_ADDR_LEN];
72  uint32_t intIfNum;
73 
75 
76 typedef enum
77 {
78  OPEN_IPV4DT_GET_FIRST = 0,
79  OPEN_IPV4DT_GET,
80  OPEN_IPV4DT_GET_NEXT
81 
82 } OPEN_IPV4DT_GET_TYPE_t;
83 
84 typedef enum
85 {
86  OPEN_IPV4DT_GET_ALL = 0,
87  OPEN_IPV4DT_GET_ALL_ACTIVE,
88  OPEN_IPV4DT_GET_ALL_INACTIVE,
89  OPEN_IPV4DT_GET_COUNT
90 
91 } OPEN_IPV4DT_GET_ALL_TYPE_t;
92 
94 {
95  OPEN_IPV4DT_GET_TYPE_t getType;
96  OPEN_BOOL_t noFilter;
97  OPEN_IPV4DT_GET_ALL_TYPE_t getAllType;
98  OPEN_BOOL_t hostIpFilter;
99  uint32_t hostIpAddr;
100  OPEN_BOOL_t hostMacFilter;
101  unsigned char hostMacAddr[OPEN_MAC_ADDR_LEN];
102  OPEN_BOOL_t intfFilter;
103  uint32_t intIfNum;
104 
106 
107 typedef enum
108 {
109  OPEN_IPV4DT_SOURCE_ARP = 0,
110  OPEN_IPV4DT_SOURCE_DHCP
111 
112 } OPEN_IPV4DT_Source_t;
113 
114 typedef enum
115 {
116  OPEN_IPV4DT_STATE_INACTIVE = 0,
117  OPEN_IPV4DT_STATE_ACTIVE
118 
119 } OPEN_IPV4DT_State_t;
120 
121 typedef struct OPEN_IPV4DT_ENTRY_s
122 {
123  OPEN_IPV4DT_Source_t source;
124  OPEN_IPV4DT_State_t state;
125  uint32_t hostIpAddr;
126  unsigned char hostMacAddr[OPEN_MAC_ADDR_LEN];
127  uint32_t intIfNum;
128  uint16_t vlanId;
129  uint32_t timeToInActive;
130  uint32_t timeSinceInActive;
131 
133 
135 {
136  uint32_t arpEntriesCount;
137  uint32_t dhcpEntriesCount;
138  uint32_t activeEntriesCount;
139  uint32_t inactiveEntriesCount;
140  uint32_t totalEntriesCount;
141 
143 
144 /********************************************************************/
158  OPEN_CONTROL_t *enable);
159 
160 /*********************************************************************/
174  OPEN_CONTROL_t enable);
175 
176 /********************************************************************/
190  OPEN_CONTROL_t *enable);
191 
192 /**********************************************************************/
206  OPEN_CONTROL_t enable);
207 
208 /**********************************************************************/
222  uint32_t *delay);
223 
224 /*************************************************************************/
238  uint32_t delay);
239 
240 /**********************************************************************/
254  uint32_t *count);
255 
256 /**********************************************************************/
270  uint32_t count);
271 
272 /**********************************************************************/
286  uint32_t *delay);
287 
288 /**********************************************************************/
302  uint32_t delay);
303 
304 /***********************************************************************/
319  uint32_t *host,
320  uint32_t *mask);
321 
322 /***********************************************************************/
337  uint32_t *host,
338  uint32_t *mask);
339 
340 /***********************************************************************/
356  uint32_t intf,
357  uint32_t *intfMax);
358 
359 /***********************************************************************/
375  uint32_t intf,
376  uint32_t intfMax);
377 
378 /***********************************************************************/
392  OPEN_IPV4DT_CLEAR_REQUEST_t *ipv4dtClear);
393 
394 /***********************************************************************/
408  OPEN_IPV4DT_ENTRIES_COUNT_t *ipv4dtEntriesCount);
409 
410 /***********************************************************************/
425  OPEN_IPV4DT_SHOW_REQUEST_t *ipv4dtShow,
426  OPEN_IPV4DT_ENTRY_t *entry);
427 
428 /***********************************************************************/
444  uint32_t intIfNum, uint32_t *nextIntIfNum);
445 
446 /***********************************************************************/
461  uint32_t intIfNum, OPEN_BOOL_t *isSupported);
462 
463 #endif
464 
open_error_t openapiIpv4dtIntfNextGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *nextIntIfNum)
Get the Next Valid Ipv4dt Interface.
open_error_t openapiIpv4dtProbeModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *enable)
Gets the Ipv4dt Probe mode.
open_error_t openapiIpv4dtProbeModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t enable)
Sets the Ipv4dt Probe mode.
open_error_t openapiIpv4dtProbeDelayGet(openapiClientHandle_t *client_handle, uint32_t *delay)
Gets the Ipv4dt Probe Delay.
open_error_t openapiIpv4dtClearEntries(openapiClientHandle_t *client_handle, OPEN_IPV4DT_CLEAR_REQUEST_t *ipv4dtClear)
Clears the Ipv4dt Entries.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiIpv4dtAdminModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *enable)
Gets the Ipv4dt Admin mode.
open_error_t openapiIpv4dtProbeAutoSourceSet(openapiClientHandle_t *client_handle, uint32_t *host, uint32_t *mask)
Sets the Ipv4dt Probe Auto-Source parameters.
OPEN_CONTROL_t
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter...
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
open_error_t openapiIpv4dtEntriesCountGet(openapiClientHandle_t *client_handle, OPEN_IPV4DT_ENTRIES_COUNT_t *ipv4dtEntriesCount)
Gets the Ipv4dt Entries Count.
open_error_t openapiIpv4dtProbeIntervalSet(openapiClientHandle_t *client_handle, uint32_t delay)
Sets the Ipv4dt Probe Interval.
open_error_t openapiIpv4dtIntfSupported(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_BOOL_t *isSupported)
Check the Ipv4dt Interface is supported or not.
open_error_t openapiIpv4dtProbeCountSet(openapiClientHandle_t *client_handle, uint32_t count)
Sets the Ipv4dt Probe Count.
open_error_t openapiIpv4dtAdminModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t enable)
Sets the Ipv4dt Admin mode.
open_error_t openapiIpv4dtProbeAutoSourceGet(openapiClientHandle_t *client_handle, uint32_t *host, uint32_t *mask)
Gets the Ipv4dt Probe Auto-Source parameters.
open_error_t openapiIpv4dtIntfMaxGet(openapiClientHandle_t *client_handle, uint32_t intf, uint32_t *intfMax)
Gets the Ipv4dt Interface Maximum limit.
open_error_t openapiIpv4dtIntfMaxSet(openapiClientHandle_t *client_handle, uint32_t intf, uint32_t intfMax)
Sets the Ipv4dt Interface Maximum limit.
open_error_t openapiIpv4dtProbeIntervalGet(openapiClientHandle_t *client_handle, uint32_t *delay)
Gets the Ipv4dt Probe Interval.
open_error_t openapiIpv4dtTableGetNext(openapiClientHandle_t *client_handle, OPEN_IPV4DT_SHOW_REQUEST_t *ipv4dtShow, OPEN_IPV4DT_ENTRY_t *entry)
Gets the Ipv4dt Entries.
open_error_t openapiIpv4dtProbeCountGet(openapiClientHandle_t *client_handle, uint32_t *count)
Gets the Ipv4dt Probe Count.
open_error_t openapiIpv4dtProbeDelaySet(openapiClientHandle_t *client_handle, uint32_t delay)
Sets the Ipv4dt Probe Delay.