]>
Commit | Line | Data |
---|---|---|
acddc0ed | 1 | // SPDX-License-Identifier: MIT |
ca10883e DS |
2 | /* |
3 | Copyright (c) 2007, 2008 by Juliusz Chroboczek | |
ca10883e DS |
4 | */ |
5 | #ifndef BABEL_RESEND_H | |
6 | #define BABEL_RESEND_H | |
7 | ||
8 | #define REQUEST_TIMEOUT 65000 | |
9 | #define RESEND_MAX 3 | |
10 | ||
11 | #define RESEND_REQUEST 1 | |
12 | #define RESEND_UPDATE 2 | |
13 | ||
14 | struct resend { | |
15 | unsigned char kind; | |
16 | unsigned char max; | |
17 | unsigned short delay; | |
18 | struct timeval time; | |
19 | unsigned char prefix[16]; | |
20 | unsigned char plen; | |
21 | unsigned short seqno; | |
22 | unsigned char id[8]; | |
23 | struct interface *ifp; | |
24 | struct resend *next; | |
25 | }; | |
26 | ||
27 | extern struct timeval resend_time; | |
28 | ||
29 | struct resend *find_request(const unsigned char *prefix, unsigned char plen, | |
30 | struct resend **previous_return); | |
31 | void flush_resends(struct neighbour *neigh); | |
32 | int record_resend(int kind, const unsigned char *prefix, unsigned char plen, | |
33 | unsigned short seqno, const unsigned char *id, | |
34 | struct interface *ifp, int delay); | |
35 | int unsatisfied_request(const unsigned char *prefix, unsigned char plen, | |
36 | unsigned short seqno, const unsigned char *id); | |
37 | int request_redundant(struct interface *ifp, | |
38 | const unsigned char *prefix, unsigned char plen, | |
39 | unsigned short seqno, const unsigned char *id); | |
40 | int satisfy_request(const unsigned char *prefix, unsigned char plen, | |
41 | unsigned short seqno, const unsigned char *id, | |
42 | struct interface *ifp); | |
43 | ||
44 | void expire_resend(void); | |
45 | void recompute_resend_time(void); | |
46 | void do_resend(void); | |
47 | ||
48 | #endif /* BABEL_RESEND_H */ |