Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.11.1.2
Macros | Enumerations | Functions
This Code Implements The OpEN Management Access Control And [OPENAPI_MACAL]

Macros

#define OPEN_MACAL_MAX_PRIORITY   64
 
#define OPEN_MACAL_MIN_PRIORITY   1
 
#define OPEN_MACAL_REQUEST_PRIORITY   0xFFFF
 

Enumerations

enum  OPEN_MACAL_ACTION_t { OPEN_MACAL_ACTION_DENY, OPEN_MACAL_ACTION_PERMIT }
 
enum  OPEN_MACAL_RULE_FIELD_t {
  OPEN_MACAL_SERVICE = (1 << 0), OPEN_MACAL_SRCIP = (1 << 1), OPEN_MACAL_SRCIP_MASK = (1 << 2), OPEN_MACAL_VLAN = (1 << 3),
  OPEN_MACAL_IF = (1 << 4), OPEN_MACAL_SERVICE_PORT = (1 << 5), OPEN_MACAL_TCP_UDP_PORT = (1 << 6)
}
 
enum  OPEN_MACAL_SERVICE_t {
  OPEN_MACAL_PROTOCOL_NONE, OPEN_MACAL_PROTOCOL_TELNET, OPEN_MACAL_PROTOCOL_HTTP, OPEN_MACAL_PROTOCOL_HTTPS,
  OPEN_MACAL_PROTOCOL_SNMP, OPEN_MACAL_PROTOCOL_SSH, OPEN_MACAL_PROTOCOL_TFTP, OPEN_MACAL_PROTOCOL_SNTP,
  OPEN_MACAL_PROTOCOL_JAVA, OPEN_MACAL_PROTOCOL_NTP, OPEN_MACAL_CUSTOM_PORT
}
 

Functions

open_error_t openapiMacalActivate (openapiClientHandle_t *client_handle, open_buffdesc *macalName)
 Activate a management ACAL. More...
 
open_error_t openapiMacalActiveListGet (openapiClientHandle_t *client_handle, open_buffdesc *macalName)
 Get the active management ACAL. More...
 
open_error_t openapiMacalClearServicePortStatistics (openapiClientHandle_t *client_handle)
 Clears macal service port statistics. More...
 
open_error_t openapiMacalDeactivate (openapiClientHandle_t *client_handle, open_buffdesc *macalName)
 Deactivate a management ACAL. More...
 
open_error_t openapiMacalDenyCounterIntervalGet (openapiClientHandle_t *client_handle, uint32_t *interval)
 Get the macal deny counter interval. More...
 
open_error_t openapiMacalDenyCounterIntervalSet (openapiClientHandle_t *client_handle, uint32_t interval)
 Set the macal deny counter interval. More...
 
open_error_t openapiMacalIsAnyListActivated (openapiClientHandle_t *client_handle, OPEN_BOOL_t *isActivated)
 Check if a MACAL list is activated. More...
 
open_error_t openapiMacalIsAnyListCreated (openapiClientHandle_t *client_handle, OPEN_BOOL_t *isCreated)
 Check if a MACAL list is created. More...
 
open_error_t openapiMacalIsFieldConfigured (openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t macalRulePrio, OPEN_MACAL_RULE_FIELD_t ruleField, OPEN_BOOL_t *isConfigured)
 Checks to see if a user has configured a field in a management ACAL rule. More...
 
open_error_t openapiMacalIsNetFilterTablesFeatureSupported (openapiClientHandle_t *client_handle, OPEN_BOOL_t *isSupported)
 Check if the Net Filter table support is present on this platform. More...
 
open_error_t openapiMacalListCreate (openapiClientHandle_t *client_handle, open_buffdesc *macalName)
 To create a new management ACAL. More...
 
open_error_t openapiMacalListDelete (openapiClientHandle_t *client_handle, open_buffdesc *macalName)
 To delete an existing management ACAL. More...
 
open_error_t openapiMacalListVrfGet (openapiClientHandle_t *client_handle, open_buffdesc *vrfName)
 Gets VRF of a management ACAL. More...
 
