flow_learn_span_example.cpp

Reference Documentation

Platform
Intel® PAC
Napatech SmartNIC
Content Type
Reference Information
Capture Software Version
Link™ Capture Software 12.8
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.

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 **)
 

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
 

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
 

Function Documentation

int main ( int  ,
char **   
)

Definition at line 363 of file flow_learn_span_example.cpp.

Macro Definition Documentation

#define STR_INNER (   A)    #A

Definition at line 96 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 97 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 199 of file flow_learn_span_example.cpp.

Referenced by main().

#define WHITELIST   4
Examples:
flow/flow_learn_span/flow_learn_span_example.cpp.

Definition at line 200 of file flow_learn_span_example.cpp.

Referenced by anonymous_namespace{flow_learn_span_example.cpp}::handle_stream_miss(), and main().