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

Comparing gvpe/src/conf.h (file contents):
Revision 1.42 by root, Tue Dec 4 10:29:43 2012 UTC vs.
Revision 1.46 by root, Fri Oct 11 07:56:07 2013 UTC

37#include <openssl/rsa.h> 37#include <openssl/rsa.h>
38 38
39#include "slog.h" 39#include "slog.h"
40#include "global.h" 40#include "global.h"
41 41
42#define DEFAULT_REKEY 3600 42#define DEFAULT_REKEY 3607 // interval between rekeys
43#define DEFAULT_RESEED 3613 // interval between rng reseeds
43#define DEFAULT_KEEPALIVE 60 // one keepalive/minute (it's just 8 bytes...) 44#define DEFAULT_KEEPALIVE 60 // one keepalive/minute (it's just 8 bytes...)
44#define DEFAULT_UDPPORT 655 // same as tinc, conflicts would be rare 45#define DEFAULT_UDPPORT 655 // same as tinc, conflicts would be rare
45#define DEFAULT_MTU 1500 // let's ether-net 46#define DEFAULT_MTU 1500 // let's ether-net
46#define DEFAULT_MAX_RETRY 3600 // retry at least this often 47#define DEFAULT_MAX_RETRY 3600 // retry at least this often
47#define DEFAULT_MAX_TTL 60 // packets expire after this many seconds 48#define DEFAULT_MAX_TTL 60 // packets expire after this many seconds
90 int max_queue; // maixmum send queue length 91 int max_queue; // maixmum send queue length
91 92
92 enum connectmode { C_ONDEMAND, C_NEVER, C_ALWAYS, C_DISABLED } connectmode; 93 enum connectmode { C_ONDEMAND, C_NEVER, C_ALWAYS, C_DISABLED } connectmode;
93 bool compress; 94 bool compress;
94 bool inherit_tos; // inherit TOS in packets send to this destination 95 bool inherit_tos; // inherit TOS in packets send to this destination
96 bool low_power; // node is a low-power node (reduce cpu usage, wakeups and assume higher latency)
95 97
96 vector<const char *> allow_direct; 98 vector<const char *> allow_direct;
97 vector<const char *> deny_direct; 99 vector<const char *> deny_direct;
98 100
99 u32 routerprio; 101 u32 routerprio;
122{ 124{
123 typedef vector<conf_node *> node_vector; 125 typedef vector<conf_node *> node_vector;
124 node_vector nodes; 126 node_vector nodes;
125 conf_node default_node; 127 conf_node default_node;
126 conf_node *thisnode; 128 conf_node *thisnode;
129 char serial[SERIAL_SIZE];
130 char *seed_dev; // the randomd evice to use for seeding
131 double reseed; // the interval between additional seeds
127 int mtu; // the mtu used for outgoing tunnel packets 132 int mtu; // the mtu used for outgoing tunnel packets
128 int nfmark; // the SO_MARK // netfilter mark // fwmark 133 int nfmark; // the SO_MARK // netfilter mark // fwmark
129 double rekey; // rekey interval 134 double rekey; // rekey interval
130 double keepalive; // keepalive probes interval 135 double keepalive; // keepalive probes interval
131 char *ifname; // the interface name (tap0 ...) 136 char *ifname; // the interface name (tap0 ...)
165 170
166 void init (); 171 void init ();
167 void cleanup (); 172 void cleanup ();
168 void clear (); 173 void clear ();
169 174
175 conf_node *find_node (const char *name);
176
170 // create a filename from string, replacing %s by the nodename 177 // create a filename from string, replacing %s by the nodename
171 // and using relative paths under confbase. 178 // and using relative paths under confbase.
172 char *config_filename (const char *name, const char *dflt = 0); 179 char *config_filename (const char *name, const char *dflt = 0);
173 180
174 void print (); 181 void print ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines