ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/vpn.h
(Generate patch)

Comparing gvpe/src/vpn.h (file contents):
Revision 1.9 by pcg, Tue Oct 14 03:22:09 2003 UTC vs.
Revision 1.15 by pcg, Tue Mar 1 06:27:20 2005 UTC

1/* 1/*
2 vpn.h -- header for vpn.C 2 vpn.h -- header for vpn.C
3 Copyright (C) 2003-2004 Marc Lehmann <pcg@goof.com>
3 4
4 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version. 8 (at your option) any later version.
24#include "device.h" 25#include "device.h"
25#include "connection.h" 26#include "connection.h"
26 27
27struct vpn 28struct vpn
28 { 29 {
29 int udpv4_fd, tcpv4_fd, ipv4_fd, icmpv4_fd; 30 int udpv4_fd, tcpv4_fd, ipv4_fd, icmpv4_fd, dnsv4_fd;
30 31
31 int events; 32 int events;
32 33
33 enum { 34 enum {
34 EVENT_RECONNECT = 1, 35 EVENT_RECONNECT = 1,
47 48
48 void reconnect_all (); 49 void reconnect_all ();
49 void shutdown_all (); 50 void shutdown_all ();
50 51
51 void tap_ev (io_watcher &w, short revents); io_watcher tap_ev_watcher; 52 void tap_ev (io_watcher &w, short revents); io_watcher tap_ev_watcher;
53 void inject_data_packet (tap_packet *pkt, int dst);
52 54
53 void send_connect_request (int id); 55 void send_connect_request (int id);
54 56
55 void recv_vpn_packet (vpn_packet *pkt, const sockinfo &rsi); 57 void recv_vpn_packet (vpn_packet *pkt, const sockinfo &rsi);
56 bool send_vpn_packet (vpn_packet *pkt, const sockinfo &si, int tos);
57 58
58#if ENABLE_TCP 59#if ENABLE_TCP
59 void tcpv4_ev (io_watcher &w, short revents); io_watcher tcpv4_ev_watcher; 60 void tcpv4_ev (io_watcher &w, short revents); io_watcher tcpv4_ev_watcher;
60 bool send_tcpv4_packet (vpn_packet *pkt, const sockinfo &si, int tos); 61 bool send_tcpv4_packet (vpn_packet *pkt, const sockinfo &si, int tos);
61#endif 62#endif
62 63
63#if ENABLE_ICMP 64#if ENABLE_ICMP
64 void icmpv4_ev (io_watcher &w, short revents); io_watcher icmpv4_ev_watcher; 65 void icmpv4_ev (io_watcher &w, short revents); io_watcher icmpv4_ev_watcher;
65 bool send_icmpv4_packet (vpn_packet *pkt, const sockinfo &si, int tos); 66 bool send_icmpv4_packet (vpn_packet *pkt, const sockinfo &si, int tos);
67#endif
68
69#if ENABLE_DNS
70 void dnsv4_ev (io_watcher &w, short revents); io_watcher dnsv4_ev_watcher;
66#endif 71#endif
67 72
68 void udpv4_ev (io_watcher &w, short revents); io_watcher udpv4_ev_watcher; 73 void udpv4_ev (io_watcher &w, short revents); io_watcher udpv4_ev_watcher;
69 bool send_udpv4_packet (vpn_packet *pkt, const sockinfo &si, int tos); 74 bool send_udpv4_packet (vpn_packet *pkt, const sockinfo &si, int tos);
70 75
79 void dump_status (); 84 void dump_status ();
80 85
81 const char *script_if_up (); 86 const char *script_if_up ();
82 }; 87 };
83 88
89extern vpn network; // THE vpn
90
84#endif 91#endif
85 92

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines