|
PcapPlusPlus
20.08
|
Go to the documentation of this file. 1 #ifndef PCAPPP_SYSTEM_UTILS
2 #define PCAPPP_SYSTEM_UTILS
7 #if defined(WIN32) || defined(WINx64) || defined(PCAPPP_MINGW_ENV)
15 #define MAX_NUM_OF_CORES 32
18 int gettimeofday(
struct timeval * tp,
struct timezone * tzp);
194 typedef uint32_t CoreMask;
263 static std::string m_AppName;
271 static void init(
int argc,
char* argv[])
282 size_t lastPos = m_AppName.rfind(
'/');
283 if (lastPos != std::string::npos)
285 m_AppName = m_AppName.substr(lastPos + 1);
289 lastPos = m_AppName.rfind(
'\\');
290 if (lastPos != std::string::npos)
292 m_AppName = m_AppName.substr(lastPos + 1);
296 m_AppName = m_AppName.substr(0, m_AppName.rfind(
'.'));
302 static const std::string&
get() {
return m_AppName; }
340 void* m_ApplicationInterruptedCookie;
346 static BOOL WINAPI handlerRoutine(DWORD fdwCtrlType);
348 pthread_mutex_t m_HandlerRoutineMutex;
349 static void handlerRoutine(
int signum);
Definition: SystemUtils.h:32
uint32_t Mask
Definition: SystemUtils.h:39
static const SystemCore Core24
Definition: SystemUtils.h:158
static ApplicationEventHandler & getInstance()
Definition: SystemUtils.h:324
static const SystemCore Core17
Definition: SystemUtils.h:130
static const SystemCore Core12
Definition: SystemUtils.h:110
static const SystemCore Core5
Definition: SystemUtils.h:82
Definition: SystemUtils.h:310
static const SystemCore Core19
Definition: SystemUtils.h:138
std::string executeShellCommand(const std::string command)
static const SystemCore Core29
Definition: SystemUtils.h:178
void createCoreVectorFromCoreMask(CoreMask coreMask, std::vector< SystemCore > &resultVec)
static void init(int argc, char *argv[])
Definition: SystemUtils.h:271
static const SystemCore Core18
Definition: SystemUtils.h:134
static const SystemCore Core16
Definition: SystemUtils.h:126
static const SystemCore Core4
Definition: SystemUtils.h:78
int clockGetTime(long &sec, long &nsec)
static const SystemCore Core9
Definition: SystemUtils.h:98
static const SystemCore Core21
Definition: SystemUtils.h:146
void(* EventHandlerCallback)(void *cookie)
Definition: SystemUtils.h:318
CoreMask createCoreMaskFromCoreVector(std::vector< SystemCore > cores)
static const SystemCore Core0
Definition: SystemUtils.h:62
static const SystemCore Core30
Definition: SystemUtils.h:182
Definition: SystemUtils.h:260
static const SystemCore Core22
Definition: SystemUtils.h:150
static const SystemCore Core14
Definition: SystemUtils.h:118
static const SystemCore IdToSystemCore[32]
Definition: SystemUtils.h:191
static const SystemCore Core25
Definition: SystemUtils.h:162
static const SystemCore Core7
Definition: SystemUtils.h:90
The main namespace for the PcapPlusPlus lib.
bool directoryExists(std::string dirPath)
static const SystemCore Core23
Definition: SystemUtils.h:154
Definition: SystemUtils.h:57
static const SystemCore Core1
Definition: SystemUtils.h:66
static const SystemCore Core15
Definition: SystemUtils.h:122
void onApplicationInterrupted(EventHandlerCallback handler, void *cookie)
static const SystemCore Core13
Definition: SystemUtils.h:114
static const SystemCore Core2
Definition: SystemUtils.h:70
static const SystemCore Core3
Definition: SystemUtils.h:74
uint8_t Id
Definition: SystemUtils.h:44
static const SystemCore Core26
Definition: SystemUtils.h:166
static const SystemCore Core11
Definition: SystemUtils.h:106
CoreMask createCoreMaskFromCoreIds(std::vector< int > coreIds)
CoreMask getCoreMaskForAllMachineCores()
static const SystemCore Core6
Definition: SystemUtils.h:86
static const SystemCore Core20
Definition: SystemUtils.h:142
static const SystemCore Core28
Definition: SystemUtils.h:174
bool operator==(const SystemCore &other) const
Definition: SystemUtils.h:50
static const SystemCore Core27
Definition: SystemUtils.h:170
static const SystemCore Core8
Definition: SystemUtils.h:94
static const SystemCore Core10
Definition: SystemUtils.h:102
static const SystemCore Core31
Definition: SystemUtils.h:186
static const std::string & get()
Definition: SystemUtils.h:302