]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_nb.c
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / zebra / zebra_nb.c
index 1fc1faff67cb46bbbea0eb8686e9662712cc1722..d94547cffc61f628e8d4da2a7bd7a6731f819340 100644 (file)
@@ -1,23 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (C) 2020  Cumulus Networks, Inc.
  * Chirag Shah
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include <zebra.h>
+#include "interface.h"
 #include "northbound.h"
 #include "libfrr.h"
 #include "zebra_nb.h"
@@ -350,6 +338,41 @@ const struct frr_yang_module_info frr_zebra_info = {
                                .destroy = lib_interface_zebra_bandwidth_destroy,
                        }
                },
+               {
+                       .xpath = "/frr-interface:lib/interface/frr-zebra:zebra/bandwidth",
+                       .cbs = {
+                               .modify = lib_interface_zebra_bandwidth_modify,
+                               .destroy = lib_interface_zebra_bandwidth_destroy,
+                       }
+               },
+               {
+                       .xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/legacy-admin-group",
+                       .cbs = {
+                               .modify = lib_interface_zebra_legacy_admin_group_modify,
+                               .destroy = lib_interface_zebra_legacy_admin_group_destroy,
+                               .cli_show = cli_show_legacy_admin_group,
+                       },
+               },
+               {
+                       .xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/affinities",
+                       .cbs = {
+                               .cli_show = cli_show_affinity,
+                       },
+               },
+               {
+                       .xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/affinities/affinity",
+                       .cbs = {
+                               .create = lib_interface_zebra_affinity_create,
+                               .destroy = lib_interface_zebra_affinity_destroy,
+                       },
+               },
+               {
+                       .xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/affinity-mode",
+                       .cbs = {
+                               .modify = lib_interface_zebra_affinity_mode_modify,
+                               .cli_show = cli_show_affinity_mode,
+                       },
+               },
                {
                        .xpath = "/frr-interface:lib/interface/frr-zebra:zebra/state/up-count",
                        .cbs = {
@@ -401,13 +424,23 @@ const struct frr_yang_module_info frr_zebra_info = {
                {
                        .xpath = "/frr-vrf:lib/vrf/frr-zebra:zebra/ribs/rib",
                        .cbs = {
-                               .create = lib_vrf_zebra_ribs_rib_create,
-                               .destroy = lib_vrf_zebra_ribs_rib_destroy,
                                .get_next = lib_vrf_zebra_ribs_rib_get_next,
                                .get_keys = lib_vrf_zebra_ribs_rib_get_keys,
                                .lookup_entry = lib_vrf_zebra_ribs_rib_lookup_entry,
                        }
                },
+               {
+                       .xpath = "/frr-vrf:lib/vrf/frr-zebra:zebra/ribs/rib/afi-safi-name",
+                       .cbs = {
+                               .get_elem = lib_vrf_zebra_ribs_rib_afi_safi_name_get_elem,
+                       }
+               },
+               {
+                       .xpath = "/frr-vrf:lib/vrf/frr-zebra:zebra/ribs/rib/table-id",
+                       .cbs = {
+                               .get_elem = lib_vrf_zebra_ribs_rib_table_id_get_elem,
+                       }
+               },
                {
                        .xpath = "/frr-vrf:lib/vrf/frr-zebra:zebra/ribs/rib/route",
                        .cbs = {
@@ -633,48 +666,6 @@ const struct frr_yang_module_info frr_zebra_info = {
                                .modify = lib_vrf_zebra_prefix_only_modify,
                        }
                },
-               {
-                       .xpath = "/frr-route-map:lib/route-map/entry/match-condition/frr-zebra:ipv4-prefix-length",
-                       .cbs = {
-                               .modify = lib_route_map_entry_match_condition_ipv4_prefix_length_modify,
-                               .destroy = lib_route_map_entry_match_condition_ipv4_prefix_length_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-route-map:lib/route-map/entry/match-condition/frr-zebra:ipv6-prefix-length",
-                       .cbs = {
-                               .modify = lib_route_map_entry_match_condition_ipv6_prefix_length_modify,
-                               .destroy = lib_route_map_entry_match_condition_ipv6_prefix_length_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-route-map:lib/route-map/entry/match-condition/frr-zebra:source-protocol",
-                       .cbs = {
-                               .modify = lib_route_map_entry_match_condition_source_protocol_modify,
-                               .destroy = lib_route_map_entry_match_condition_source_protocol_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-route-map:lib/route-map/entry/match-condition/frr-zebra:source-instance",
-                       .cbs = {
-                               .modify = lib_route_map_entry_match_condition_source_instance_modify,
-                               .destroy = lib_route_map_entry_match_condition_source_instance_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-route-map:lib/route-map/entry/set-action/frr-zebra:source-v4",
-                       .cbs = {
-                               .modify = lib_route_map_entry_set_action_source_v4_modify,
-                               .destroy = lib_route_map_entry_set_action_source_v4_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-route-map:lib/route-map/entry/set-action/frr-zebra:source-v6",
-                       .cbs = {
-                               .modify = lib_route_map_entry_set_action_source_v6_modify,
-                               .destroy = lib_route_map_entry_set_action_source_v6_destroy,
-                       }
-               },
                {
                        .xpath = NULL,
                },