]>
Commit | Line | Data |
---|---|---|
8a71d93d DS |
1 | /* |
2 | * Zebra connect library for SHARP | |
3 | * Copyright (C) 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_ZEBRA_H__ | |
23 | #define __SHARP_ZEBRA_H__ | |
24 | ||
25 | extern void sharp_zebra_init(void); | |
26 | ||
2be4d61a MS |
27 | /* Add and delete extra zapi client sessions, for testing */ |
28 | int sharp_zclient_create(uint32_t session_id); | |
29 | int sharp_zclient_delete(uint32_t session_id); | |
30 | ||
7d061b3c | 31 | extern void vrf_label_add(vrf_id_t vrf_id, afi_t afi, mpls_label_t label); |
21735352 SW |
32 | extern void nhg_add(uint32_t id, const struct nexthop_group *nhg, |
33 | const struct nexthop_group *backup_nhg); | |
569e87c0 | 34 | extern void nhg_del(uint32_t id); |
91529dc8 DS |
35 | extern void sharp_zebra_nexthop_watch(struct prefix *p, vrf_id_t vrf_id, |
36 | bool import, bool watch, bool connected); | |
6b98d34f | 37 | |
0cf08685 | 38 | extern void sharp_install_routes_helper(struct prefix *p, vrf_id_t vrf_id, |
569e87c0 | 39 | uint8_t instance, uint32_t nhgid, |
1df3b1dc MS |
40 | const struct nexthop_group *nhg, |
41 | const struct nexthop_group *backup_nhg, | |
4df9d859 HS |
42 | uint32_t routes, uint32_t flags, |
43 | char *opaque); | |
0cf08685 DS |
44 | extern void sharp_remove_routes_helper(struct prefix *p, vrf_id_t vrf_id, |
45 | uint8_t instance, uint32_t routes); | |
c9e5adba | 46 | |
faa75dfa MS |
47 | int sharp_install_lsps_helper(bool install_p, bool update_p, |
48 | const struct prefix *p, uint8_t type, | |
49 | int instance, uint32_t in_label, | |
665edffd MS |
50 | const struct nexthop_group *nhg, |
51 | const struct nexthop_group *backup_nhg); | |
939b2339 | 52 | |
2ac6c90d | 53 | /* Send OPAQUE messages, using subtype 'type'. */ |
c8b27f2a MS |
54 | void sharp_opaque_send(uint32_t type, uint32_t proto, uint32_t instance, |
55 | uint32_t session_id, uint32_t count); | |
2ac6c90d | 56 | |
939b2339 MS |
57 | /* Send OPAQUE registration messages, using subtype 'type'. */ |
58 | void sharp_opaque_reg_send(bool is_reg, uint32_t proto, uint32_t instance, | |
59 | uint32_t session_id, uint32_t type); | |
665edffd | 60 | |
da187b77 JU |
61 | extern void sharp_zebra_send_arp(const struct interface *ifp, |
62 | const struct prefix *p); | |
63 | ||
1888e243 OD |
64 | /* Register Link State Opaque messages */ |
65 | extern void sharp_zebra_register_te(void); | |
66 | ||
921af54d DS |
67 | extern void sharp_redistribute_vrf(struct vrf *vrf, int source); |
68 | ||
2ba6be5b HS |
69 | extern int sharp_zebra_srv6_manager_get_locator_chunk(const char *lname); |
70 | extern int sharp_zebra_srv6_manager_release_locator_chunk(const char *lname); | |
ade3eebc HS |
71 | extern void sharp_install_seg6local_route_helper(struct prefix *p, |
72 | uint8_t instance, | |
73 | enum seg6local_action_t act, | |
74 | struct seg6local_context *ctx); | |
75 | ||
8a71d93d | 76 | #endif |