PcapPlusPlus  20.08+
pcpp::AppName Class Reference

#include <SystemUtils.h>

Static Public Member Functions

static void init (int argc, char *argv[])
 
static const std::string & get ()
 

Detailed Description

This class extracts the application name from the current running executable and stores it for usage of the application throughout its runtime. This class should be initialized once in the beginning of the main() method using AppName::init() and from then on the app name could be retrieved using AppName::get()

Member Function Documentation

◆ get()

static const std::string& pcpp::AppName::get ( )
inlinestatic
Returns
The app name as extracted from the current running executable

◆ init()

static void pcpp::AppName::init ( int  argc,
char *  argv[] 
)
inlinestatic

Static init method which should be called once at the beginning of the main method.

Parameters
[in]argcThe argc param from main()
[in]argvThe argv param from main()