]>
Commit | Line | Data |
---|---|---|
acddc0ed | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
c1d0d21f CF |
2 | /* |
3 | * This is an implementation of the IETF SPF delay algorithm | |
4 | * as explained in draft-ietf-rtgwg-backoff-algo-04 | |
5 | * | |
6 | * Created: 25-01-2017 by S. Litkowski | |
7 | * | |
8 | * Copyright (C) 2017 Orange Labs http://www.orange.com/ | |
9 | * Copyright (C) 2017 by Christian Franke, Open Source Routing / NetDEF Inc. | |
10 | * | |
8678d638 | 11 | * This file is part of FRRouting (FRR) |
c1d0d21f CF |
12 | */ |
13 | #ifndef _ZEBRA_SPF_BACKOFF_H | |
14 | #define _ZEBRA_SPF_BACKOFF_H | |
15 | ||
5e244469 RW |
16 | #ifdef __cplusplus |
17 | extern "C" { | |
18 | #endif | |
19 | ||
c1d0d21f | 20 | struct spf_backoff; |
cd9d0537 | 21 | struct event_loop; |
c1d0d21f CF |
22 | struct vty; |
23 | ||
cd9d0537 | 24 | struct spf_backoff *spf_backoff_new(struct event_loop *m, const char *name, |
d62a17ae | 25 | long init_delay, long short_delay, |
26 | long long_delay, long holddown, | |
27 | long timetolearn); | |
c1d0d21f CF |
28 | |
29 | void spf_backoff_free(struct spf_backoff *backoff); | |
30 | ||
31 | /* Called whenever an IGP event is received, returns how many | |
32 | * milliseconds routing table computation should be delayed */ | |
33 | long spf_backoff_schedule(struct spf_backoff *backoff); | |
34 | ||
35 | /* Shows status of SPF backoff instance */ | |
d62a17ae | 36 | void spf_backoff_show(struct spf_backoff *backoff, struct vty *vty, |
37 | const char *prefix); | |
c1d0d21f CF |
38 | |
39 | /* Writes out global SPF backoff debug config */ | |
40 | int spf_backoff_write_config(struct vty *vty); | |
41 | ||
42 | /* Registers global SPF backoff debug commands */ | |
43 | void spf_backoff_cmd_init(void); | |
44 | ||
45 | /* Accessor functions for SPF backoff parameters */ | |
46 | long spf_backoff_init_delay(struct spf_backoff *backoff); | |
47 | long spf_backoff_short_delay(struct spf_backoff *backoff); | |
48 | long spf_backoff_long_delay(struct spf_backoff *backoff); | |
49 | long spf_backoff_holddown(struct spf_backoff *backoff); | |
50 | long spf_backoff_timetolearn(struct spf_backoff *backoff); | |
51 | ||
5e244469 RW |
52 | #ifdef __cplusplus |
53 | } | |
54 | #endif | |
55 | ||
c1d0d21f | 56 | #endif |