… | |
… | |
39 | |
39 | |
40 | struct vpn |
40 | struct vpn |
41 | { |
41 | { |
42 | int udpv4_fd , tcpv4_fd, ipv4_fd , icmpv4_fd , dnsv4_fd; |
42 | int udpv4_fd , tcpv4_fd, ipv4_fd , icmpv4_fd , dnsv4_fd; |
43 | int udpv4_tos, ipv4_tos, icmpv4_tos, dnsv4_tos; |
43 | int udpv4_tos, ipv4_tos, icmpv4_tos, dnsv4_tos; |
44 | |
|
|
45 | #if 1 //D |
|
|
46 | int ipv42_fd, ipv42_tos; |
|
|
47 | void ipv42_ev (ev::io &w, int revents); ev::io ipv42_ev_watcher; |
|
|
48 | bool send_ipv42_packet (vpn_packet *pkt, const sockinfo &si, int tos); |
|
|
49 | #endif |
|
|
50 | |
44 | |
51 | int events; |
45 | int events; |
52 | |
46 | |
53 | enum { |
47 | enum { |
54 | EVENT_RECONNECT = 1, |
48 | EVENT_RECONNECT = 1, |
… | |
… | |
110 | vpn (); |
104 | vpn (); |
111 | ~vpn (); |
105 | ~vpn (); |
112 | |
106 | |
113 | int setup_socket (u8 prot, int family, int type, int proto); |
107 | int setup_socket (u8 prot, int family, int type, int proto); |
114 | int setup (); |
108 | int setup (); |
|
|
109 | bool drop_privileges (); |
115 | |
110 | |
116 | void dump_status (); |
111 | void dump_status (); |
117 | |
112 | |
118 | void script_init_env (); |
113 | void script_init_env (); |
119 | const char *script_if_init (); |
114 | const char *script_if_init (); |