open_error_t openapiMacalListVrfSet (openapiClientHandle_t *client_handle, open_buffdesc *vrfName)
 Sets VRF of a management ACAL. More...
 
open_error_t openapiMacalNameGet (openapiClientHandle_t *client_handle, open_buffdesc *macalName)
 Get the name of the management ACAL already existing. More...
 
open_error_t openapiMacalRuleActionAdd (openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t macalRulePrio, OPEN_MACAL_ACTION_t action)
 To add an action to management ACAL rule. More...
 
open_error_t openapiMacalRuleActionGet (openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t macalRulePrio, OPEN_MACAL_ACTION_t *action)
 Get the action for a management ACAL rule. More...
 
open_error_t openapiMacalRuleEntryAdd (openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t *macalRulePrio)
 To add a management ACAL rule. More...
 
open_error_t openapiMacalRuleExists (openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t macalRulePrio, OPEN_BOOL_t *isIndexExists)
 Check if this management ACAL rule with given priority exists. More...
 
open_error_t openapiMacalRuleFirstGet (openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t *macalRulePrio)
 Get the first management ACAL rule. More...
 
open_error_t openapiMacalRuleInterfaceAdd (openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t macalRulePrio, uint32_t ifNum)
 To add an interface (ethernet/LAG) to an existing management ACAL rule. More...
 
open_error_t openapiMacalRuleInterfaceGet (openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t macalRulePrio, uint32_t *ifNum)
 Get the interface (ethernet/LAG) of an existing management ACAL rule. More...
 
open_error_t openapiMacalRuleIsServicePortSet (openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t macalRulePrio, OPEN_BOOL_t *isRuleForServicePort)
 Check if this management ACAL rule is for the service port. More...
 
open_error_t openapiMacalRuleNextGet (openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t macalRulePrio, uint32_t *nextMacalRulePrio)
 Get the next management ACAL rule. More...
 
open_error_t openapiMacalRulePriorityIndexGet (openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t *macalRulePrio)
 Get the first available priority (index) for the specified management ACAL. More...
 
open_error_t openapiMacalRuleRemove (openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t macalRulePrio)
 To remove a management rule from an existing ACAL. More...
 
open_error_t openapiMacalRuleServiceAdd (openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t macalRulePrio, OPEN_MACAL_SERVICE_t service)
 To add a service to management ACAL rule. More...
 
open_error_t openapiMacalRuleServiceGet (openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t macalRulePrio, OPEN_MACAL_SERVICE_t *service)
 Get the service of a management ACAL rule. More...
 
open_error_t openapiMacalRuleServicePortSet (openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t macalRulePrio, OPEN_BOOL_t isServicePort)
 To add a serviceport to an existing management ACAL rule. More...
 
open_error_t openapiMacalRuleSrcIpMaskAdd (openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t macalRulePrio, uint32_t ipAddr, uint32_t mask)
 To add the source ip address and net mask to a management ACAL rule. More...
 
open_error_t openapiMacalRuleSrcIpMaskGet (openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t macalRulePrio, uint32_t *ipAddr, uint32_t *mask)
 Get the source ip address and net mask of a management ACAL rule. More...
 
open_error_t openapiMacalRuleTcpUdpPortNumberAdd (openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t macalRulePrio, uint32_t portNum)
 Add the TCP/UDP port number to a management ACAL rule. More...
 
open_error_t openapiMacalRuleTcpUdpPortNumberGet (openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t macalRulePrio, uint32_t *portNum)
 Get the TCP/UDP port number of a management ACAL rule. More...
 
open_error_t openapiMacalRuleVlanAdd (openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t macalRulePrio, uint32_t vlanId)
 To add a vlan to an existing management ACAL rule. More...
 
open_error_t openapiMacalRuleVlanGet (openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t macalRulePrio, uint32_t *vlanId)
 Gets the vlan ID of an existing management ACAL rule. More...
 
open_error_t openapiMacalServicePortRuleStatisticsGet (openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t macalRulePrio, uint32_t *packets, uint32_t *bytes)
 Get the service port statistics for a management ACAL rule. More...
 
open_error_t openapiMacalStatsPacketsFilteredGet (openapiClientHandle_t *client_handle, uint32_t *filtPackets)
 Get the number of packets filtered. More...
 
open_error_t openapiMacalVrfNameValid (openapiClientHandle_t *client_handle, open_buffdesc *vrfName, OPEN_BOOL_t *isValid)
 Checks the specified VRF name is valid or not. More...
 

Detailed Description

Function Documentation

open_error_t openapiMacalActivate ( openapiClientHandle_t client_handle,
open_buffdesc macalName 
)

Activate a management ACAL.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalActiveListGet ( openapiClientHandle_t client_handle,
open_buffdesc macalName 
)

Get the active management ACAL.

Parameters
[in]client_handleClient handle from registration API
[out]macalNameActive MACAL name
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalClearServicePortStatistics ( openapiClientHandle_t client_handle)

Clears macal service port statistics.

Parameters
[in]client_handleClient handle from registration API
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalDeactivate ( openapiClientHandle_t client_handle,
open_buffdesc macalName 
)

Deactivate a management ACAL.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalDenyCounterIntervalGet ( openapiClientHandle_t client_handle,
uint32_t *  interval 
)

Get the macal deny counter interval.

Parameters
[in]client_handleClient handle from registration API
[out]intervalDeny counter interval
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalDenyCounterIntervalSet ( openapiClientHandle_t client_handle,
uint32_t  interval 
)

Set the macal deny counter interval.

Parameters
[in]client_handleClient handle from registration API
[in]intervalDeny counter interval
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalIsAnyListActivated ( openapiClientHandle_t client_handle,
OPEN_BOOL_t isActivated 
)

Check if a MACAL list is activated.

Parameters
[in]client_handleClient handle from registration API
[out]isActivatedTRUE if the MACAL is activated
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalIsAnyListCreated ( openapiClientHandle_t client_handle,
OPEN_BOOL_t isCreated 
)

Check if a MACAL list is created.

Parameters
[in]client_handleClient handle from registration API
[out]isCreatedTRUE if the MACAL is created
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalIsFieldConfigured ( openapiClientHandle_t client_handle,
open_buffdesc macalName,
uint32_t  macalRulePrio,
OPEN_MACAL_RULE_FIELD_t  ruleField,
OPEN_BOOL_t isConfigured 
)

Checks to see if a user has configured a field in a management ACAL rule.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
[in]macalRulePrioMACAL rule priority. This is used as the rule index
[in]ruleFieldManagement ACAL rule field
[out]isConfiguredTRUE if the specified filed is configured
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalIsNetFilterTablesFeatureSupported ( openapiClientHandle_t client_handle,
OPEN_BOOL_t isSupported 
)

Check if the Net Filter table support is present on this platform.

Parameters
[in]client_handleClient handle from registration API
[out]isSupportedTRUE if the platform supports net filter table
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalListCreate ( openapiClientHandle_t client_handle,
open_buffdesc macalName 
)

To create a new management ACAL.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalListDelete ( openapiClientHandle_t client_handle,
open_buffdesc macalName 
)

To delete an existing management ACAL.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalListVrfGet ( openapiClientHandle_t client_handle,
open_buffdesc vrfName 
)

Gets VRF of a management ACAL.

Parameters
[in]client_handleClient handle from registration API
[in]vrfNameVRF name
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalListVrfSet ( openapiClientHandle_t client_handle,
open_buffdesc vrfName 
)

Sets VRF of a management ACAL.

Parameters
[in]client_handleClient handle from registration API
[in]vrfNameVRF name
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalNameGet ( openapiClientHandle_t client_handle,
open_buffdesc macalName 
)

Get the name of the management ACAL already existing.

Parameters
[in]client_handleClient handle from registration API
[out]macalNameMACAL name
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalRuleActionAdd ( openapiClientHandle_t client_handle,
open_buffdesc macalName,
uint32_t  macalRulePrio,
OPEN_MACAL_ACTION_t  action 
)

To add an action to management ACAL rule.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
[in]macalRulePrioMACAL rule priority. This is used as the rule index
[in]actionAction (permit/deny)
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalRuleActionGet ( openapiClientHandle_t client_handle,
open_buffdesc macalName,
uint32_t  macalRulePrio,
OPEN_MACAL_ACTION_t *  action 
)

Get the action for a management ACAL rule.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
[in]macalRulePrioMACAL rule priority. This is used as the rule index
[out]actionAction (permit/deny)
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalRuleEntryAdd ( openapiClientHandle_t client_handle,
open_buffdesc macalName,
uint32_t *  macalRulePrio 
)

To add a management ACAL rule.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
[in,out]macalRulePrioMACAL rule priority. This is used as the rule index
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available
Note
Calling this API will change the running configuration of the switch
If macalRulePrio input value is 0xFFFF then application will allocate available priority/index and set the value in macalRulePrio. If input is other than 0xFFFF, application will create rule with the given priority.

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalRuleExists ( openapiClientHandle_t client_handle,
open_buffdesc macalName,
uint32_t  macalRulePrio,
OPEN_BOOL_t isIndexExists 
)

Check if this management ACAL rule with given priority exists.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
[in]macalRulePrioMACAL rule priority. This is used as the rule index
[out]isIndexExistsTRUE if the rule exists
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalRuleFirstGet ( openapiClientHandle_t client_handle,
open_buffdesc macalName,
uint32_t *  macalRulePrio 
)

Get the first management ACAL rule.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
[out]macalRulePrioMACAL rule priority.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalRuleInterfaceAdd ( openapiClientHandle_t client_handle,
open_buffdesc macalName,
uint32_t  macalRulePrio,
uint32_t  ifNum 
)

To add an interface (ethernet/LAG) to an existing management ACAL rule.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
[in]macalRulePrioMACAL rule priority. This is used as the rule index
[in]ifNumInterface number
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalRuleInterfaceGet ( openapiClientHandle_t client_handle,
open_buffdesc macalName,
uint32_t  macalRulePrio,
uint32_t *  ifNum 
)

Get the interface (ethernet/LAG) of an existing management ACAL rule.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
[in]macalRulePrioMACAL rule priority. This is used as the rule index
[out]ifNumInterface number
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalRuleIsServicePortSet ( openapiClientHandle_t client_handle,
open_buffdesc macalName,
uint32_t  macalRulePrio,
OPEN_BOOL_t isRuleForServicePort 
)

Check if this management ACAL rule is for the service port.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
[in]macalRulePrioMACAL rule priority. This is used as the rule index
[out]isRuleForServicePortTRUE if the rule is for the service port
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalRuleNextGet ( openapiClientHandle_t client_handle,
open_buffdesc macalName,
uint32_t  macalRulePrio,
uint32_t *  nextMacalRulePrio 
)

Get the next management ACAL rule.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
[in]macalRulePrioMACAL rule priority. This is used as index
[out]nextMacalRulePrioNext MACAL rule index
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalRulePriorityIndexGet ( openapiClientHandle_t client_handle,
open_buffdesc macalName,
uint32_t *  macalRulePrio 
)

Get the first available priority (index) for the specified management ACAL.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
[out]macalRulePrioMACAL rule priority. This is used as the rule index
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalRuleRemove ( openapiClientHandle_t client_handle,
open_buffdesc macalName,
uint32_t  macalRulePrio 
)

To remove a management rule from an existing ACAL.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
[in]macalRulePrioMACAL rule priority. This is used as the rule index
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalRuleServiceAdd ( openapiClientHandle_t client_handle,
open_buffdesc macalName,
uint32_t  macalRulePrio,
OPEN_MACAL_SERVICE_t  service 
)

To add a service to management ACAL rule.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
[in]macalRulePrioMACAL rule priority. This is used as the rule index
[in]serviceThe service to be added
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalRuleServiceGet ( openapiClientHandle_t client_handle,
open_buffdesc macalName,
uint32_t  macalRulePrio,
OPEN_MACAL_SERVICE_t *  service 
)

