]> git.proxmox.com Git - mirror_frr.git/blame - zebra/zebra_rnh.h
*: auto-convert to SPDX License IDs
[mirror_frr.git] / zebra / zebra_rnh.h
CommitLineData
acddc0ed 1// SPDX-License-Identifier: GPL-2.0-or-later
fb018d25
DS
2/*
3 * Zebra next hop tracking header
4 * Copyright (C) 2013 Cumulus Networks, Inc.
fb018d25
DS
5 */
6
7#ifndef _ZEBRA_RNH_H
8#define _ZEBRA_RNH_H
9
10#include "prefix.h"
11#include "vty.h"
12
51e94aa7
EDP
13#ifdef __cplusplus
14extern "C" {
15#endif
16
453844ab
QY
17extern void zebra_rnh_init(void);
18
e9ac2861 19extern struct rnh *zebra_add_rnh(struct prefix *p, vrf_id_t vrfid, safi_t safi,
6071e5e9 20 bool *exists);
d597533a
DS
21extern struct rnh *zebra_lookup_rnh(struct prefix *p, vrf_id_t vrfid,
22 safi_t safi);
d62a17ae 23extern void zebra_free_rnh(struct rnh *rnh);
d62a17ae 24extern void zebra_add_rnh_client(struct rnh *rnh, struct zserv *client,
6071e5e9 25 vrf_id_t vrfid);
31f937fb 26extern int zebra_send_rnh_update(struct rnh *rnh, struct zserv *client,
6071e5e9 27 vrf_id_t vrf_id, uint32_t srte_color);
1fddcd0a 28extern void zebra_register_rnh_pseudowire(vrf_id_t, struct zebra_pw *, bool *);
731a75fe 29extern void zebra_deregister_rnh_pseudowire(vrf_id_t, struct zebra_pw *);
6071e5e9 30extern void zebra_remove_rnh_client(struct rnh *rnh, struct zserv *client);
73bf60a0 31extern void zebra_evaluate_rnh(struct zebra_vrf *zvrf, afi_t afi, int force,
7d08e1e3 32 const struct prefix *p, safi_t safi);
6c90403b 33extern void zebra_print_rnh_table(vrf_id_t vrfid, afi_t afi, safi_t safi,
780563cc
SPG
34 struct vty *vty, const struct prefix *p,
35 json_object *json);
51e94aa7 36
5a0bdc78
PG
37extern int rnh_resolve_via_default(struct zebra_vrf *zvrf, int family);
38
b59839af
DS
39extern bool rnh_nexthop_valid(const struct route_entry *re,
40 const struct nexthop *nh);
41
aef1d540
MS
42/* UI control to avoid notifications if backup nexthop status changes */
43void rnh_set_hide_backups(bool hide_p);
44bool rnh_get_hide_backups(void);
45
553c8048
PJD
46void show_nexthop_json_helper(json_object *json_nexthop,
47 const struct nexthop *nexthop,
48 const struct route_entry *re);
49void show_route_nexthop_helper(struct vty *vty, const struct route_entry *re,
50 const struct nexthop *nexthop);
51
51e94aa7
EDP
52#ifdef __cplusplus
53}
54#endif
55
fb018d25 56#endif /*_ZEBRA_RNH_H */