Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.11.1.2
openapi_dhcp_snooping.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2018-2023 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 **********************************************************************
26 *
27 * @filename openapi_dhcp_snooping.h
28 *
29 * @purpose DHCP Snooping API
30 *
31 * @component OpEN
32 *
33 * @note This code must not include any ICOS header files.
34 *
35 * @create 7/9/2018
36 *
37 * @end
38 *
39 **********************************************************************/
40 #ifndef OPENAPI_DHCP_SNOOPING_H_INCLUDED
41 #define OPENAPI_DHCP_SNOOPING_H_INCLUDED
42 
43 #include "openapi_common.h"
44 
46 typedef enum
47 {
52 
53 /*****************************************************************/
71  OPEN_AF_t family,
72  OPEN_CONTROL_t *adminMode);
73 
74 /*****************************************************************/
97  OPEN_AF_t family,
98  OPEN_CONTROL_t *sourceMacVerify);
99 
100 /*****************************************************************/
124  OPEN_AF_t family,
125  uint32_t *vlanStart,
126  uint32_t *vlanEnd);
127 
128 /*****************************************************************/
149  OPEN_AF_t family,
150  uint32_t ifNum,
151  OPEN_CONTROL_t *enabled);
152 
153 /*****************************************************************/
170  OPEN_AF_t family,
171  uint32_t ifNum,
172  OPEN_BOOL_t *trusted);
173 
174 /*****************************************************************/
192  OPEN_AF_t family,
193  uint32_t ifNum,
194  OPEN_BOOL_t *logged);
195 
196 /*****************************************************************/
210 
211 /*****************************************************************/
227  OPEN_AF_t family,
228  open_buffdesc *fileName);
229 
230 /*****************************************************************/
245  OPEN_AF_t family,
246  open_inet_addr_t *addr);
247 
248 /*****************************************************************/
263  OPEN_AF_t family,
264  uint32_t *delay);
265 
266 /*****************************************************************/
282  OPEN_CONTROL_t *adminMode);
283 
284 /*****************************************************************/
299  OPEN_CONTROL_t adminMode);
300 
301 /*****************************************************************/
318  uint32_t ifNum,
319  OPEN_CONTROL_t *intfMode);
320 
321 /*****************************************************************/
337  uint32_t ifNum,
338  OPEN_CONTROL_t intfMode);
339 
340 /*****************************************************************/
357  uint32_t ifNum,
358  OPEN_BOOL_t *trustMode);
359 
360 /*****************************************************************/
376  uint32_t ifNum,
377  OPEN_BOOL_t trustMode);
378 
379 /*****************************************************************/
396  uint32_t vlanNum,
397  OPEN_CONTROL_t *l2RelayMode);
398 
399 /*****************************************************************/
415  uint32_t vlanNum,
416  OPEN_CONTROL_t l2RelayMode);
417 
418 /*****************************************************************/
435  uint32_t vlanStart, uint32_t vlanEnd,
436  OPEN_CONTROL_t l2RelayMode);
437 
438 /*****************************************************************/
455  uint32_t vlanNum,
456  OPEN_CONTROL_t *circuitIdMode);
457 
458 /*****************************************************************/
474  uint32_t vlanNum,
475  OPEN_CONTROL_t circuitIdMode);
476 
477 /*****************************************************************/
494  uint32_t vlanStart,
495  uint32_t vlanEnd,
496  OPEN_CONTROL_t circuitIdMode);
497 
498 /*****************************************************************/
514  uint32_t vlanNum,
515  open_buffdesc *remoteId);
516 
517 /*****************************************************************/
533  uint32_t vlanNum,
534  open_buffdesc *remoteId);
535 
536 /*****************************************************************/
553  uint32_t vlanStart,
554  uint32_t vlanEnd,
555  open_buffdesc *remoteId);
556 
557 /*****************************************************************/
575  uint32_t ifNum,
576  open_buffdesc *subscriptionName,
577  OPEN_CONTROL_t *l2RelaySubMode);
578 
579 /*****************************************************************/
596  uint32_t ifNum,
597  open_buffdesc *subscriptionName,
598  OPEN_CONTROL_t l2RelaySubMode);
599 
600 /*****************************************************************/
619  uint32_t ifNum,
620  open_buffdesc *subscriptionName,
621  OPEN_CONTROL_t *l2RelayCIdMode);
622 
623 /*****************************************************************/
641  uint32_t ifNum,
642  open_buffdesc *subscriptionName,
643  OPEN_CONTROL_t l2RelayCIdMode);
644 
645 /*****************************************************************/
663  uint32_t ifNum,
664  open_buffdesc *subscriptionName,
665  open_buffdesc *remoteId);
666 
667 /*****************************************************************/
685  uint32_t ifNum,
686  open_buffdesc *subscriptionName,
687  open_buffdesc *remoteId);
688 
689 /*****************************************************************/
708  uint32_t ifNum,
709  uint32_t *untrustedSrvMsgsWithOpt82,
710  uint32_t *untrustedCliMsgsWithOpt82,
711  uint32_t *trustedSrvMsgsWithoutOpt82,
712  uint32_t *trustedCliMsgsWithoutOpt82);
713 
714 /*****************************************************************/
729  uint32_t ifNum);
730 
731 /*****************************************************************/
748  uint32_t ifNum,
750 
751 /*****************************************************************/
768  uint32_t ifNum,
770 
771 #endif /* OPENAPI_DHCP_SNOOPING_H_INCLUDED */
772 
open_error_t openapiDsL2RelayAdminModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *adminMode)
Gets the DHCP L2 Relay Admin mode.
open_error_t openapiDsL2RelaySubscriptionModeSet(openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *subscriptionName, OPEN_CONTROL_t l2RelaySubMode)
Sets the DHCP L2 Relay mode for a given subscription on an interface.
open_error_t openapiDhcpSnoopingIntfLoggedGet(openapiClientHandle_t *client_handle, OPEN_AF_t family, uint32_t ifNum, OPEN_BOOL_t *logged)
Determines whether DHCP snooping logs invalid packets on an interface.
open_error_t openapiDsL2RelayIntfTrustSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t trustMode)
Set API to configure a port in desired trust mode for DHCP l2 relay.
open_error_t openapiDhcpSnoopingDbFileNameGet(openapiClientHandle_t *client_handle, OPEN_AF_t family, open_buffdesc *fileName)
Get the remote DHCP snooping database file name.
open_error_t openapiDsL2RelaySubscriptionCircuitIdModeSet(openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *subscriptionName, OPEN_CONTROL_t l2RelayCIdMode)
Sets the DHCP L2 Relay Circuit-id mode for a given subscription on an interface.
open_error_t openapiDhcpSnoopingDbIpAddressGet(openapiClientHandle_t *client_handle, OPEN_AF_t family, open_inet_addr_t *addr)
Get the remote DHCP snooping database IPv4 Address.
open_error_t openapiDsL2RelayVlanRangeCircuitIdSet(openapiClientHandle_t *client_handle, uint32_t vlanStart, uint32_t vlanEnd, OPEN_CONTROL_t circuitIdMode)
Sets the DHCP L2 Relay circuit-Id mode for a vlan range.
open_error_t openapiDhcpSnoopingIntfTrustedGet(openapiClientHandle_t *client_handle, OPEN_AF_t family, uint32_t ifNum, OPEN_BOOL_t *trusted)
Determines whether DHCP snooping considers an interface as trusted.
open_error_t openapiDsL2RelayVlanRangeModeSet(openapiClientHandle_t *client_handle, uint32_t vlanStart, uint32_t vlanEnd, OPEN_CONTROL_t l2RelayMode)
Sets the DHCP L2 Relay mode for a vlan range.
open_error_t openapiDsL2RelayIntfTrustGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t *trustMode)
Get API for whether DHCP L2 relay considers a port trusted.
open_error_t openapiDsL2RelayIntfTrustNoOption82ActionGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DHCP_L2RELAY_NO_OPTION_82_ACTION_t *action)
Fetch configured no-option-82 action on L2 relay trusted interfaces.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiDhcpSnoopingAdminModeGet(openapiClientHandle_t *client_handle, OPEN_AF_t family, OPEN_CONTROL_t *adminMode)
Gets the DHCP Snooping Admin mode.
open_error_t openapiDhcpSnoopingPortEnabledGet(openapiClientHandle_t *client_handle, OPEN_AF_t family, uint32_t ifNum, OPEN_CONTROL_t *enabled)
Determines whether DHCP snooping is enabled on a port.
open_error_t openapiDsL2RelayCircuitIdGet(openapiClientHandle_t *client_handle, uint32_t vlanNum, OPEN_CONTROL_t *circuitIdMode)
Gets the DHCP L2 Relay circuit-id mode for a vlan.
open_error_t openapiDsL2RelayRemoteIdGet(openapiClientHandle_t *client_handle, uint32_t vlanNum, open_buffdesc *remoteId)
Gets the DHCP L2 Relay remote-id string for a vlan.
open_error_t openapiDsL2RelaySubscriptionRemoteIdGet(openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *subscriptionName, open_buffdesc *remoteId)
Gets the DHCP L2 Relay Remote-id string for a given subscription on an interface. ...
open_error_t openapiDsL2RelayCircuitIdSet(openapiClientHandle_t *client_handle, uint32_t vlanNum, OPEN_CONTROL_t circuitIdMode)
Sets the DHCP L2 Relay circuit-Id mode for a vlan.
open_error_t openapiDsL2RelayVlanRangeRemoteIdSet(openapiClientHandle_t *client_handle, uint32_t vlanStart, uint32_t vlanEnd, open_buffdesc *remoteId)
Sets the DHCP L2 Relay remote-Id string for a vlan range.
OPEN_AF_t
OPEN uses these enumerators to indicate address family, IPV4 or IPV6.
open_error_t openapiDsL2RelaySubscriptionRemoteIdSet(openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *subscriptionName, open_buffdesc *remoteId)
Sets the DHCP L2 Relay Remote-id string for a given subscription on an interface. ...
open_error_t openapiDhcpSnoopingDbFileNameMaxLengthGet(openapiClientHandle_t *client_handle, uint32_t *len)
Get the remote DHCP snooping database file name max length.
OPEN_CONTROL_t
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter...
open_error_t openapiDhcpSnoopingDbWriteDelayGet(openapiClientHandle_t *client_handle, OPEN_AF_t family, uint32_t *delay)
Get the DHCP snooping database write delay.
open_error_t openapiDsL2RelayIntfModeSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_CONTROL_t intfMode)
Sets the DHCP L2 Relay interface mode.
open_error_t openapiDhcpSnoopingEnabledVlanRangeNextGet(openapiClientHandle_t *client_handle, OPEN_AF_t family, uint32_t *vlanStart, uint32_t *vlanEnd)
Given a VLAN ID, return the endpoints of the next range of VLANs enabled for DHCP snooping...
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
OPEN_DHCP_L2RELAY_NO_OPTION_82_ACTION_t
DHCP L2 relay option 82 actions.
open_error_t openapiDsL2RelayIntfStatsGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *untrustedSrvMsgsWithOpt82, uint32_t *untrustedCliMsgsWithOpt82, uint32_t *trustedSrvMsgsWithoutOpt82, uint32_t *trustedCliMsgsWithoutOpt82)
Gets the DHCP L2 Relay interface specific statistics.
open_error_t openapiDsL2RelayIntfStatsClear(openapiClientHandle_t *client_handle, uint32_t ifNum)
Clears the DHCP L2 Relay interface specific statistics.
open_error_t openapiDsL2RelayVlanModeSet(openapiClientHandle_t *client_handle, uint32_t vlanNum, OPEN_CONTROL_t l2RelayMode)
Sets the DHCP L2 Relay mode for a vlan.
open_error_t openapiDhcpSnoopingVerifySourceMacGet(openapiClientHandle_t *client_handle, OPEN_AF_t family, OPEN_CONTROL_t *sourceMacVerify)
Gets whether DHCP snooping verifies source MAC addresses.
open_error_t openapiDsL2RelayIntfTrustNoOption82ActionSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DHCP_L2RELAY_NO_OPTION_82_ACTION_t action)
Configure action for packets received without option-82 on L2 relay trusted interfaces.
open_error_t openapiDsL2RelayIntfModeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_CONTROL_t *intfMode)
Gets the DHCP L2 Relay interface mode.
open_error_t openapiDsL2RelayRemoteIdSet(openapiClientHandle_t *client_handle, uint32_t vlanNum, open_buffdesc *remoteId)
Sets the DHCP L2 Relay remote-Id string for a vlan.
open_error_t openapiDsL2RelayVlanModeGet(openapiClientHandle_t *client_handle, uint32_t vlanNum, OPEN_CONTROL_t *l2RelayMode)
Gets the DHCP L2 Relay mode for a VLAN.
open_error_t openapiDsL2RelaySubscriptionModeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *subscriptionName, OPEN_CONTROL_t *l2RelaySubMode)
Gets the DHCP L2 Relay mode for a given subscription on an interface.
open_error_t openapiDsL2RelaySubscriptionCircuitIdModeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *subscriptionName, OPEN_CONTROL_t *l2RelayCIdMode)
Gets the DHCP L2 Relay Circuit-id mode for a given subscription on an interface.
open_error_t openapiDsL2RelayAdminModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t adminMode)
Sets the DHCP L2 Relay Admin mode.