]> git.proxmox.com Git - mirror_frr.git/blame - sharpd/sharp_globals.h
lib, zebra: Ensure that the ifp->node exists
[mirror_frr.git] / sharpd / sharp_globals.h
CommitLineData
acddc0ed 1// SPDX-License-Identifier: GPL-2.0-or-later
d21f1a93
DS
2/*
3 * SHARP - code to track globals
4 * Copyright (C) 2019 Cumulus Networks, Inc.
5 * Donald Sharp
d21f1a93
DS
6 */
7#ifndef __SHARP_GLOBAL_H__
8#define __SHARP_GLOBAL_H__
9
ade3eebc
HS
10#include "lib/srv6.h"
11
bf8d3d6a 12DECLARE_MGROUP(SHARPD);
86da53ab 13
547dc642
DS
14struct sharp_routes {
15 /* The original prefix for route installation */
16 struct prefix orig_prefix;
17
1df3b1dc 18 /* The nexthop info we are using for installation */
547dc642 19 struct nexthop nhop;
1df3b1dc 20 struct nexthop backup_nhop;
569e87c0 21 uint32_t nhgid;
547dc642 22 struct nexthop_group nhop_group;
1df3b1dc 23 struct nexthop_group backup_nhop_group;
547dc642
DS
24
25 uint32_t total_routes;
26 uint32_t installed_routes;
27 uint32_t removed_routes;
28 int32_t repeat;
29
c27b47d7
HS
30 /* ZAPI_ROUTE's flag */
31 uint32_t flags;
32
547dc642 33 uint8_t inst;
0cf08685 34 vrf_id_t vrf_id;
547dc642
DS
35
36 struct timeval t_start;
37 struct timeval t_end;
cfa2a35d
DS
38
39 char opaque[ZAPI_MESSAGE_OPAQUE_LENGTH];
547dc642
DS
40};
41
ade3eebc
HS
42struct 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
d21f1a93 50struct sharp_global {
f59e6418 51 /* Global data about route install/deletions */
547dc642 52 struct sharp_routes r;
86da53ab
DS
53
54 /* The list of nexthops that we are watching and data about them */
55 struct list *nhs;
1888e243
OD
56
57 /* Traffic Engineering Database */
58 struct ls_ted *ted;
ade3eebc
HS
59
60 /* list of sharp_srv6_locator */
61 struct list *srv6_locators;
d21f1a93
DS
62};
63
547dc642 64extern struct sharp_global sg;
d21f1a93 65#endif