![]() |
Panoptes 1.0.0
Endpoint Detection and Response
|
#include <grpcpp/grpcpp.h>#include "panoptes.grpc.pb.h"#include "panoptes.pb.h"#include "container_ipc.hpp"#include <ExtensibilityCore.h>#include <iostream>#include <atomic>Go to the source code of this file.
Functions | |
| bool | GetRegistryPortValue (DWORD &portValue) |
| Get the gRPC port value from the registry. | |
| void | MessageQueueThread () |
| The MessageQueueThread function is a thread that dequeues messages from the message queue and processes them in the PanoEntry function of the loaded extensibility DLL. | |
| void | HealthCheck () |
| The HealthCheck function is a thread that checks the health of the Panoptes main service. | |
| bool | LoadExtensibility (std::string dllFile) |
| The LoadExtensibility function is a function that loads the extensibility DLL. | |
| bool | BindToServiceWithRetry (int containerPort, int maxAttempts, int baseSleep, double multiplier) |
| The BindToServiceWithRetry function is a function that binds to the Panoptes main service with a retry mechanism. | |
| int WINAPI | WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) |
| The WinMain function is the entry point for the container. | |
Variables | |
| ExtensibilityCore::PanoBindPtr | PanoBind |
| ExtensibilityCore::PanoEntryPtr | PanoEntry |
| ExtensibilityCore::PanoUnbindPtr | PanoUnbind |
| PeMessageQueue * | message_queue_pe_ |
| MemoryMessageQueue * | message_queue_mem_ |
| std::atomic_bool | isConnected = true |
| std::unique_ptr< PanoptesService::Stub > | stub |
| int | BindPort = 0 |
| bool BindToServiceWithRetry | ( | int | containerPort, |
| int | maxAttempts, | ||
| int | baseSleep, | ||
| double | multiplier | ||
| ) |
The BindToServiceWithRetry function is a function that binds to the Panoptes main service with a retry mechanism.
| containerPort | The port value that is read from the registry. |
| maxAttempts | The maximum number of attempts to bind to the service. |
| baseSleep | The base sleep time in milliseconds. |
| multiplier | The multiplier for the sleep time. |
Definition at line 149 of file container.cpp.
References BindPort, and PanoBind.
Referenced by WinMain().
| bool GetRegistryPortValue | ( | DWORD & | portValue | ) |
Get the gRPC port value from the registry.
| portValue | The port value that is read from the registry. |
Definition at line 24 of file container.cpp.
Referenced by HealthCheck().
| void HealthCheck | ( | ) |
The HealthCheck function is a thread that checks the health of the Panoptes main service.
Definition at line 83 of file container.cpp.
References GetRegistryPortValue(), isConnected, and stub.
Referenced by WinMain().
| bool LoadExtensibility | ( | std::string | dllFile | ) |
The LoadExtensibility function is a function that loads the extensibility DLL.
| dllFile | The path to the extensibility DLL. |
Definition at line 118 of file container.cpp.
References PanoBind, PanoEntry, and PanoUnbind.
Referenced by WinMain().
| void MessageQueueThread | ( | ) |
The MessageQueueThread function is a thread that dequeues messages from the message queue and processes them in the PanoEntry function of the loaded extensibility DLL.
Definition at line 71 of file container.cpp.
References PeMessageQueue::dequeue(), isConnected, message_queue_pe_, PanoEntry, and PeScan::PePath.
Referenced by WinMain().
| int WINAPI WinMain | ( | HINSTANCE | hInstance, |
| HINSTANCE | hPrevInstance, | ||
| LPSTR | lpCmdLine, | ||
| int | nCmdShow | ||
| ) |
The WinMain function is the entry point for the container.
| hInstance | The instance of the application. |
| hPrevInstance | The previous instance of the application. |
| lpCmdLine | The command line arguments. |
| nCmdShow | The command line arguments. |
Definition at line 172 of file container.cpp.
References BindPort, BindToServiceWithRetry(), HealthCheck(), isConnected, LoadExtensibility(), MessageQueueThread(), PanoUnbind, and RunContainerServer().
| int BindPort = 0 |
Definition at line 19 of file container.cpp.
Referenced by BindToServiceWithRetry(), and WinMain().
| std::atomic_bool isConnected = true |
Definition at line 17 of file container.cpp.
Referenced by HealthCheck(), MessageQueueThread(), and WinMain().
| MemoryMessageQueue* message_queue_mem_ |
Definition at line 16 of file container.cpp.
| PeMessageQueue* message_queue_pe_ |
Definition at line 15 of file container.cpp.
Referenced by MessageQueueThread().
| ExtensibilityCore::PanoBindPtr PanoBind |
Definition at line 11 of file container.cpp.
Referenced by BindToServiceWithRetry(), and LoadExtensibility().
| ExtensibilityCore::PanoEntryPtr PanoEntry |
Definition at line 12 of file container.cpp.
Referenced by LoadExtensibility(), and MessageQueueThread().
| ExtensibilityCore::PanoUnbindPtr PanoUnbind |
Definition at line 13 of file container.cpp.
Referenced by LoadExtensibility(), and WinMain().
| std::unique_ptr<PanoptesService::Stub> stub |
Definition at line 18 of file container.cpp.
Referenced by HealthCheck().