summaryrefslogtreecommitdiff
path: root/zebra/zebra_nb.c
diff options
context:
space:
mode:
authorvdhingra <vdhingra@vmware.com>2020-07-01 22:36:51 -0700
committervdhingra <vdhingra@vmware.com>2020-07-16 08:40:42 -0700
commit755100ac8983324e02cca9e1ab50bca1ab2da4da (patch)
tree82f051868e1d186b7164788774ffe57858c34c5a /zebra/zebra_nb.c
parent88fa5104a04af60b7d1107f02ee84fb9c0a15abe (diff)
zebra: Moving afi-safi identity to lib
afi-safi identity handling should be in the common place. Signed-off-by: VishalDhingra <vdhingra@vmware.com>
Diffstat (limited to 'zebra/zebra_nb.c')
-rw-r--r--zebra/zebra_nb.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/zebra/zebra_nb.c b/zebra/zebra_nb.c
index 53fe8e8e3f..6f01c41d71 100644
--- a/zebra/zebra_nb.c
+++ b/zebra/zebra_nb.c
@@ -22,40 +22,6 @@
#include "libfrr.h"
#include "zebra_nb.h"
-const char *zebra_afi_safi_value2identity(afi_t afi, safi_t safi)
-{
- if (afi == AFI_IP && safi == SAFI_UNICAST)
- return "ipv4-unicast";
- if (afi == AFI_IP6 && safi == SAFI_UNICAST)
- return "ipv6-unicast";
- if (afi == AFI_IP && safi == SAFI_MULTICAST)
- return "ipv4-multicast";
- if (afi == AFI_IP6 && safi == SAFI_MULTICAST)
- return "ipv6-multicast";
-
- return " ";
-}
-
-void zebra_afi_safi_identity2value(const char *key, afi_t *afi, safi_t *safi)
-{
- if (strmatch(key, "frr-zebra:ipv4-unicast")) {
- *afi = AFI_IP;
- *safi = SAFI_UNICAST;
- } else if (strmatch(key, "frr-zebra:ipv6-unicast")) {
- *afi = AFI_IP6;
- *safi = SAFI_UNICAST;
- } else if (strmatch(key, "frr-zebra:ipv4-multicast")) {
- *afi = AFI_IP;
- *safi = SAFI_MULTICAST;
- } else if (strmatch(key, "frr-zebra:ipv6-multicast")) {
- *afi = AFI_IP6;
- *safi = SAFI_MULTICAST;
- } else {
- *afi = AFI_UNSPEC;
- *safi = SAFI_UNSPEC;
- }
-}
-
/* clang-format off */
const struct frr_yang_module_info frr_zebra_info = {
.name = "frr-zebra",