~ubuntu-branches/ubuntu/hardy/openvpn/hardy-security

« back to all changes in this revision

Viewing changes to forward.h

  • Committer: Bazaar Package Importer
  • Author(s): Alberto Gonzalez Iniesta
  • Date: 2005-01-05 19:03:11 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050105190311-mvqzpuhmlvobg9nh
Tags: 1.99+2.rc6-1
* The 'Three Wise Men' release.
* New upstream release.
* Update README.Debian with comments on changed string remapping.
  Thanks ron@debian.org for noting this first. (Closes: #288669)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
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
 
6
 *             packet compression.
 
7
 *
 
8
 *  Copyright (C) 2002-2004 James Yonan <jim@yonan.net>
 
9
 *
 
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.
 
14
 *
 
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.
 
19
 *
 
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
 
24
 */
 
25
 
 
26
#ifndef FORWARD_H
 
27
#define FORWARD_H
 
28
 
 
29
#include "openvpn.h"
 
30
#include "occ.h"
 
31
#include "ping.h"
 
32
 
 
33
#define TUN_OUT(c)      (BLEN(&(c)->c2.to_tun) > 0)
 
34
#define LINK_OUT(c)     (BLEN(&(c)->c2.to_link) > 0)
 
35
#define ANY_OUT(c)      (TUN_OUT(c) || LINK_OUT(c))
 
36
 
 
37
#ifdef ENABLE_FRAGMENT
 
38
#define TO_LINK_FRAG(c) ((c)->c2.fragment && fragment_outgoing_defined ((c)->c2.fragment))
 
39
#else
 
40
#define TO_LINK_FRAG(c) (false)
 
41
#endif
 
42
 
 
43
#define TO_LINK_DEF(c)  (LINK_OUT(c) || TO_LINK_FRAG(c))
 
44
 
 
45
#define IOW_TO_TUN          (1<<0)
 
46
#define IOW_TO_LINK         (1<<1)
 
47
#define IOW_READ_TUN        (1<<2)
 
48
#define IOW_READ_LINK       (1<<3)
 
49
#define IOW_SHAPER          (1<<4)
 
50
#define IOW_CHECK_RESIDUAL  (1<<5)
 
51
#define IOW_FRAG            (1<<6)
 
52
#define IOW_MBUF            (1<<7)
 
53
#define IOW_READ_TUN_FORCE  (1<<8)
 
54
#define IOW_WAIT_SIGNAL     (1<<9)
 
55
 
 
56
#define IOW_READ            (IOW_READ_TUN|IOW_READ_LINK)
 
57
 
 
58
void pre_select (struct context *c);
 
59
 
 
60
void process_io (struct context *c);
 
61
 
 
62
void encrypt_sign (struct context *c, bool comp_frag);
 
63
 
 
64
const char *wait_status_string (struct context *c, struct gc_arena *gc);
 
65
void show_wait_status (struct context *c);
 
66
 
 
67
void read_incoming_link (struct context *c);
 
68
void process_incoming_link (struct context *c);
 
69
void read_incoming_tun (struct context *c);
 
70
void process_incoming_tun (struct context *c);
 
71
void process_outgoing_link (struct context *c);
 
72
void process_outgoing_tun (struct context *c);
 
73
 
 
74
bool send_control_channel_string (struct context *c, const char *str, int msglevel);
 
75
 
 
76
#define PIPV4_PASSTOS         (1<<0)
 
77
#define PIPV4_MSSFIX          (1<<1)
 
78
 
 
79
void process_ipv4_header (struct context *c, unsigned int flags, struct buffer *buf);
 
80
 
 
81
#if P2MP
 
82
void schedule_exit (struct context *c, const int n_seconds);
 
83
#endif
 
84
 
 
85
#endif /* FORWARD_H */