From 92bbb061acc027bbe29a8973422a60eda5bff88e Mon Sep 17 00:00:00 2001 From: james Date: Wed, 14 Dec 2005 01:09:11 +0000 Subject: 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 --- openvpn.h | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) (limited to 'openvpn.h') 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 */ -- cgit v1.2.3