diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2011-07-28 23:56:24 +0200 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2011-07-28 23:56:24 +0200 |
commit | 98619012e242176bcbdc3215fa462fa2cf882e36 (patch) | |
tree | 0b5178b62a70fb162a1afe44b0608018a4d92c52 /openvpn.c | |
parent | Added data channel fragmentation docs (diff) | |
download | openvpn-98619012e242176bcbdc3215fa462fa2cf882e36.tar.xz |
Added main/control docs
Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Diffstat (limited to 'openvpn.c')
-rw-r--r-- | openvpn.c | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -42,6 +42,16 @@ process_signal_p2p (struct context *c) return process_signal (c); } + + +/**************************************************************************/ +/** + * Main event loop for OpenVPN in client mode, where only one VPN tunnel + * is active. + * @ingroup eventloop + * + * @param c - The context structure of the single active VPN tunnel. + */ static void tunnel_point_to_point (struct context *c) { @@ -90,6 +100,27 @@ tunnel_point_to_point (struct context *c) #undef PROCESS_SIGNAL_P2P + +/**************************************************************************/ +/** + * OpenVPN's main init-run-cleanup loop. + * @ingroup eventloop + * + * This function contains the two outer OpenVPN loops. Its structure is + * as follows: + * - Once-per-process initialization. + * - Outer loop, run at startup and then once per \c SIGHUP: + * - Level 1 initialization + * - Inner loop, run at startup and then once per \c SIGUSR1: + * - Call event loop function depending on client or server mode: + * - \c tunnel_point_to_point() + * - \c tunnel_server() + * - Level 1 cleanup + * - Once-per-process cleanup. + * + * @param argc - Commandline argument count. + * @param argv - Commandline argument values. + */ int main (int argc, char *argv[]) { |