]> git.proxmox.com Git - mirror_frr.git/blame - pbrd/pbr_vrf.h
Merge pull request #13060 from opensourcerouting/feature/allow_peering_with_127.0.0.1
[mirror_frr.git] / pbrd / pbr_vrf.h
CommitLineData
acddc0ed 1// SPDX-License-Identifier: GPL-2.0-or-later
be3b67b5
SW
2/*
3 * VRF library for PBR
4 * Copyright (C) 2019 Cumulus Networks, Inc.
5 * Stephen Worley
be3b67b5
SW
6 */
7#ifndef __PBR_VRF_H__
8#define __PBR_VRF_H__
9
10struct pbr_vrf {
11 struct vrf *vrf;
12};
13
14static inline const char *pbr_vrf_name(const struct pbr_vrf *pbr_vrf)
15{
16 return pbr_vrf->vrf->name;
17}
18
19static inline vrf_id_t pbr_vrf_id(const struct pbr_vrf *pbr_vrf)
20{
21 return pbr_vrf->vrf->vrf_id;
22}
23
be3b67b5
SW
24extern struct pbr_vrf *pbr_vrf_lookup_by_name(const char *name);
25extern bool pbr_vrf_is_valid(const struct pbr_vrf *pbr_vrf);
26extern bool pbr_vrf_is_enabled(const struct pbr_vrf *pbr_vrf);
27
28extern void pbr_vrf_init(void);
0e7d7358 29extern void pbr_vrf_terminate(void);
be3b67b5 30#endif