flowmatch_example_helper.cpp

Reference Documentation

Platform
Intel® PAC
Napatech SmartNIC
Content Type
Reference Information
Capture Software Version
Link™ Capture Software 12.10
Napatech Software Suite: examples/flowmatch/flowmatch_example_helper.cpp File Reference
flowmatch_example_helper.cpp File Reference
#include <nt.h>
#include <atomic>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include "flowmatch_example_helper.h"

Go to the source code of this file.

Namespaces

 anonymous_namespace{flowmatch_example_helper.cpp}
 

Functions

bool applicationRunning (void)
 
void applicationStop (void)
 
void handleErrorStatus (int status, const char *message)
 
void setHostLoopback (uint8_t port, bool enable)
 

Variables

std::atomic< bool > anonymous_namespace{flowmatch_example_helper.cpp}::ApplicationRunning { true }
 

Function Documentation

bool applicationRunning ( void  )

Check if application is still running.

Returns
true until applicationStop() has been called.

Definition at line 60 of file flowmatch_example_helper.cpp.

Referenced by taskReceiverCounter(), and taskReceiverMiss().

void applicationStop ( void  )

Sets flag that causes applicationRunning() to return false.

Examples:
flowmatch/flowmatch_example_main.cpp.

Definition at line 65 of file flowmatch_example_helper.cpp.

Referenced by main().

void handleErrorStatus ( int  status,
const char *  message 
)

Check if status is an error code, and if it is print the error description and then quit the application.

Examples:
flowmatch/flowmatch_example_main.cpp.

Definition at line 70 of file flowmatch_example_helper.cpp.

Referenced by assignNtplFilters(), main(), anonymous_namespace{flowmatch_example_ntpl.cpp}::ntplCall(), openAndClearFlowStats(), printAndCloseFlowStats(), setHostLoopback(), taskReceiverCounter(), taskReceiverMiss(), and taskTransmitter().

void setHostLoopback ( uint8_t  port,
bool  enable 
)

Configure a port to enable or disable host-loopback. This function is used to allow the example code to be independent of a specific test setup.

Examples:
flowmatch/flowmatch_example_main.cpp.

Definition at line 80 of file flowmatch_example_helper.cpp.

Referenced by main().