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-2004 James Yonan <jim@yonan.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 as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version.
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
20
* You should have received a copy of the GNU General Public License
21
* along with this program (see the file COPYING included with this
22
* distribution); if not, write to the Free Software Foundation, Inc.,
23
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
42
* Should we send an OCC_REQUEST message?
45
check_send_occ_req (struct context *c)
47
void check_send_occ_req_dowork (struct context *c);
48
if (event_timeout_defined (&c->c2.occ_interval)
49
&& event_timeout_trigger (&c->c2.occ_interval,
51
(!TO_LINK_DEF(c) && c->c2.occ_op < 0) ? ETT_DEFAULT : 0))
52
check_send_occ_req_dowork (c);
56
* Should we send an MTU load test?
59
check_send_occ_load_test (struct context *c)
61
void check_send_occ_load_test_dowork (struct context *c);
62
if (event_timeout_defined (&c->c2.occ_mtu_load_test_interval)
63
&& event_timeout_trigger (&c->c2.occ_mtu_load_test_interval,
65
(!TO_LINK_DEF(c) && c->c2.occ_op < 0) ? ETT_DEFAULT : 0))
66
check_send_occ_load_test_dowork (c);
70
* Should we send an OCC message?
73
check_send_occ_msg (struct context *c)
75
void check_send_occ_msg_dowork (struct context *c);
76
if (c->c2.occ_op >= 0)
79
check_send_occ_msg_dowork (c);
81
tv_clear (&c->c2.timeval); /* ZERO-TIMEOUT */