summaryrefslogtreecommitdiff
path: root/src/openvpnserv/service.h
diff options
context:
space:
mode:
authorAlberto Gonzalez Iniesta <agi@inittab.org>2016-12-27 18:25:47 +0100
committerAlberto Gonzalez Iniesta <agi@inittab.org>2016-12-27 18:25:47 +0100
commit79f3537f69e125f19f59c36aa090120a63186a54 (patch)
tree2089a3b7dac990841dbc2e4d9b2f535b82dbb0af /src/openvpnserv/service.h
parentf2137fedb30cb87448eb03b2f288920df6187571 (diff)
parent3a2bbdb05ca6a6996e424c9fb225cb0d53804125 (diff)
Merge tag 'upstream/2.4.0'
Upstream version 2.4.0
Diffstat (limited to 'src/openvpnserv/service.h')
-rw-r--r--src/openvpnserv/service.h55
1 files changed, 29 insertions, 26 deletions
diff --git a/src/openvpnserv/service.h b/src/openvpnserv/service.h
index c5d745f..b1130c9 100644
--- a/src/openvpnserv/service.h
+++ b/src/openvpnserv/service.h
@@ -5,7 +5,7 @@
* packet encryption, packet authentication, and
* packet compression.
*
- * Copyright (C) 2013 Heiko Hund <heiko.hund@sophos.com>
+ * Copyright (C) 2013-2017 Heiko Hund <heiko.hund@sophos.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
@@ -48,48 +48,51 @@
#define M_ERR (MSG_FLAGS_ERROR) /* error */
typedef enum {
- automatic,
- interactive,
- _service_max
+ automatic,
+ interactive,
+ _service_max
} openvpn_service_type;
typedef struct {
- openvpn_service_type type;
- TCHAR *name;
- TCHAR *display_name;
- TCHAR *dependencies;
- DWORD start_type;
+ openvpn_service_type type;
+ TCHAR *name;
+ TCHAR *display_name;
+ TCHAR *dependencies;
+ DWORD start_type;
} openvpn_service_t;
#define MAX_NAME 256
typedef struct {
- TCHAR exe_path[MAX_PATH];
- TCHAR config_dir[MAX_PATH];
- TCHAR ext_string[16];
- TCHAR log_dir[MAX_PATH];
- TCHAR ovpn_admin_group[MAX_NAME];
- DWORD priority;
- BOOL append;
+ TCHAR exe_path[MAX_PATH];
+ TCHAR config_dir[MAX_PATH];
+ TCHAR ext_string[16];
+ TCHAR log_dir[MAX_PATH];
+ TCHAR ovpn_admin_group[MAX_NAME];
+ DWORD priority;
+ BOOL append;
} settings_t;
extern openvpn_service_t automatic_service;
extern openvpn_service_t interactive_service;
-VOID WINAPI ServiceStartAutomatic (DWORD argc, LPTSTR *argv);
-VOID WINAPI ServiceStartInteractive (DWORD argc, LPTSTR *argv);
+VOID WINAPI ServiceStartAutomatic(DWORD argc, LPTSTR *argv);
-int openvpn_vsntprintf (LPTSTR str, size_t size, LPCTSTR format, va_list arglist);
-int openvpn_sntprintf (LPTSTR str, size_t size, LPCTSTR format, ...);
+VOID WINAPI ServiceStartInteractive(DWORD argc, LPTSTR *argv);
-DWORD GetOpenvpnSettings (settings_t *s);
+int openvpn_vsntprintf(LPTSTR str, size_t size, LPCTSTR format, va_list arglist);
-BOOL ReportStatusToSCMgr (SERVICE_STATUS_HANDLE service, SERVICE_STATUS *status);
+int openvpn_sntprintf(LPTSTR str, size_t size, LPCTSTR format, ...);
-LPCTSTR GetLastErrorText ();
-DWORD MsgToEventLog (DWORD flags, LPCTSTR lpszMsg, ...);
+DWORD GetOpenvpnSettings(settings_t *s);
+
+BOOL ReportStatusToSCMgr(SERVICE_STATUS_HANDLE service, SERVICE_STATUS *status);
+
+LPCTSTR GetLastErrorText();
+
+DWORD MsgToEventLog(DWORD flags, LPCTSTR lpszMsg, ...);
/* Convert a utf8 string to utf16. Caller should free the result */
-wchar_t *utf8to16 (const char *utf8);
+wchar_t *utf8to16(const char *utf8);
-#endif
+#endif /* ifndef _SERVICE_H */