--- gvpe/src/vpn.h 2003/04/06 18:12:18 1.6 +++ gvpe/src/vpn.h 2003/10/16 02:41:21 1.11 @@ -1,5 +1,6 @@ /* vpn.h -- header for vpn.C + Copyright (C) 2003 Marc Lehmann This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,8 +20,6 @@ #ifndef VPE_VPN_H__ #define VPE_VPN_H__ -#include - #include "global.h" #include "conf.h" #include "device.h" @@ -28,7 +27,7 @@ struct vpn { - int udpv4_fd, tcpv4_fd, ipv4_fd; + int udpv4_fd, tcpv4_fd, ipv4_fd, icmpv4_fd; int events; @@ -45,11 +44,13 @@ conns_vector conns; connection *find_router (); + connection *find_forwarder (); void reconnect_all (); void shutdown_all (); void tap_ev (io_watcher &w, short revents); io_watcher tap_ev_watcher; + void inject_data_packet (tap_packet *pkt, int dst); void send_connect_request (int id); @@ -61,6 +62,11 @@ bool send_tcpv4_packet (vpn_packet *pkt, const sockinfo &si, int tos); #endif +#if ENABLE_ICMP + void icmpv4_ev (io_watcher &w, short revents); io_watcher icmpv4_ev_watcher; + bool send_icmpv4_packet (vpn_packet *pkt, const sockinfo &si, int tos); +#endif + void udpv4_ev (io_watcher &w, short revents); io_watcher udpv4_ev_watcher; bool send_udpv4_packet (vpn_packet *pkt, const sockinfo &si, int tos); @@ -77,5 +83,7 @@ const char *script_if_up (); }; +extern struct vpn network; + #endif