3. Data Structures

Here are the data structures with brief descriptions:

DPI init configuration
L2-L4 flow information
Dequeue result
Extra signature data
Signature info
DPI statistics
Doca flow actions information
Doca flow global configuration
Doca flow encap data information
Doca flow error message struct
Forwarding configuration
Doca flow ip address
Doca flow matcher information
Doca monitor action configuration
Pipeline configuration
Doca flow port configuration
Flow query result
Doca flow tunnel information
Flow record, represent a flow at specific moment, usually after a flow end or after some timeout. Each one is a data record that will appear in the collector. This template is based on V5 fields with additional V9 fields
One field in netflow template, please look at doca_netflow_types for type macros
Template for the records. struct record_exmaple { uint32_t src_addr_V4; uint32_t dst_addr_V4; } struct doca_netflow_flowset_field fields[] = { {.type = DOCA_NETFLOW_IPV4_SRC_ADDR, .length = DOCA_NETFLOW_IPV4_SRC_ADDR_DEFAULT_LENGTH}, {.type = DOCA_NETFLOW_IPV4_DST_ADDR, .length = DOCA_NETFLOW_IPV4_DST_ADDR_DEFAULT_LENGTH} }; struct doca_netflow_template template = { .field_count = 2; .fields = fields; };

3.1. doca_dpi_config_t Struct Reference

[Deep packet inspection]

Public Variables

uint32_t  max_packets_per_queue
uint32_t  max_sig_match_len
uint16_t  nb_queues


uint32_t doca_dpi_config_t::max_packets_per_queue [inherited]

Number of packets concurrently processed by the DPI engine.

uint32_t doca_dpi_config_t::max_sig_match_len [inherited]

The minimum required overlap between two packets for regex match

uint16_t doca_dpi_config_t::nb_queues [inherited]

Number of DPI queues

3.2. doca_dpi_parsing_info Struct Reference

[Deep packet inspection]

Public Variables

__be16  ethertype
in_addr  ipv4
in6_addr  ipv6
in_port_t  l4_dport
uint8_t  l4_protocol
in_port_t  l4_sport


__be16 doca_dpi_parsing_info::ethertype [inherited]

Ethertype of the packet in network byte order

in_addr doca_dpi_parsing_info::ipv4 [inherited]

Ipv4 destination address in network byte order

in6_addr doca_dpi_parsing_info::ipv6 [inherited]

Ipv6 destination address in network byte order

in_port_t doca_dpi_parsing_info::l4_dport [inherited]

Layer 4 destination port in network byte order

uint8_t doca_dpi_parsing_info::l4_protocol [inherited]

Layer 4 protocol

in_port_t doca_dpi_parsing_info::l4_sport [inherited]

Layer 4 source port in network byte order

3.3. doca_dpi_result Struct Reference

[Deep packet inspection]

Public Variables

struct doca_dpi_sig_info info
bool  matched
rte_mbuf * pkt
int  status_flags
void * user_data


struct doca_dpi_sig_infodoca_dpi_result::info [inherited]

Signature information

bool doca_dpi_result::matched [inherited]

Indicates flow was matched

rte_mbuf * doca_dpi_result::pkt [inherited]

Pkt provided on enqueue

int doca_dpi_result::status_flags [inherited]

doca_dpi_flow_status flags

void * doca_dpi_result::user_data [inherited]

User data provided on enqueue

3.4. doca_dpi_sig_data Struct Reference

[Deep packet inspection]

Public Variables

char  name[1024]
uint32_t  sig_id


char doca_dpi_sig_data::name[1024] [inherited]

Signature name

uint32_t doca_dpi_sig_data::sig_id [inherited]

Signature ID as provided in the signature

3.5. doca_dpi_sig_info Struct Reference

[Deep packet inspection]

Public Variables

int  action
uint32_t  sig_id


int doca_dpi_sig_info::action [inherited]

The action as provided in the signature

uint32_t doca_dpi_sig_info::sig_id [inherited]

Signature ID as provided in the signature

3.6. doca_dpi_stat_info Struct Reference

[Deep packet inspection]

Public Variables

uint32_t  nb_http_parser_based
uint32_t  nb_matches
uint32_t  nb_other_l4
uint32_t  nb_other_l7
uint32_t  nb_scanned_pkts
uint32_t  nb_ssl_parser_based
uint32_t  nb_tcp_based
uint32_t  nb_udp_based


uint32_t doca_dpi_stat_info::nb_http_parser_based [inherited]

Total number of http signature matches

uint32_t doca_dpi_stat_info::nb_matches [inherited]

Total number of signature matches

uint32_t doca_dpi_stat_info::nb_other_l4 [inherited]

Total number of other l5 signature matches

uint32_t doca_dpi_stat_info::nb_other_l7 [inherited]

Total number of other l7 signature matches

uint32_t doca_dpi_stat_info::nb_scanned_pkts [inherited]

Total number of scanned packets

uint32_t doca_dpi_stat_info::nb_ssl_parser_based [inherited]

Total number of ssl signature matches

uint32_t doca_dpi_stat_info::nb_tcp_based [inherited]

Total number of tco signature matches

uint32_t doca_dpi_stat_info::nb_udp_based [inherited]

Total number of udp signature matches

3.7. doca_flow_actions Struct Reference


Public Variables

bool  dec_ttl
bool  decap
struct doca_flow_encap_action encap
bool  has_encap
struct doca_flow_ip_addr mod_dst_ip
uint8_t  mod_dst_mac[DOCA_ETHER_ADDR_LEN]
doca_be16_t  mod_dst_port
struct doca_flow_ip_addr mod_src_ip
uint8_t  mod_src_mac[DOCA_ETHER_ADDR_LEN]
doca_be16_t  mod_src_port


bool doca_flow_actions::dec_ttl [inherited]

decrease TTL value

bool doca_flow_actions::decap [inherited]

when true, will do decap

struct doca_flow_encap_actiondoca_flow_actions::encap [inherited]

encap data information

bool doca_flow_actions::has_encap [inherited]

when true, will do encap

struct doca_flow_ip_addrdoca_flow_actions::mod_dst_ip [inherited]

modify destination ip address

uint8_t doca_flow_actions::mod_dst_mac[DOCA_ETHER_ADDR_LEN] [inherited]

modify destination mac address

doca_be16_t doca_flow_actions::mod_dst_port [inherited]

modify layer 4 destination port

struct doca_flow_ip_addrdoca_flow_actions::mod_src_ip [inherited]

modify source ip address

uint8_t doca_flow_actions::mod_src_mac[DOCA_ETHER_ADDR_LEN] [inherited]

modify source mac address

doca_be16_t doca_flow_actions::mod_src_port [inherited]

modify layer 4 source port

3.8. doca_flow_cfg Struct Reference


Public Variables

bool  aging
bool  is_hairpin
uint16_t  queues
uint32_t  total_sessions


bool doca_flow_cfg::aging [inherited]

when true, aging is handled by doca

bool doca_flow_cfg::is_hairpin [inherited]

when true, the fwd will be hairpin queue

uint16_t doca_flow_cfg::queues [inherited]

queue id for each offload thread

uint32_t doca_flow_cfg::total_sessions [inherited]

total flows count

3.9. doca_flow_encap_action Struct Reference


Public Variables

struct doca_flow_ip_addr dst_ip
uint8_t  dst_mac[DOCA_ETHER_ADDR_LEN]
struct doca_flow_ip_addr src_ip
uint8_t  src_mac[DOCA_ETHER_ADDR_LEN]
struct doca_flow_tun tun


struct doca_flow_ip_addrdoca_flow_encap_action::dst_ip [inherited]

destination ip address

uint8_t doca_flow_encap_action::dst_mac[DOCA_ETHER_ADDR_LEN] [inherited]

destination mac address

struct doca_flow_ip_addrdoca_flow_encap_action::src_ip [inherited]

source ip address

uint8_t doca_flow_encap_action::src_mac[DOCA_ETHER_ADDR_LEN] [inherited]

source mac address

struct doca_flow_tundoca_flow_encap_action::tun [inherited]

tunnel info

3.10. doca_flow_error Struct Reference


Public Variables

const char * message
enumdoca_flow_error_type type


const char * doca_flow_error::message [inherited]

Human-readable error message

enumdoca_flow_error_typedoca_flow_error::type [inherited]

Cause field and error types

3.11. doca_flow_fwd Struct Reference


Public Variables

doca_flow_pipe * next_pipe
int  num_of_queues
uint16_t  port_id
uint32_t  rss_flags
uint32_t  rss_mark
uint16_t * rss_queues
enumdoca_flow_fwd_type type


doca_flow_pipe * doca_flow_fwd::next_pipe [inherited]

next pipe pointer

int doca_flow_fwd::num_of_queues [inherited]

number of queues

uint16_t doca_flow_fwd::port_id [inherited]

destination port id

uint32_t doca_flow_fwd::rss_flags [inherited]

