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

Comparing gvpe/src/vpn_dns.C (file contents):
Revision 1.14 by pcg, Fri Mar 4 09:51:23 2005 UTC vs.
Revision 1.15 by pcg, Fri Mar 4 10:15:45 2005 UTC

43 43
44#include "netcompat.h" 44#include "netcompat.h"
45 45
46#include "vpn.h" 46#include "vpn.h"
47 47
48#define MIN_POLL_INTERVAL .02 // how often to poll minimally when the server is having data 48#define MIN_POLL_INTERVAL .02 // how often to poll minimally when the server has data
49#define MAX_POLL_INTERVAL 6. // how often to poll minimally when the server has no data 49#define MAX_POLL_INTERVAL 6. // 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 INITIAL_TIMEOUT 1. 52#define INITIAL_TIMEOUT 1. // retry timeouts
53#define INITIAL_SYN_TIMEOUT 2. 53#define INITIAL_SYN_TIMEOUT 2. // retry timeout for initial syn
54 54
55#define MIN_SEND_INTERVAL 0.01 55#define MIN_SEND_INTERVAL 0.01 // wait at least this time between sending requests
56#define MAX_SEND_INTERVAL 0.5 // optimistic? 56#define MAX_SEND_INTERVAL 0.5 // optimistic?
57 57
58#define MAX_OUTSTANDING 40 // max. outstanding requests 58#define MAX_OUTSTANDING 40 // max. outstanding requests
59#define MAX_WINDOW 100 // max. for MAX_OUTSTANDING 59#define MAX_WINDOW 100 // max. for MAX_OUTSTANDING
60#define MAX_BACKLOG (100*1024) // size of protocol backlog, must be > MAXSIZE 60#define MAX_BACKLOG (100*1024) // size of gvpe protocol backlog (bytes), must be > MAXSIZE
61 61
62#define MAX_DOMAIN_SIZE 220 // 255 is legal limit, but bind doesn't compress well 62#define MAX_DOMAIN_SIZE 220 // 255 is legal limit, but bind doesn't compress well
63// 240 leaves about 4 bytes of server reply data 63// 240 leaves about 4 bytes of server reply data
64// every two request byte sless give room for one reply byte 64// every two request bytes less give room for one reply byte
65 65
66#define SEQNO_MASK 0xffff 66#define SEQNO_MASK 0xffff
67#define SEQNO_EQ(a,b) ( 0 == ( ((a) ^ (b)) & SEQNO_MASK) ) 67#define SEQNO_EQ(a,b) ( 0 == ( ((a) ^ (b)) & SEQNO_MASK) )
68 68
69#define MAX_LBL_SIZE 63 69#define MAX_LBL_SIZE 63
870 } 870 }
871 871
872 // avoid empty TXT rdata 872 // avoid empty TXT rdata
873 if (offs == rdlen_offs) 873 if (offs == rdlen_offs)
874 pkt[offs++] = 0; 874 pkt[offs++] = 0;
875
876 slog (L_NOISE, "snddq %d", dns->snddq.size ());
875 } 877 }
876 else 878 else
877 { 879 {
878 // send RST 880 // send RST
879 pkt [offs++] = CMD_IP_1; pkt [offs++] = CMD_IP_2; pkt [offs++] = CMD_IP_3; 881 pkt [offs++] = CMD_IP_1; pkt [offs++] = CMD_IP_2; pkt [offs++] = CMD_IP_3;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines