… | |
… | |
47 | #include "vpn.h" |
47 | #include "vpn.h" |
48 | |
48 | |
49 | #define MAX_POLL_INTERVAL 5. // how often to poll minimally when the server has no data |
49 | #define MAX_POLL_INTERVAL 5. // how often to poll minimally when the server has no data |
50 | #define ACTIVITY_INTERVAL 5. |
50 | #define ACTIVITY_INTERVAL 5. |
51 | |
51 | |
52 | #define TIMEOUT_FACTOR 2. |
52 | #define TIMEOUT_FACTOR 4. |
53 | |
53 | |
54 | #define INITIAL_TIMEOUT 0.1 // retry timeouts |
54 | #define INITIAL_TIMEOUT 0.1 // retry timeouts |
55 | #define INITIAL_SYN_TIMEOUT 10. // retry timeout for initial syn |
55 | #define INITIAL_SYN_TIMEOUT 10. // retry timeout for initial syn |
56 | |
56 | |
57 | #define MIN_SEND_INTERVAL 0.001 // wait at least this time between sending requests |
57 | #define MIN_SEND_INTERVAL 0.001 // wait at least this time between sending requests |
… | |
… | |
64 | |
64 | |
65 | #define MAX_DOMAIN_SIZE 240 // 255 is legal limit, but bind doesn't compress well |
65 | #define MAX_DOMAIN_SIZE 240 // 255 is legal limit, but bind doesn't compress well |
66 | // 240 leaves about 4 bytes of server reply data |
66 | // 240 leaves about 4 bytes of server reply data |
67 | // every two request bytes less give room for one reply byte |
67 | // every two request bytes less give room for one reply byte |
68 | |
68 | |
69 | #define SEQNO_MASK 0x0fff |
69 | #define SEQNO_MASK 0x3fff |
70 | #define SEQNO_EQ(a,b) ( 0 == ( ((a) ^ (b)) & SEQNO_MASK) ) |
70 | #define SEQNO_EQ(a,b) ( 0 == ( ((a) ^ (b)) & SEQNO_MASK) ) |
71 | |
71 | |
72 | #define MAX_LBL_SIZE 63 |
72 | #define MAX_LBL_SIZE 63 |
73 | #define MAX_PKT_SIZE 512 |
73 | #define MAX_PKT_SIZE 512 |
74 | |
74 | |