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
;
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
;
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 can not have blackhole and non-blackhole nexthops simultaneously");
173 return NB_ERR_VALIDATION
;
180 yang_dnode_get_ip(&ipaddr
, args
->dnode
, "./gateway");
181 nh_type
= yang_dnode_get_enum(args
->dnode
, "./nh-type");
182 ifname
= yang_dnode_get_string(args
->dnode
, "./interface");
183 nh_vrf
= yang_dnode_get_string(args
->dnode
, "./vrf");
184 pn
= nb_running_get_entry(args
->dnode
, NULL
, true);
186 if (!static_add_nexthop_validate(nh_vrf
, nh_type
, &ipaddr
))
188 EC_LIB_NB_CB_CONFIG_VALIDATE
,
189 "Warning!! Local connected address is configured as Gateway IP((%s))",
190 yang_dnode_get_string(args
->dnode
,
192 nh
= static_add_nexthop(pn
, nh_type
, &ipaddr
, ifname
, nh_vrf
,
194 nb_running_set_entry(args
->dnode
, nh
);
201 static bool static_nexthop_destroy(struct nb_cb_destroy_args
*args
)
203 struct static_nexthop
*nh
;
205 switch (args
->event
) {
211 nh
= nb_running_unset_entry(args
->dnode
);
212 static_delete_nexthop(nh
);
219 static int nexthop_mpls_label_stack_entry_create(struct nb_cb_create_args
*args
)
221 struct static_nexthop
*nh
;
225 switch (args
->event
) {
229 args
->errmsg
, args
->errmsg_len
,
230 "%% MPLS not turned on in kernel ignoring static route");
231 return NB_ERR_VALIDATION
;
238 nh
= nb_running_get_entry(args
->dnode
, NULL
, true);
239 pos
= yang_get_list_pos(args
->dnode
);
241 flog_warn(EC_LIB_NB_CB_CONFIG_APPLY
,
242 "libyang returns invalid label position");
245 /* Mapping to array = list-index -1 */
247 nh
->snh_label
.label
[index
] = 0;
248 nh
->snh_label
.num_labels
++;
256 nexthop_mpls_label_stack_entry_destroy(struct nb_cb_destroy_args
*args
)
258 struct static_nexthop
*nh
;
262 switch (args
->event
) {
268 nh
= nb_running_get_entry(args
->dnode
, NULL
, true);
269 pos
= yang_get_list_pos(args
->dnode
);
271 flog_warn(EC_LIB_NB_CB_CONFIG_APPLY
,
272 "libyang returns invalid label position");
276 nh
->snh_label
.label
[index
] = 0;
277 nh
->snh_label
.num_labels
--;
284 static int static_nexthop_mpls_label_modify(struct nb_cb_modify_args
*args
)
286 struct static_nexthop
*nh
;
290 nh
= nb_running_get_entry(args
->dnode
, NULL
, true);
291 pos
= yang_get_list_pos(lyd_parent(args
->dnode
));
293 flog_warn(EC_LIB_NB_CB_CONFIG_APPLY
,
294 "libyang returns invalid label position");
297 /* Mapping to array = list-index -1 */
299 nh
->snh_label
.label
[index
] = yang_dnode_get_uint32(args
->dnode
, NULL
);
304 static int static_nexthop_onlink_modify(struct nb_cb_modify_args
*args
)
306 struct static_nexthop
*nh
;
307 static_types nh_type
;
309 switch (args
->event
) {
311 nh_type
= yang_dnode_get_enum(args
->dnode
, "../nh-type");
312 if ((nh_type
!= STATIC_IPV4_GATEWAY_IFNAME
)
313 && (nh_type
!= STATIC_IPV6_GATEWAY_IFNAME
)) {
315 args
->errmsg
, args
->errmsg_len
,
316 "nexthop type is not the ipv4 or ipv6 interface type");
317 return NB_ERR_VALIDATION
;
324 nh
= nb_running_get_entry(args
->dnode
, NULL
, true);
325 nh
->onlink
= yang_dnode_get_bool(args
->dnode
, NULL
);
332 static int static_nexthop_color_modify(struct nb_cb_modify_args
*args
)
334 struct static_nexthop
*nh
;
336 nh
= nb_running_get_entry(args
->dnode
, NULL
, true);
337 nh
->color
= yang_dnode_get_uint32(args
->dnode
, NULL
);
342 static int static_nexthop_color_destroy(struct nb_cb_destroy_args
*args
)
344 struct static_nexthop
*nh
;
346 nh
= nb_running_unset_entry(args
->dnode
);
352 static int static_nexthop_bh_type_modify(struct nb_cb_modify_args
*args
)
354 struct static_nexthop
*nh
;
355 static_types nh_type
;
357 switch (args
->event
) {
359 nh_type
= yang_dnode_get_enum(args
->dnode
, "../nh-type");
360 if (nh_type
!= STATIC_BLACKHOLE
) {
361 snprintf(args
->errmsg
, args
->errmsg_len
,
362 "nexthop type is not the blackhole type");
363 return NB_ERR_VALIDATION
;
370 nh
= nb_running_get_entry(args
->dnode
, NULL
, true);
371 nh
->bh_type
= yang_dnode_get_enum(args
->dnode
, NULL
);
378 void routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_apply_finish(
379 struct nb_cb_apply_finish_args
*args
)
381 struct static_nexthop
*nh
;
383 nh
= nb_running_get_entry(args
->dnode
, NULL
, true);
385 static_install_nexthop(nh
);
388 void routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_apply_finish(
389 struct nb_cb_apply_finish_args
*args
)
391 struct static_nexthop
*nh
;
393 nh
= nb_running_get_entry(args
->dnode
, NULL
, true);
395 static_install_nexthop(nh
);
398 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_pre_validate(
399 struct nb_cb_pre_validate_args
*args
)
401 const struct lyd_node
*mls_dnode
;
404 mls_dnode
= yang_dnode_get(args
->dnode
, "./mpls-label-stack");
405 count
= yang_get_list_elements_count(lyd_child(mls_dnode
));
407 if (count
> MPLS_MAX_LABELS
) {
408 snprintf(args
->errmsg
, args
->errmsg_len
,
409 "Too many labels, Enter %d or fewer",
411 return NB_ERR_VALIDATION
;
416 int routing_control_plane_protocols_name_validate(
417 struct nb_cb_create_args
*args
)
421 name
= yang_dnode_get_string(args
->dnode
, "./name");
422 if (!strmatch(name
, "staticd")) {
423 snprintf(args
->errmsg
, args
->errmsg_len
,
424 "static routing supports only one instance with name staticd");
425 return NB_ERR_VALIDATION
;
431 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list
433 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_create(
434 struct nb_cb_create_args
*args
)
437 struct static_vrf
*s_vrf
;
438 struct route_node
*rn
;
439 const struct lyd_node
*vrf_dnode
;
440 struct prefix prefix
;
441 const char *afi_safi
;
446 switch (args
->event
) {
448 yang_dnode_get_prefix(&prefix
, args
->dnode
, "./prefix");
449 afi_safi
= yang_dnode_get_string(args
->dnode
, "./afi-safi");
450 yang_afi_safi_identity2value(afi_safi
, &afi
, &safi
);
451 prefix_afi
= family2afi(prefix
.family
);
452 if (afi
!= prefix_afi
) {
454 EC_LIB_NB_CB_CONFIG_VALIDATE
,
455 "route node %s creation failed",
456 yang_dnode_get_string(args
->dnode
, "./prefix"));
457 return NB_ERR_VALIDATION
;
464 vrf_dnode
= yang_dnode_get_parent(args
->dnode
,
465 "control-plane-protocol");
466 vrf
= nb_running_get_entry(vrf_dnode
, NULL
, true);
469 yang_dnode_get_prefix(&prefix
, args
->dnode
, "./prefix");
470 afi_safi
= yang_dnode_get_string(args
->dnode
, "./afi-safi");
471 yang_afi_safi_identity2value(afi_safi
, &afi
, &safi
);
473 rn
= static_add_route(afi
, safi
, &prefix
, NULL
, s_vrf
);
474 if (vrf
->vrf_id
== VRF_UNKNOWN
)
476 args
->errmsg
, args
->errmsg_len
,
477 "Static Route to %s not installed currently because dependent config not fully available",
478 yang_dnode_get_string(args
->dnode
, "./prefix"));
479 nb_running_set_entry(args
->dnode
, rn
);
485 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_destroy(
486 struct nb_cb_destroy_args
*args
)
488 struct route_node
*rn
;
490 switch (args
->event
) {
496 rn
= nb_running_unset_entry(args
->dnode
);
497 static_del_route(rn
);
505 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list
507 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_create(
508 struct nb_cb_create_args
*args
)
510 return static_path_list_create(args
);
513 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_destroy(
514 struct nb_cb_destroy_args
*args
)
516 return static_path_list_destroy(args
);
521 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/tag
523 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_tag_modify(
524 struct nb_cb_modify_args
*args
)
526 return static_path_list_tag_modify(args
);
531 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop
533 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_create(
534 struct nb_cb_create_args
*args
)
536 return static_nexthop_create(args
);
539 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_destroy(
540 struct nb_cb_destroy_args
*args
)
542 return static_nexthop_destroy(args
);
547 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/bh-type
549 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_bh_type_modify(
550 struct nb_cb_modify_args
*args
)
552 return static_nexthop_bh_type_modify(args
);
557 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/onlink
559 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_onlink_modify(
560 struct nb_cb_modify_args
*args
)
562 return static_nexthop_onlink_modify(args
);
567 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/srte-color
569 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_color_modify(
570 struct nb_cb_modify_args
*args
)
572 switch (args
->event
) {
578 if (static_nexthop_color_modify(args
) != NB_OK
)
586 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_color_destroy(
587 struct nb_cb_destroy_args
*args
)
589 switch (args
->event
) {
595 if (static_nexthop_color_destroy(args
) != NB_OK
)
604 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/mpls-label-stack/entry
606 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_create(
607 struct nb_cb_create_args
*args
)
609 return nexthop_mpls_label_stack_entry_create(args
);
612 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_destroy(
613 struct nb_cb_destroy_args
*args
)
615 return nexthop_mpls_label_stack_entry_destroy(args
);
620 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/mpls-label-stack/entry/label
622 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_label_modify(
623 struct nb_cb_modify_args
*args
)
625 switch (args
->event
) {
631 if (static_nexthop_mpls_label_modify(args
) != NB_OK
)
638 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_label_destroy(
639 struct nb_cb_destroy_args
*args
)
642 * No operation is required in this call back.
643 * nexthop_mpls_label_stack_entry_destroy() will take care
644 * to reset the label vaue.
646 switch (args
->event
) {
658 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop/mpls-label-stack/entry/ttl
660 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_ttl_modify(
661 struct nb_cb_modify_args
*args
)
663 switch (args
->event
) {
674 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_ttl_destroy(
675 struct nb_cb_destroy_args
*args
)
677 switch (args
->event
) {
690 * /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
692 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_traffic_class_modify(
693 struct nb_cb_modify_args
*args
)
695 switch (args
->event
) {
706 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_traffic_class_destroy(
707 struct nb_cb_destroy_args
*args
)
709 switch (args
->event
) {
722 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list
724 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_create(
725 struct nb_cb_create_args
*args
)
727 struct static_vrf
*s_vrf
;
728 struct route_node
*rn
;
729 struct route_node
*src_rn
;
730 struct prefix_ipv6 src_prefix
= {};
731 struct stable_info
*info
;
733 safi_t safi
= SAFI_UNICAST
;
735 switch (args
->event
) {
741 rn
= nb_running_get_entry(args
->dnode
, NULL
, true);
742 info
= route_table_get_info(rn
->table
);
744 yang_dnode_get_ipv6p(&src_prefix
, args
->dnode
, "./src-prefix");
745 afi
= family2afi(src_prefix
.family
);
747 static_add_route(afi
, safi
, &rn
->p
, &src_prefix
, s_vrf
);
748 nb_running_set_entry(args
->dnode
, src_rn
);
754 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_destroy(
755 struct nb_cb_destroy_args
*args
)
757 struct route_node
*src_rn
;
759 switch (args
->event
) {
765 src_rn
= nb_running_unset_entry(args
->dnode
);
766 static_del_route(src_rn
);
775 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list
777 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_create(
778 struct nb_cb_create_args
*args
)
780 return static_path_list_create(args
);
783 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_destroy(
784 struct nb_cb_destroy_args
*args
)
786 return static_path_list_destroy(args
);
791 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/tag
793 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_tag_modify(
794 struct nb_cb_modify_args
*args
)
796 return static_path_list_tag_modify(args
);
801 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop
803 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_create(
804 struct nb_cb_create_args
*args
)
806 return static_nexthop_create(args
);
809 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_destroy(
810 struct nb_cb_destroy_args
*args
)
812 return static_nexthop_destroy(args
);
817 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop/bh-type
819 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_bh_type_modify(
820 struct nb_cb_modify_args
*args
)
822 return static_nexthop_bh_type_modify(args
);
827 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop/onlink
829 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_onlink_modify(
830 struct nb_cb_modify_args
*args
)
832 return static_nexthop_onlink_modify(args
);
837 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop/srte-color
839 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_color_modify(
840 struct nb_cb_modify_args
*args
)
842 switch (args
->event
) {
848 if (static_nexthop_color_modify(args
) != NB_OK
)
857 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_color_destroy(
858 struct nb_cb_destroy_args
*args
)
860 switch (args
->event
) {
866 if (static_nexthop_color_destroy(args
) != NB_OK
)
875 * /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
877 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_create(
878 struct nb_cb_create_args
*args
)
880 return nexthop_mpls_label_stack_entry_create(args
);
883 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_destroy(
884 struct nb_cb_destroy_args
*args
)
886 return nexthop_mpls_label_stack_entry_destroy(args
);
891 * /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
893 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_label_modify(
894 struct nb_cb_modify_args
*args
)
896 switch (args
->event
) {
902 if (static_nexthop_mpls_label_modify(args
) != NB_OK
)
909 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_label_destroy(
910 struct nb_cb_destroy_args
*args
)
913 * No operation is required in this call back.
914 * nexthop_mpls_label_stack_entry_destroy() will take care
915 * to reset the label vaue.
917 switch (args
->event
) {
929 * /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
931 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_ttl_modify(
932 struct nb_cb_modify_args
*args
)
934 switch (args
->event
) {
945 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_mpls_label_stack_entry_ttl_destroy(
946 struct nb_cb_destroy_args
*args
)
948 switch (args
->event
) {
961 * /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
963 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(
964 struct nb_cb_modify_args
*args
)
966 switch (args
->event
) {
977 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(
978 struct nb_cb_destroy_args
*args
)
980 switch (args
->event
) {