--- gvpe/src/vpn.h 2003/04/02 21:02:25 1.3 +++ gvpe/src/vpn.h 2003/10/14 03:22:09 1.9 @@ -26,7 +26,7 @@ struct vpn { - int udpv4_fd, tcpv4_fd, ipv4_fd; + int udpv4_fd, tcpv4_fd, ipv4_fd, icmpv4_fd; int events; @@ -43,25 +43,33 @@ conns_vector conns; connection *find_router (); + connection *find_forwarder (); void reconnect_all (); void shutdown_all (); - void connect_request (int id); - - void recv_vpn_packet (vpn_packet *pkt, const sockinfo &rsi); void tap_ev (io_watcher &w, short revents); io_watcher tap_ev_watcher; + void send_connect_request (int id); + + void recv_vpn_packet (vpn_packet *pkt, const sockinfo &rsi); + bool send_vpn_packet (vpn_packet *pkt, const sockinfo &si, int tos); + #if ENABLE_TCP void tcpv4_ev (io_watcher &w, short revents); io_watcher tcpv4_ev_watcher; - void send_tcpv4_packet (vpn_packet *pkt, const sockinfo &si, int tos = IPTOS_RELIABILITY); + 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; - void send_udpv4_packet (vpn_packet *pkt, const sockinfo &si, int tos = IPTOS_RELIABILITY); + bool send_udpv4_packet (vpn_packet *pkt, const sockinfo &si, int tos); void ipv4_ev (io_watcher &w, short revents); io_watcher ipv4_ev_watcher; - void send_ipv4_packet (vpn_packet *pkt, const sockinfo &si, int tos = IPTOS_RELIABILITY); + bool send_ipv4_packet (vpn_packet *pkt, const sockinfo &si, int tos); vpn (); ~vpn ();