9 #define MAX_NUM_OF_CORES 32
12 int gettimeofday(
struct timeval* tp,
struct timezone* tzp);
47 return Id == other.
Id;
192 typedef uint32_t CoreMask;
302 static std::string m_AppName;
311 static void init(
int argc,
char* argv[])
322 size_t lastPos = m_AppName.rfind(
'/');
323 if (lastPos != std::string::npos)
325 m_AppName = m_AppName.substr(lastPos + 1);
329 lastPos = m_AppName.rfind(
'\\');
330 if (lastPos != std::string::npos)
332 m_AppName = m_AppName.substr(lastPos + 1);
336 lastPos = m_AppName.rfind(
'.');
337 if (lastPos != std::string::npos)
339 m_AppName.resize(lastPos);
346 static const std::string&
get()
388 void* m_ApplicationInterruptedCookie;
394 static int handlerRoutine(
unsigned long fdwCtrlType);
396 static void handlerRoutine(
int signum);
Definition: SystemUtils.h:300
static void init(int argc, char *argv[])
Definition: SystemUtils.h:311
static const std::string & get()
Definition: SystemUtils.h:346
Definition: SystemUtils.h:358
static ApplicationEventHandler & getInstance()
Definition: SystemUtils.h:371
void(* EventHandlerCallback)(void *cookie)
Definition: SystemUtils.h:365
void onApplicationInterrupted(EventHandlerCallback handler, void *cookie)
The main namespace for the PcapPlusPlus lib.
CoreMask createCoreMaskFromCoreIds(const std::vector< int > &coreIds)
void multiPlatformMSleep(uint32_t milliseconds)
std::string executeShellCommand(const std::string &command)
CoreMask createCoreMaskFromCoreVector(const std::vector< SystemCore > &cores)
CoreMask getCoreMaskForAllMachineCores()
void createCoreVectorFromCoreMask(CoreMask coreMask, std::vector< SystemCore > &resultVec)
uint32_t netToHost32(uint32_t net)
uint16_t hostToNet16(uint16_t host)
uint32_t hostToNet32(uint32_t host)
uint16_t netToHost16(uint16_t net)
int clockGetTime(long &sec, long &nsec)
void multiPlatformSleep(uint32_t seconds)
bool directoryExists(const std::string &dirPath)
Definition: SystemUtils.h:27
bool operator==(const SystemCore &other) const
Definition: SystemUtils.h:45
uint32_t Mask
Definition: SystemUtils.h:34
uint8_t Id
Definition: SystemUtils.h:39
Definition: SystemUtils.h:56
static const SystemCore Core9
Definition: SystemUtils.h:96
static const SystemCore Core16
Definition: SystemUtils.h:124
static const SystemCore Core15
Definition: SystemUtils.h:120
static const SystemCore Core29
Definition: SystemUtils.h:176
static const SystemCore Core26
Definition: SystemUtils.h:164
static const SystemCore Core13
Definition: SystemUtils.h:112
static const SystemCore Core22
Definition: SystemUtils.h:148
static const SystemCore Core10
Definition: SystemUtils.h:100
static const SystemCore Core8
Definition: SystemUtils.h:92
static const SystemCore Core1
Definition: SystemUtils.h:64
static const SystemCore Core23
Definition: SystemUtils.h:152
static const SystemCore Core17
Definition: SystemUtils.h:128
static const SystemCore Core14
Definition: SystemUtils.h:116
static const SystemCore Core20
Definition: SystemUtils.h:140
static const SystemCore Core3
Definition: SystemUtils.h:72
static const SystemCore Core27
Definition: SystemUtils.h:168
static const SystemCore Core30
Definition: SystemUtils.h:180
static const SystemCore Core18
Definition: SystemUtils.h:132
static const SystemCore Core0
Definition: SystemUtils.h:60
static const SystemCore Core12
Definition: SystemUtils.h:108
static const SystemCore Core24
Definition: SystemUtils.h:156
static const SystemCore Core25
Definition: SystemUtils.h:160
static const SystemCore Core11
Definition: SystemUtils.h:104
static const SystemCore Core28
Definition: SystemUtils.h:172
static const SystemCore Core7
Definition: SystemUtils.h:88
static const SystemCore Core19
Definition: SystemUtils.h:136
static const SystemCore Core4
Definition: SystemUtils.h:76
static const SystemCore IdToSystemCore[32]
Definition: SystemUtils.h:189
static const SystemCore Core31
Definition: SystemUtils.h:184
static const SystemCore Core2
Definition: SystemUtils.h:68
static const SystemCore Core5
Definition: SystemUtils.h:80
static const SystemCore Core6
Definition: SystemUtils.h:84
static const SystemCore Core21
Definition: SystemUtils.h:144