]>
git.proxmox.com Git - mirror_frr.git/blob - lib/spf_backoff.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * This is an implementation of the IETF SPF delay algorithm
4 * as explained in draft-ietf-rtgwg-backoff-algo-04
6 * Created: 25-01-2017 by S. Litkowski
8 * Copyright (C) 2017 Orange Labs http://www.orange.com/
9 * Copyright (C) 2017 by Christian Franke, Open Source Routing / NetDEF Inc.
11 * This file is part of FRRouting (FRR)
13 #ifndef _ZEBRA_SPF_BACKOFF_H
14 #define _ZEBRA_SPF_BACKOFF_H
24 struct spf_backoff
*spf_backoff_new(struct thread_master
*m
, const char *name
,
25 long init_delay
, long short_delay
,
26 long long_delay
, long holddown
,
29 void spf_backoff_free(struct spf_backoff
*backoff
);
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
);
35 /* Shows status of SPF backoff instance */
36 void spf_backoff_show(struct spf_backoff
*backoff
, struct vty
*vty
,
39 /* Writes out global SPF backoff debug config */
40 int spf_backoff_write_config(struct vty
*vty
);
42 /* Registers global SPF backoff debug commands */
43 void spf_backoff_cmd_init(void);
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
);