39 #ifndef OPENAPI_MACAL_H_INCLUDED
40 #define OPENAPI_MACAL_H_INCLUDED
46 OPEN_MACAL_ACTION_DENY,
47 OPEN_MACAL_ACTION_PERMIT
48 } OPEN_MACAL_ACTION_t;
52 OPEN_MACAL_PROTOCOL_NONE,
53 OPEN_MACAL_PROTOCOL_TELNET,
54 OPEN_MACAL_PROTOCOL_HTTP,
55 OPEN_MACAL_PROTOCOL_HTTPS,
56 OPEN_MACAL_PROTOCOL_SNMP,
57 OPEN_MACAL_PROTOCOL_SSH,
58 OPEN_MACAL_PROTOCOL_TFTP,
59 OPEN_MACAL_PROTOCOL_SNTP,
60 OPEN_MACAL_PROTOCOL_JAVA,
61 OPEN_MACAL_PROTOCOL_NTP,
62 OPEN_MACAL_CUSTOM_PORT
63 } OPEN_MACAL_SERVICE_t;
67 OPEN_MACAL_SERVICE = (1 << 0),
68 OPEN_MACAL_SRCIP = (1 << 1),
69 OPEN_MACAL_SRCIP_MASK = (1 << 2),
70 OPEN_MACAL_VLAN = (1 << 3),
71 OPEN_MACAL_IF = (1 << 4),
72 OPEN_MACAL_SERVICE_PORT = (1 << 5),
73 OPEN_MACAL_TCP_UDP_PORT = (1 << 6)
75 } OPEN_MACAL_RULE_FIELD_t;
77 #define OPEN_MACAL_REQUEST_PRIORITY 0xFFFF
78 #define OPEN_MACAL_MIN_PRIORITY 1
79 #define OPEN_MACAL_MAX_PRIORITY 64
218 uint32_t *macalRulePrio);
240 uint32_t macalRulePrio);
263 uint32_t macalRulePrio,
264 OPEN_MACAL_ACTION_t action);
288 uint32_t macalRulePrio,
289 uint32_t ipAddr, uint32_t mask);
312 uint32_t macalRulePrio, uint32_t ifNum);
335 uint32_t macalRulePrio, uint32_t vlanId);
359 uint32_t macalRulePrio,
383 uint32_t macalRulePrio,
407 uint32_t macalRulePrio,
408 OPEN_MACAL_SERVICE_t service);
464 uint32_t *macalRulePrio);
486 uint32_t macalRulePrio,
487 uint32_t *nextMacalRulePrio);
509 uint32_t macalRulePrio,
532 uint32_t macalRulePrio,
533 OPEN_MACAL_ACTION_t *action);
556 uint32_t macalRulePrio,
557 uint32_t *ipAddr, uint32_t *mask);
579 uint32_t macalRulePrio,
602 uint32_t macalRulePrio,
625 uint32_t macalRulePrio,
626 OPEN_MACAL_SERVICE_t *service);
649 uint32_t macalRulePrio,
673 uint32_t macalRulePrio,
697 uint32_t macalRulePrio,
721 uint32_t macalRulePrio,
722 OPEN_MACAL_RULE_FIELD_t ruleField,
777 uint32_t *filtPackets);
835 uint32_t *macalRulePrio);
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.
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.
open_error_t openapiMacalRuleRemove(openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t macalRulePrio)
To remove a management rule from an existing ACAL.
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.
open_error_t openapiMacalIsAnyListCreated(openapiClientHandle_t *client_handle, OPEN_BOOL_t *isCreated)
Check if a MACAL list is created.
open_error_t openapiMacalListCreate(openapiClientHandle_t *client_handle, open_buffdesc *macalName)
To create a new management ACAL.
open_error_t openapiMacalStatsPacketsFilteredGet(openapiClientHandle_t *client_handle, uint32_t *filtPackets)
Get the number of packets filtered.
open_error_t openapiMacalIsNetFilterTablesFeatureSupported(openapiClientHandle_t *client_handle, OPEN_BOOL_t *isSupported)
Check if the Net Filter table support is present on this platform.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiMacalListVrfGet(openapiClientHandle_t *client_handle, open_buffdesc *vrfName)
Gets VRF of a management ACAL.
open_error_t openapiMacalDenyCounterIntervalGet(openapiClientHandle_t *client_handle, uint32_t *interval)
Get the macal deny counter interval.
open_error_t openapiMacalClearServicePortStatistics(openapiClientHandle_t *client_handle)
Clears macal service port statistics.
open_error_t openapiMacalListDelete(openapiClientHandle_t *client_handle, open_buffdesc *macalName)
To delete an existing management ACAL.
open_error_t openapiMacalActivate(openapiClientHandle_t *client_handle, open_buffdesc *macalName)
Activate a management ACAL.
open_error_t openapiMacalDenyCounterIntervalSet(openapiClientHandle_t *client_handle, uint32_t interval)
Set the macal deny counter interval.
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.
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.
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.
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.
open_error_t openapiMacalRuleEntryAdd(openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t *macalRulePrio)
To add a management ACAL rule.
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.
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
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.
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.
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.
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.
open_error_t openapiMacalVrfNameValid(openapiClientHandle_t *client_handle, open_buffdesc *vrfName, OPEN_BOOL_t *isValid)
Checks the specified VRF name is valid or not.
open_error_t openapiMacalDeactivate(openapiClientHandle_t *client_handle, open_buffdesc *macalName)
Deactivate a management ACAL.
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.
open_error_t openapiMacalListVrfSet(openapiClientHandle_t *client_handle, open_buffdesc *vrfName)
Sets VRF of a management ACAL.
open_error_t openapiMacalRuleNextGet(openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t macalRulePrio, uint32_t *nextMacalRulePrio)
Get the next management ACAL rule.
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.
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.
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.
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.
open_error_t openapiMacalRuleFirstGet(openapiClientHandle_t *client_handle, open_buffdesc *macalName, uint32_t *macalRulePrio)
Get the first management ACAL rule.
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.
open_error_t openapiMacalActiveListGet(openapiClientHandle_t *client_handle, open_buffdesc *macalName)
Get the active management ACAL.
open_error_t openapiMacalIsAnyListActivated(openapiClientHandle_t *client_handle, OPEN_BOOL_t *isActivated)
Check if a MACAL list is activated.
open_error_t openapiMacalNameGet(openapiClientHandle_t *client_handle, open_buffdesc *macalName)
Get the name of the management ACAL already existing.