summaryrefslogtreecommitdiffstats
path: root/openvpn.h
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-12-14 01:09:11 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-12-14 01:09:11 +0000
commit92bbb061acc027bbe29a8973422a60eda5bff88e (patch)
tree8e0831c042ebf8eb59992463a499dbe25851a630 /openvpn.h
parent6d89ede657243804ff9014141f9500312256cd6b (diff)
downloadopenvpn-92bbb061acc027bbe29a8973422a60eda5bff88e.tar.gz
openvpn-92bbb061acc027bbe29a8973422a60eda5bff88e.tar.xz
openvpn-92bbb061acc027bbe29a8973422a60eda5bff88e.zip
svn merge -r 845:854 $SO/trunk/openvpn .
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@855 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'openvpn.h')
-rw-r--r--openvpn.h31
1 files changed, 22 insertions, 9 deletions
diff --git a/openvpn.h b/openvpn.h
index e635dba..437a02f 100644
--- a/openvpn.h
+++ b/openvpn.h
@@ -117,6 +117,23 @@ struct context_buffers
struct buffer read_tun_buf;
};
+/*
+ * level 0 context contains data related to
+ * once-per OpenVPN instantiation events
+ * such as daemonization.
+ */
+struct context_0
+{
+ /* workspace for get_pid_file/write_pid */
+ struct pid_state pid_state;
+
+ /* workspace for --user/--group */
+ bool uid_gid_specified;
+ bool uid_gid_set;
+ struct user_state user_state;
+ struct group_state group_state;
+};
+
/*
* Contains the persist-across-restart OpenVPN tunnel instance state.
* Reset only for SIGHUP restarts.
@@ -337,15 +354,6 @@ struct context_2
*/
bool ipv4_tun;
- /* workspace for get_pid_file/write_pid */
- struct pid_state pid_state;
-
- /* workspace for --user/--group */
- bool uid_gid_specified;
- bool uid_gid_set;
- struct user_state user_state;
- struct group_state group_state;
-
/* should we print R|W|r|w to console on packet transfers? */
bool log_rw;
@@ -453,6 +461,11 @@ struct context
/* set to true after we daemonize */
bool did_we_daemonize;
+ /* level 0 context contains data related to
+ once-per OpenVPN instantiation events
+ such as daemonization */
+ struct context_0 *c0;
+
/* level 1 context is preserved for
SIGUSR1 restarts, but initialized
for SIGHUP restarts */