]> git.proxmox.com Git - mirror_frr.git/blame - sharpd/sharp_globals.h
Merge pull request #10682 from mjstapp/fix_zebra_doc
[mirror_frr.git] / sharpd / sharp_globals.h
CommitLineData
d21f1a93
DS
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
ade3eebc
HS
25#include "lib/srv6.h"
26
bf8d3d6a 27DECLARE_MGROUP(SHARPD);
86da53ab 28
547dc642
DS
29struct sharp_routes {
30 /* The original prefix for route installation */
31 struct prefix orig_prefix;
32
1df3b1dc 33 /* The nexthop info we are using for installation */
547dc642 34 struct nexthop nhop;
1df3b1dc 35 struct nexthop backup_nhop;
569e87c0 36 uint32_t nhgid;
547dc642 37 struct nexthop_group nhop_group;
1df3b1dc 38 struct nexthop_group backup_nhop_group;
547dc642
DS
39
40 uint32_t total_routes;
41 uint32_t installed_routes;
42 uint32_t removed_routes;
43 int32_t repeat;
44
c27b47d7
HS
45 /* ZAPI_ROUTE's flag */
46 uint32_t flags;
47
547dc642 48 uint8_t inst;
0cf08685 49 vrf_id_t vrf_id;
547dc642
DS
50
51 struct timeval t_start;
52 struct timeval t_end;
cfa2a35d
DS
53
54 char opaque[ZAPI_MESSAGE_OPAQUE_LENGTH];
547dc642
DS
55};
56
ade3eebc
HS
57struct sharp_srv6_locator {
58 /* name of locator */
59 char name[SRV6_LOCNAME_SIZE];
60
61 /* list of struct prefix_ipv6 */
62 struct list *chunks;
63};
64
d21f1a93 65struct sharp_global {
f59e6418 66 /* Global data about route install/deletions */
547dc642 67 struct sharp_routes r;
86da53ab
DS
68
69 /* The list of nexthops that we are watching and data about them */
70 struct list *nhs;
1888e243
OD
71
72 /* Traffic Engineering Database */
73 struct ls_ted *ted;
ade3eebc
HS
74
75 /* list of sharp_srv6_locator */
76 struct list *srv6_locators;
d21f1a93
DS
77};
78
547dc642 79extern struct sharp_global sg;
d21f1a93 80#endif