rss offload types

uint32_t doca_flow_fwd::rss_mark [inherited]

markid of each queues

uint16_t * doca_flow_fwd::rss_queues [inherited]

rss queues array

enumdoca_flow_fwd_typedoca_flow_fwd::type [inherited]

indicate the forwarding type

3.12. doca_flow_ip_addr Struct Reference

Public Variables

doca_be32_t  ipv4_addr
doca_be32_t  ipv6_addr[4]
uint8_t  type


doca_be32_t doca_flow_ip_addr::ipv4_addr [inherited]

ipv4 address if type is ipv4

doca_be32_t doca_flow_ip_addr::ipv6_addr[4] [inherited]

ipv6 address if type is ipv6

uint8_t doca_flow_ip_addr::type [inherited]

ip address type

3.13. doca_flow_match Struct Reference


Public Variables

uint32_t  flags
struct doca_flow_ip_addr in_dst_ip
doca_be16_t  in_dst_port
uint8_t  in_l4_type
struct doca_flow_ip_addr in_src_ip
doca_be16_t  in_src_port
struct doca_flow_ip_addr out_dst_ip
uint8_t  out_dst_mac[DOCA_ETHER_ADDR_LEN]
doca_be16_t  out_dst_port
uint8_t  out_l4_type
struct doca_flow_ip_addr out_src_ip
uint8_t  out_src_mac[DOCA_ETHER_ADDR_LEN]
doca_be16_t  out_src_port
struct doca_flow_tun tun
doca_be16_t  vlan_id


uint32_t doca_flow_match::flags [inherited]

match items which are no value

struct doca_flow_ip_addrdoca_flow_match::in_dst_ip [inherited]

inner destination ip address if tunnel is used

doca_be16_t doca_flow_match::in_dst_port [inherited]

inner layer 4 destination port if tunnel is used

uint8_t doca_flow_match::in_l4_type [inherited]

inner layer 4 protocol type if tunnel is used

struct doca_flow_ip_addrdoca_flow_match::in_src_ip [inherited]

inner source ip address if tunnel is used

doca_be16_t doca_flow_match::in_src_port [inherited]

inner layer 4 source port if tunnel is used

struct doca_flow_ip_addrdoca_flow_match::out_dst_ip [inherited]

outer destination ip address

uint8_t doca_flow_match::out_dst_mac[DOCA_ETHER_ADDR_LEN] [inherited]

outer destination mac address

doca_be16_t doca_flow_match::out_dst_port [inherited]

outer layer 4 destination port

uint8_t doca_flow_match::out_l4_type [inherited]

outer layer 4 protocol type

struct doca_flow_ip_addrdoca_flow_match::out_src_ip [inherited]

outer source ip address

uint8_t doca_flow_match::out_src_mac[DOCA_ETHER_ADDR_LEN] [inherited]

outer source mac address

doca_be16_t doca_flow_match::out_src_port [inherited]

outer layer 4 source port

struct doca_flow_tundoca_flow_match::tun [inherited]

tunnel info

doca_be16_t doca_flow_match::vlan_id [inherited]

outer vlan id

3.14. doca_flow_monitor Struct Reference


Public Variables

uint32_t  aging
uint64_t  cir
uint8_t  flags
uint32_t  id


uint32_t doca_flow_monitor::aging [inherited]

aging time in seconds.

uint64_t doca_flow_monitor::cir [inherited]

Committed Information Rate (bytes/second).

uint8_t doca_flow_monitor::flags [inherited]

indicate which actions be included

uint32_t doca_flow_monitor::id [inherited]

meter id

3.15. doca_flow_pipe_cfg Struct Reference


Public Variables

const char * name
doca_flow_port * port


doca_flow_actions * doca_flow_pipe_cfg::actions [inherited]

actions for the pipeline

doca_flow_match * doca_flow_pipe_cfg::match [inherited]

matcher for the pipeline

doca_flow_match * doca_flow_pipe_cfg::match_mask [inherited]

match mask for the pipeline

doca_flow_monitor * doca_flow_pipe_cfg::monitor [inherited]

monitor for the pipeline

const char * doca_flow_pipe_cfg::name [inherited]

name for the pipeline

doca_flow_port * doca_flow_pipe_cfg::port [inherited]

port for the pipeline

3.16. doca_flow_port_cfg Struct Reference


Public Variables

const char * devargs
uint16_t  port_id
uint16_t  priv_data_size
enumdoca_flow_port_type type


const char * doca_flow_port_cfg::devargs [inherited]

