source: nscp/modules/NRPEListener/NRPEListener.cpp @ 2a94f3f

0.4.00.4.10.4.2stable
Last change on this file since 2a94f3f was 2a94f3f, checked in by Michael Medin <michael@…>, 8 years ago
  • Refactored out NSCLient Listener as a separate module
  • Added initial NRPE listener module (not yet implemented only a shell)
  • Changed Module API (Inject function has new syntax)
  • Added some tokenizer function to charEx
  • Added new wrapper function to inject Command
  • Minor changes in relation to refactor work
  • Property mode set to 100644
File size: 1.1 KB
Line 
1// CheckEventLog.cpp : Defines the entry point for the DLL application.
2//
3
4#include "stdafx.h"
5#include "NRPEListener.h"
6#include <strEx.h>
7#include <time.h>
8
9NRPEListener gNRPEListener;
10
11BOOL APIENTRY DllMain( HANDLE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved)
12{
13        NSCModuleWrapper::wrapDllMain(hModule, ul_reason_for_call);
14        return TRUE;
15}
16
17NRPEListener::NRPEListener() {
18}
19NRPEListener::~NRPEListener() {
20}
21
22
23bool NRPEListener::loadModule() {
24        return true;
25}
26bool NRPEListener::unloadModule() {
27        return true;
28}
29
30std::string NRPEListener::getModuleName() {
31        return "CheckDisk Various Disk related checks.";
32}
33NSCModuleWrapper::module_version NRPEListener::getModuleVersion() {
34        NSCModuleWrapper::module_version version = {0, 0, 1 };
35        return version;
36}
37
38bool NRPEListener::hasCommandHandler() {
39        return true;
40}
41bool NRPEListener::hasMessageHandler() {
42        return false;
43}
44
45
46std::string NRPEListener::handleCommand(const std::string command, const unsigned int argLen, char **char_args) {
47        return "";
48}
49
50
51NSC_WRAPPERS_MAIN_DEF(gNRPEListener);
52NSC_WRAPPERS_IGNORE_MSG_DEF();
53NSC_WRAPPERS_HANDLE_CMD_DEF(gNRPEListener);
Note: See TracBrowser for help on using the repository browser.