]> git.proxmox.com Git - mirror_frr.git/blob - sharpd/sharp_globals.h
Merge pull request #6811 from rgirada/test_helper
[mirror_frr.git] / sharpd / sharp_globals.h
1 /*
2 * SHARP - code to track globals
3 * Copyright (C) 2019 Cumulus Networks, Inc.
4 * Donald Sharp
5 *
6 * This file is part of FRR.
7 *
8 * FRR is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2, or (at your option) any
11 * later version.
12 *
13 * FRR is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; see the file COPYING; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22 #ifndef __SHARP_GLOBAL_H__
23 #define __SHARP_GLOBAL_H__
24
25 DECLARE_MGROUP(SHARPD)
26
27 struct sharp_routes {
28 /* The original prefix for route installation */
29 struct prefix orig_prefix;
30
31 /* The nexthop info we are using for installation */
32 struct nexthop nhop;
33 struct nexthop backup_nhop;
34 uint32_t nhgid;
35 struct nexthop_group nhop_group;
36 struct nexthop_group backup_nhop_group;
37
38 uint32_t total_routes;
39 uint32_t installed_routes;
40 uint32_t removed_routes;
41 int32_t repeat;
42
43 uint8_t inst;
44 vrf_id_t vrf_id;
45
46 struct timeval t_start;
47 struct timeval t_end;
48 };
49
50 struct sharp_global {
51 /* Global data about route install/deletions */
52 struct sharp_routes r;
53
54 /* The list of nexthops that we are watching and data about them */
55 struct list *nhs;
56 };
57
58 extern struct sharp_global sg;
59 #endif