… | |
… | |
31 | |
31 | |
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 28800 // retry at least this often |
36 | #define DEFAULT_MAX_RETRY 3600 // retry at least this often |
37 | |
37 | |
38 | enum { |
38 | enum { |
39 | PROT_UDPv4 = 0x01, // udp over ipv4 |
39 | PROT_UDPv4 = 0x01, // udp over ipv4 |
40 | PROT_IPv4 = 0x02, // generic ip protocol |
40 | PROT_IPv4 = 0x02, // generic ip protocol |
41 | PROT_TCPv4 = 0x04, // tcp over ipv4 (server) |
41 | PROT_TCPv4 = 0x04, // tcp over ipv4 (server) |
42 | PROT_ICMPv4 = 0x08, // icmp over ipv4 |
42 | PROT_ICMPv4 = 0x08, // icmp over ipv4 |
43 | PROT_DNSv4 = 0x10, // dns tunnel ipv4 (server) |
43 | PROT_DNSv4 = 0x10, // dns tunnel ipv4 (server) |
44 | }; |
44 | }; |
|
|
45 | |
|
|
46 | #define PROT_RELIABLE (PROT_TCPv4 | PROT_DNSv4) |
|
|
47 | #define PROT_SLOW PROT_DNSv4 |
45 | |
48 | |
46 | // select the "best" protocol of the available ones |
49 | // select the "best" protocol of the available ones |
47 | u8 best_protocol (u8 protset); |
50 | u8 best_protocol (u8 protset); |
48 | const char *strprotocol (u8 protocol); |
51 | const char *strprotocol (u8 protocol); |
49 | |
52 | |