source: nscp/trunk/modules/NSClientListener/NSClientListener.cpp @ 4f2e807

Last change on this file since 4f2e807 was 4f2e807, 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: 970 bytes
Line 
1// CheckEventLog.cpp : Defines the entry point for the DLL application.
2//
3
4#include "stdafx.h"
5#include "NSClientListener.h"
6#include <strEx.h>
7#include <time.h>
8
9NSClientListener gNSClientListener;
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
17NSClientListener::NSClientListener() {
18}
19NSClientListener::~NSClientListener() {
20}
21
22
23bool NSClientListener::loadModule() {
24        socketThreadManager.createThread(NULL);
25        return true;
26}
27bool NSClientListener::unloadModule() {
28        socketThreadManager.exitThread();
29        return true;
30}
31
32std::string NSClientListener::getModuleName() {
33        return "NSClient Listener.";
34}
35NSCModuleWrapper::module_version NSClientListener::getModuleVersion() {
36        NSCModuleWrapper::module_version version = {0, 0, 1 };
37        return version;
38}
39
40NSC_WRAPPERS_MAIN_DEF(gNSClientListener);
41NSC_WRAPPERS_IGNORE_MSG_DEF();
42NSC_WRAPPERS_IGNORE_CMD_DEF();
Note: See TracBrowser for help on using the repository browser.