2 * Copyright (C) 2018 Vmware
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the Free
7 * Software Foundation; either version 2 of the License, or (at your option)
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 * You should have received a copy of the GNU General Public License along
16 * with this program; see the file COPYING; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 #include "northbound.h"
24 #include "lib_errors.h"
29 #include "srcdest_table.h"
31 #include "static_vrf.h"
32 #include "static_routes.h"
33 #include "static_nb.h"
36 static int static_path_list_create(struct nb_cb_create_args
*args
)
38 struct route_node
*rn
;
39 struct static_path
*pn
;
40 const struct lyd_node
*vrf_dnode
;
45 switch (args
->event
) {
47 vrf_dnode
= yang_dnode_get_parent(args
->dnode
,
48 "control-plane-protocol");
49 vrf
= yang_dnode_get_string(vrf_dnode
, "./vrf");
50 table_id
= yang_dnode_get_uint32(args
->dnode
, "./table-id");
53 * TableId is not applicable for VRF. Consider the case of
54 * l3mdev, there is one uint32_t space to work with.
55 * A l3mdev device points at a specific table that it
56 * relates to and a set of interfaces it belongs to.
58 if (table_id
&& (strcmp(vrf
, vrf_get_default_name()) != 0)
59 && !vrf_is_backend_netns()) {
61 args
->errmsg
, args
->errmsg_len
,
62 "%% table param only available when running on netns-based vrfs");
63 return NB_ERR_VALIDATION
;
70 rn
= nb_running_get_entry(args
->dnode
, NULL
, true);
71 distance
= yang_dnode_get_uint8(args
->dnode
, "./distance");
72 table_id
= yang_dnode_get_uint32(args
->dnode
, "./table-id");
73 pn
= static_add_path(rn
, table_id
, distance
);
74 nb_running_set_entry(args
->dnode
, pn
);
80 static int static_path_list_destroy(struct nb_cb_destroy_args
*args
)
82 struct static_path
*pn
;
84 switch (args
->event
) {
90 pn
= nb_running_unset_entry(args
->dnode
);
98 static int static_path_list_tag_modify(struct nb_cb_modify_args
*args
)
100 struct static_path
*pn
;
102 switch (args
->event
) {
108 pn
= nb_running_get_entry(args
->dnode
, NULL
, true);
109 pn
->tag
= yang_dnode_get_uint32(args
->dnode
, NULL
);
110 static_install_path(pn
);
117 struct nexthop_iter
{
122 static int nexthop_iter_cb(const struct lyd_node
*dnode
, void *arg
)
124 struct nexthop_iter
*iter
= arg
;
125 enum static_nh_type nh_type
;
127 nh_type
= yang_dnode_get_enum(dnode
, "./nh-type");
129 if (nh_type
== STATIC_BLACKHOLE
)
130 iter
->blackhole
= true;
134 return YANG_ITER_CONTINUE
;
137 static bool static_nexthop_create(struct nb_cb_create_args
*args
)
139 const struct lyd_node
*pn_dnode
;
140 struct nexthop_iter iter
;
141 struct static_path
*pn
;
142 struct ipaddr ipaddr
;
143 struct static_nexthop
*nh
;
144 enum static_nh_type nh_type
;
148 switch (args
->event
) {
150 ifname
= yang_dnode_get_string(args
->dnode
, "./interface");
151 if (ifname
!= NULL
) {
152 if (strcasecmp(ifname
, "Null0") == 0
153 || strcasecmp(ifname
, "reject") == 0
154 || strcasecmp(ifname
, "blackhole") == 0) {
155 snprintf(args
->errmsg
, args
->errmsg_len
,
156 "%s: Nexthop interface name can not be from reserved keywords(Null0, reject, blackhole)",
158 return NB_ERR_VALIDATION
;
163 iter
.blackhole
= false;
165 pn_dnode
= yang_dnode_get_parent(args
->dnode
, "path-list");
166 yang_dnode_iterate(nexthop_iter_cb
, &iter
, pn_dnode
,
167 "./frr-nexthops/nexthop");
169 if (iter
.blackhole
&& iter
.count
> 1) {
171 args
->errmsg
, args
->errmsg_len
,
172 "Route cannot have blackhole and non-blackhole nexthops simultaneously");
173 return NB_ERR_VALIDATION
;
174 } else if (iter
.count
> zebra_ecmp_count
) {
175 snprintf(args
->errmsg
, args
->errmsg_len
,
176 "Route cannot have more than %d ECMP nexthops",
178 return NB_ERR_VALIDATION
;
185 yang_dnode_get_ip(&ipaddr
, args
->dnode
, "./gateway");
186 nh_type
= yang_dnode_get_enum(args
->dnode
, "./nh-type");
187 ifname
= yang_dnode_get_string(args
->dnode
, "./interface");
188 nh_vrf
= yang_dnode_get_string(args
->dnode
, "./vrf");
189 pn
= nb_running_get_entry(args
->dnode
, NULL
, true);
191 if (!static_add_nexthop_validate(nh_vrf
, nh_type
, &ipaddr
))
193 EC_LIB_NB_CB_CONFIG_VALIDATE
,
194 "Warning!! Local connected address is configured as Gateway IP((%s))",
195 yang_dnode_get_string(args
->dnode
,
197 nh
= static_add_nexthop(pn
, nh_type
, &ipaddr
, ifname
, nh_vrf
,
199 nb_running_set_entry(args
->dnode
, nh
);
206 static bool static_nexthop_destroy(struct nb_cb_destroy_args
*args
)
208 struct static_nexthop
*nh
;
210 switch (args
->event
) {
216 nh
= nb_running_unset_entry(args
->dnode
);
217 static_delete_nexthop(nh
);
224 static int nexthop_mpls_label_stack_entry_create(struct nb_cb_create_args
*args
)
226 struct static_nexthop
*nh
;
230 switch (args
->event
) {
234 args
->errmsg
, args
->errmsg_len
,
235 "%% MPLS not turned on in kernel ignoring static route");
236 return NB_ERR_VALIDATION
;
243 nh
= nb_running_get_entry(args
->dnode
, NULL
, true);
244 pos
= yang_get_list_pos(args
->dnode
);
246 flog_warn(EC_LIB_NB_CB_CONFIG_APPLY
,
247 "libyang returns invalid label position");
250 /* Mapping to array = list-index -1 */
252 nh
->snh_label
.label
[index
] = 0;
253 nh
->snh_label
.num_labels
++;
261 nexthop_mpls_label_stack_entry_destroy(struct nb_cb_destroy_args
*args
)
263 struct static_nexthop
*nh
;
267 switch (args
->event
) {
273 nh
= nb_running_get_entry(args
->dnode
, NULL
, true);
274 pos
= yang_get_list_pos(args
->dnode
);
276 flog_warn(EC_LIB_NB_CB_CONFIG_APPLY
,
277 "libyang returns invalid label position");
281 nh
->snh_label
.label
[index
] = 0;
282 nh
->snh_label
.num_labels
--;
289 static int static_nexthop_mpls_label_modify(struct nb_cb_modify_args
*args
)
291 struct static_nexthop
*nh
;
295 nh
= nb_running_get_entry(args
->dnode
, NULL
, true);
296 pos
= yang_get_list_pos(lyd_parent(args
->dnode
));
298 flog_warn(EC_LIB_NB_CB_CONFIG_APPLY
,
299 "libyang returns invalid label position");
302 /* Mapping to array = list-index -1 */
304 nh
->snh_label
.label
[index
] = yang_dnode_get_uint32(args
->dnode
, NULL
);
309 static int static_nexthop_onlink_modify(struct nb_cb_modify_args
*args
)
311 struct static_nexthop
*nh
;
312 enum static_nh_type nh_type
;
314 switch (args
->event
) {
316 nh_type
= yang_dnode_get_enum(args
->dnode
, "../nh-type");
317 if ((nh_type
!= STATIC_IPV4_GATEWAY_IFNAME
)
318 && (nh_type
!= STATIC_IPV6_GATEWAY_IFNAME
)) {
320 args
->errmsg
, args
->errmsg_len
,
321 "nexthop type is not the ipv4 or ipv6 interface type");
322 return NB_ERR_VALIDATION
;
329 nh
= nb_running_get_entry(args
->dnode
, NULL
, true);
330 nh
->onlink
= yang_dnode_get_bool(args
->dnode
, NULL
);
337 static int static_nexthop_color_modify(struct nb_cb_modify_args
*args
)
339 struct static_nexthop
*nh
;
341 nh
= nb_running_get_entry(args
->dnode
, NULL
, true);
342 nh
->color
= yang_dnode_get_uint32(args
->dnode
, NULL
);
347 static int static_nexthop_color_destroy(struct nb_cb_destroy_args
*args
)
349 struct static_nexthop
*nh
;
351 nh
= nb_running_unset_entry(args
->dnode
);
357 static int static_nexthop_bh_type_modify(struct nb_cb_modify_args
*args
)
359 struct static_nexthop
*nh
;
360 enum static_nh_type nh_type
;
362 switch (args
->event
) {
364 nh_type
= yang_dnode_get_enum(args
->dnode
, "../nh-type");
365 if (nh_type
!= STATIC_BLACKHOLE
) {
366 snprintf(args
->errmsg
, args
->errmsg_len
,
367 "nexthop type is not the blackhole type");
368 return NB_ERR_VALIDATION
;
375 nh
= nb_running_get_entry(args
->dnode
, NULL
, true);
376 nh
->bh_type
= yang_dnode_get_enum(args
->dnode
, NULL
);
383 void routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_apply_finish(
384 struct nb_cb_apply_finish_args
*args
)
386 struct static_nexthop
*nh
;
388 nh
= nb_running_get_entry(args
->dnode
, NULL
, true);
390 static_install_nexthop(nh
);
393 void routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_apply_finish(
394 struct nb_cb_apply_finish_args
*args
)
396 struct static_nexthop
*nh
;
398 nh
= nb_running_get_entry(args
->dnode
, NULL
, true);
400 static_install_nexthop(nh
);
403 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_pre_validate(
404 struct nb_cb_pre_validate_args
*args
)
406 const struct lyd_node
*mls_dnode
;
409 mls_dnode
= yang_dnode_get(args
->dnode
, "./mpls-label-stack");
410 count
= yang_get_list_elements_count(lyd_child(mls_dnode
));
412 if (count
> MPLS_MAX_LABELS
) {
413 snprintf(args
->errmsg
, args
->errmsg_len
,
414 "Too many labels, Enter %d or fewer",
416 return NB_ERR_VALIDATION
;
421 int routing_control_plane_protocols_name_validate(
422 struct nb_cb_create_args
*args
)
426 name
= yang_dnode_get_string(args
->dnode
, "./name");
427 if (!strmatch(name
, "staticd")) {
428 snprintf(args
->errmsg
, args
->errmsg_len
,
429 "static routing supports only one instance with name staticd");
430 return NB_ERR_VALIDATION
;
436 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list
438 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_create(
439 struct nb_cb_create_args
*args
)
442 struct static_vrf
*s_vrf
;
443 struct route_node
*rn
;
444 const struct lyd_node
*vrf_dnode
;
445 struct prefix prefix
;
446 const char *afi_safi
;
451 switch (args
->event
) {
453 yang_dnode_get_prefix(&prefix
, args
->dnode
, "./prefix");
454 afi_safi
= yang_dnode_get_string(args
->dnode
, "./afi-safi");
455 yang_afi_safi_identity2value(afi_safi
, &afi
, &safi
);
456 prefix_afi
= family2afi(prefix
.family
);
457 if (afi
!= prefix_afi
) {
459 EC_LIB_NB_CB_CONFIG_VALIDATE
,
460 "route node %s creation failed",
461 yang_dnode_get_string(args
->dnode
, "./prefix"));
462 return NB_ERR_VALIDATION
;
469 vrf_dnode
= yang_dnode_get_parent(args
->dnode
,
470 "control-plane-protocol");
471 vrf
= nb_running_get_entry(vrf_dnode
, NULL
, true);
474 yang_dnode_get_prefix(&prefix
, args
->dnode
, "./prefix");
475 afi_safi
= yang_dnode_get_string(args
->dnode
, "./afi-safi");
476 yang_afi_safi_identity2value(afi_safi
, &afi
, &safi
);
478 rn
= static_add_route(afi
, safi
, &prefix
, NULL
, s_vrf
);
479 if (vrf
->vrf_id
== VRF_UNKNOWN
)
481 args
->errmsg
, args
->errmsg_len
,
482 "Static Route to %s not installed currently because dependent config not fully available",
483 yang_dnode_get_string(args
->dnode
, "./prefix"));
484 nb_running_set_entry(args
->dnode
, rn
);
490 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_destroy(
491 struct nb_cb_destroy_args
*args
)
493 struct route_node
*rn
;
495 switch (args
->event
) {
501 rn
= nb_running_unset_entry(args
->dnode
);
502 static_del_route(rn
);
510 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list
512 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_create(
513 struct nb_cb_create_args
*args
)
515 return static_path_list_create(args
);
518 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_destroy(
519 struct nb_cb_destroy_args
*args
)
521 return static_path_list_destroy(args
);
526 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/tag
528 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_tag_modify(
529 struct nb_cb_modify_args
*args
)
531 return static_path_list_tag_modify(args
);
536 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop
538 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_create(
539 struct nb_cb_create_args
*args
)
541 return static_nexthop_create(args
);
544 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_destroy(
545 struct nb_cb_destroy_args
*args
)
547 return static_nexthop_destroy(args
);
552 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/bh-type
554 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_bh_type_modify(
555 struct nb_cb_modify_args
*args
)
557 return static_nexthop_bh_type_modify(args
);
562 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/onlink
564 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_onlink_modify(
565 struct nb_cb_modify_args
*args
)
567 return static_nexthop_onlink_modify(args
);
572 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/srte-color
574 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_color_modify(
575 struct nb_cb_modify_args
*args
)
577 switch (args
->event
) {
583 if (static_nexthop_color_modify(args
) != NB_OK
)
591 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_color_destroy(
592 struct nb_cb_destroy_args
*args
)
594 switch (args
->event
) {
600 if (static_nexthop_color_destroy(args
) != NB_OK
)
609 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/mpls-label-stack/entry
611 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_create(
612 struct nb_cb_create_args
*args
)
614 return nexthop_mpls_label_stack_entry_create(args
);
617 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_destroy(
618 struct nb_cb_destroy_args
*args
)
620 return nexthop_mpls_label_stack_entry_destroy(args
);
625 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/mpls-label-stack/entry/label
627 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_label_modify(
628 struct nb_cb_modify_args
*args
)
630 switch (args
->event
) {
636 if (static_nexthop_mpls_label_modify(args
) != NB_OK
)
643 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_label_destroy(
644 struct nb_cb_destroy_args
*args
)
647 * No operation is required in this call back.
648 * nexthop_mpls_label_stack_entry_destroy() will take care
649 * to reset the label vaue.
651 switch (args
->event
) {
663 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/mpls-label-stack/entry/ttl
665 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_ttl_modify(
666 struct nb_cb_modify_args
*args
)
668 switch (args
->event
) {
679 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_ttl_destroy(
680 struct nb_cb_destroy_args
*args
)
682 switch (args
->event
) {
695 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/mpls-label-stack/entry/traffic-class
697 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_traffic_class_modify(
698 struct nb_cb_modify_args
*args
)
700 switch (args
->event
) {
711 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_traffic_class_destroy(
712 struct nb_cb_destroy_args
*args
)
714 switch (args
->event
) {
727 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list
729 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_create(
730 struct nb_cb_create_args
*args
)
732 struct static_vrf
*s_vrf
;
733 struct route_node
*rn
;
734 struct route_node
*src_rn
;
735 struct prefix_ipv6 src_prefix
= {};
736 struct stable_info
*info
;
738 safi_t safi
= SAFI_UNICAST
;
740 switch (args
->event
) {
746 rn
= nb_running_get_entry(args
->dnode
, NULL
, true);
747 info
= route_table_get_info(rn
->table
);
749 yang_dnode_get_ipv6p(&src_prefix
, args
->dnode
, "./src-prefix");
750 afi
= family2afi(src_prefix
.family
);
752 static_add_route(afi
, safi
, &rn
->p
, &src_prefix
, s_vrf
);
753 nb_running_set_entry(args
->dnode
, src_rn
);
759 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_destroy(
760 struct nb_cb_destroy_args
*args
)
762 struct route_node
*src_rn
;
764 switch (args
->event
) {
770 src_rn
= nb_running_unset_entry(args
->dnode
);
771 static_del_route(src_rn
);
780 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list
782 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_create(
783 struct nb_cb_create_args
*args
)
785 return static_path_list_create(args
);
788 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_destroy(
789 struct nb_cb_destroy_args
*args
)
791 return static_path_list_destroy(args
);
796 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/tag
798 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_tag_modify(
799 struct nb_cb_modify_args
*args
)
801 return static_path_list_tag_modify(args
);
806 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop
808 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_create(
809 struct nb_cb_create_args
*args
)
811 return static_nexthop_create(args
);
814 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_destroy(
815 struct nb_cb_destroy_args
*args
)
817 return static_nexthop_destroy(args
);
822 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop/bh-type
824 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_bh_type_modify(
825 struct nb_cb_modify_args
*args
)
827 return static_nexthop_bh_type_modify(args
);
832 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop/onlink
834 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_onlink_modify(
835 struct nb_cb_modify_args
*args
)
837 return static_nexthop_onlink_modify(args
);
842 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop/srte-color
844 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_color_modify(
845 struct nb_cb_modify_args
*args
)
847 switch (args
->event
) {
853 if (static_nexthop_color_modify(args
) != NB_OK
)
862 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_color_destroy(
863 struct nb_cb_destroy_args
*args
)
865 switch (args
->event
) {
871 if (static_nexthop_color_destroy(args
) != NB_OK
)
880 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop/mpls-label-stack/entry
882 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_create(
883 struct nb_cb_create_args
*args
)
885 return nexthop_mpls_label_stack_entry_create(args
);
888 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_destroy(
889 struct nb_cb_destroy_args
*args
)
891 return nexthop_mpls_label_stack_entry_destroy(args
);
896 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop/mpls-label-stack/entry/label
898 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_label_modify(
899 struct nb_cb_modify_args
*args
)
901 switch (args
->event
) {
907 if (static_nexthop_mpls_label_modify(args
) != NB_OK
)
914 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_label_destroy(
915 struct nb_cb_destroy_args
*args
)
918 * No operation is required in this call back.
919 * nexthop_mpls_label_stack_entry_destroy() will take care
920 * to reset the label vaue.
922 switch (args
->event
) {
934 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop/mpls-label-stack/entry/ttl
936 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_ttl_modify(
937 struct nb_cb_modify_args
*args
)
939 switch (args
->event
) {
950 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_ttl_destroy(
951 struct nb_cb_destroy_args
*args
)
953 switch (args
->event
) {
966 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop/mpls-label-stack/entry/traffic-class
968 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_traffic_class_modify(
969 struct nb_cb_modify_args
*args
)
971 switch (args
->event
) {
982 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_traffic_class_destroy(
983 struct nb_cb_destroy_args
*args
)
985 switch (args
->event
) {