Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Enumerations | Functions
Storm Control Configuration And Status [OPENAPI_STORM_CONTROL]

Enumerations

enum  OPEN_POLICY_PORT_ACTION_t { OPEN_POLICY_PORT_ACTION_NONE = 0, OPEN_POLICY_PORT_ACTION_SHUTDOWN = 1, OPEN_POLICY_PORT_ACTION_RATELIMIT = 2, OPEN_POLICY_PORT_ACTION_TRAP = 3 }
 OpEN uses this enumeration to define Storm Control actions. More...
 
enum  OPEN_STORM_CTRL_MODE_t { OPEN_STORM_CTRL_MODE_NONE = 0, OPEN_STORM_CTRL_MODE_UNICAST = 1, OPEN_STORM_CTRL_MODE_BROADCAST = 2, OPEN_STORM_CTRL_MODE_MULTICAST = 3 }
 OpEN uses this enumeration to define Storm Control modes. More...
 

Functions

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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

Detailed Description

Enumeration Type Documentation

OpEN uses this enumeration to define Storm Control actions.

Enumerator
OPEN_POLICY_PORT_ACTION_SHUTDOWN 

shutdown port if storm

OPEN_POLICY_PORT_ACTION_RATELIMIT 

rate limit port if storm

OPEN_POLICY_PORT_ACTION_TRAP 

trap if storm

Definition at line 53 of file openapi_storm_control.h.

OpEN uses this enumeration to define Storm Control modes.

Enumerator
OPEN_STORM_CTRL_MODE_NONE 

Storm Control mode none.

OPEN_STORM_CTRL_MODE_UNICAST 

Storm Control unicast mode.

OPEN_STORM_CTRL_MODE_BROADCAST 

Storm Control broadcast mode.

OPEN_STORM_CTRL_MODE_MULTICAST 

Storm Control multicast mode.

Definition at line 44 of file openapi_storm_control.h.

Function Documentation

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.

Parameters
[in]client_handleClient handle from registration API
[in]stormCtrlModeStorm control mode: OPEN_STORM_CTRL_MODE_t
[out]actionStorm control action: OPEN_POLICY_PORT_ACTION_t
Return values
OPEN_E_NONEif storm control action is returned successfully.
OPEN_E_UNAVAILif the feature is unsupported.
OPEN_E_PARAMerror in parameter passed.

OpEN API Version: 1.11

Examples:
storm_control_example.c.
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.

Parameters
[in]client_handleClient handle from registration API
[in]stormCtrlModeStorm control mode: OPEN_STORM_CTRL_MODE_t
[in]actionStorm control action: OPEN_POLICY_PORT_ACTION_t
Return values
OPEN_E_NONEif storm control action is set.
OPEN_E_FAILif failed to set storm control action.
OPEN_E_UNAVAILif the feature is unsupported.
OPEN_E_PARAMerror in parameter passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.11

Examples:
storm_control_example.c.
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.

Parameters
[in]client_handleClient handle from registration API
[in]stormCtrlModeStorm control mode: broadcast/multicast/unicast
[in]interfaceInterface ID
[out]stateStorm-control mode state: enable/disable
Return values
OPEN_E_NONEif the state of storm control mode is returned on an interface.
OPEN_E_FAILif the interface is not a physical interface or if failed to set storm control mode.
OPEN_E_PARAMerror in parameter passed.

OpEN API Version: 1.1

Examples:
storm_control_example.c.
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.

Parameters
[in]client_handleClient handle from registration API
[in]stormCtrlModeStorm control mode: broadcast/multicast/unicast
[in]interfaceInterface ID
[in]stateStorm control mode state: enable/disable
Return values
OPEN_E_NONEif state of storm control mode is set on an interface.
OPEN_E_FAILif failed to set state of storm control mode on an interface.
OPEN_E_UNAVAILif the feature is unsupported.
OPEN_E_PARAMerror in parameter passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
storm_control_example.c.
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.

Parameters
[in]client_handleClient handle from registration API
[in]stormCtrlModeStorm control mode: broadcast/multicast/unicast
[in]interfaceInterface ID.
Return values
OPEN_E_NONEif threshold value and rate unit are set on an interface.
OPEN_E_FAILif the interface is not a physical interface or if failed to set the threshold value and rate unit.
OPEN_E_PARAMerror in parameter passed.
Note
Calling this API will change the running configuration of the switch.
This API also sets storm control mode to default on an interface.
For storm control to be operational, it must also enabled globally.

OpEN API Version: 1.1

Examples:
storm_control_example.c.
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.

