]> git.proxmox.com Git - mirror_frr.git/blob - sharpd/sharp_globals.h
Merge pull request #13649 from donaldsharp/unlock_the_node_or_else
[mirror_frr.git] / sharpd / sharp_globals.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * SHARP - code to track globals
4 * Copyright (C) 2019 Cumulus Networks, Inc.
5 * Donald Sharp
6 */
7 #ifndef __SHARP_GLOBAL_H__
8 #define __SHARP_GLOBAL_H__
9
10 #include "lib/srv6.h"
11
12 DECLARE_MGROUP(SHARPD);
13
14 struct sharp_routes {
15 /* The original prefix for route installation */
16 struct prefix orig_prefix;
17
18 /* The nexthop info we are using for installation */
19 struct nexthop nhop;
20 struct nexthop backup_nhop;
21 uint32_t nhgid;
22 struct nexthop_group nhop_group;
23 struct nexthop_group backup_nhop_group;
24
25 uint32_t total_routes;
26 uint32_t installed_routes;
27 uint32_t removed_routes;
28 int32_t repeat;
29
30 /* ZAPI_ROUTE's flag */
31 uint32_t flags;
32
33 uint8_t inst;
34 vrf_id_t vrf_id;
35
36 struct timeval t_start;
37 struct timeval t_end;
38
39 char opaque[ZAPI_MESSAGE_OPAQUE_LENGTH];
40 };
41
42 struct sharp_srv6_locator {
43 /* name of locator */
44 char name[SRV6_LOCNAME_SIZE];
45
46 /* list of struct prefix_ipv6 */
47 struct list *chunks;
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 /* Traffic Engineering Database */
58 struct ls_ted *ted;
59
60 /* list of sharp_srv6_locator */
61 struct list *srv6_locators;
62 };
63
64 extern struct sharp_global sg;
65 #endif