… | |
… | |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | GNU General Public License for more details. |
15 | GNU General Public License for more details. |
16 | |
16 | |
17 | You should have received a copy of the GNU General Public License |
17 | You should have received a copy of the GNU General Public License |
18 | along with gvpe; if not, write to the Free Software |
18 | along with gvpe; if not, write to the Free Software |
19 | Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
20 | */ |
20 | */ |
21 | |
21 | |
22 | #ifndef GVPE_CONF_H__ |
22 | #ifndef GVPE_CONF_H__ |
23 | #define GVPE_CONF_H__ |
23 | #define GVPE_CONF_H__ |
24 | |
24 | |
… | |
… | |
32 | #define DEFAULT_REKEY 3600 |
32 | #define DEFAULT_REKEY 3600 |
33 | #define DEFAULT_KEEPALIVE 60 // one keepalive/minute (it's just 8 bytes...) |
33 | #define DEFAULT_KEEPALIVE 60 // one keepalive/minute (it's just 8 bytes...) |
34 | #define DEFAULT_UDPPORT 655 // same as tinc, conflicts would be rare |
34 | #define DEFAULT_UDPPORT 655 // same as tinc, conflicts would be rare |
35 | #define DEFAULT_MTU 1500 // let's ether-net |
35 | #define DEFAULT_MTU 1500 // let's ether-net |
36 | #define DEFAULT_MAX_RETRY 3600 // retry at least this often |
36 | #define DEFAULT_MAX_RETRY 3600 // retry at least this often |
|
|
37 | #define DEFAULT_MAX_TTL 60 // packets expire after this many seconds |
|
|
38 | #define DEFAULT_MAX_QUEUE 512 // never queue more than this many packets |
37 | |
39 | |
38 | #define DEFAULT_DNS_TIMEOUT_FACTOR 8.F // initial retry timeout multiple |
40 | #define DEFAULT_DNS_TIMEOUT_FACTOR 8.F // initial retry timeout multiple |
39 | #define DEFAULT_DNS_SEND_INTERVAL .01F // minimum send interval |
41 | #define DEFAULT_DNS_SEND_INTERVAL .01F // minimum send interval |
40 | #define DEFAULT_DNS_OVERLAP_FACTOR .5F // RTT * LATENCY_FACTOR == sending rate |
42 | #define DEFAULT_DNS_OVERLAP_FACTOR .5F // RTT * LATENCY_FACTOR == sending rate |
41 | #define DEFAULT_DNS_MAX_OUTSTANDING 100 // max. number of outstanding requests |
43 | #define DEFAULT_DNS_MAX_OUTSTANDING 100 // max. number of outstanding requests |
… | |
… | |
71 | u16 dns_port; |
73 | u16 dns_port; |
72 | |
74 | |
73 | u8 protocols; // protocols this host can send & receive |
75 | u8 protocols; // protocols this host can send & receive |
74 | u16 udp_port, tcp_port; // the port to bind to |
76 | u16 udp_port, tcp_port; // the port to bind to |
75 | int max_retry; |
77 | int max_retry; |
|
|
78 | double max_ttl; // packets expire after this many seconds |
|
|
79 | int max_queue; // maixmum send queue length |
76 | |
80 | |
77 | enum connectmode { C_ONDEMAND, C_NEVER, C_ALWAYS, C_DISABLED } connectmode; |
81 | enum connectmode { C_ONDEMAND, C_NEVER, C_ALWAYS, C_DISABLED } connectmode; |
78 | bool compress; |
82 | bool compress; |
79 | bool inherit_tos; // inherit TOS in packets send to this destination |
83 | bool inherit_tos; // inherit TOS in packets send to this destination |
80 | |
84 | |
|
|
85 | vector<const char *> allow_direct; |
|
|
86 | vector<const char *> deny_direct; |
|
|
87 | |
81 | u32 routerprio; |
88 | u32 routerprio; |
|
|
89 | |
|
|
90 | bool can_direct (struct conf_node *other); |
82 | |
91 | |
83 | void print (); |
92 | void print (); |
84 | |
93 | |
85 | ~conf_node (); |
94 | ~conf_node (); |
86 | }; |
95 | }; |