]>
git.proxmox.com Git - mirror_frr.git/blob - lib/spf_backoff.h
2 * This is an implementation of the IETF SPF delay algorithm
3 * as explained in draft-ietf-rtgwg-backoff-algo-04
5 * Created: 25-01-2017 by S. Litkowski
7 * Copyright (C) 2017 Orange Labs http://www.orange.com/
8 * Copyright (C) 2017 by Christian Franke, Open Source Routing / NetDEF Inc.
10 * This file is part of FRRouting (FRR)
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
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.
22 * You should have received a copy of the GNU General Public License along
23 * with this program; see the file COPYING; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 #ifndef _ZEBRA_SPF_BACKOFF_H
27 #define _ZEBRA_SPF_BACKOFF_H
37 struct spf_backoff
*spf_backoff_new(struct thread_master
*m
, const char *name
,
38 long init_delay
, long short_delay
,
39 long long_delay
, long holddown
,
42 void spf_backoff_free(struct spf_backoff
*backoff
);
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
);
48 /* Shows status of SPF backoff instance */
49 void spf_backoff_show(struct spf_backoff
*backoff
, struct vty
*vty
,
52 /* Writes out global SPF backoff debug config */
53 int spf_backoff_write_config(struct vty
*vty
);
55 /* Registers global SPF backoff debug commands */
56 void spf_backoff_cmd_init(void);
58 /* Accessor functions for SPF backoff parameters */
59 long spf_backoff_init_delay(struct spf_backoff
*backoff
);
60 long spf_backoff_short_delay(struct spf_backoff
*backoff
);
61 long spf_backoff_long_delay(struct spf_backoff
*backoff
);
62 long spf_backoff_holddown(struct spf_backoff
*backoff
);
63 long spf_backoff_timetolearn(struct spf_backoff
*backoff
);