flow_learn_span_example.cpp

Reference Documentation

Platform
Intel® PAC
Napatech SmartNIC
Content Type
Reference Information
Capture Software Version
Link™ Capture Software 12.10
Napatech Software Suite: examples/flow/flow_learn_span/flow_learn_span_example.cpp File Reference
flow_learn_span_example.cpp File Reference
#include <nt.h>
#include <algorithm>
#include <array>
#include <atomic>
#include <cstdint>
#include <cstring>
#include <functional>
#include <iostream>
#include <memory>
#include <string>
#include <thread>
#include <unordered_map>
#include <vector>

Go to the source code of this file.

Namespaces

 anonymous_namespace{flow_learn_span_example.cpp}
 

Macros

#define STR_INNER(A)   #A
 
#define STR(A)    STR_INNER(A)
 
#define BLACKLIST   3
 
#define WHITELIST   4
 

Functions

void anonymous_namespace{flow_learn_span_example.cpp}::handle_error_status (int status, const char *message)
 
void anonymous_namespace{flow_learn_span_example.cpp}::ntpl_multicall (const std::vector< std::string > &ntpls)
 
uint64_t anonymous_namespace{flow_learn_span_example.cpp}::flow_hash (const NtFlow_t *flow)
 
void anonymous_namespace{flow_learn_span_example.cpp}::rx_task (std::atomic< int > *ready, std::atomic< bool > *end_task, uint32_t stream_id, std::function< void(const NtNetBuf_t &)> handle)
 
void anonymous_namespace{flow_learn_span_example.cpp}::flow_program_task (std::atomic< int > *ready, std::atomic< bool > *end_task)
 
void anonymous_namespace{flow_learn_span_example.cpp}::handle_stream_unhandled (const NtNetBuf_t &)
 
void anonymous_namespace{flow_learn_span_example.cpp}::handle_stream_miss (const NtNetBuf_t &net_buffer)
 
void anonymous_namespace{flow_learn_span_example.cpp}::handle_stream_blacklist_hit (const NtNetBuf_t &)
 
void anonymous_namespace{flow_learn_span_example.cpp}::handle_stream_whitelist_hit (const NtNetBuf_t &)
 
int main (int, char **)
 

Variables

uint64_t anonymous_namespace{flow_learn_span_example.cpp}::counter_unhandled = 0
 
uint64_t anonymous_namespace{flow_learn_span_example.cpp}::counter_miss = 0
 
uint64_t anonymous_namespace{flow_learn_span_example.cpp}::counter_blacklist_hit = 0
 
uint64_t anonymous_namespace{flow_learn_span_example.cpp}::counter_whitelist_hit = 0
 
NtFlowStream_t anonymous_namespace{flow_learn_span_example.cpp}::flow_stream
 
std::unordered_multimap< uint64_t, std::unique_ptr< NtFlow_t > > anonymous_namespace{flow_learn_span_example.cpp}::flow_map
 
std::atomic< uint64_t > anonymous_namespace{flow_learn_span_example.cpp}::flow_learn_queue_read_index {0}
 
std::atomic< uint64_t > anonymous_namespace{flow_learn_span_example.cpp}::flow_learn_queue_write_index {0}
 
std::array< NtFlow_t *, 0x100000 > anonymous_namespace{flow_learn_span_example.cpp}::flow_learn_queue
 
constexpr uint64_t anonymous_namespace{flow_learn_span_example.cpp}::flow_learn_queue_index_mask = 0xfffff
 

Macro Definition Documentation

#define STR_INNER (   A)    #A

Definition at line 97 of file flow_learn_span_example.cpp.

#define STR (   A)    STR_INNER(A)
Examples:
flow/flow_learn_span/flow_learn_span_example.cpp.

Definition at line 98 of file flow_learn_span_example.cpp.

Referenced by main().

#define BLACKLIST   3
Examples:
flow/flow_learn_span/flow_learn_span_example.cpp.

Definition at line 200 of file flow_learn_span_example.cpp.

Referenced by main().

Function Documentation

int main ( int  ,
char **   
)

Definition at line 364 of file flow_learn_span_example.cpp.