2 * Copyright (C) 1998 Kunihiro Ishiguro
3 * Copyright (C) 2018 NetDEF, Inc.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation; either version 2 of the License, or (at your option)
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 * You should have received a copy of the GNU General Public License along
17 * with this program; see the file COPYING; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30 #include "agg_table.h"
31 #include "northbound.h"
34 #include "ripngd/ripngd.h"
35 #include "ripngd/ripng_route.h"
36 #include "ripngd/ripng_cli.h"
39 * XPath: /frr-ripngd:ripngd/instance
41 static int ripngd_instance_create(enum nb_event event
,
42 const struct lyd_node
*dnode
,
43 union nb_resource
*resource
)
50 vrf_name
= yang_dnode_get_string(dnode
, "./vrf");
51 vrf
= vrf_lookup_by_name(vrf_name
);
54 * Try to create a RIPng socket only if the VRF is enabled, otherwise
55 * create a disabled RIPng instance and wait for the VRF to be enabled.
61 if (!vrf
|| !vrf_is_enabled(vrf
))
64 socket
= ripng_make_socket(vrf
);
66 return NB_ERR_RESOURCE
;
67 resource
->fd
= socket
;
70 if (!vrf
|| !vrf_is_enabled(vrf
))
73 socket
= resource
->fd
;
77 if (vrf
&& vrf_is_enabled(vrf
))
78 socket
= resource
->fd
;
82 ripng
= ripng_create(vrf_name
, vrf
, socket
);
83 yang_dnode_set_entry(dnode
, ripng
);
90 static int ripngd_instance_delete(enum nb_event event
,
91 const struct lyd_node
*dnode
)
95 if (event
!= NB_EV_APPLY
)
98 ripng
= yang_dnode_get_entry(dnode
, true);
105 * XPath: /frr-ripngd:ripngd/instance/allow-ecmp
107 static int ripngd_instance_allow_ecmp_modify(enum nb_event event
,
108 const struct lyd_node
*dnode
,
109 union nb_resource
*resource
)
113 if (event
!= NB_EV_APPLY
)
116 ripng
= yang_dnode_get_entry(dnode
, true);
117 ripng
->ecmp
= yang_dnode_get_bool(dnode
, NULL
);
119 ripng_ecmp_disable(ripng
);
125 * XPath: /frr-ripngd:ripngd/instance/default-information-originate
127 static int ripngd_instance_default_information_originate_modify(
128 enum nb_event event
, const struct lyd_node
*dnode
,
129 union nb_resource
*resource
)
132 bool default_information
;
133 struct prefix_ipv6 p
;
135 if (event
!= NB_EV_APPLY
)
138 ripng
= yang_dnode_get_entry(dnode
, true);
139 default_information
= yang_dnode_get_bool(dnode
, NULL
);
141 str2prefix_ipv6("::/0", &p
);
142 if (default_information
) {
143 ripng_redistribute_add(ripng
, ZEBRA_ROUTE_RIPNG
,
144 RIPNG_ROUTE_DEFAULT
, &p
, 0, NULL
, 0);
146 ripng_redistribute_delete(ripng
, ZEBRA_ROUTE_RIPNG
,
147 RIPNG_ROUTE_DEFAULT
, &p
, 0);
154 * XPath: /frr-ripngd:ripngd/instance/default-metric
156 static int ripngd_instance_default_metric_modify(enum nb_event event
,
157 const struct lyd_node
*dnode
,
158 union nb_resource
*resource
)
162 if (event
!= NB_EV_APPLY
)
165 ripng
= yang_dnode_get_entry(dnode
, true);
166 ripng
->default_metric
= yang_dnode_get_uint8(dnode
, NULL
);
172 * XPath: /frr-ripngd:ripngd/instance/network
174 static int ripngd_instance_network_create(enum nb_event event
,
175 const struct lyd_node
*dnode
,
176 union nb_resource
*resource
)
181 if (event
!= NB_EV_APPLY
)
184 ripng
= yang_dnode_get_entry(dnode
, true);
185 yang_dnode_get_ipv6p(&p
, dnode
, NULL
);
186 apply_mask_ipv6((struct prefix_ipv6
*)&p
);
188 return ripng_enable_network_add(ripng
, &p
);
191 static int ripngd_instance_network_delete(enum nb_event event
,
192 const struct lyd_node
*dnode
)
197 if (event
!= NB_EV_APPLY
)
200 ripng
= yang_dnode_get_entry(dnode
, true);
201 yang_dnode_get_ipv6p(&p
, dnode
, NULL
);
202 apply_mask_ipv6((struct prefix_ipv6
*)&p
);
204 return ripng_enable_network_delete(ripng
, &p
);
208 * XPath: /frr-ripngd:ripngd/instance/interface
210 static int ripngd_instance_interface_create(enum nb_event event
,
211 const struct lyd_node
*dnode
,
212 union nb_resource
*resource
)
217 if (event
!= NB_EV_APPLY
)
220 ripng
= yang_dnode_get_entry(dnode
, true);
221 ifname
= yang_dnode_get_string(dnode
, NULL
);
223 return ripng_enable_if_add(ripng
, ifname
);
226 static int ripngd_instance_interface_delete(enum nb_event event
,
227 const struct lyd_node
*dnode
)
232 if (event
!= NB_EV_APPLY
)
235 ripng
= yang_dnode_get_entry(dnode
, true);
236 ifname
= yang_dnode_get_string(dnode
, NULL
);
238 return ripng_enable_if_delete(ripng
, ifname
);
242 * XPath: /frr-ripngd:ripngd/instance/offset-list
244 static int ripngd_instance_offset_list_create(enum nb_event event
,
245 const struct lyd_node
*dnode
,
246 union nb_resource
*resource
)
250 struct ripng_offset_list
*offset
;
252 if (event
!= NB_EV_APPLY
)
255 ripng
= yang_dnode_get_entry(dnode
, true);
256 ifname
= yang_dnode_get_string(dnode
, "./interface");
258 offset
= ripng_offset_list_new(ripng
, ifname
);
259 yang_dnode_set_entry(dnode
, offset
);
264 static int ripngd_instance_offset_list_delete(enum nb_event event
,
265 const struct lyd_node
*dnode
)
268 struct ripng_offset_list
*offset
;
270 if (event
!= NB_EV_APPLY
)
273 direct
= yang_dnode_get_enum(dnode
, "./direction");
275 offset
= yang_dnode_get_entry(dnode
, true);
276 if (offset
->direct
[direct
].alist_name
) {
277 free(offset
->direct
[direct
].alist_name
);
278 offset
->direct
[direct
].alist_name
= NULL
;
280 if (offset
->direct
[RIPNG_OFFSET_LIST_IN
].alist_name
== NULL
281 && offset
->direct
[RIPNG_OFFSET_LIST_OUT
].alist_name
== NULL
)
282 ripng_offset_list_del(offset
);
288 * XPath: /frr-ripngd:ripngd/instance/offset-list/access-list
291 ripngd_instance_offset_list_access_list_modify(enum nb_event event
,
292 const struct lyd_node
*dnode
,
293 union nb_resource
*resource
)
296 struct ripng_offset_list
*offset
;
297 const char *alist_name
;
299 if (event
!= NB_EV_APPLY
)
302 direct
= yang_dnode_get_enum(dnode
, "../direction");
303 alist_name
= yang_dnode_get_string(dnode
, NULL
);
305 offset
= yang_dnode_get_entry(dnode
, true);
306 if (offset
->direct
[direct
].alist_name
)
307 free(offset
->direct
[direct
].alist_name
);
308 offset
->direct
[direct
].alist_name
= strdup(alist_name
);
314 * XPath: /frr-ripngd:ripngd/instance/offset-list/metric
317 ripngd_instance_offset_list_metric_modify(enum nb_event event
,
318 const struct lyd_node
*dnode
,
319 union nb_resource
*resource
)
323 struct ripng_offset_list
*offset
;
325 if (event
!= NB_EV_APPLY
)
328 direct
= yang_dnode_get_enum(dnode
, "../direction");
329 metric
= yang_dnode_get_uint8(dnode
, NULL
);
331 offset
= yang_dnode_get_entry(dnode
, true);
332 offset
->direct
[direct
].metric
= metric
;
338 * XPath: /frr-ripngd:ripngd/instance/passive-interface
341 ripngd_instance_passive_interface_create(enum nb_event event
,
342 const struct lyd_node
*dnode
,
343 union nb_resource
*resource
)
348 if (event
!= NB_EV_APPLY
)
351 ripng
= yang_dnode_get_entry(dnode
, true);
352 ifname
= yang_dnode_get_string(dnode
, NULL
);
354 return ripng_passive_interface_set(ripng
, ifname
);
358 ripngd_instance_passive_interface_delete(enum nb_event event
,
359 const struct lyd_node
*dnode
)
364 if (event
!= NB_EV_APPLY
)
367 ripng
= yang_dnode_get_entry(dnode
, true);
368 ifname
= yang_dnode_get_string(dnode
, NULL
);
370 return ripng_passive_interface_unset(ripng
, ifname
);
374 * XPath: /frr-ripngd:ripngd/instance/redistribute
376 static int ripngd_instance_redistribute_create(enum nb_event event
,
377 const struct lyd_node
*dnode
,
378 union nb_resource
*resource
)
383 static int ripngd_instance_redistribute_delete(enum nb_event event
,
384 const struct lyd_node
*dnode
)
389 if (event
!= NB_EV_APPLY
)
392 ripng
= yang_dnode_get_entry(dnode
, true);
393 type
= yang_dnode_get_enum(dnode
, "./protocol");
395 ripng_redistribute_conf_delete(ripng
, type
);
401 ripngd_instance_redistribute_apply_finish(const struct lyd_node
*dnode
)
406 ripng
= yang_dnode_get_entry(dnode
, true);
407 type
= yang_dnode_get_enum(dnode
, "./protocol");
409 ripng_redistribute_conf_update(ripng
, type
);
413 * XPath: /frr-ripngd:ripngd/instance/redistribute/route-map
416 ripngd_instance_redistribute_route_map_modify(enum nb_event event
,
417 const struct lyd_node
*dnode
,
418 union nb_resource
*resource
)
422 const char *rmap_name
;
424 if (event
!= NB_EV_APPLY
)
427 ripng
= yang_dnode_get_entry(dnode
, true);
428 type
= yang_dnode_get_enum(dnode
, "../protocol");
429 rmap_name
= yang_dnode_get_string(dnode
, NULL
);
431 if (ripng
->route_map
[type
].name
)
432 free(ripng
->route_map
[type
].name
);
433 ripng
->route_map
[type
].name
= strdup(rmap_name
);
434 ripng
->route_map
[type
].map
= route_map_lookup_by_name(rmap_name
);
440 ripngd_instance_redistribute_route_map_delete(enum nb_event event
,
441 const struct lyd_node
*dnode
)
446 if (event
!= NB_EV_APPLY
)
449 ripng
= yang_dnode_get_entry(dnode
, true);
450 type
= yang_dnode_get_enum(dnode
, "../protocol");
452 free(ripng
->route_map
[type
].name
);
453 ripng
->route_map
[type
].name
= NULL
;
454 ripng
->route_map
[type
].map
= NULL
;
460 * XPath: /frr-ripngd:ripngd/instance/redistribute/metric
463 ripngd_instance_redistribute_metric_modify(enum nb_event event
,
464 const struct lyd_node
*dnode
,
465 union nb_resource
*resource
)
471 if (event
!= NB_EV_APPLY
)
474 ripng
= yang_dnode_get_entry(dnode
, true);
475 type
= yang_dnode_get_enum(dnode
, "../protocol");
476 metric
= yang_dnode_get_uint8(dnode
, NULL
);
478 ripng
->route_map
[type
].metric_config
= true;
479 ripng
->route_map
[type
].metric
= metric
;
485 ripngd_instance_redistribute_metric_delete(enum nb_event event
,
486 const struct lyd_node
*dnode
)
491 if (event
!= NB_EV_APPLY
)
494 ripng
= yang_dnode_get_entry(dnode
, true);
495 type
= yang_dnode_get_enum(dnode
, "../protocol");
497 ripng
->route_map
[type
].metric_config
= false;
498 ripng
->route_map
[type
].metric
= 0;
504 * XPath: /frr-ripngd:ripngd/instance/static-route
506 static int ripngd_instance_static_route_create(enum nb_event event
,
507 const struct lyd_node
*dnode
,
508 union nb_resource
*resource
)
511 struct prefix_ipv6 p
;
513 if (event
!= NB_EV_APPLY
)
516 ripng
= yang_dnode_get_entry(dnode
, true);
517 yang_dnode_get_ipv6p(&p
, dnode
, NULL
);
520 ripng_redistribute_add(ripng
, ZEBRA_ROUTE_RIPNG
, RIPNG_ROUTE_STATIC
, &p
,
526 static int ripngd_instance_static_route_delete(enum nb_event event
,
527 const struct lyd_node
*dnode
)
530 struct prefix_ipv6 p
;
532 if (event
!= NB_EV_APPLY
)
535 ripng
= yang_dnode_get_entry(dnode
, true);
536 yang_dnode_get_ipv6p(&p
, dnode
, NULL
);
539 ripng_redistribute_delete(ripng
, ZEBRA_ROUTE_RIPNG
, RIPNG_ROUTE_STATIC
,
546 * XPath: /frr-ripngd:ripngd/instance/aggregate-address
549 ripngd_instance_aggregate_address_create(enum nb_event event
,
550 const struct lyd_node
*dnode
,
551 union nb_resource
*resource
)
554 struct prefix_ipv6 p
;
556 if (event
!= NB_EV_APPLY
)
559 ripng
= yang_dnode_get_entry(dnode
, true);
560 yang_dnode_get_ipv6p(&p
, dnode
, NULL
);
563 ripng_aggregate_add(ripng
, (struct prefix
*)&p
);
569 ripngd_instance_aggregate_address_delete(enum nb_event event
,
570 const struct lyd_node
*dnode
)
573 struct prefix_ipv6 p
;
575 if (event
!= NB_EV_APPLY
)
578 ripng
= yang_dnode_get_entry(dnode
, true);
579 yang_dnode_get_ipv6p(&p
, dnode
, NULL
);
582 ripng_aggregate_delete(ripng
, (struct prefix
*)&p
);
588 * XPath: /frr-ripngd:ripngd/instance/timers
590 static void ripngd_instance_timers_apply_finish(const struct lyd_node
*dnode
)
594 ripng
= yang_dnode_get_entry(dnode
, true);
596 /* Reset update timer thread. */
597 ripng_event(ripng
, RIPNG_UPDATE_EVENT
, 0);
601 * XPath: /frr-ripngd:ripngd/instance/timers/flush-interval
604 ripngd_instance_timers_flush_interval_modify(enum nb_event event
,
605 const struct lyd_node
*dnode
,
606 union nb_resource
*resource
)
610 if (event
!= NB_EV_APPLY
)
613 ripng
= yang_dnode_get_entry(dnode
, true);
614 ripng
->garbage_time
= yang_dnode_get_uint16(dnode
, NULL
);
620 * XPath: /frr-ripngd:ripngd/instance/timers/holddown-interval
623 ripngd_instance_timers_holddown_interval_modify(enum nb_event event
,
624 const struct lyd_node
*dnode
,
625 union nb_resource
*resource
)
629 if (event
!= NB_EV_APPLY
)
632 ripng
= yang_dnode_get_entry(dnode
, true);
633 ripng
->timeout_time
= yang_dnode_get_uint16(dnode
, NULL
);
639 * XPath: /frr-ripngd:ripngd/instance/timers/update-interval
642 ripngd_instance_timers_update_interval_modify(enum nb_event event
,
643 const struct lyd_node
*dnode
,
644 union nb_resource
*resource
)
648 if (event
!= NB_EV_APPLY
)
651 ripng
= yang_dnode_get_entry(dnode
, true);
652 ripng
->update_time
= yang_dnode_get_uint16(dnode
, NULL
);
658 * XPath: /frr-ripngd:ripngd/state/neighbors/neighbor
661 ripngd_state_neighbors_neighbor_get_next(const void *parent_list_entry
,
662 const void *list_entry
)
665 struct listnode
*node
;
667 ripng
= ripng_lookup_by_vrf_id(VRF_DEFAULT
);
671 if (list_entry
== NULL
)
672 node
= listhead(ripng
->peer_list
);
674 node
= listnextnode((struct listnode
*)list_entry
);
679 static int ripngd_state_neighbors_neighbor_get_keys(const void *list_entry
,
680 struct yang_list_keys
*keys
)
682 const struct listnode
*node
= list_entry
;
683 const struct ripng_peer
*peer
= listgetdata(node
);
686 (void)inet_ntop(AF_INET6
, &peer
->addr
, keys
->key
[0],
687 sizeof(keys
->key
[0]));
693 ripngd_state_neighbors_neighbor_lookup_entry(const void *parent_list_entry
,
694 const struct yang_list_keys
*keys
)
697 struct in6_addr address
;
698 struct ripng_peer
*peer
;
699 struct listnode
*node
;
701 yang_str2ipv6(keys
->key
[0], &address
);
703 ripng
= ripng_lookup_by_vrf_id(VRF_DEFAULT
);
707 for (ALL_LIST_ELEMENTS_RO(ripng
->peer_list
, node
, peer
)) {
708 if (IPV6_ADDR_SAME(&peer
->addr
, &address
))
716 * XPath: /frr-ripngd:ripngd/state/neighbors/neighbor/address
718 static struct yang_data
*
719 ripngd_state_neighbors_neighbor_address_get_elem(const char *xpath
,
720 const void *list_entry
)
722 const struct listnode
*node
= list_entry
;
723 const struct ripng_peer
*peer
= listgetdata(node
);
725 return yang_data_new_ipv6(xpath
, &peer
->addr
);
729 * XPath: /frr-ripngd:ripngd/state/neighbors/neighbor/last-update
731 static struct yang_data
*
732 ripngd_state_neighbors_neighbor_last_update_get_elem(const char *xpath
,
733 const void *list_entry
)
735 /* TODO: yang:date-and-time is tricky */
740 * XPath: /frr-ripngd:ripngd/state/neighbors/neighbor/bad-packets-rcvd
742 static struct yang_data
*
743 ripngd_state_neighbors_neighbor_bad_packets_rcvd_get_elem(
744 const char *xpath
, const void *list_entry
)
746 const struct listnode
*node
= list_entry
;
747 const struct ripng_peer
*peer
= listgetdata(node
);
749 return yang_data_new_uint32(xpath
, peer
->recv_badpackets
);
753 * XPath: /frr-ripngd:ripngd/state/neighbors/neighbor/bad-routes-rcvd
755 static struct yang_data
*
756 ripngd_state_neighbors_neighbor_bad_routes_rcvd_get_elem(const char *xpath
,
757 const void *list_entry
)
759 const struct listnode
*node
= list_entry
;
760 const struct ripng_peer
*peer
= listgetdata(node
);
762 return yang_data_new_uint32(xpath
, peer
->recv_badroutes
);
766 * XPath: /frr-ripngd:ripngd/state/routes/route
769 ripngd_state_routes_route_get_next(const void *parent_list_entry
,
770 const void *list_entry
)
775 ripng
= ripng_lookup_by_vrf_id(VRF_DEFAULT
);
779 if (list_entry
== NULL
)
780 rn
= agg_route_top(ripng
->table
);
782 rn
= agg_route_next((struct agg_node
*)list_entry
);
783 while (rn
&& rn
->info
== NULL
)
784 rn
= agg_route_next(rn
);
789 static int ripngd_state_routes_route_get_keys(const void *list_entry
,
790 struct yang_list_keys
*keys
)
792 const struct agg_node
*rn
= list_entry
;
795 (void)prefix2str(&rn
->p
, keys
->key
[0], sizeof(keys
->key
[0]));
801 ripngd_state_routes_route_lookup_entry(const void *parent_list_entry
,
802 const struct yang_list_keys
*keys
)
805 struct prefix prefix
;
808 yang_str2ipv6p(keys
->key
[0], &prefix
);
810 ripng
= ripng_lookup_by_vrf_id(VRF_DEFAULT
);
814 rn
= agg_node_lookup(ripng
->table
, &prefix
);
815 if (!rn
|| !rn
->info
)
824 * XPath: /frr-ripngd:ripngd/state/routes/route/prefix
826 static struct yang_data
*
827 ripngd_state_routes_route_prefix_get_elem(const char *xpath
,
828 const void *list_entry
)
830 const struct agg_node
*rn
= list_entry
;
831 const struct ripng_info
*rinfo
= listnode_head(rn
->info
);
833 return yang_data_new_ipv6p(xpath
, &rinfo
->rp
->p
);
837 * XPath: /frr-ripngd:ripngd/state/routes/route/next-hop
839 static struct yang_data
*
840 ripngd_state_routes_route_next_hop_get_elem(const char *xpath
,
841 const void *list_entry
)
843 const struct agg_node
*rn
= list_entry
;
844 const struct ripng_info
*rinfo
= listnode_head(rn
->info
);
846 return yang_data_new_ipv6(xpath
, &rinfo
->nexthop
);
850 * XPath: /frr-ripngd:ripngd/state/routes/route/interface
852 static struct yang_data
*
853 ripngd_state_routes_route_interface_get_elem(const char *xpath
,
854 const void *list_entry
)
856 const struct agg_node
*rn
= list_entry
;
857 const struct ripng_info
*rinfo
= listnode_head(rn
->info
);
859 return yang_data_new_string(
860 xpath
, ifindex2ifname(rinfo
->ifindex
, VRF_DEFAULT
));
864 * XPath: /frr-ripngd:ripngd/state/routes/route/metric
866 static struct yang_data
*
867 ripngd_state_routes_route_metric_get_elem(const char *xpath
,
868 const void *list_entry
)
870 const struct agg_node
*rn
= list_entry
;
871 const struct ripng_info
*rinfo
= listnode_head(rn
->info
);
873 return yang_data_new_uint8(xpath
, rinfo
->metric
);
877 * XPath: /frr-ripngd:clear-ripng-route
879 static int clear_ripng_route_rpc(const char *xpath
, const struct list
*input
,
884 struct ripng_info
*rinfo
;
886 struct listnode
*listnode
;
888 ripng
= ripng_lookup_by_vrf_id(VRF_DEFAULT
);
892 /* Clear received RIPng routes */
893 for (rp
= agg_route_top(ripng
->table
); rp
; rp
= agg_route_next(rp
)) {
898 for (ALL_LIST_ELEMENTS_RO(list
, listnode
, rinfo
)) {
899 if (!ripng_route_rte(rinfo
))
902 if (CHECK_FLAG(rinfo
->flags
, RIPNG_RTF_FIB
))
903 ripng_zebra_ipv6_delete(ripng
, rp
);
908 RIPNG_TIMER_OFF(rinfo
->t_timeout
);
909 RIPNG_TIMER_OFF(rinfo
->t_garbage_collect
);
910 listnode_delete(list
, rinfo
);
911 ripng_info_free(rinfo
);
914 if (list_isempty(list
)) {
925 * XPath: /frr-interface:lib/interface/frr-ripngd:ripng/split-horizon
928 lib_interface_ripng_split_horizon_modify(enum nb_event event
,
929 const struct lyd_node
*dnode
,
930 union nb_resource
*resource
)
932 struct interface
*ifp
;
933 struct ripng_interface
*ri
;
935 if (event
!= NB_EV_APPLY
)
938 ifp
= yang_dnode_get_entry(dnode
, true);
940 ri
->split_horizon
= yang_dnode_get_enum(dnode
, NULL
);
945 /* clang-format off */
946 const struct frr_yang_module_info frr_ripngd_info
= {
947 .name
= "frr-ripngd",
950 .xpath
= "/frr-ripngd:ripngd/instance",
951 .cbs
.create
= ripngd_instance_create
,
952 .cbs
.delete = ripngd_instance_delete
,
953 .cbs
.cli_show
= cli_show_router_ripng
,
956 .xpath
= "/frr-ripngd:ripngd/instance/allow-ecmp",
957 .cbs
.modify
= ripngd_instance_allow_ecmp_modify
,
958 .cbs
.cli_show
= cli_show_ripng_allow_ecmp
,
961 .xpath
= "/frr-ripngd:ripngd/instance/default-information-originate",
962 .cbs
.modify
= ripngd_instance_default_information_originate_modify
,
963 .cbs
.cli_show
= cli_show_ripng_default_information_originate
,
966 .xpath
= "/frr-ripngd:ripngd/instance/default-metric",
967 .cbs
.modify
= ripngd_instance_default_metric_modify
,
968 .cbs
.cli_show
= cli_show_ripng_default_metric
,
971 .xpath
= "/frr-ripngd:ripngd/instance/network",
972 .cbs
.create
= ripngd_instance_network_create
,
973 .cbs
.delete = ripngd_instance_network_delete
,
974 .cbs
.cli_show
= cli_show_ripng_network_prefix
,
977 .xpath
= "/frr-ripngd:ripngd/instance/interface",
978 .cbs
.create
= ripngd_instance_interface_create
,
979 .cbs
.delete = ripngd_instance_interface_delete
,
980 .cbs
.cli_show
= cli_show_ripng_network_interface
,
983 .xpath
= "/frr-ripngd:ripngd/instance/offset-list",
984 .cbs
.create
= ripngd_instance_offset_list_create
,
985 .cbs
.delete = ripngd_instance_offset_list_delete
,
986 .cbs
.cli_show
= cli_show_ripng_offset_list
,
989 .xpath
= "/frr-ripngd:ripngd/instance/offset-list/access-list",
990 .cbs
.modify
= ripngd_instance_offset_list_access_list_modify
,
993 .xpath
= "/frr-ripngd:ripngd/instance/offset-list/metric",
994 .cbs
.modify
= ripngd_instance_offset_list_metric_modify
,
997 .xpath
= "/frr-ripngd:ripngd/instance/passive-interface",
998 .cbs
.create
= ripngd_instance_passive_interface_create
,
999 .cbs
.delete = ripngd_instance_passive_interface_delete
,
1000 .cbs
.cli_show
= cli_show_ripng_passive_interface
,
1003 .xpath
= "/frr-ripngd:ripngd/instance/redistribute",
1004 .cbs
.create
= ripngd_instance_redistribute_create
,
1005 .cbs
.delete = ripngd_instance_redistribute_delete
,
1006 .cbs
.apply_finish
= ripngd_instance_redistribute_apply_finish
,
1007 .cbs
.cli_show
= cli_show_ripng_redistribute
,
1010 .xpath
= "/frr-ripngd:ripngd/instance/redistribute/route-map",
1011 .cbs
.modify
= ripngd_instance_redistribute_route_map_modify
,
1012 .cbs
.delete = ripngd_instance_redistribute_route_map_delete
,
1015 .xpath
= "/frr-ripngd:ripngd/instance/redistribute/metric",
1016 .cbs
.modify
= ripngd_instance_redistribute_metric_modify
,
1017 .cbs
.delete = ripngd_instance_redistribute_metric_delete
,
1020 .xpath
= "/frr-ripngd:ripngd/instance/static-route",
1021 .cbs
.create
= ripngd_instance_static_route_create
,
1022 .cbs
.delete = ripngd_instance_static_route_delete
,
1023 .cbs
.cli_show
= cli_show_ripng_route
,
1026 .xpath
= "/frr-ripngd:ripngd/instance/aggregate-address",
1027 .cbs
.create
= ripngd_instance_aggregate_address_create
,
1028 .cbs
.delete = ripngd_instance_aggregate_address_delete
,
1029 .cbs
.cli_show
= cli_show_ripng_aggregate_address
,
1032 .xpath
= "/frr-ripngd:ripngd/instance/timers",
1033 .cbs
.apply_finish
= ripngd_instance_timers_apply_finish
,
1034 .cbs
.cli_show
= cli_show_ripng_timers
,
1037 .xpath
= "/frr-ripngd:ripngd/instance/timers/flush-interval",
1038 .cbs
.modify
= ripngd_instance_timers_flush_interval_modify
,
1041 .xpath
= "/frr-ripngd:ripngd/instance/timers/holddown-interval",
1042 .cbs
.modify
= ripngd_instance_timers_holddown_interval_modify
,
1045 .xpath
= "/frr-ripngd:ripngd/instance/timers/update-interval",
1046 .cbs
.modify
= ripngd_instance_timers_update_interval_modify
,
1049 .xpath
= "/frr-ripngd:ripngd/state/neighbors/neighbor",
1050 .cbs
.get_next
= ripngd_state_neighbors_neighbor_get_next
,
1051 .cbs
.get_keys
= ripngd_state_neighbors_neighbor_get_keys
,
1052 .cbs
.lookup_entry
= ripngd_state_neighbors_neighbor_lookup_entry
,
1055 .xpath
= "/frr-ripngd:ripngd/state/neighbors/neighbor/address",
1056 .cbs
.get_elem
= ripngd_state_neighbors_neighbor_address_get_elem
,
1059 .xpath
= "/frr-ripngd:ripngd/state/neighbors/neighbor/last-update",
1060 .cbs
.get_elem
= ripngd_state_neighbors_neighbor_last_update_get_elem
,
1063 .xpath
= "/frr-ripngd:ripngd/state/neighbors/neighbor/bad-packets-rcvd",
1064 .cbs
.get_elem
= ripngd_state_neighbors_neighbor_bad_packets_rcvd_get_elem
,
1067 .xpath
= "/frr-ripngd:ripngd/state/neighbors/neighbor/bad-routes-rcvd",
1068 .cbs
.get_elem
= ripngd_state_neighbors_neighbor_bad_routes_rcvd_get_elem
,
1071 .xpath
= "/frr-ripngd:ripngd/state/routes/route",
1072 .cbs
.get_next
= ripngd_state_routes_route_get_next
,
1073 .cbs
.get_keys
= ripngd_state_routes_route_get_keys
,
1074 .cbs
.lookup_entry
= ripngd_state_routes_route_lookup_entry
,
1077 .xpath
= "/frr-ripngd:ripngd/state/routes/route/prefix",
1078 .cbs
.get_elem
= ripngd_state_routes_route_prefix_get_elem
,
1081 .xpath
= "/frr-ripngd:ripngd/state/routes/route/next-hop",
1082 .cbs
.get_elem
= ripngd_state_routes_route_next_hop_get_elem
,
1085 .xpath
= "/frr-ripngd:ripngd/state/routes/route/interface",
1086 .cbs
.get_elem
= ripngd_state_routes_route_interface_get_elem
,
1089 .xpath
= "/frr-ripngd:ripngd/state/routes/route/metric",
1090 .cbs
.get_elem
= ripngd_state_routes_route_metric_get_elem
,
1093 .xpath
= "/frr-ripngd:clear-ripng-route",
1094 .cbs
.rpc
= clear_ripng_route_rpc
,
1097 .xpath
= "/frr-interface:lib/interface/frr-ripngd:ripng/split-horizon",
1098 .cbs
.modify
= lib_interface_ripng_split_horizon_modify
,
1099 .cbs
.cli_show
= cli_show_ipv6_ripng_split_horizon
,