40 #ifndef OPENAPI_FT_H_INCLUDED
41 #define OPENAPI_FT_H_INCLUDED
50 OPEN_FT_PKT_TYPE_FLW_TEMPLATE = 1,
51 OPEN_FT_PKT_TYPE_FLW_GRP_TEMPLATE,
52 OPEN_FT_PKT_TYPE_FLW_GRP_REC
58 unsigned int periodicity;
59 unsigned int rec_periodicity;
60 unsigned short src_port;
65 typedef enum _open_ft_config_feat_param_mask_
67 OPEN_FT_CONFIG_FEAT_ENABLE_MASK = (1 << 0),
68 OPEN_FT_CONFIG_FEAT_PARAM_FLW_AGE_TIME_MASK = (1 << 1),
69 } OPEN_FT_CONFIG_FEAT_PARAM_MASK_t;
76 unsigned int flow_aging_time;
84 OPEN_FT_CONFIG_FEAT_PARAM_MASK_t param_mask;
91 OPEN_FT_CL_TRANS_TYPE_IPv4_UDP = (1<<0),
92 OPEN_FT_CL_TRANS_TYPE_IPv6_UDP = (1<<1),
93 OPEN_FT_CL_TRANS_TYPE_RAW = (1<<2)
96 typedef enum _open_ft_cl_config_param_mask_
98 OPEN_FT_CL_CONFIG_PORT_MASK = (1 << 0),
99 } OPEN_FT_CL_CONFIG_PARAM_MASK_t;
104 OPEN_FT_CL_PROTO_IPFIXv10 = 10
107 #define OPEN_FT_MAX_NAME_LENGTH 128
112 char name[OPEN_FT_MAX_NAME_LENGTH];
116 OPEN_FT_CL_CONFIG_PARAM_MASK_t param_mask;
125 unsigned int max_pkt_len;
132 OPEN_INSTRU_IP_PREFIX_t src_ip;
133 OPEN_INSTRU_IP_PREFIX_t dst_ip;
134 unsigned int protocol;
135 unsigned short src_port;
136 unsigned short dst_port;
137 unsigned int tuple_mask;
140 #define OPEN_FT_MASK_BASE_UNIT unsigned int
141 #define OPEN_FT_MASKWID (8*sizeof(unsigned int))
144 #define OPEN_FT_MASK_SIZE(_max) (((_max) + OPEN_FT_MASKWID - 1) / OPEN_FT_MASKWID)
146 #define OPEN_FT_PORT_MAX_RANGE_STR_LEN 256
149 #define OPEN_ASIC_ICOS_FT_MAX_PORTS 300
150 #define OPEN_ASIC_FT_MAX_PORTS OPEN_ASIC_ICOS_FT_MAX_PORTS
155 OPEN_FT_MASK_BASE_UNIT value[OPEN_FT_MASK_SIZE(OPEN_ASIC_FT_MAX_PORTS)];
156 uint8_t port_list_str[OPEN_FT_PORT_MAX_RANGE_STR_LEN];
168 typedef enum _open_ft_flw_grp_action_mask_
170 OPEN_FT_FLW_GRP_REP_FLWS = (1 << 0),
171 OPEN_FT_FLW_GRP_REP_FLW_GRPS = (1 << 1),
172 } OPEN_FT_FLW_GRP_ACTION_MASK_t;
175 #define OPEN_FT_MAX_COLLECTOR_LIST_PER_FG 1
180 OPEN_FT_FLW_GRP_MON_TYPE_FIVE_TUPLE = (1 << 0),
181 OPEN_FT_FLW_GRP_MON_TYPE_EGR_PORTS = (1 << 1),
182 OPEN_FT_FLW_GRP_MON_TYPE_ING_PORTS = (1 << 2),
183 OPEN_FT_FLW_GRP_MON_TYPE_CONGESTION = (1 << 3),
189 char name[OPEN_FT_MAX_NAME_LENGTH];
197 OPEN_FT_FLW_GRP_ACTION_MASK_t action_mask;
201 #define OPEN_FT_TEMPLATE_MAX_SETS 1
204 #define OPEN_IP_FIX_INF_MAX_ELEMENTS 16
207 #define OPEN_FT_MAX_TEMPLATES_IN_FLW OPEN_FT_TEMPLATE_MAX_SETS
210 #define OPEN_FT_MIN_PAYLOAD_LEN 64
213 #define OPEN_FT_MAX_PAYLOAD_LEN 1500
216 #define OPEN_FT_ASIC_MAX_COUNT 1
219 #pragma pack(push, 1)
222 unsigned short ent_ele_id;
224 bool ent_num_present;
225 unsigned long ent_num;
231 char name[OPEN_FT_MAX_NAME_LENGTH];
232 unsigned short template_hdr_id;
233 unsigned int num_ele;
239 unsigned int num_templates;
249 uint64_t tcp_syn_cnt;
250 uint64_t tcp_fin_cnt;
251 uint64_t tcp_rst_cnt;
257 bool multiple_collector_support;
258 unsigned int max_collectors;
259 unsigned int export_protocols;
260 unsigned int flw_grp_types;
261 unsigned int max_flw_grps;
262 unsigned int max_flws;
263 bool flw_sampling_support;
264 bool flw_template_support_in_fw;
270 char name[OPEN_FT_MAX_NAME_LENGTH];
277 char collectorName[OPEN_FT_MAX_NAME_LENGTH];
278 char templateName[OPEN_FT_MAX_NAME_LENGTH];
enum _open_ft_pkt_type_ OPEN_FT_PKT_TYPE_t
Enum to identify packet type.
enum _open_ft_flw_grp_mon_type_ OPEN_FT_FLW_GRP_MON_TYPE_t
Flow Tracker flow group monitor type.
open_error_t openapiFtTemplateTransmitConfig(openapiClientHandle_t *clientHandle, int asic, OPEN_FT_TEMPLATE_XMIT_CONFIG_t *ftTemplateXmitConfig)
Flow tracker template transmit configuration.
struct _open_ft_configure_feature_ OPEN_FT_CONFIG_t
Flow Tracker feature configuration.
Union of flow group monitoring params.
open_error_t openapiFtCollectorConfigCreate(openapiClientHandle_t *clientHandle, int asic, OPEN_FT_CL_INFO_t *clInfo)
Flow collector configuration create function.
open_error_t openapiFtPktSend(openapiClientHandle_t *clientHandle, int asic, open_buffdesc *name, OPEN_FT_PKT_TYPE_t pkt_type, int payloadSize, open_buffdesc *payload)
Flow group template format packet send function.
Structure to hold capbilities.
#define OPEN_IP_FIX_INF_MAX_ELEMENTS
Max elements in a template record.
open_error_t
OPEN uses these enumerators to indicate the error codes.
struct _open_ft_5_tuple_key_ OPEN_FT_5_TUPLE_KEY_t
5-tuple parameters
open_error_t openapiFtConfigSet(openapiClientHandle_t *clientHandle, int asic, OPEN_FT_CONFIG_t *ftCfg)
Flow tracker feature configuration set function.
struct _open_ft_flw_grp_stats_t_ OPEN_FT_FLW_GRP_STATS_t
Structure to hold Group stats.
_open_ft_cl_trans_type_
Transport type used to communicate with collector.
_open_ft_flw_grp_mon_type_
Flow Tracker flow group monitor type.
_open_ft_cl_proto_
Flow Tracker Collector Protocol.
enum _open_ft_cl_trans_type_ OPEN_FT_CL_TRANS_TYPE_t
Transport type used to communicate with collector.
open_error_t openapiFtCollectorConfigRemove(openapiClientHandle_t *clientHandle, int asic, open_buffdesc *name)
Flow collector configuration remove function.
open_error_t openapiFtFlowGroupConfigRemove(openapiClientHandle_t *clientHandle, int asic, open_buffdesc *name)
Flow group configuration remove function.
struct _open_ft_flw_grp_config_ OPEN_FT_FLW_GRP_CONFIG_t
Flow group configuration.
#define OPEN_FT_MAX_COLLECTOR_LIST_PER_FG
Max collector for each flow group.
open_error_t openapiFtFlowTemplateConfigCreate(openapiClientHandle_t *clientHandle, int asic, OPEN_FT_FLW_REC_TEMPLATE_t *ftFlwTemplateCfg)
Flow template configuration create function.
struct _open_ft_ipfix_config_ OPEN_FT_IPFIX_CONFIG_t
IPFIX configuration of flow and flow group record exporting processes.
union _open_ft_flw_grp_mon_params_ OPEN_FT_FLW_GRP_MON_PARAMS_t
Union of flow group monitoring params.
Flow group configuration.
open_error_t openapiFtFlowGroupStatsGet(openapiClientHandle_t *clientHandle, int asic, open_buffdesc *name, OPEN_FT_FLW_GRP_STATS_t *pStat)
Flow group statistics get function.
Flow tracker collector config.
open_error_t openapiFtFlowGroupStatsClear(openapiClientHandle_t *clientHandle, int asic, open_buffdesc *name)
Flow group statistics clear function.
open_error_t openapiFtFlowTemplateConfigRemove(openapiClientHandle_t *clientHandle, int asic, open_buffdesc *name)
Flow template configuration remove function.
#define OPEN_FT_MAX_TEMPLATES_IN_FLW
Max templates to used by flow exporting process.
struct _open_ft_cl_info_ OPEN_FT_CL_INFO_t
Flow tracker collector configuration.
open_error_t openapiFtFlowGroupConfigCreate(openapiClientHandle_t *clientHandle, int asic, OPEN_FT_FLW_GRP_CONFIG_t *ftFlwGrpCfg)
Flow group configuration create function.
open_error_t openapiFtCapabilitiesGet(openapiClientHandle_t *clientHandle, int asic, OPEN_FT_CAPABILITIES_t *pCapabilities)
Flow tracker feature capabilities get function.
struct _open_ft_capabilities_t_ OPEN_FT_CAPABILITIES_t
Structure to hold capbilities.
struct _open_ft_cl_config OPEN_FT_CL_CONFIG_t
Flow tracker collector config.
open_error_t openapiFtStatsClear(openapiClientHandle_t *clientHandle, int asic, OPEN_FT_CLEAR_FLW_GRP_STATS_t *clearStatParams)
Flow group statistics clear function.
_open_ft_pkt_type_
Enum to identify packet type.
Structure to hold Group stats.
enum _open_ft_cl_proto_ OPEN_FT_CL_PROTO_t
Flow Tracker Collector Protocol.
IPFIX configuration of flow and flow group record exporting processes.
Flow tracker collector configuration.