]>
Commit | Line | Data |
---|---|---|
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 | ||
10 | struct pbr_vrf { | |
11 | struct vrf *vrf; | |
12 | }; | |
13 | ||
14 | static inline const char *pbr_vrf_name(const struct pbr_vrf *pbr_vrf) | |
15 | { | |
16 | return pbr_vrf->vrf->name; | |
17 | } | |
18 | ||
19 | static 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 |
24 | extern struct pbr_vrf *pbr_vrf_lookup_by_name(const char *name); |
25 | extern bool pbr_vrf_is_valid(const struct pbr_vrf *pbr_vrf); | |
26 | extern bool pbr_vrf_is_enabled(const struct pbr_vrf *pbr_vrf); | |
27 | ||
28 | extern void pbr_vrf_init(void); | |
0e7d7358 | 29 | extern void pbr_vrf_terminate(void); |
be3b67b5 | 30 | #endif |