--- gvpe/src/vpn.h 2003/04/02 05:15:00 1.2 +++ gvpe/src/vpn.h 2003/04/06 04:17:36 1.5 @@ -19,6 +19,8 @@ #ifndef VPE_VPN_H__ #define VPE_VPN_H__ +#include + #include "global.h" #include "conf.h" #include "device.h" @@ -35,7 +37,7 @@ EVENT_SHUTDOWN = 2, }; - void event_cb (tstamp &ts); time_watcher event; + void event_cb (time_watcher &w); time_watcher event; tap_device *tap; @@ -50,19 +52,20 @@ void recv_vpn_packet (vpn_packet *pkt, const sockinfo &rsi); - void tap_ev (int fd, short revents); io_watcher tap_ev_watcher; + void tap_ev (io_watcher &w, short revents); io_watcher tap_ev_watcher; + + void send_vpn_packet (vpn_packet *pkt, const sockinfo &si, int tos = 0); #if ENABLE_TCP - void tcpv4_ev (int fd, short revents); - void tcpv4_accept (int fd, short revents); io_watcher tcpv4_accept_watcher; - void send_tcpv4_packet (vpn_packet *pkt, const sockinfo &si, int tos = IPTOS_RELIABILITY); + 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); #endif - void udpv4_ev (int fd, short revents); io_watcher udpv4_ev_watcher; - void send_udpv4_packet (vpn_packet *pkt, const sockinfo &si, int tos = IPTOS_RELIABILITY); + 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); - void ipv4_ev (int fd, short revents); io_watcher ipv4_ev_watcher; - void send_ipv4_packet (vpn_packet *pkt, const sockinfo &si, int tos = IPTOS_RELIABILITY); + 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); vpn (); ~vpn ();