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

Comparing gvpe/src/protocol.h (file contents):
Revision 1.1 by pcg, Sat Mar 1 15:53:03 2003 UTC vs.
Revision 1.3 by pcg, Sun Mar 9 12:40:18 2003 UTC

18 18
19#ifndef VPE_PROTOCOL_H__ 19#ifndef VPE_PROTOCOL_H__
20#define VPE_PROTOCOL_H__ 20#define VPE_PROTOCOL_H__
21 21
22#include <netinet/in.h> 22#include <netinet/in.h>
23#include <netinet/ip.h> // for tos etc.
23 24
24#include <openssl/evp.h> 25#include <openssl/evp.h>
25#include <openssl/rsa.h> 26#include <openssl/rsa.h>
26 27
27#include "conf.h" 28#include "conf.h"
63 64
64 pkt_queue queue; 65 pkt_queue queue;
65 66
66 crypto_ctx *octx, *ictx; 67 crypto_ctx *octx, *ictx;
67 68
69 enum conf_node::connectmode connectmode;
70
68 void reset_dstaddr (); 71 void reset_dstaddr ();
69 72
70 void shutdown (); 73 void shutdown ();
71 void reset_connection (); 74 void reset_connection ();
72 void establish_connection (); 75 void establish_connection ();
86 connection(struct vpn *vpn_) 89 connection(struct vpn *vpn_)
87 : vpn(vpn_) 90 : vpn(vpn_)
88 { 91 {
89 octx = ictx = 0; 92 octx = ictx = 0;
90 retry_cnt = 0; 93 retry_cnt = 0;
94 connectmode = conf_node::C_ALWAYS; // initial setting
91 reset_connection (); 95 reset_connection ();
92 } 96 }
93 97
94 ~connection () 98 ~connection ()
95 { 99 {
116 typedef vector<connection *> conns_vector; 120 typedef vector<connection *> conns_vector;
117 conns_vector conns; 121 conns_vector conns;
118 122
119 connection *find_router (); 123 connection *find_router ();
120 124
121 void send_vpn_packet (vpn_packet *pkt, SOCKADDR *sa); 125 void send_vpn_packet (vpn_packet *pkt, SOCKADDR *sa, int tos = IPTOS_RELIABILITY);
122 void reconnect_all (); 126 void reconnect_all ();
123 void shutdown_all (); 127 void shutdown_all ();
124 void connect_request (int id); 128 void connect_request (int id);
125 129
126 vpn (); 130 vpn ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines