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

Comparing gvpe/src/connection.h (file contents):
Revision 1.4 by pcg, Wed Apr 2 21:02:25 2003 UTC vs.
Revision 1.5 by pcg, Sat Apr 5 02:32:40 2003 UTC

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_CONNECTION_H__ 19#ifndef VPE_CONNECTION_H__
20#define VPE_CONNECTION_H__ 20#define VPE_CONNECTION_H__
21
22#include <netinet/ip.h> // for tos etc.
23 21
24#include <openssl/hmac.h> 22#include <openssl/hmac.h>
25 23
26#include "global.h" 24#include "global.h"
27#include "conf.h" 25#include "conf.h"
75 }; 73 };
76 74
77 u8 type; 75 u8 type;
78 u8 srcdst, src1, dst1; 76 u8 srcdst, src1, dst1;
79 77
80 void set_hdr (ptype type, unsigned int dst); 78 void set_hdr (ptype type_, unsigned int dst);
81 79
82 unsigned int src () const 80 unsigned int src () const
83 { 81 {
84 return src1 | ((srcdst >> 4) << 8); 82 return src1 | ((srcdst >> 4) << 8);
85 } 83 }
149 void send_ping (const sockinfo &dsi, u8 pong = 0); 147 void send_ping (const sockinfo &dsi, u8 pong = 0);
150 void send_data_packet (tap_packet *pkt, bool broadcast = false); 148 void send_data_packet (tap_packet *pkt, bool broadcast = false);
151 void inject_data_packet (tap_packet *pkt, bool broadcast = false); 149 void inject_data_packet (tap_packet *pkt, bool broadcast = false);
152 void connect_request (int id); 150 void connect_request (int id);
153 151
154 void send_vpn_packet (vpn_packet *pkt, const sockinfo &si, int tos = IPTOS_RELIABILITY);
155 void recv_vpn_packet (vpn_packet *pkt, const sockinfo &rsi); 152 void recv_vpn_packet (vpn_packet *pkt, const sockinfo &rsi);
156 153
157 void script_node (); 154 void script_node ();
158 const char *script_node_up (); 155 const char *script_node_up ();
159 const char *script_node_down (); 156 const char *script_node_down ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines