40 #ifndef OPENAPI_IFA_H_INCLUDED
41 #define OPENAPI_IFA_H_INCLUDED
48 #define OPEN_IFA_MAX_NAME_LENGTH 128
51 #define OPEN_IFA_MAX_FLOWS_PER_SESSION 8
54 #define OPEN_IFA_ASIC_MAX_COUNT 1
63 typedef enum _open_ifa_flow_type_
65 OPEN_IFA_FLOW_FIVE_TUPLE = (1<<0),
66 OPEN_IFA_FLOW_EGR_PORTS = (1<<1),
67 OPEN_IFA_FLOW_ING_PORTS = (1<<2),
68 } OPEN_IFA_FLOW_TYPE_t;
71 typedef enum _open_ifa_tuple_mask_
73 OPEN_IFA_CONFIG_TUPLE_SRC_IP = (1 << 0),
74 OPEN_IFA_CONFIG_TUPLE_DST_IP = (1 << 1),
75 OPEN_IFA_CONFIG_TUPLE_PROTOCOL = (1 << 2),
76 OPEN_IFA_CONFIG_TUPLE_SRC_PORT = (1 << 3),
77 OPEN_IFA_CONFIG_TUPLE_DST_PORT = (1 << 4)
78 } OPEN_IFA_TUPLE_MASK_t;
83 OPEN_INSTRU_IP_PREFIX_t src_ip;
84 OPEN_INSTRU_IP_PREFIX_t dst_ip;
85 unsigned int protocol;
86 unsigned short src_port;
87 unsigned short dst_port;
88 unsigned int tuple_mask;
92 typedef enum _open_ifa_flow_param_mask_
94 OPEN_IFA_FLOW_PARAM_ING_PORT = (1 << 0),
95 OPEN_IFA_FLOW_PARAM_SAMPLING_RATE = (1 << 1),
96 } OPEN_IFA_FLOW_PARAM_t;
101 unsigned int ing_port;
105 unsigned int sampling_rate;
113 OPEN_IFA_FLOW_TYPE_t type;
117 typedef enum _open_ifa_cl_config_param_mask_
119 OPEN_IFA_CL_CONFIG_VLAN_MASK = (1 << 0),
120 OPEN_IFA_CL_CONFIG_PRIORITY_MASK = (1 << 1),
121 } OPEN_IFA_CL_CONFIG_PARAM_MASK_t;
133 OPEN_INSTRU_IP_ADDR_t addr;
135 unsigned short vlan_id;
136 unsigned char priority;
137 OPEN_IFA_CL_CONFIG_PARAM_MASK_t mask;
150 unsigned int num_of_flows;
153 unsigned int congestion_limit;
154 unsigned int drop_limit;
158 typedef enum _open_ifa_dev_type_
160 IFA_DEV_TYPE_INGRESS = (1 << 0),
161 IFA_DEV_TYPE_INTERMEDIATE = (1 << 1),
162 IFA_DEV_TYPE_EGRESS = (1 << 2)
163 } OPEN_IFA_DEV_TYPE_t;
166 typedef enum _open_ifa_feat_config_mask_
168 OPEN_IFA_FEAT_CONFIG_DEV_ID = (1 << 1),
169 OPEN_IFA_FEAT_CONFIG_DEV_TYPE = (1 << 2)
170 } OPEN_IFA_FEAT_CONFIG_MASK_t;
177 OPEN_IFA_DEV_TYPE_t dev_type;
178 OPEN_IFA_FEAT_CONFIG_MASK_t mask;
184 unsigned int max_flows;
185 unsigned int max_sessions;
186 unsigned int max_collectors;
187 unsigned int max_payload;
188 unsigned int flow_types;
191 unsigned int supported_dev_type_mask;
open_error_t openapiIfaSessionStatsGet(openapiClientHandle_t *clientHandle, int asic, open_buffdesc *name, OPEN_IFA_SESSION_STATS_t *data)
Get IFA stats.
open_error_t openapiIfaClearStats(openapiClientHandle_t *clientHandle, int asic, open_buffdesc *name)
Clear IFA stats.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiIfaSessionCreate(openapiClientHandle_t *clientHandle, int asic, OPEN_IFA_SESSION_t *session)
Create IFA session.
open_error_t openapiIfaFlowCreate(openapiClientHandle_t *clientHandle, int asic, OPEN_IFA_FLOW_t *appFlow)
Create IFA flow.
open_error_t openapiIfaSessionStop(openapiClientHandle_t *clientHandle, int asic, open_buffdesc *name)
Stop IFA session.
open_error_t openapiIfaCapabilitiesGet(openapiClientHandle_t *clientHandle, int asic, OPEN_IFA_CAPABILITIES_t *cap)
Get IFA capabilities.
open_error_t openapiIfaCollectorRemove(openapiClientHandle_t *clientHandle, int asic, open_buffdesc *name)
Remove IFA collector.
open_error_t openapiIfaSessionRemove(openapiClientHandle_t *clientHandle, int asic, open_buffdesc *name)
Remove IFA session.
open_error_t openapiIfaCollectorCreate(openapiClientHandle_t *clientHandle, int asic, OPEN_IFA_CL_CONFIG_t *clConfig)
Create IFA collector.
open_error_t openapiIfaSessionStart(openapiClientHandle_t *clientHandle, int asic, open_buffdesc *name)
Start IFA session.
open_error_t openapiIfaFlowRemove(openapiClientHandle_t *clientHandle, int asic, open_buffdesc *name)
Remove IFA flow.
#define OPEN_IFA_MAX_NAME_LENGTH
Maximum length of name param.
open_error_t openapiIfaConfigGet(openapiClientHandle_t *clientHandle, int asic, OPEN_IFA_FEATURE_t *config)
Inband flow analyzer feature configuration get function.
open_error_t openapiIfaConfigSet(openapiClientHandle_t *clientHandle, int asic, OPEN_IFA_FEATURE_t *config)
Inband flow analyzer feature configuration set function.