IBR-DTNSuite
0.12
|
#include "config.h"
#include "Configuration.h"
#include <ibrcommon/Logger.h>
#include <ibrcommon/data/File.h>
#include <windows.h>
#include <string.h>
#include <csignal>
#include <set>
#include <sys/types.h>
#include <unistd.h>
#include "NativeDaemon.h"
Go to the source code of this file.
Functions | |
void | ibrdtn_daemon_shutdown () |
int | InitService () |
void | ControlHandler (DWORD request) |
void | ServiceMain (int argc, char **argv) |
int | main () |
Variables | |
ibrcommon::Conditional | _shutdown_cond |
bool | _shutdown = false |
dtn::daemon::NativeDaemon | _dtnd |
const char * | _subkey = "Software\\IBR-DTN" |
SERVICE_STATUS | ServiceStatus |
SERVICE_STATUS_HANDLE | hStatus |
void ControlHandler | ( | DWORD | request) |
Definition at line 139 of file NTService.cpp.
References hStatus, ibrdtn_daemon_shutdown(), and ServiceStatus.
Referenced by ServiceMain().
void ibrdtn_daemon_shutdown | ( | ) |
Definition at line 51 of file NTService.cpp.
References _shutdown, and ibrcommon::Conditional::signal().
Referenced by ControlHandler().
int InitService | ( | ) |
Definition at line 57 of file NTService.cpp.
References _subkey, ibrcommon::Logger::enableAsync(), ibrcommon::Logger::enableBuffer(), ibrcommon::LogLevel::error, dtn::daemon::NativeDaemon::setConfigFile(), dtn::daemon::NativeDaemon::setDebug(), dtn::daemon::NativeDaemon::setLogFile(), and dtn::daemon::NativeDaemon::setLogging().
Referenced by ServiceMain().
int main | ( | ) |
Definition at line 215 of file NTService.cpp.
References ServiceMain().
void ServiceMain | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 161 of file NTService.cpp.
References _shutdown, ControlHandler(), ibrcommon::LogLevel::error, hStatus, dtn::daemon::NativeDaemon::init(), InitService(), dtn::daemon::RUNLEVEL_ROUTING_EXTENSIONS, dtn::daemon::RUNLEVEL_ZERO, ServiceStatus, ibrcommon::Logger::stop(), and ibrcommon::Conditional::wait().
Referenced by main().
Definition at line 43 of file NTService.cpp.
bool _shutdown = false |
Definition at line 40 of file NTService.cpp.
ibrcommon::Conditional _shutdown_cond |
Definition at line 39 of file NTService.cpp.
const char* _subkey = "Software\\IBR-DTN" |
Definition at line 46 of file NTService.cpp.
Referenced by InitService().
SERVICE_STATUS_HANDLE hStatus |
Definition at line 49 of file NTService.cpp.
Referenced by ControlHandler(), and ServiceMain().
SERVICE_STATUS ServiceStatus |
Definition at line 48 of file NTService.cpp.
Referenced by ControlHandler(), and ServiceMain().