]>
Commit | Line | Data |
---|---|---|
c1d0d21f CF |
1 | /* |
2 | * This is an implementation of the IETF SPF delay algorithm | |
3 | * as explained in draft-ietf-rtgwg-backoff-algo-04 | |
4 | * | |
5 | * Created: 25-01-2017 by S. Litkowski | |
6 | * | |
7 | * Copyright (C) 2017 Orange Labs http://www.orange.com/ | |
8 | * Copyright (C) 2017 by Christian Franke, Open Source Routing / NetDEF Inc. | |
9 | * | |
10 | * This file is part of FreeRangeRouting (FRR) | |
11 | * | |
12 | * FRR is free software; you can redistribute it and/or modify it | |
13 | * under the terms of the GNU General Public License as published by the | |
14 | * Free Software Foundation; either version 2, or (at your option) any | |
15 | * later version. | |
16 | * | |
17 | * FRR is distributed in the hope that it will be useful, but | |
18 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
20 | * General Public License for more details. | |
21 | * | |
22 | * You should have received a copy of the GNU General Public License | |
23 | * along with FRR; see the file COPYING. If not, write to the Free | |
24 | * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
25 | * 02111-1307, USA. | |
26 | */ | |
27 | #ifndef _ZEBRA_SPF_BACKOFF_H | |
28 | #define _ZEBRA_SPF_BACKOFF_H | |
29 | ||
30 | struct spf_backoff; | |
31 | struct thread_master; | |
32 | struct vty; | |
33 | ||
34 | struct spf_backoff *spf_backoff_new(struct thread_master *m, | |
35 | const char *name, | |
36 | long init_delay, | |
37 | long short_delay, | |
38 | long long_delay, | |
39 | long holddown, | |
40 | long timetolearn); | |
41 | ||
42 | void spf_backoff_free(struct spf_backoff *backoff); | |
43 | ||
44 | /* Called whenever an IGP event is received, returns how many | |
45 | * milliseconds routing table computation should be delayed */ | |
46 | long spf_backoff_schedule(struct spf_backoff *backoff); | |
47 | ||
48 | /* Shows status of SPF backoff instance */ | |
49 | void spf_backoff_show(struct spf_backoff *backoff, | |
50 | struct vty *vty, | |
51 | const char *prefix); | |
52 | ||
53 | /* Writes out global SPF backoff debug config */ | |
54 | int spf_backoff_write_config(struct vty *vty); | |
55 | ||
56 | /* Registers global SPF backoff debug commands */ | |
57 | void spf_backoff_cmd_init(void); | |
58 | ||
59 | /* Accessor functions for SPF backoff parameters */ | |
60 | long spf_backoff_init_delay(struct spf_backoff *backoff); | |
61 | long spf_backoff_short_delay(struct spf_backoff *backoff); | |
62 | long spf_backoff_long_delay(struct spf_backoff *backoff); | |
63 | long spf_backoff_holddown(struct spf_backoff *backoff); | |
64 | long spf_backoff_timetolearn(struct spf_backoff *backoff); | |
65 | ||
66 | #endif |