Parameters
[in]client_handleClient handle from registration API
[in]stormCtrlModeStorm control mode: broadcast/multicast/unicast
[in]interfaceInterface ID
[out]rateUnitThreshold unit - pps/percent
[out]thresholdThreshold value
Return values
OPEN_E_NONEif storm control threshold and rate unit of an interface is returned.
OPEN_E_FAILif the interface is not a physical interface or if failed to get storm control threshold and rate unit.
OPEN_E_PARAMerror in parameter passed.

OpEN API Version: 1.1

Examples:
storm_control_example.c.
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.

Parameters
[in]client_handleClient handle from registration API
[in]stormCtrlModeStorm control mode: OPEN_STORM_CTRL_MODE_t
[in]interfaceInterface ID.
[in]rateUnitThreshold unit: OPEN_RATE_UNIT_t
[in]thresholdThreshold value: openapiStormControlThresholdMinMaxGet()
Return values
OPEN_E_NONEif threshold value and rate unit are applied.
OPEN_E_FAILif the interface is not a physical interface or if failed to set storm control mode or if failed to set the threshold value and rate unit.
OPEN_E_UNAVAILif the feature is unsupported.
OPEN_E_PARAMerror in parameter passed.
Note
Calling this API will change the running configuration of the switch.
This API also sets storm control mode to non-default state on the interface.
For storm control to be operational it must also enabled globally.
The minimum and maximum threshold ranges can be determined via openapiStormControlThresholdMinMaxGet().

OpEN API Version: 1.1

Examples:
storm_control_example.c.
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.

Parameters
[in]client_handleClient handle from registration API
[in]stormCtrlModeStorm control mode: OPEN_STORM_CTRL_MODE_t
[out]stateStorm control mode state
Return values
OPEN_E_NONEif storm control mode state is returned successfully.
OPEN_E_UNAVAILif the feature is unsupported.
OPEN_E_PARAMerror in parameter passed.

OpEN API Version: 1.1

Examples:
storm_control_example.c.
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.

Parameters
[in]client_handleClient handle from registration API
[in]stormCtrlModeStorm control mode: OPEN_STORM_CTRL_MODE_t
[in]stateStorm control mode state
Return values
OPEN_E_NONEif storm control mode state is set.
OPEN_E_FAILif failed to set storm control mode state.
OPEN_E_UNAVAILif the feature is unsupported.
OPEN_E_PARAMerror in parameter passed.
Note
Calling this API will change the running configuration of the switch.
This API enables storm control mode globally and sets the default threshold value and rate unit on all interfaces.

OpEN API Version: 1.1

Examples:
storm_control_example.c.
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.

Parameters
[in]client_handleClient handle from registration API
[in]stormCtrlModeStorm control mode: broadcast/multicast/unicast
Return values
OPEN_E_NONEif storm control threshold rate unit and threshold are set to default values.
OPEN_E_FAILif failed to set the values to default.
OPEN_E_UNAVAILif the feature is unsupported.
OPEN_E_PARAMerror in parameter passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
storm_control_example.c.
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.

Parameters
[in]client_handleClient handle from registration API
[in]stormCtrlModeStorm control mode: broadcast/multicast/unicast
[out]rateUnitThreshold unit - pps/percentage
[out]thresholdThreshold value
Return values
OPEN_E_NONEif the storm control threshold is returned.
OPEN_E_UNAVAILif the feature is unsupported.
OPEN_E_PARAMerror in parameter passed.

OpEN API Version: 1.1

Examples:
storm_control_example.c.
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.

Parameters
[in]client_handleClient handle from registration API
[in]rateUnitThreshold unit: OPEN_RATE_UNIT_t
[out]minThresholdMinimum threshold
[out]maxThresholdMaximum threshold
Return values
OPEN_E_NONEif storm control threshold values are returned.
OPEN_E_FAILif failed to get storm control thresholds.
OPEN_E_PARAMerror in parameter passed.

OpEN API Version: 1.1

Examples:
storm_control_example.c.
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.

Parameters
[in]client_handleClient handle from registration API
[in]stormCtrlModeStorm control mode: OPEN_STORM_CTRL_MODE_t
[in]rateUnitThreshold unit: OPEN_RATE_UNIT_t
[in]thresholdThreshold value: openapiStormControlThresholdMinMaxGet()
Return values
OPEN_E_NONEif storm control mode is applied.
OPEN_E_FAILif failed to apply storm control mode.
OPEN_E_UNAVAILif the feature is unsupported.
OPEN_E_PARAMerror in parameter passed.
Note
Calling this API will change the running configuration of the switch.
This API also enables storm control mode globally.
The minimum and maximum threshold ranges can be determined via openapiStormControlThresholdMinMaxGet().

OpEN API Version: 1.1

Examples:
storm_control_example.c.