]> git.proxmox.com Git - mirror_frr.git/blob - sharpd/sharp_globals.h
doc: Add `show ipv6 rpf X:X::X:X` command to docs
[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 #include "lib/srv6.h"
26
27 DECLARE_MGROUP(SHARPD);
28
29 struct sharp_routes {
30 /* The original prefix for route installation */
31 struct prefix orig_prefix;
32
33 /* The nexthop info we are using for installation */
34 struct nexthop nhop;
35 struct nexthop backup_nhop;
36 uint32_t nhgid;
37 struct nexthop_group nhop_group;
38 struct nexthop_group backup_nhop_group;
39
40 uint32_t total_routes;
41 uint32_t installed_routes;
42 uint32_t removed_routes;
43 int32_t repeat;
44
45 /* ZAPI_ROUTE's flag */
46 uint32_t flags;
47
48 uint8_t inst;
49 vrf_id_t vrf_id;
50
51 struct timeval t_start;
52 struct timeval t_end;
53
54 char opaque[ZAPI_MESSAGE_OPAQUE_LENGTH];
55 };
56
57 struct 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
65 struct sharp_global {
66 /* Global data about route install/deletions */
67 struct sharp_routes r;
68
69 /* The list of nexthops that we are watching and data about them */
70 struct list *nhs;
71
72 /* Traffic Engineering Database */
73 struct ls_ted *ted;
74
75 /* list of sharp_srv6_locator */
76 struct list *srv6_locators;
77 };
78
79 extern struct sharp_global sg;
80 #endif