Get the service of a management ACAL rule.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
[in]macalRulePrioMACAL rule priority. This is used as the rule index
[out]serviceService like telnet, ssh ...etc
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalRuleServicePortSet ( openapiClientHandle_t client_handle,
open_buffdesc macalName,
uint32_t  macalRulePrio,
OPEN_BOOL_t  isServicePort 
)

To add a serviceport to an existing management ACAL rule.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
[in]macalRulePrioMACAL rule priority. This is used as the rule index
[in]isServicePortTRUE if the rule is for the service port
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalRuleSrcIpMaskAdd ( openapiClientHandle_t client_handle,
open_buffdesc macalName,
uint32_t  macalRulePrio,
uint32_t  ipAddr,
uint32_t  mask 
)

To add the source ip address and net mask to a management ACAL rule.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
[in]macalRulePrioMACAL rule priority. This is used as the rule index
[in]ipAddrIP address
[in]maskNet Mask
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalRuleSrcIpMaskGet ( openapiClientHandle_t client_handle,
open_buffdesc macalName,
uint32_t  macalRulePrio,
uint32_t *  ipAddr,
uint32_t *  mask 
)

Get the source ip address and net mask of a management ACAL rule.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
[in]macalRulePrioMACAL rule priority. This is used as the rule index
[out]ipAddrIP address
[out]maskNet Mask
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalRuleTcpUdpPortNumberAdd ( openapiClientHandle_t client_handle,
open_buffdesc macalName,
uint32_t  macalRulePrio,
uint32_t  portNum 
)

Add the TCP/UDP port number to a management ACAL rule.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
[in]macalRulePrioMACAL rule priority. This is used as the rule index
[in]portNumTCP/UDP port number
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalRuleTcpUdpPortNumberGet ( openapiClientHandle_t client_handle,
open_buffdesc macalName,
uint32_t  macalRulePrio,
uint32_t *  portNum 
)

Get the TCP/UDP port number of a management ACAL rule.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
[in]macalRulePrioMACAL rule priority. This is used as the rule index
[out]portNumTCP/UDP port number
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalRuleVlanAdd ( openapiClientHandle_t client_handle,
open_buffdesc macalName,
uint32_t  macalRulePrio,
uint32_t  vlanId 
)

To add a vlan to an existing management ACAL rule.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
[in]macalRulePrioMACAL rule priority. This is used as the rule index
[in]vlanIdVlan ID to be added
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalRuleVlanGet ( openapiClientHandle_t client_handle,
open_buffdesc macalName,
uint32_t  macalRulePrio,
uint32_t *  vlanId 
)

Gets the vlan ID of an existing management ACAL rule.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
[in]macalRulePrioMACAL rule priority. This is used as the rule index
[out]vlanIdVlan ID
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalServicePortRuleStatisticsGet ( openapiClientHandle_t client_handle,
open_buffdesc macalName,
uint32_t  macalRulePrio,
uint32_t *  packets,
uint32_t *  bytes 
)

Get the service port statistics for a management ACAL rule.

Parameters
[in]client_handleClient handle from registration API
[in]macalNameMACAL name
[in]macalRulePrioMACAL rule priority. This is used as the rule index
[out]packetsNumber of packets
[out]bytesNumber of bytes
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalStatsPacketsFilteredGet ( openapiClientHandle_t client_handle,
uint32_t *  filtPackets 
)

Get the number of packets filtered.

Parameters
[in]client_handleClient handle from registration API
[out]filtPacketsNumber of packets filtered by MACAL
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available

OpEN API Version: 1.25

Examples:
macal_example.c.
open_error_t openapiMacalVrfNameValid ( openapiClientHandle_t client_handle,
open_buffdesc vrfName,
OPEN_BOOL_t isValid 
)

Checks the specified VRF name is valid or not.

Parameters
[in]client_handleClient handle from registration API
[in]vrfNameVRF name
[out]isValidTRUE if the VRF is valid
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILFeature not available

OpEN API Version: 1.25

Examples:
macal_example.c.