Coverage Report

Created: 2025-07-14 06:48

/src/frr/zebra/zebra_vrf.h
Line
Count
Source (jump to first uncovered line)
1
// SPDX-License-Identifier: GPL-2.0-or-later
2
/*
3
 * Zebra Vrf Header
4
 * Copyright (C) 2016 Cumulus Networks
5
 *                    Donald Sharp
6
 */
7
#if !defined(__ZEBRA_VRF_H__)
8
#define __ZEBRA_VRF_H__
9
10
#include "vxlan.h"
11
12
#include <zebra/zebra_ns.h>
13
#include <zebra/zebra_pw.h>
14
#include <zebra/rtadv.h>
15
#include <lib/vxlan.h>
16
17
#ifdef __cplusplus
18
extern "C" {
19
#endif
20
21
/* MPLS (Segment Routing) global block */
22
struct mpls_srgb {
23
  uint32_t start_label;
24
  uint32_t end_label;
25
};
26
27
struct zebra_rmap {
28
  char *name;
29
  struct route_map *map;
30
};
31
32
PREDECL_RBTREE_UNIQ(otable);
33
34
struct other_route_table {
35
  struct otable_item next;
36
37
  afi_t afi;
38
  safi_t safi;
39
  uint32_t table_id;
40
41
  struct route_table *table;
42
};
43
44
/* Routing table instance.  */
45
struct zebra_vrf {
46
  /* Back pointer */
47
  struct vrf *vrf;
48
49
  /* Description.  */
50
  char *desc;
51
52
  /* FIB identifier.  */
53
  uint8_t fib_id;
54
55
  /* Flags. */
56
  uint16_t flags;
57
#define ZEBRA_VRF_RETAIN          (1 << 0)
58
#define ZEBRA_PIM_SEND_VXLAN_SG   (1 << 1)
59
60
  uint32_t table_id;
61
62
  /* Routing table.  */
63
  struct route_table *table[AFI_MAX][SAFI_MAX];
64
65
  /* Recursive Nexthop table */
66
  struct route_table *rnh_table[AFI_MAX];
67
  struct route_table *rnh_table_multicast[AFI_MAX];
68
69
  struct otable_head other_tables;
70
71
  /* 2nd pointer type used primarily to quell a warning on
72
   * ALL_LIST_ELEMENTS_RO
73
   */
74
  struct list _rid_all_sorted_list;
75
  struct list _rid_lo_sorted_list;
76
  struct list *rid_all_sorted_list;
77
  struct list *rid_lo_sorted_list;
78
  struct prefix rid_user_assigned;
79
  struct list _rid6_all_sorted_list;
80
  struct list _rid6_lo_sorted_list;
81
  struct list *rid6_all_sorted_list;
82
  struct list *rid6_lo_sorted_list;
83
  struct prefix rid6_user_assigned;
84
85
  /*
86
   * Back pointer to the owning namespace.
87
   */
88
  struct zebra_ns *zns;
89
90
  /* MPLS Label to handle L3VPN <-> vrf popping */
91
  mpls_label_t label[AFI_MAX];
92
  uint8_t label_proto[AFI_MAX];
93
94
  /* MPLS static LSP config table */
95
  struct hash *slsp_table;
96
97
  /* MPLS label forwarding table */
98
  struct hash *lsp_table;
99
100
  /* MPLS FEC binding table */
101
  struct route_table *fec_table[AFI_MAX];
102
103
  /* MPLS Segment Routing Global block */
104
  struct mpls_srgb mpls_srgb;
105
106
  /* Pseudowires. */
107
  struct zebra_pw_head pseudowires;
108
  struct zebra_static_pw_head static_pseudowires;
109
110
  struct zebra_rmap proto_rm[AFI_MAX][ZEBRA_ROUTE_MAX + 1];
111
  struct zebra_rmap nht_rm[AFI_MAX][ZEBRA_ROUTE_MAX + 1];
112
113
  /* MPLS processing flags */
114
  uint16_t mpls_flags;
115
#define MPLS_FLAG_SCHEDULE_LSPS    (1 << 0)
116
117
  /*
118
   * EVPN hash table. Only in the EVPN instance.
119
   */
120
  struct hash *evpn_table;
121
122
  /*
123
   * Whether EVPN is enabled or not. Only in the EVPN instance.
124
   */
125
  int advertise_all_vni;
126
127
  /*
128
   * Whether we are advertising g/w macip in EVPN or not.
129
   * Only in the EVPN instance.
130
   */
131
  int advertise_gw_macip;
132
133
  int advertise_svi_macip;
134
135
  /* l3-vni info */
136
  vni_t l3vni;
137
138
  /* pim mroutes installed for vxlan flooding */
139
  struct hash *vxlan_sg_table;
140
141
  bool dup_addr_detect;
142
143
  int dad_time;
144
  uint32_t dad_max_moves;
145
  bool dad_freeze;
146
  uint32_t dad_freeze_time;
147
148
  /*
149
   * Flooding mechanism for BUM packets for VxLAN-EVPN.
150
   */
151
  enum vxlan_flood_control vxlan_flood_ctrl;
152
153
  /* Install stats */
154
  uint64_t installs;
155
  uint64_t removals;
156
  uint64_t installs_queued;
157
  uint64_t removals_queued;
158
  uint64_t neigh_updates;
159
  uint64_t lsp_installs_queued;
160
  uint64_t lsp_removals_queued;
161
  uint64_t lsp_installs;
162
  uint64_t lsp_removals;
163
164
  struct table_manager *tbl_mgr;
165
166
  struct rtadv rtadv;
167
168
  bool zebra_rnh_ip_default_route;
169
  bool zebra_rnh_ipv6_default_route;
170
};
171
0
#define PROTO_RM_NAME(zvrf, afi, rtype) zvrf->proto_rm[afi][rtype].name
172
0
#define NHT_RM_NAME(zvrf, afi, rtype) zvrf->nht_rm[afi][rtype].name
173
0
#define PROTO_RM_MAP(zvrf, afi, rtype) zvrf->proto_rm[afi][rtype].map
174
0
#define NHT_RM_MAP(zvrf, afi, rtype) zvrf->nht_rm[afi][rtype].map
175
176
/*
177
 * special macro to allow us to get the correct zebra_vrf
178
 */
179
#define ZEBRA_DECLVAR_CONTEXT_VRF(vrfptr, zvrfptr)                             \
180
0
  VTY_DECLVAR_CONTEXT_VRF(vrfptr);                                       \
181
0
  struct zebra_vrf *zvrfptr = vrfptr->info;                              \
182
0
  MACRO_REQUIRE_SEMICOLON() /* end */
183
184
static inline vrf_id_t zvrf_id(struct zebra_vrf *zvrf)
185
0
{
186
0
  if (!zvrf || !zvrf->vrf)
187
0
    return VRF_DEFAULT;
188
0
  return zvrf->vrf->vrf_id;
189
0
}
Unexecuted instantiation: connected.c:zvrf_id
Unexecuted instantiation: if_netlink.c:zvrf_id
Unexecuted instantiation: interface.c:zvrf_id
Unexecuted instantiation: ioctl.c:zvrf_id
Unexecuted instantiation: kernel_netlink.c:zvrf_id
Unexecuted instantiation: label_manager.c:zvrf_id
Unexecuted instantiation: main.c:zvrf_id
Unexecuted instantiation: netconf_netlink.c:zvrf_id
Unexecuted instantiation: redistribute.c:zvrf_id
Unexecuted instantiation: router-id.c:zvrf_id
Unexecuted instantiation: rt_netlink.c:zvrf_id
Unexecuted instantiation: rtadv.c:zvrf_id
Unexecuted instantiation: rtread_netlink.c:zvrf_id
Unexecuted instantiation: rule_netlink.c:zvrf_id
Unexecuted instantiation: table_manager.c:zvrf_id
Unexecuted instantiation: tc_netlink.c:zvrf_id
Unexecuted instantiation: zapi_msg.c:zvrf_id
Unexecuted instantiation: zebra_dplane.c:zvrf_id
Unexecuted instantiation: zebra_gr.c:zvrf_id
Unexecuted instantiation: zebra_l2.c:zvrf_id
Unexecuted instantiation: zebra_l2_bridge_if.c:zvrf_id
Unexecuted instantiation: zebra_evpn.c:zvrf_id
Unexecuted instantiation: zebra_evpn_mac.c:zvrf_id
Unexecuted instantiation: zebra_evpn_neigh.c:zvrf_id
Unexecuted instantiation: zebra_mlag.c:zvrf_id
Unexecuted instantiation: zebra_mlag_vty.c:zvrf_id
Unexecuted instantiation: zebra_mpls.c:zvrf_id
Unexecuted instantiation: zebra_mpls_netlink.c:zvrf_id
Unexecuted instantiation: zebra_mpls_null.c:zvrf_id
Unexecuted instantiation: zebra_mpls_vty.c:zvrf_id
Unexecuted instantiation: zebra_srv6.c:zvrf_id
Unexecuted instantiation: zebra_srv6_vty.c:zvrf_id
Unexecuted instantiation: zebra_mroute.c:zvrf_id
Unexecuted instantiation: zebra_nb.c:zvrf_id
Unexecuted instantiation: zebra_nb_config.c:zvrf_id
Unexecuted instantiation: zebra_nb_rpcs.c:zvrf_id
Unexecuted instantiation: zebra_nb_state.c:zvrf_id
Unexecuted instantiation: zebra_netns_id.c:zvrf_id
Unexecuted instantiation: zebra_netns_notify.c:zvrf_id
Unexecuted instantiation: zebra_nhg.c:zvrf_id
Unexecuted instantiation: zebra_ns.c:zvrf_id
Unexecuted instantiation: zebra_pbr.c:zvrf_id
Unexecuted instantiation: zebra_ptm.c:zvrf_id
Unexecuted instantiation: zebra_ptm_redistribute.c:zvrf_id
Unexecuted instantiation: zebra_pw.c:zvrf_id
Unexecuted instantiation: zebra_rib.c:zvrf_id
Unexecuted instantiation: zebra_router.c:zvrf_id
Unexecuted instantiation: zebra_rnh.c:zvrf_id
Unexecuted instantiation: zebra_routemap.c:zvrf_id
Unexecuted instantiation: zebra_script.c:zvrf_id
Unexecuted instantiation: zebra_srte.c:zvrf_id
Unexecuted instantiation: zebra_tc.c:zvrf_id
Unexecuted instantiation: zebra_vrf.c:zvrf_id
Unexecuted instantiation: zebra_vty.c:zvrf_id
Unexecuted instantiation: zebra_vxlan.c:zvrf_id
Unexecuted instantiation: zebra_vxlan_if.c:zvrf_id
Unexecuted instantiation: zebra_evpn_mh.c:zvrf_id
Unexecuted instantiation: zebra_neigh.c:zvrf_id
Unexecuted instantiation: zserv.c:zvrf_id
Unexecuted instantiation: debug_nl.c:zvrf_id
190
191
static inline const char *zvrf_ns_name(struct zebra_vrf *zvrf)
192
0
{
193
0
  if (!zvrf->vrf || !zvrf->vrf->ns_ctxt)
194
0
    return NULL;
195
0
  return ns_get_name((struct ns *)zvrf->vrf->ns_ctxt);
196
0
}
Unexecuted instantiation: connected.c:zvrf_ns_name
Unexecuted instantiation: if_netlink.c:zvrf_ns_name
Unexecuted instantiation: interface.c:zvrf_ns_name
Unexecuted instantiation: ioctl.c:zvrf_ns_name
Unexecuted instantiation: kernel_netlink.c:zvrf_ns_name
Unexecuted instantiation: label_manager.c:zvrf_ns_name
Unexecuted instantiation: main.c:zvrf_ns_name
Unexecuted instantiation: netconf_netlink.c:zvrf_ns_name
Unexecuted instantiation: redistribute.c:zvrf_ns_name
Unexecuted instantiation: router-id.c:zvrf_ns_name
Unexecuted instantiation: rt_netlink.c:zvrf_ns_name
Unexecuted instantiation: rtadv.c:zvrf_ns_name
Unexecuted instantiation: rtread_netlink.c:zvrf_ns_name
Unexecuted instantiation: rule_netlink.c:zvrf_ns_name
Unexecuted instantiation: table_manager.c:zvrf_ns_name
Unexecuted instantiation: tc_netlink.c:zvrf_ns_name
Unexecuted instantiation: zapi_msg.c:zvrf_ns_name
Unexecuted instantiation: zebra_dplane.c:zvrf_ns_name
Unexecuted instantiation: zebra_gr.c:zvrf_ns_name
Unexecuted instantiation: zebra_l2.c:zvrf_ns_name
Unexecuted instantiation: zebra_l2_bridge_if.c:zvrf_ns_name
Unexecuted instantiation: zebra_evpn.c:zvrf_ns_name
Unexecuted instantiation: zebra_evpn_mac.c:zvrf_ns_name
Unexecuted instantiation: zebra_evpn_neigh.c:zvrf_ns_name
Unexecuted instantiation: zebra_mlag.c:zvrf_ns_name
Unexecuted instantiation: zebra_mlag_vty.c:zvrf_ns_name
Unexecuted instantiation: zebra_mpls.c:zvrf_ns_name
Unexecuted instantiation: zebra_mpls_netlink.c:zvrf_ns_name
Unexecuted instantiation: zebra_mpls_null.c:zvrf_ns_name
Unexecuted instantiation: zebra_mpls_vty.c:zvrf_ns_name
Unexecuted instantiation: zebra_srv6.c:zvrf_ns_name
Unexecuted instantiation: zebra_srv6_vty.c:zvrf_ns_name
Unexecuted instantiation: zebra_mroute.c:zvrf_ns_name
Unexecuted instantiation: zebra_nb.c:zvrf_ns_name
Unexecuted instantiation: zebra_nb_config.c:zvrf_ns_name
Unexecuted instantiation: zebra_nb_rpcs.c:zvrf_ns_name
Unexecuted instantiation: zebra_nb_state.c:zvrf_ns_name
Unexecuted instantiation: zebra_netns_id.c:zvrf_ns_name
Unexecuted instantiation: zebra_netns_notify.c:zvrf_ns_name
Unexecuted instantiation: zebra_nhg.c:zvrf_ns_name
Unexecuted instantiation: zebra_ns.c:zvrf_ns_name
Unexecuted instantiation: zebra_pbr.c:zvrf_ns_name
Unexecuted instantiation: zebra_ptm.c:zvrf_ns_name
Unexecuted instantiation: zebra_ptm_redistribute.c:zvrf_ns_name
Unexecuted instantiation: zebra_pw.c:zvrf_ns_name
Unexecuted instantiation: zebra_rib.c:zvrf_ns_name
Unexecuted instantiation: zebra_router.c:zvrf_ns_name
Unexecuted instantiation: zebra_rnh.c:zvrf_ns_name
Unexecuted instantiation: zebra_routemap.c:zvrf_ns_name
Unexecuted instantiation: zebra_script.c:zvrf_ns_name
Unexecuted instantiation: zebra_srte.c:zvrf_ns_name
Unexecuted instantiation: zebra_tc.c:zvrf_ns_name
Unexecuted instantiation: zebra_vrf.c:zvrf_ns_name
Unexecuted instantiation: zebra_vty.c:zvrf_ns_name
Unexecuted instantiation: zebra_vxlan.c:zvrf_ns_name
Unexecuted instantiation: zebra_vxlan_if.c:zvrf_ns_name
Unexecuted instantiation: zebra_evpn_mh.c:zvrf_ns_name
Unexecuted instantiation: zebra_neigh.c:zvrf_ns_name
Unexecuted instantiation: zserv.c:zvrf_ns_name
Unexecuted instantiation: debug_nl.c:zvrf_ns_name
197
198
static inline const char *zvrf_name(struct zebra_vrf *zvrf)
199
0
{
200
0
  if (!zvrf || !zvrf->vrf)
201
0
    return "Unknown";
202
0
  return zvrf->vrf->name;
203
0
}
Unexecuted instantiation: connected.c:zvrf_name
Unexecuted instantiation: if_netlink.c:zvrf_name
Unexecuted instantiation: interface.c:zvrf_name
Unexecuted instantiation: ioctl.c:zvrf_name
Unexecuted instantiation: kernel_netlink.c:zvrf_name
Unexecuted instantiation: label_manager.c:zvrf_name
Unexecuted instantiation: main.c:zvrf_name
Unexecuted instantiation: netconf_netlink.c:zvrf_name
Unexecuted instantiation: redistribute.c:zvrf_name
Unexecuted instantiation: router-id.c:zvrf_name
Unexecuted instantiation: rt_netlink.c:zvrf_name
Unexecuted instantiation: rtadv.c:zvrf_name
Unexecuted instantiation: rtread_netlink.c:zvrf_name
Unexecuted instantiation: rule_netlink.c:zvrf_name
Unexecuted instantiation: table_manager.c:zvrf_name
Unexecuted instantiation: tc_netlink.c:zvrf_name
Unexecuted instantiation: zapi_msg.c:zvrf_name
Unexecuted instantiation: zebra_dplane.c:zvrf_name
Unexecuted instantiation: zebra_gr.c:zvrf_name
Unexecuted instantiation: zebra_l2.c:zvrf_name
Unexecuted instantiation: zebra_l2_bridge_if.c:zvrf_name
Unexecuted instantiation: zebra_evpn.c:zvrf_name
Unexecuted instantiation: zebra_evpn_mac.c:zvrf_name
Unexecuted instantiation: zebra_evpn_neigh.c:zvrf_name
Unexecuted instantiation: zebra_mlag.c:zvrf_name
Unexecuted instantiation: zebra_mlag_vty.c:zvrf_name
Unexecuted instantiation: zebra_mpls.c:zvrf_name
Unexecuted instantiation: zebra_mpls_netlink.c:zvrf_name
Unexecuted instantiation: zebra_mpls_null.c:zvrf_name
Unexecuted instantiation: zebra_mpls_vty.c:zvrf_name
Unexecuted instantiation: zebra_srv6.c:zvrf_name
Unexecuted instantiation: zebra_srv6_vty.c:zvrf_name
Unexecuted instantiation: zebra_mroute.c:zvrf_name
Unexecuted instantiation: zebra_nb.c:zvrf_name
Unexecuted instantiation: zebra_nb_config.c:zvrf_name
Unexecuted instantiation: zebra_nb_rpcs.c:zvrf_name
Unexecuted instantiation: zebra_nb_state.c:zvrf_name
Unexecuted instantiation: zebra_netns_id.c:zvrf_name
Unexecuted instantiation: zebra_netns_notify.c:zvrf_name
Unexecuted instantiation: zebra_nhg.c:zvrf_name
Unexecuted instantiation: zebra_ns.c:zvrf_name
Unexecuted instantiation: zebra_pbr.c:zvrf_name
Unexecuted instantiation: zebra_ptm.c:zvrf_name
Unexecuted instantiation: zebra_ptm_redistribute.c:zvrf_name
Unexecuted instantiation: zebra_pw.c:zvrf_name
Unexecuted instantiation: zebra_rib.c:zvrf_name
Unexecuted instantiation: zebra_router.c:zvrf_name
Unexecuted instantiation: zebra_rnh.c:zvrf_name
Unexecuted instantiation: zebra_routemap.c:zvrf_name
Unexecuted instantiation: zebra_script.c:zvrf_name
Unexecuted instantiation: zebra_srte.c:zvrf_name
Unexecuted instantiation: zebra_tc.c:zvrf_name
Unexecuted instantiation: zebra_vrf.c:zvrf_name
Unexecuted instantiation: zebra_vty.c:zvrf_name
Unexecuted instantiation: zebra_vxlan.c:zvrf_name
Unexecuted instantiation: zebra_vxlan_if.c:zvrf_name
Unexecuted instantiation: zebra_evpn_mh.c:zvrf_name
Unexecuted instantiation: zebra_neigh.c:zvrf_name
Unexecuted instantiation: zserv.c:zvrf_name
Unexecuted instantiation: debug_nl.c:zvrf_name
204
205
static inline bool zvrf_is_active(struct zebra_vrf *zvrf)
206
0
{
207
0
  return zvrf->vrf->status & VRF_ACTIVE;
208
0
}
Unexecuted instantiation: connected.c:zvrf_is_active
Unexecuted instantiation: if_netlink.c:zvrf_is_active
Unexecuted instantiation: interface.c:zvrf_is_active
Unexecuted instantiation: ioctl.c:zvrf_is_active
Unexecuted instantiation: kernel_netlink.c:zvrf_is_active
Unexecuted instantiation: label_manager.c:zvrf_is_active
Unexecuted instantiation: main.c:zvrf_is_active
Unexecuted instantiation: netconf_netlink.c:zvrf_is_active
Unexecuted instantiation: redistribute.c:zvrf_is_active
Unexecuted instantiation: router-id.c:zvrf_is_active
Unexecuted instantiation: rt_netlink.c:zvrf_is_active
Unexecuted instantiation: rtadv.c:zvrf_is_active
Unexecuted instantiation: rtread_netlink.c:zvrf_is_active
Unexecuted instantiation: rule_netlink.c:zvrf_is_active
Unexecuted instantiation: table_manager.c:zvrf_is_active
Unexecuted instantiation: tc_netlink.c:zvrf_is_active
Unexecuted instantiation: zapi_msg.c:zvrf_is_active
Unexecuted instantiation: zebra_dplane.c:zvrf_is_active
Unexecuted instantiation: zebra_gr.c:zvrf_is_active
Unexecuted instantiation: zebra_l2.c:zvrf_is_active
Unexecuted instantiation: zebra_l2_bridge_if.c:zvrf_is_active
Unexecuted instantiation: zebra_evpn.c:zvrf_is_active
Unexecuted instantiation: zebra_evpn_mac.c:zvrf_is_active
Unexecuted instantiation: zebra_evpn_neigh.c:zvrf_is_active
Unexecuted instantiation: zebra_mlag.c:zvrf_is_active
Unexecuted instantiation: zebra_mlag_vty.c:zvrf_is_active
Unexecuted instantiation: zebra_mpls.c:zvrf_is_active
Unexecuted instantiation: zebra_mpls_netlink.c:zvrf_is_active
Unexecuted instantiation: zebra_mpls_null.c:zvrf_is_active
Unexecuted instantiation: zebra_mpls_vty.c:zvrf_is_active
Unexecuted instantiation: zebra_srv6.c:zvrf_is_active
Unexecuted instantiation: zebra_srv6_vty.c:zvrf_is_active
Unexecuted instantiation: zebra_mroute.c:zvrf_is_active
Unexecuted instantiation: zebra_nb.c:zvrf_is_active
Unexecuted instantiation: zebra_nb_config.c:zvrf_is_active
Unexecuted instantiation: zebra_nb_rpcs.c:zvrf_is_active
Unexecuted instantiation: zebra_nb_state.c:zvrf_is_active
Unexecuted instantiation: zebra_netns_id.c:zvrf_is_active
Unexecuted instantiation: zebra_netns_notify.c:zvrf_is_active
Unexecuted instantiation: zebra_nhg.c:zvrf_is_active
Unexecuted instantiation: zebra_ns.c:zvrf_is_active
Unexecuted instantiation: zebra_pbr.c:zvrf_is_active
Unexecuted instantiation: zebra_ptm.c:zvrf_is_active
Unexecuted instantiation: zebra_ptm_redistribute.c:zvrf_is_active
Unexecuted instantiation: zebra_pw.c:zvrf_is_active
Unexecuted instantiation: zebra_rib.c:zvrf_is_active
Unexecuted instantiation: zebra_router.c:zvrf_is_active
Unexecuted instantiation: zebra_rnh.c:zvrf_is_active
Unexecuted instantiation: zebra_routemap.c:zvrf_is_active
Unexecuted instantiation: zebra_script.c:zvrf_is_active
Unexecuted instantiation: zebra_srte.c:zvrf_is_active
Unexecuted instantiation: zebra_tc.c:zvrf_is_active
Unexecuted instantiation: zebra_vrf.c:zvrf_is_active
Unexecuted instantiation: zebra_vty.c:zvrf_is_active
Unexecuted instantiation: zebra_vxlan.c:zvrf_is_active
Unexecuted instantiation: zebra_vxlan_if.c:zvrf_is_active
Unexecuted instantiation: zebra_evpn_mh.c:zvrf_is_active
Unexecuted instantiation: zebra_neigh.c:zvrf_is_active
Unexecuted instantiation: zserv.c:zvrf_is_active
Unexecuted instantiation: debug_nl.c:zvrf_is_active
209
210
static inline int
211
zvrf_other_table_compare_func(const struct other_route_table *a,
212
            const struct other_route_table *b)
213
0
{
214
0
  if (a->afi != b->afi)
215
0
    return a->afi - b->afi;
216
217
0
  if (a->safi != b->safi)
218
0
    return a->safi - b->safi;
219
220
0
  if (a->table_id != b->table_id)
221
0
    return a->table_id - b->table_id;
222
223
0
  return 0;
224
0
}
Unexecuted instantiation: connected.c:zvrf_other_table_compare_func
Unexecuted instantiation: if_netlink.c:zvrf_other_table_compare_func
Unexecuted instantiation: interface.c:zvrf_other_table_compare_func
Unexecuted instantiation: ioctl.c:zvrf_other_table_compare_func
Unexecuted instantiation: kernel_netlink.c:zvrf_other_table_compare_func
Unexecuted instantiation: label_manager.c:zvrf_other_table_compare_func
Unexecuted instantiation: main.c:zvrf_other_table_compare_func
Unexecuted instantiation: netconf_netlink.c:zvrf_other_table_compare_func
Unexecuted instantiation: redistribute.c:zvrf_other_table_compare_func
Unexecuted instantiation: router-id.c:zvrf_other_table_compare_func
Unexecuted instantiation: rt_netlink.c:zvrf_other_table_compare_func
Unexecuted instantiation: rtadv.c:zvrf_other_table_compare_func
Unexecuted instantiation: rtread_netlink.c:zvrf_other_table_compare_func
Unexecuted instantiation: rule_netlink.c:zvrf_other_table_compare_func
Unexecuted instantiation: table_manager.c:zvrf_other_table_compare_func
Unexecuted instantiation: tc_netlink.c:zvrf_other_table_compare_func
Unexecuted instantiation: zapi_msg.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_dplane.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_gr.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_l2.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_l2_bridge_if.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_evpn.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_evpn_mac.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_evpn_neigh.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_mlag.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_mlag_vty.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_mpls.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_mpls_netlink.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_mpls_null.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_mpls_vty.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_srv6.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_srv6_vty.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_mroute.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_nb.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_nb_config.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_nb_rpcs.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_nb_state.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_netns_id.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_netns_notify.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_nhg.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_ns.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_pbr.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_ptm.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_ptm_redistribute.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_pw.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_rib.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_router.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_rnh.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_routemap.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_script.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_srte.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_tc.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_vrf.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_vty.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_vxlan.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_vxlan_if.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_evpn_mh.c:zvrf_other_table_compare_func
Unexecuted instantiation: zebra_neigh.c:zvrf_other_table_compare_func
Unexecuted instantiation: zserv.c:zvrf_other_table_compare_func
Unexecuted instantiation: debug_nl.c:zvrf_other_table_compare_func
225
226
DECLARE_RBTREE_UNIQ(otable, struct other_route_table, next,
227
        zvrf_other_table_compare_func);
228
229
extern struct route_table *
230
zebra_vrf_lookup_table_with_table_id(afi_t afi, safi_t safi, vrf_id_t vrf_id,
231
             uint32_t table_id);
232
extern struct route_table *zebra_vrf_get_table_with_table_id(afi_t afi,
233
                   safi_t safi,
234
                   vrf_id_t vrf_id,
235
                   uint32_t table_id);
236
237
extern void zebra_vrf_update_all(struct zserv *client);
238
extern struct zebra_vrf *zebra_vrf_lookup_by_id(vrf_id_t vrf_id);
239
extern struct zebra_vrf *zebra_vrf_lookup_by_name(const char *);
240
extern struct zebra_vrf *zebra_vrf_alloc(struct vrf *vrf);
241
extern struct route_table *zebra_vrf_table(afi_t, safi_t, vrf_id_t);
242
243
/*
244
 * API to associate a VRF with a NETNS.
245
 * Called either from vty or through discovery.
246
 */
247
extern int zebra_vrf_netns_handler_create(struct vty *vty, struct vrf *vrf,
248
            char *pathname, ns_id_t ext_ns_id,
249
            ns_id_t ns_id, ns_id_t rel_def_ns_id);
250
251
extern void zebra_vrf_init(void);
252
253
extern void zebra_rtable_node_cleanup(struct route_table *table,
254
              struct route_node *node);
255
256
#ifdef __cplusplus
257
}
258
#endif
259
260
#endif /* ZEBRA_VRF_H */