Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.12.0.1
openapi_storm_control.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2016-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_storm_control.h
28 *
29 * @purpose Storm Control Configuration and Status
30 *
31 * @component OPEN
32 *
33 * @create 30/01/2013
34 *
35 * @end
36 *
37 **********************************************************************/
38 #ifndef OPENAPI_STORM_CONTROL_H_INCLUDED
39 #define OPENAPI_STORM_CONTROL_H_INCLUDED
40 
41 #include "openapi_common.h"
42 
44 typedef enum
45 {
51 
53 typedef enum
54 {
55  OPEN_POLICY_PORT_ACTION_NONE = 0,
60 
61 
62 typedef enum
63 {
64  OPEN_STORMCONTROL_BCAST = 0x01,
65  OPEN_STORMCONTROL_MCAST = 0x02,
66  OPEN_STORMCONTROL_UCAST = 0x04,
67 } OPEN_STORMCONTROL_TYPE;
68 
69 /*****************************************************************/
90  OPEN_STORM_CTRL_MODE_t stormCtrlMode,
91  OPEN_CONTROL_t state);
92 
93 /*****************************************************************/
109  OPEN_STORM_CTRL_MODE_t stormCtrlMode,
110  OPEN_CONTROL_t *state);
111 
112 /*****************************************************************/
134  OPEN_STORM_CTRL_MODE_t stormCtrlMode,
135  OPEN_RATE_UNIT_t rateUnit,
136  uint32_t threshold);
137 
138 /*****************************************************************/
157  OPEN_STORM_CTRL_MODE_t stormCtrlMode);
158 
159 /*****************************************************************/
176  OPEN_STORM_CTRL_MODE_t stormCtrlMode,
177  OPEN_RATE_UNIT_t *rateUnit,
178  uint32_t *threshold);
179 
180 /*****************************************************************/
199  OPEN_STORM_CTRL_MODE_t stormCtrlMode,
200  uint32_t interface,
201  OPEN_CONTROL_t state);
202 
203 /*****************************************************************/
221  OPEN_STORM_CTRL_MODE_t stormCtrlMode,
222  uint32_t interface,
223  OPEN_CONTROL_t *state);
224 
225 /*****************************************************************/
252  OPEN_STORM_CTRL_MODE_t stormCtrlMode,
253  uint32_t interface,
254  OPEN_RATE_UNIT_t rateUnit,
255  uint32_t threshold);
256 
257 /*****************************************************************/
278  OPEN_STORM_CTRL_MODE_t stormCtrlMode,
279  uint32_t interface);
280 
281 /*****************************************************************/
301  OPEN_STORM_CTRL_MODE_t stormCtrlMode,
302  uint32_t interface,
303  OPEN_RATE_UNIT_t *rateUnit,
304  uint32_t *threshold);
305 
306 /*****************************************************************/
324  OPEN_RATE_UNIT_t rateUnit,
325  uint32_t *minThreshold,
326  uint32_t *maxThreshold);
327 
328 /*****************************************************************/
347  OPEN_STORM_CTRL_MODE_t stormCtrlMode,
349 
350 /*****************************************************************/
366  OPEN_STORM_CTRL_MODE_t stormCtrlMode,
367  OPEN_POLICY_PORT_ACTION_t *action);
368 
369 /*************************************************************************/
386  uint32_t interface,
387  OPEN_POLICY_PORT_ACTION_t *action);
388 
389 /*************************************************************************/
408  uint32_t interface, uint32_t type,
409  OPEN_POLICY_PORT_ACTION_t *action);
410 
411 /*************************************************************************/
428  uint32_t interface,
430 
431 /*************************************************************************/
448  uint32_t interface,
450 
451 /*************************************************************************/
468  uint32_t interface,
470 
471 #endif
472 
open_error_t openapiSwDevCtrlMcastStormControlActionIntfSet(openapiClientHandle_t *client_handle, uint32_t interface, OPEN_POLICY_PORT_ACTION_t action)
Set the Multicast Storm Control Action mode of an interface.
open_error_t openapiStormControlThresholdDefaultSet(openapiClientHandle_t *client_handle, OPEN_STORM_CTRL_MODE_t stormCtrlMode)
Set the storm control threshold and rate unit on all the interfaces to default values.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiStormControlIntfModeGet(openapiClientHandle_t *client_handle, OPEN_STORM_CTRL_MODE_t stormCtrlMode, uint32_t interface, OPEN_CONTROL_t *state)
Get the state of storm control mode on an interface.
open_error_t openapiStormControlIntfThresholdSet(openapiClientHandle_t *client_handle, OPEN_STORM_CTRL_MODE_t stormCtrlMode, uint32_t interface, OPEN_RATE_UNIT_t rateUnit, uint32_t threshold)
Set the storm control mode and threshold on an interface.
OPEN_RATE_UNIT_t
OpEN uses this enumeration to define rate units.
Storm Control broadcast mode.
open_error_t openapiStormControlActionGet(openapiClientHandle_t *client_handle, OPEN_STORM_CTRL_MODE_t stormCtrlMode, OPEN_POLICY_PORT_ACTION_t *action)
Get the global storm control action.
open_error_t openapiStormControlActionSet(openapiClientHandle_t *client_handle, OPEN_STORM_CTRL_MODE_t stormCtrlMode, OPEN_POLICY_PORT_ACTION_t action)
Set the storm control action globally and on all the interfaces.
open_error_t openapiStormControlThresholdGet(openapiClientHandle_t *client_handle, OPEN_STORM_CTRL_MODE_t stormCtrlMode, OPEN_RATE_UNIT_t *rateUnit, uint32_t *threshold)
Get the global storm control threshold value and rate unit.
open_error_t openapiSwDevCtrlBcastStormControlActionIntfGet(openapiClientHandle_t *client_handle, uint32_t interface, OPEN_POLICY_PORT_ACTION_t *action)
Get the Broadcast Storm Control Action of an interface.
open_error_t openapiStormControlModeGet(openapiClientHandle_t *client_handle, OPEN_STORM_CTRL_MODE_t stormCtrlMode, OPEN_CONTROL_t *state)
Get the state of global storm control mode.
open_error_t openapiStormControlThresholdSet(openapiClientHandle_t *client_handle, OPEN_STORM_CTRL_MODE_t stormCtrlMode, OPEN_RATE_UNIT_t rateUnit, uint32_t threshold)
Set the storm control threshold and rate unit on all the interfaces.
OPEN_CONTROL_t
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter...
open_error_t openapiStormControlIntfThresholdDefaultSet(openapiClientHandle_t *client_handle, OPEN_STORM_CTRL_MODE_t stormCtrlMode, uint32_t interface)
Set the storm control threshold value and rate unit to default on an interface.
open_error_t openapiSwDevCtrlBcastStormControlActionIntfSet(openapiClientHandle_t *client_handle, uint32_t interface, OPEN_POLICY_PORT_ACTION_t action)
Set the Broadcast Storm Control Action mode of an interface.
open_error_t openapiStormControlIntfThresholdGet(openapiClientHandle_t *client_handle, OPEN_STORM_CTRL_MODE_t stormCtrlMode, uint32_t interface, OPEN_RATE_UNIT_t *rateUnit, uint32_t *threshold)
Get the storm control threshold on an interface.
open_error_t openapiSwDevCtrlStormControlActionIntfGet(openapiClientHandle_t *client_handle, uint32_t interface, uint32_t type, OPEN_POLICY_PORT_ACTION_t *action)
Get the Storm Control Action of an interface for a given storm control type.
open_error_t openapiSwDevCtrlUcastStormControlActionIntfSet(openapiClientHandle_t *client_handle, uint32_t interface, OPEN_POLICY_PORT_ACTION_t action)
Set the Unicast Storm Control Action mode of an interface.
open_error_t openapiStormControlThresholdMinMaxGet(openapiClientHandle_t *client_handle, OPEN_RATE_UNIT_t rateUnit, uint32_t *minThreshold, uint32_t *maxThreshold)
Get the storm control minimum and maximum threshold values based on the rate.
open_error_t openapiStormControlIntfModeSet(openapiClientHandle_t *client_handle, OPEN_STORM_CTRL_MODE_t stormCtrlMode, uint32_t interface, OPEN_CONTROL_t state)
Set the state of storm control mode on an interface.
OPEN_POLICY_PORT_ACTION_t
OpEN uses this enumeration to define Storm Control actions.
open_error_t openapiStormControlModeSet(openapiClientHandle_t *client_handle, OPEN_STORM_CTRL_MODE_t stormCtrlMode, OPEN_CONTROL_t state)
Set the state of storm control mode globally and on all the interfaces.
Storm Control mode none.
Storm Control multicast mode.
OPEN_STORM_CTRL_MODE_t
OpEN uses this enumeration to define Storm Control modes.
Storm Control unicast mode.