… | |
… | |
16 | Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
16 | Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ |
17 | */ |
18 | |
18 | |
19 | #ifndef VPE_VPN_H__ |
19 | #ifndef VPE_VPN_H__ |
20 | #define VPE_VPN_H__ |
20 | #define VPE_VPN_H__ |
|
|
21 | |
|
|
22 | #include <netinet/ip.h> |
21 | |
23 | |
22 | #include "global.h" |
24 | #include "global.h" |
23 | #include "conf.h" |
25 | #include "conf.h" |
24 | #include "device.h" |
26 | #include "device.h" |
25 | #include "connection.h" |
27 | #include "connection.h" |
… | |
… | |
50 | |
52 | |
51 | void recv_vpn_packet (vpn_packet *pkt, const sockinfo &rsi); |
53 | void recv_vpn_packet (vpn_packet *pkt, const sockinfo &rsi); |
52 | |
54 | |
53 | void tap_ev (io_watcher &w, short revents); io_watcher tap_ev_watcher; |
55 | void tap_ev (io_watcher &w, short revents); io_watcher tap_ev_watcher; |
54 | |
56 | |
|
|
57 | void send_vpn_packet (vpn_packet *pkt, const sockinfo &si, int tos = 0); |
|
|
58 | |
55 | #if ENABLE_TCP |
59 | #if ENABLE_TCP |
56 | 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; |
57 | void send_tcpv4_packet (vpn_packet *pkt, const sockinfo &si, int tos = IPTOS_RELIABILITY); |
61 | void send_tcpv4_packet (vpn_packet *pkt, const sockinfo &si, int tos); |
58 | #endif |
62 | #endif |
59 | |
63 | |
60 | void udpv4_ev (io_watcher &w, short revents); io_watcher udpv4_ev_watcher; |
64 | void udpv4_ev (io_watcher &w, short revents); io_watcher udpv4_ev_watcher; |
61 | void send_udpv4_packet (vpn_packet *pkt, const sockinfo &si, int tos = IPTOS_RELIABILITY); |
65 | void send_udpv4_packet (vpn_packet *pkt, const sockinfo &si, int tos); |
62 | |
66 | |
63 | void ipv4_ev (io_watcher &w, short revents); io_watcher ipv4_ev_watcher; |
67 | void ipv4_ev (io_watcher &w, short revents); io_watcher ipv4_ev_watcher; |
64 | void send_ipv4_packet (vpn_packet *pkt, const sockinfo &si, int tos = IPTOS_RELIABILITY); |
68 | void send_ipv4_packet (vpn_packet *pkt, const sockinfo &si, int tos); |
65 | |
69 | |
66 | vpn (); |
70 | vpn (); |
67 | ~vpn (); |
71 | ~vpn (); |
68 | |
72 | |
69 | int setup (); |
73 | int setup (); |