specific per port type cfg

uint16_t doca_flow_port_cfg::port_id [inherited]

dpdk port id

uint16_t doca_flow_port_cfg::priv_data_size [inherited]

user private data

enumdoca_flow_port_typedoca_flow_port_cfg::type [inherited]

mapping type of port

3.17. doca_flow_query Struct Reference


Public Variables

uint64_t  total_bytes
uint64_t  total_pkts


uint64_t doca_flow_query::total_bytes [inherited]

total bytes hit this flow

uint64_t doca_flow_query::total_pkts [inherited]

total packets hit this flow

3.18. doca_flow_tun Struct Reference

Public Variables

doca_be32_t  gre_key
enum doca_flow_tun_type  type
uint32_t  vxlan_tun_id


doca_be32_t doca_flow_tun::gre_key [inherited]

gre key

enum doca_flow_tun_type doca_flow_tun::type [inherited]

tunnel type

uint32_t doca_flow_tun::vxlan_tun_id [inherited]

vxlan vni

3.19. doca_netflow_default_record Struct Reference



all fields are in network byte order.

Public Variables

__be32  d_octets
__be32  d_pkts
__be32  dst_addr_v4
in6_addr  dst_addr_v6
__be16  dst_as
uint8_t  dst_mask
__be16  dst_port
__be32  first
__be64  flow_id
__be16  input
__be32  last
__be32  next_hop_v4
in6_addr  next_hop_v6
__be16  output
uint8_t  protocol
__be32  src_addr_v4
in6_addr  src_addr_v6
__be16  src_as
uint8_t  src_mask
__be16  src_port
uint8_t  tcp_flags
uint8_t  tos


char doca_netflow_default_record::application_name[DOCA_NETFLOW_APPLICATION_NAME_DEFAULT_LENGTH] [inherited]

Name associated with a classification

__be32 doca_netflow_default_record::d_octets [inherited]

Octets sent in Duration.

__be32 doca_netflow_default_record::d_pkts [inherited]

Packets sent in Duration

__be32 doca_netflow_default_record::dst_addr_v4 [inherited]

Destination IPV4 Address

in6_addr doca_netflow_default_record::dst_addr_v6 [inherited]

Destination IPV6 Address

__be16 doca_netflow_default_record::dst_as [inherited]

originating AS of destination address

uint8_t doca_netflow_default_record::dst_mask [inherited]

destination address prefix mask bits

__be16 doca_netflow_default_record::dst_port [inherited]

TCP/UDP destination port number or equivalent

__be32 doca_netflow_default_record::first [inherited]

SysUptime at start of flow

__be64 doca_netflow_default_record::flow_id [inherited]

This identifies a transaction within a connection

__be16 doca_netflow_default_record::input [inherited]

Input interface index

__be32 doca_netflow_default_record::last [inherited]

and of last packet of flow

__be32 doca_netflow_default_record::next_hop_v4 [inherited]

Next hop router's IPV4 Address

in6_addr doca_netflow_default_record::next_hop_v6 [inherited]

Next hop router's IPV6 Address

__be16 doca_netflow_default_record::output [inherited]

Output interface index

uint8_t doca_netflow_default_record::protocol [inherited]

IP protocol type (for example, TCP = 6;UDP = 17)

__be32 doca_netflow_default_record::src_addr_v4 [inherited]

Source IPV4 Address

in6_addr doca_netflow_default_record::src_addr_v6 [inherited]

Source IPV6 Address

__be16 doca_netflow_default_record::src_as [inherited]

originating AS of source address

uint8_t doca_netflow_default_record::src_mask [inherited]

source address prefix mask bits

__be16 doca_netflow_default_record::src_port [inherited]

TCP/UDP source port number or equivalent

uint8_t doca_netflow_default_record::tcp_flags [inherited]

Cumulative OR of tcp flags

uint8_t doca_netflow_default_record::tos [inherited]

IP Type-of-Service

3.20. doca_netflow_flowset_field Struct Reference


Public Variables

int  length
int  type


int doca_netflow_flowset_field::length [inherited]

field len in bytes (see link) - will be converted to uint16

int doca_netflow_flowset_field::type [inherited]

field number id (see link) - will be converted to uint16

3.21. doca_netflow_template Struct Reference



all fields are in network byte order.

Public Variables

int  field_count


int doca_netflow_template::field_count [inherited]

number of fields in 'fields' array - will be converted to uint16

doca_netflow_flowset_field * doca_netflow_template::fields [inherited]

array of field info