]> git.proxmox.com Git - mirror_frr.git/blame - babeld/resend.h
Merge pull request #13376 from louis-6wind/fix-flex-algo-mem-leak
[mirror_frr.git] / babeld / resend.h
CommitLineData
acddc0ed 1// SPDX-License-Identifier: MIT
ca10883e
DS
2/*
3Copyright (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
14struct 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
27extern struct timeval resend_time;
28
29struct resend *find_request(const unsigned char *prefix, unsigned char plen,
30 struct resend **previous_return);
31void flush_resends(struct neighbour *neigh);
32int 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);
35int unsatisfied_request(const unsigned char *prefix, unsigned char plen,
36 unsigned short seqno, const unsigned char *id);
37int request_redundant(struct interface *ifp,
38 const unsigned char *prefix, unsigned char plen,
39 unsigned short seqno, const unsigned char *id);
40int satisfy_request(const unsigned char *prefix, unsigned char plen,
41 unsigned short seqno, const unsigned char *id,
42 struct interface *ifp);
43
44void expire_resend(void);
45void recompute_resend_time(void);
46void do_resend(void);
47
48#endif /* BABEL_RESEND_H */