ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/vpn.h
(Generate patch)

Comparing gvpe/src/vpn.h (file contents):
Revision 1.28 by pcg, Thu Aug 7 17:54:27 2008 UTC vs.
Revision 1.31 by pcg, Mon Mar 23 15:22:00 2009 UTC

54 tap_device *tap; 54 tap_device *tap;
55 55
56 typedef vector<connection *> conns_vector; 56 typedef vector<connection *> conns_vector;
57 conns_vector conns; 57 conns_vector conns;
58 58
59 connection *find_router (); 59 // called when any conenction has been established
60 connection *find_forwarder (); 60 void connection_established (connection *c);
61
62 // return true if src can connect directly to dst
63 bool can_direct (conf_node *src, conf_node *dst) const;
64 connection *find_router_for (const connection *dst);
61 65
62 void reconnect_all (); 66 void reconnect_all ();
63 void shutdown_all (); 67 void shutdown_all ();
64 68
65 void tap_ev (ev::io &w, int revents); ev::io tap_ev_watcher; 69 void tap_ev (ev::io &w, int revents); ev::io tap_ev_watcher;
66 void inject_data_packet (tap_packet *pkt, int dst); 70 void inject_data_packet (tap_packet *pkt, int dst);
67 71
68 void send_connect_request (int id); 72 void send_connect_request (connection *c);
69 73
70 void recv_vpn_packet (vpn_packet *pkt, const sockinfo &rsi); 74 void recv_vpn_packet (vpn_packet *pkt, const sockinfo &rsi);
71 bool send_vpn_packet (vpn_packet *pkt, const sockinfo &si, int tos = 0); 75 bool send_vpn_packet (vpn_packet *pkt, const sockinfo &si, int tos = 0);
72 76
73#if ENABLE_TCP 77#if ENABLE_TCP
98 bool send_ipv4_packet (vpn_packet *pkt, const sockinfo &si, int tos); 102 bool send_ipv4_packet (vpn_packet *pkt, const sockinfo &si, int tos);
99 103
100 vpn (); 104 vpn ();
101 ~vpn (); 105 ~vpn ();
102 106
107 int setup_socket (u8 prot, int family, int type, int proto);
103 int setup (); 108 int setup ();
104 109
105 void dump_status (); 110 void dump_status ();
106 111
107 void script_init_env (); 112 void script_init_env ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines