Panoptes 1.0.0
Endpoint Detection and Response
Loading...
Searching...
No Matches
ResourceCore.h File Reference

Go to the source code of this file.

Macros

#define RESOURCES_API   __declspec(dllimport)
#define NOT_SET   101
#define PANO_SUCCESS   102
#define FILE_NOT_FOUND   103
#define PERMISSION_DENIED   104
#define INVALID_INPUT   105
#define MUTEX_NOT_SET   106
#define MUTEX_SET   107
#define DB_INITIALIZATION   108
#define DB_DELETE   109
#define CONTAINER_START   110
#define WINDOWS_ERR   111
#define INVALID_HANDLE   112
#define IOCTL_FAILED   113
#define EVENT_CREATE   114
#define NAMED_PIPE_CREATE   115
#define KERNEL_PIPE   116
#define NOT_INSTALLED   117
#define CONTROL_SERVICE   118
#define PANO_SERVICE_RUNNING   119
#define PANO_SERVICE_STOPPED   120
#define ERROR_STARTING_SERVICE   121
#define ERROR_STOPPING_SERVICE   122
#define CLEAN_HANDLE   123
#define NOT_ADMIN   125
#define NO_CONFIG   126
#define GRPC_SERVER_ERROR   128
#define EXT_INVALID   129
#define DEBUGGER   130

Functions

RESOURCES_API int GetResourceErrorCode (const char *errorName)
RESOURCES_API const char * GetResourceErrorString (int errorCode)

Macro Definition Documentation

◆ CLEAN_HANDLE

#define CLEAN_HANDLE   123

Definition at line 32 of file ResourceCore.h.

Referenced by DestroyMutex().

◆ CONTAINER_START

#define CONTAINER_START   110

Definition at line 19 of file ResourceCore.h.

Referenced by StartContainers(), and StartDetector().

◆ CONTROL_SERVICE

#define CONTROL_SERVICE   118

Definition at line 27 of file ResourceCore.h.

Referenced by GetKernelServiceStatus(), and StartKernelService().

◆ DB_DELETE

#define DB_DELETE   109

Definition at line 18 of file ResourceCore.h.

◆ DB_INITIALIZATION

#define DB_INITIALIZATION   108

Definition at line 17 of file ResourceCore.h.

Referenced by PanoptesDatabase::InitializeDatabase().

◆ DEBUGGER

#define DEBUGGER   130

Definition at line 37 of file ResourceCore.h.

Referenced by WinMain().

◆ ERROR_STARTING_SERVICE

#define ERROR_STARTING_SERVICE   121

Definition at line 30 of file ResourceCore.h.

◆ ERROR_STOPPING_SERVICE

#define ERROR_STOPPING_SERVICE   122

Definition at line 31 of file ResourceCore.h.

◆ EVENT_CREATE

#define EVENT_CREATE   114

Definition at line 23 of file ResourceCore.h.

◆ EXT_INVALID

#define EXT_INVALID   129

Definition at line 36 of file ResourceCore.h.

◆ FILE_NOT_FOUND

#define FILE_NOT_FOUND   103

Definition at line 12 of file ResourceCore.h.

◆ GRPC_SERVER_ERROR

#define GRPC_SERVER_ERROR   128

Definition at line 35 of file ResourceCore.h.

Referenced by WinMain().

◆ INVALID_HANDLE

#define INVALID_HANDLE   112

Definition at line 21 of file ResourceCore.h.

◆ INVALID_INPUT

#define INVALID_INPUT   105

◆ IOCTL_FAILED

#define IOCTL_FAILED   113

◆ KERNEL_PIPE

#define KERNEL_PIPE   116

◆ MUTEX_NOT_SET

#define MUTEX_NOT_SET   106

Definition at line 15 of file ResourceCore.h.

Referenced by MutexExist().

◆ MUTEX_SET

#define MUTEX_SET   107

Definition at line 16 of file ResourceCore.h.

Referenced by WinMain().

◆ NAMED_PIPE_CREATE

#define NAMED_PIPE_CREATE   115

Definition at line 24 of file ResourceCore.h.

◆ NO_CONFIG

#define NO_CONFIG   126

Definition at line 34 of file ResourceCore.h.

◆ NOT_ADMIN

◆ NOT_INSTALLED

#define NOT_INSTALLED   117

Definition at line 26 of file ResourceCore.h.

Referenced by GetKernelServiceStatus(), and StartKernelService().

◆ NOT_SET

#define NOT_SET   101

Definition at line 10 of file ResourceCore.h.

Referenced by GetKernelServiceStatus(), and GetResourceErrorCode().

◆ PANO_SERVICE_RUNNING

#define PANO_SERVICE_RUNNING   119

Definition at line 28 of file ResourceCore.h.

Referenced by GetKernelServiceStatus(), StartKernelService(), and WinMain().

◆ PANO_SERVICE_STOPPED

#define PANO_SERVICE_STOPPED   120

Definition at line 29 of file ResourceCore.h.

Referenced by GetKernelServiceStatus(), StartKernelService(), and WinMain().

◆ PANO_SUCCESS

◆ PERMISSION_DENIED

#define PERMISSION_DENIED   104

Definition at line 13 of file ResourceCore.h.

◆ RESOURCES_API

#define RESOURCES_API   __declspec(dllimport)

Definition at line 6 of file ResourceCore.h.

Referenced by GetResourceErrorCode(), and GetResourceErrorString().

◆ WINDOWS_ERR

#define WINDOWS_ERR   111

Function Documentation

◆ GetResourceErrorCode()

RESOURCES_API int GetResourceErrorCode ( const char * errorName)

Definition at line 71 of file ResourceCore.cpp.

71 {
72 auto it = errorCodeMap.find(errorName);
73 return (it != errorCodeMap.end()) ? it->second : NOT_SET;
74}
#define NOT_SET

References NOT_SET, and RESOURCES_API.

◆ GetResourceErrorString()

RESOURCES_API const char * GetResourceErrorString ( int errorCode)

Definition at line 76 of file ResourceCore.cpp.

76 {
77 auto it = errorStringMap.find(errorCode);
78 return (it != errorStringMap.end()) ? it->second : "Unknown error code";
79}

References RESOURCES_API.