]> git.proxmox.com Git - mirror_frr.git/blame - sharpd/sharp_zebra.h
lib, zebra: Add ability to send down a nhgid over route install
[mirror_frr.git] / sharpd / sharp_zebra.h
CommitLineData
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
25extern void sharp_zebra_init(void);
26
2be4d61a
MS
27/* Add and delete extra zapi client sessions, for testing */
28int sharp_zclient_create(uint32_t session_id);
29int sharp_zclient_delete(uint32_t session_id);
30
7d061b3c 31extern void vrf_label_add(vrf_id_t vrf_id, afi_t afi, mpls_label_t label);
1df3b1dc
MS
32extern void route_add(const struct prefix *p, vrf_id_t, uint8_t instance,
33 const struct nexthop_group *nhg,
34 const struct nexthop_group *backup_nhg);
0cf08685 35extern void route_delete(struct prefix *p, vrf_id_t vrf_id, uint8_t instance);
91529dc8
DS
36extern void sharp_zebra_nexthop_watch(struct prefix *p, vrf_id_t vrf_id,
37 bool import, bool watch, bool connected);
6b98d34f 38
0cf08685
DS
39extern void sharp_install_routes_helper(struct prefix *p, vrf_id_t vrf_id,
40 uint8_t instance,
1df3b1dc
MS
41 const struct nexthop_group *nhg,
42 const struct nexthop_group *backup_nhg,
0cf08685
DS
43 uint32_t routes);
44extern void sharp_remove_routes_helper(struct prefix *p, vrf_id_t vrf_id,
45 uint8_t instance, uint32_t routes);
c9e5adba 46
faa75dfa
MS
47int 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
54void 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'. */
58void 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
61extern void sharp_zebra_send_arp(const struct interface *ifp,
62 const struct prefix *p);
63
8a71d93d 64#endif