]>
Commit | Line | Data |
---|---|---|
acddc0ed | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
8a71d93d DS |
2 | /* |
3 | * Zebra connect library for SHARP | |
4 | * Copyright (C) Cumulus Networks, Inc. | |
5 | * Donald Sharp | |
8a71d93d DS |
6 | */ |
7 | #ifndef __SHARP_ZEBRA_H__ | |
8 | #define __SHARP_ZEBRA_H__ | |
9 | ||
10 | extern void sharp_zebra_init(void); | |
11 | ||
2be4d61a MS |
12 | /* Add and delete extra zapi client sessions, for testing */ |
13 | int sharp_zclient_create(uint32_t session_id); | |
14 | int sharp_zclient_delete(uint32_t session_id); | |
15 | ||
7d061b3c | 16 | extern void vrf_label_add(vrf_id_t vrf_id, afi_t afi, mpls_label_t label); |
21735352 SW |
17 | extern void nhg_add(uint32_t id, const struct nexthop_group *nhg, |
18 | const struct nexthop_group *backup_nhg); | |
569e87c0 | 19 | extern void nhg_del(uint32_t id); |
91529dc8 DS |
20 | extern void sharp_zebra_nexthop_watch(struct prefix *p, vrf_id_t vrf_id, |
21 | bool import, bool watch, bool connected); | |
6b98d34f | 22 | |
0cf08685 | 23 | extern void sharp_install_routes_helper(struct prefix *p, vrf_id_t vrf_id, |
569e87c0 | 24 | uint8_t instance, uint32_t nhgid, |
1df3b1dc MS |
25 | const struct nexthop_group *nhg, |
26 | const struct nexthop_group *backup_nhg, | |
4df9d859 HS |
27 | uint32_t routes, uint32_t flags, |
28 | char *opaque); | |
0cf08685 DS |
29 | extern void sharp_remove_routes_helper(struct prefix *p, vrf_id_t vrf_id, |
30 | uint8_t instance, uint32_t routes); | |
c9e5adba | 31 | |
faa75dfa MS |
32 | int sharp_install_lsps_helper(bool install_p, bool update_p, |
33 | const struct prefix *p, uint8_t type, | |
34 | int instance, uint32_t in_label, | |
665edffd MS |
35 | const struct nexthop_group *nhg, |
36 | const struct nexthop_group *backup_nhg); | |
939b2339 | 37 | |
2ac6c90d | 38 | /* Send OPAQUE messages, using subtype 'type'. */ |
c8b27f2a MS |
39 | void sharp_opaque_send(uint32_t type, uint32_t proto, uint32_t instance, |
40 | uint32_t session_id, uint32_t count); | |
2ac6c90d | 41 | |
939b2339 MS |
42 | /* Send OPAQUE registration messages, using subtype 'type'. */ |
43 | void sharp_opaque_reg_send(bool is_reg, uint32_t proto, uint32_t instance, | |
44 | uint32_t session_id, uint32_t type); | |
665edffd | 45 | |
da187b77 JU |
46 | extern void sharp_zebra_send_arp(const struct interface *ifp, |
47 | const struct prefix *p); | |
48 | ||
1888e243 OD |
49 | /* Register Link State Opaque messages */ |
50 | extern void sharp_zebra_register_te(void); | |
51 | ||
921af54d DS |
52 | extern void sharp_redistribute_vrf(struct vrf *vrf, int source); |
53 | ||
2ba6be5b HS |
54 | extern int sharp_zebra_srv6_manager_get_locator_chunk(const char *lname); |
55 | extern int sharp_zebra_srv6_manager_release_locator_chunk(const char *lname); | |
ade3eebc HS |
56 | extern void sharp_install_seg6local_route_helper(struct prefix *p, |
57 | uint8_t instance, | |
58 | enum seg6local_action_t act, | |
59 | struct seg6local_context *ctx); | |
60 | ||
f9a1140c SW |
61 | extern int sharp_zebra_send_interface_protodown(struct interface *ifp, |
62 | bool down); | |
04bc334e SY |
63 | extern int sharp_zebra_send_tc_filter_rate(struct interface *ifp, |
64 | const struct prefix *source, | |
65 | const struct prefix *destination, | |
66 | uint8_t ip_proto, uint16_t src_port, | |
67 | uint16_t dst_port, uint64_t rate); | |
8a71d93d | 68 | #endif |