2 * OpenVPN -- An application to securely tunnel IP networks
3 * over a single TCP/UDP port, with support for SSL/TLS-based
4 * session authentication and key exchange,
5 * packet encryption, packet authentication, and
8 * Copyright (C) 2002-2005 OpenVPN Solutions LLC <info@openvpn.net>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2
12 * as published by the Free Software Foundation.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program (see the file COPYING included with this
21 * distribution); if not, write to the Free Software Foundation, Inc.,
22 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
32 * Signal information, including signal code
33 * and descriptive text.
37 volatile int signal_received
;
39 const char *signal_text
;
42 #define IS_SIG(c) ((c)->sig->signal_received)
46 extern struct signal_info siginfo_static
;
48 int parse_signal (const char *signame
);
49 const char *signal_name (const int sig
, const bool upper
);
50 const char *signal_description (const int signum
, const char *sigtext
);
51 void throw_signal (const int signum
);
53 void pre_init_signal_catch (void);
54 void post_init_signal_catch (void);
56 void print_signal (const struct signal_info
*si
, const char *title
, int msglevel
);
57 void print_status (const struct context
*c
, struct status_output
*so
);
59 void remap_signal (struct context
*c
);
61 void signal_restart_status (const struct signal_info
*si
);
63 bool process_signal (struct context
*c
);
66 void process_explicit_exit_notification_timer_wakeup (struct context
*c
);
72 get_signal (volatile int *sig
)
74 *sig
= win32_signal_get (&win32_signal
);
78 halt_non_edge_triggered_signals (void)
80 win32_signal_close (&win32_signal
);
86 get_signal (volatile int *sig
)
88 const int i
= siginfo_static
.signal_received
;
94 halt_non_edge_triggered_signals (void)