]> git.proxmox.com Git - mirror_frr.git/blob - sharpd/sharp_zebra.h
Merge pull request #13649 from donaldsharp/unlock_the_node_or_else
[mirror_frr.git] / sharpd / sharp_zebra.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * Zebra connect library for SHARP
4 * Copyright (C) Cumulus Networks, Inc.
5 * Donald Sharp
6 */
7 #ifndef __SHARP_ZEBRA_H__
8 #define __SHARP_ZEBRA_H__
9
10 extern void sharp_zebra_init(void);
11
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
16 extern void vrf_label_add(vrf_id_t vrf_id, afi_t afi, mpls_label_t label);
17 extern void nhg_add(uint32_t id, const struct nexthop_group *nhg,
18 const struct nexthop_group *backup_nhg);
19 extern void nhg_del(uint32_t id);
20 extern void sharp_zebra_nexthop_watch(struct prefix *p, vrf_id_t vrf_id,
21 bool import, bool watch, bool connected);
22
23 extern void sharp_install_routes_helper(struct prefix *p, vrf_id_t vrf_id,
24 uint8_t instance, uint32_t nhgid,
25 const struct nexthop_group *nhg,
26 const struct nexthop_group *backup_nhg,
27 uint32_t routes, uint32_t flags,
28 char *opaque);
29 extern void sharp_remove_routes_helper(struct prefix *p, vrf_id_t vrf_id,
30 uint8_t instance, uint32_t routes);
31
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,
35 const struct nexthop_group *nhg,
36 const struct nexthop_group *backup_nhg);
37
38 /* Send OPAQUE messages, using subtype 'type'. */
39 void sharp_opaque_send(uint32_t type, uint32_t proto, uint32_t instance,
40 uint32_t session_id, uint32_t count);
41
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);
45
46 extern void sharp_zebra_send_arp(const struct interface *ifp,
47 const struct prefix *p);
48
49 /* Register Link State Opaque messages */
50 extern void sharp_zebra_register_te(void);
51
52 extern void sharp_redistribute_vrf(struct vrf *vrf, int source);
53
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);
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
61 extern int sharp_zebra_send_interface_protodown(struct interface *ifp,
62 bool down);
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);
68 #endif