openssl update to 1.0.1i
[tomato/tomato-dir865l.git] / release / src / router / pptp-client / pqueue.h
blob70bfdb0c414f3449057e6b6c7f33ff79282c64d0
1 #ifndef PQUEUE_H
2 #define PQUEUE_H
4 #include <time.h>
5 #include <sys/time.h>
7 /* wait this many seconds for missing packets before forgetting about them */
8 #define DEFAULT_PACKET_TIMEOUT 0.3
9 extern int packet_timeout_usecs;
11 /* assume packet is bad/spoofed if it's more than this many seqs ahead */
12 #define MISSING_WINDOW 300
14 /* Packet queue structure: linked list of packets received out-of-order */
15 typedef struct pqueue {
16 struct pqueue *next;
17 struct pqueue *prev;
18 int seq;
19 struct timeval expires;
20 unsigned char *packet;
21 int packlen;
22 int capacity;
23 } pqueue_t;
25 int pqueue_add (int seq, unsigned char *packet, int packlen);
26 int pqueue_del (pqueue_t *point);
27 pqueue_t *pqueue_head ();
28 int pqueue_expiry_time (pqueue_t *entry);
30 #endif /* PQUEUE_H */