mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 13:37:17 +02:00
zebra: convert interface configuration output to NB
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
parent
185fd140cf
commit
218b5017ee
|
@ -37,6 +37,7 @@
|
||||||
#include "zebra/zebra_vxlan.h"
|
#include "zebra/zebra_vxlan.h"
|
||||||
#include "zebra/zebra_errors.h"
|
#include "zebra/zebra_errors.h"
|
||||||
#include "zebra/zebra_evpn_mh.h"
|
#include "zebra/zebra_evpn_mh.h"
|
||||||
|
#include "zebra/zebra_nb.h"
|
||||||
|
|
||||||
DEFINE_MTYPE_STATIC(ZEBRA, ZINFO, "Zebra Interface Information");
|
DEFINE_MTYPE_STATIC(ZEBRA, ZINFO, "Zebra Interface Information");
|
||||||
|
|
||||||
|
@ -44,8 +45,6 @@ DEFINE_MTYPE_STATIC(ZEBRA, ZINFO, "Zebra Interface Information");
|
||||||
|
|
||||||
DEFINE_HOOK(zebra_if_extra_info, (struct vty * vty, struct interface *ifp),
|
DEFINE_HOOK(zebra_if_extra_info, (struct vty * vty, struct interface *ifp),
|
||||||
(vty, ifp));
|
(vty, ifp));
|
||||||
DEFINE_HOOK(zebra_if_config_wr, (struct vty * vty, struct interface *ifp),
|
|
||||||
(vty, ifp));
|
|
||||||
|
|
||||||
DEFINE_MTYPE(ZEBRA, ZIF_DESC, "Intf desc");
|
DEFINE_MTYPE(ZEBRA, ZIF_DESC, "Intf desc");
|
||||||
|
|
||||||
|
@ -3704,6 +3703,18 @@ DEFPY_YANG (multicast_new,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_multicast_cli_write(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode,
|
||||||
|
bool show_defaults)
|
||||||
|
{
|
||||||
|
bool multicast = yang_dnode_get_bool(dnode, NULL);
|
||||||
|
|
||||||
|
if (multicast)
|
||||||
|
vty_out(vty, " multicast enable\n");
|
||||||
|
else
|
||||||
|
vty_out(vty, " multicast disable\n");
|
||||||
|
}
|
||||||
|
|
||||||
int if_multicast_set(struct interface *ifp)
|
int if_multicast_set(struct interface *ifp)
|
||||||
{
|
{
|
||||||
struct zebra_if *if_data;
|
struct zebra_if *if_data;
|
||||||
|
@ -3751,6 +3762,18 @@ DEFPY_YANG (mpls,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_mpls_cli_write(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode,
|
||||||
|
bool show_defaults)
|
||||||
|
{
|
||||||
|
bool mpls = yang_dnode_get_bool(dnode, NULL);
|
||||||
|
|
||||||
|
if (mpls)
|
||||||
|
vty_out(vty, " mpls enable\n");
|
||||||
|
else
|
||||||
|
vty_out(vty, " mpls disable\n");
|
||||||
|
}
|
||||||
|
|
||||||
int if_multicast_unset(struct interface *ifp)
|
int if_multicast_unset(struct interface *ifp)
|
||||||
{
|
{
|
||||||
struct zebra_if *if_data;
|
struct zebra_if *if_data;
|
||||||
|
@ -3816,6 +3839,18 @@ DEFPY_YANG (linkdetect,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_link_detect_cli_write(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode,
|
||||||
|
bool show_defaults)
|
||||||
|
{
|
||||||
|
bool link_detect = yang_dnode_get_bool(dnode, NULL);
|
||||||
|
|
||||||
|
if (!link_detect)
|
||||||
|
vty_out(vty, " no link-detect\n");
|
||||||
|
else if (show_defaults)
|
||||||
|
vty_out(vty, " link-detect\n");
|
||||||
|
}
|
||||||
|
|
||||||
int if_shutdown(struct interface *ifp)
|
int if_shutdown(struct interface *ifp)
|
||||||
{
|
{
|
||||||
struct zebra_if *if_data;
|
struct zebra_if *if_data;
|
||||||
|
@ -3847,6 +3882,18 @@ DEFPY_YANG (shutdown_if,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_enabled_cli_write(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode,
|
||||||
|
bool show_defaults)
|
||||||
|
{
|
||||||
|
bool enabled = yang_dnode_get_bool(dnode, NULL);
|
||||||
|
|
||||||
|
if (!enabled)
|
||||||
|
vty_out(vty, " shutdown\n");
|
||||||
|
else if (show_defaults)
|
||||||
|
vty_out(vty, " no shutdown\n");
|
||||||
|
}
|
||||||
|
|
||||||
int if_no_shutdown(struct interface *ifp)
|
int if_no_shutdown(struct interface *ifp)
|
||||||
{
|
{
|
||||||
struct zebra_if *if_data;
|
struct zebra_if *if_data;
|
||||||
|
@ -3888,6 +3935,15 @@ DEFPY_YANG (bandwidth_if,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_bandwidth_cli_write(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode,
|
||||||
|
bool show_defaults)
|
||||||
|
{
|
||||||
|
uint32_t bandwidth = yang_dnode_get_uint32(dnode, NULL);
|
||||||
|
|
||||||
|
vty_out(vty, " bandwidth %u\n", bandwidth);
|
||||||
|
}
|
||||||
|
|
||||||
struct cmd_node link_params_node = {
|
struct cmd_node link_params_node = {
|
||||||
.name = "link-params",
|
.name = "link-params",
|
||||||
.node = LINK_PARAMS_NODE,
|
.node = LINK_PARAMS_NODE,
|
||||||
|
@ -3967,6 +4023,19 @@ DEFUN_NOSH (exit_link_params,
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_link_params_cli_write(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode,
|
||||||
|
bool show_defaults)
|
||||||
|
{
|
||||||
|
vty_out(vty, " link-params\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_link_params_cli_write_end(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode)
|
||||||
|
{
|
||||||
|
vty_out(vty, " exit-link-params\n");
|
||||||
|
}
|
||||||
|
|
||||||
DEFUN_YANG (no_link_params,
|
DEFUN_YANG (no_link_params,
|
||||||
no_link_params_cmd,
|
no_link_params_cmd,
|
||||||
"no link-params",
|
"no link-params",
|
||||||
|
@ -4024,6 +4093,14 @@ DEFPY_YANG (link_params_metric,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_link_params_metric_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
uint32_t metric = yang_dnode_get_uint32(dnode, NULL);
|
||||||
|
|
||||||
|
vty_out(vty, " metric %u\n", metric);
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY_YANG (link_params_maxbw,
|
DEFPY_YANG (link_params_maxbw,
|
||||||
link_params_maxbw_cmd,
|
link_params_maxbw_cmd,
|
||||||
"max-bw BANDWIDTH",
|
"max-bw BANDWIDTH",
|
||||||
|
@ -4045,6 +4122,14 @@ DEFPY_YANG (link_params_maxbw,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_link_params_max_bandwidth_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
float max_bandwidth = yang_dnode_get_bandwidth_ieee_float32(dnode, NULL);
|
||||||
|
|
||||||
|
vty_out(vty, " max-bw %g\n", max_bandwidth);
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY_YANG (link_params_max_rsv_bw,
|
DEFPY_YANG (link_params_max_rsv_bw,
|
||||||
link_params_max_rsv_bw_cmd,
|
link_params_max_rsv_bw_cmd,
|
||||||
"max-rsv-bw BANDWIDTH",
|
"max-rsv-bw BANDWIDTH",
|
||||||
|
@ -4067,6 +4152,15 @@ DEFPY_YANG (link_params_max_rsv_bw,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_link_params_max_reservable_bandwidth_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
float max_reservable_bandwidth =
|
||||||
|
yang_dnode_get_bandwidth_ieee_float32(dnode, NULL);
|
||||||
|
|
||||||
|
vty_out(vty, " max-rsv-bw %g\n", max_reservable_bandwidth);
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY_YANG (link_params_unrsv_bw,
|
DEFPY_YANG (link_params_unrsv_bw,
|
||||||
link_params_unrsv_bw_cmd,
|
link_params_unrsv_bw_cmd,
|
||||||
"unrsv-bw (0-7)$priority BANDWIDTH",
|
"unrsv-bw (0-7)$priority BANDWIDTH",
|
||||||
|
@ -4093,6 +4187,17 @@ DEFPY_YANG (link_params_unrsv_bw,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_link_params_unreserved_bandwidths_unreserved_bandwidth_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
uint8_t priority = yang_dnode_get_uint8(dnode, "priority");
|
||||||
|
float unreserved_bandwidth =
|
||||||
|
yang_dnode_get_bandwidth_ieee_float32(dnode,
|
||||||
|
"unreserved-bandwidth");
|
||||||
|
|
||||||
|
vty_out(vty, " unrsv-bw %u %g\n", priority, unreserved_bandwidth);
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY_YANG(link_params_admin_grp, link_params_admin_grp_cmd,
|
DEFPY_YANG(link_params_admin_grp, link_params_admin_grp_cmd,
|
||||||
"admin-grp BITPATTERN",
|
"admin-grp BITPATTERN",
|
||||||
"Administrative group membership\n"
|
"Administrative group membership\n"
|
||||||
|
@ -4156,6 +4261,16 @@ DEFPY_YANG (link_params_inter_as,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_link_params_neighbor_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
uint32_t remote_as = yang_dnode_get_uint32(dnode, "remote-as");
|
||||||
|
const char *ipv4_remote_id = yang_dnode_get_string(dnode,
|
||||||
|
"ipv4-remote-id");
|
||||||
|
|
||||||
|
vty_out(vty, " neighbor %s as %u\n", ipv4_remote_id, remote_as);
|
||||||
|
}
|
||||||
|
|
||||||
/* RFC7471: OSPF Traffic Engineering (TE) Metric extensions &
|
/* RFC7471: OSPF Traffic Engineering (TE) Metric extensions &
|
||||||
* draft-ietf-isis-metric-extensions-07.txt */
|
* draft-ietf-isis-metric-extensions-07.txt */
|
||||||
DEFPY_YANG (link_params_delay,
|
DEFPY_YANG (link_params_delay,
|
||||||
|
@ -4191,6 +4306,27 @@ DEFPY_YANG (link_params_delay,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_link_params_delay_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
uint32_t delay = yang_dnode_get_uint32(dnode, NULL);
|
||||||
|
|
||||||
|
vty_out(vty, " delay %u", delay);
|
||||||
|
|
||||||
|
if (yang_dnode_exists(dnode, "../min-max-delay")) {
|
||||||
|
uint32_t delay_min =
|
||||||
|
yang_dnode_get_uint32(dnode,
|
||||||
|
"../min-max-delay/delay-min");
|
||||||
|
uint32_t delay_max =
|
||||||
|
yang_dnode_get_uint32(dnode,
|
||||||
|
"../min-max-delay/delay-max");
|
||||||
|
|
||||||
|
vty_out(vty, " min %u max %u", delay_min, delay_max);
|
||||||
|
}
|
||||||
|
|
||||||
|
vty_out(vty, "\n");
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY_YANG (link_params_delay_var,
|
DEFPY_YANG (link_params_delay_var,
|
||||||
link_params_delay_var_cmd,
|
link_params_delay_var_cmd,
|
||||||
"[no] delay-variation ![(0-16777215)$delay_var]",
|
"[no] delay-variation ![(0-16777215)$delay_var]",
|
||||||
|
@ -4208,6 +4344,14 @@ DEFPY_YANG (link_params_delay_var,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_link_params_delay_variation_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
uint32_t delay_variation = yang_dnode_get_uint32(dnode, NULL);
|
||||||
|
|
||||||
|
vty_out(vty, " delay-variation %u\n", delay_variation);
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY_YANG(
|
DEFPY_YANG(
|
||||||
link_params_pkt_loss, link_params_pkt_loss_cmd,
|
link_params_pkt_loss, link_params_pkt_loss_cmd,
|
||||||
"[no] packet-loss ![PERCENTAGE]",
|
"[no] packet-loss ![PERCENTAGE]",
|
||||||
|
@ -4224,6 +4368,14 @@ DEFPY_YANG(
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_link_params_packet_loss_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
double packet_loss = yang_dnode_get_dec64(dnode, NULL);
|
||||||
|
|
||||||
|
vty_out(vty, " packet-loss %lf\n", packet_loss);
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY_YANG (link_params_res_bw,
|
DEFPY_YANG (link_params_res_bw,
|
||||||
link_params_res_bw_cmd,
|
link_params_res_bw_cmd,
|
||||||
"[no] res-bw ![BANDWIDTH]",
|
"[no] res-bw ![BANDWIDTH]",
|
||||||
|
@ -4252,6 +4404,15 @@ DEFPY_YANG (link_params_res_bw,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_link_params_residual_bandwidth_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
float residual_bandwidth = yang_dnode_get_bandwidth_ieee_float32(dnode,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
vty_out(vty, " res-bw %g\n", residual_bandwidth);
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY_YANG (link_params_ava_bw,
|
DEFPY_YANG (link_params_ava_bw,
|
||||||
link_params_ava_bw_cmd,
|
link_params_ava_bw_cmd,
|
||||||
"[no] ava-bw ![BANDWIDTH]",
|
"[no] ava-bw ![BANDWIDTH]",
|
||||||
|
@ -4280,6 +4441,15 @@ DEFPY_YANG (link_params_ava_bw,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_link_params_available_bandwidth_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
float available_bandwidth = yang_dnode_get_bandwidth_ieee_float32(dnode,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
vty_out(vty, " ava-bw %g\n", available_bandwidth);
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY_YANG (link_params_use_bw,
|
DEFPY_YANG (link_params_use_bw,
|
||||||
link_params_use_bw_cmd,
|
link_params_use_bw_cmd,
|
||||||
"[no] use-bw ![BANDWIDTH]",
|
"[no] use-bw ![BANDWIDTH]",
|
||||||
|
@ -4308,6 +4478,15 @@ DEFPY_YANG (link_params_use_bw,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_link_params_utilized_bandwidth_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
float utilized_bandwidth = yang_dnode_get_bandwidth_ieee_float32(dnode,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
vty_out(vty, " use-bw %g\n", utilized_bandwidth);
|
||||||
|
}
|
||||||
|
|
||||||
static int ag_change(struct vty *vty, int argc, struct cmd_token **argv,
|
static int ag_change(struct vty *vty, int argc, struct cmd_token **argv,
|
||||||
const char *xpath_base, bool no, int start_idx)
|
const char *xpath_base, bool no, int start_idx)
|
||||||
{
|
{
|
||||||
|
@ -4537,6 +4716,23 @@ DEFPY_YANG (ip_address,
|
||||||
ip, mask);
|
ip, mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_ipv4_addrs_cli_write(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode,
|
||||||
|
bool show_defaults)
|
||||||
|
{
|
||||||
|
const char *ip = yang_dnode_get_string(dnode, "ip");
|
||||||
|
uint8_t prefix_length = yang_dnode_get_uint8(dnode, "prefix-length");
|
||||||
|
|
||||||
|
vty_out(vty, " ip address %s/%u", ip, prefix_length);
|
||||||
|
|
||||||
|
if (yang_dnode_exists(dnode, "label")) {
|
||||||
|
const char *label = yang_dnode_get_string(dnode, "label");
|
||||||
|
vty_out(vty, " label %s", label);
|
||||||
|
}
|
||||||
|
|
||||||
|
vty_out(vty, "\n");
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef HAVE_NETLINK
|
#ifdef HAVE_NETLINK
|
||||||
DEFPY_YANG (ip_address_peer,
|
DEFPY_YANG (ip_address_peer,
|
||||||
ip_address_peer_cmd,
|
ip_address_peer_cmd,
|
||||||
|
@ -4590,6 +4786,26 @@ DEFPY_YANG (ip_address_peer,
|
||||||
address_str, peer_ip, peer_mask);
|
address_str, peer_ip, peer_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_ipv4_p2p_addrs_cli_write(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode,
|
||||||
|
bool show_defaults)
|
||||||
|
{
|
||||||
|
const char *ip = yang_dnode_get_string(dnode, "ip");
|
||||||
|
const char *peer_ip = yang_dnode_get_string(dnode, "peer-ip");
|
||||||
|
uint8_t peer_prefix_length = yang_dnode_get_uint8(dnode,
|
||||||
|
"peer-prefix-length");
|
||||||
|
|
||||||
|
vty_out(vty, " ip address %s peer %s/%u", ip, peer_ip,
|
||||||
|
peer_prefix_length);
|
||||||
|
|
||||||
|
if (yang_dnode_exists(dnode, "label")) {
|
||||||
|
const char *label = yang_dnode_get_string(dnode, "label");
|
||||||
|
vty_out(vty, " label %s", label);
|
||||||
|
}
|
||||||
|
|
||||||
|
vty_out(vty, "\n");
|
||||||
|
}
|
||||||
|
|
||||||
void if_ipv6_address_install(struct interface *ifp, struct prefix *prefix)
|
void if_ipv6_address_install(struct interface *ifp, struct prefix *prefix)
|
||||||
{
|
{
|
||||||
struct zebra_if *if_data;
|
struct zebra_if *if_data;
|
||||||
|
@ -4683,153 +4899,14 @@ DEFPY_YANG (ipv6_address,
|
||||||
ip, mask);
|
ip, mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int link_params_config_write(struct vty *vty, struct interface *ifp)
|
void lib_interface_zebra_ipv6_addrs_cli_write(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode,
|
||||||
|
bool show_defaults)
|
||||||
{
|
{
|
||||||
const struct lyd_node *dnode;
|
const char *ip = yang_dnode_get_string(dnode, "ip");
|
||||||
char xpath[XPATH_MAXLEN];
|
uint8_t prefix_length = yang_dnode_get_uint8(dnode, "prefix-length");
|
||||||
int i;
|
|
||||||
|
|
||||||
if ((ifp == NULL) || !HAS_LINK_PARAMS(ifp))
|
vty_out(vty, " ipv6 address %s/%u\n", ip, prefix_length);
|
||||||
return -1;
|
|
||||||
|
|
||||||
struct if_link_params *iflp = ifp->link_params;
|
|
||||||
|
|
||||||
vty_out(vty, " link-params\n");
|
|
||||||
if (IS_PARAM_SET(iflp, LP_TE_METRIC) && iflp->te_metric != ifp->metric)
|
|
||||||
vty_out(vty, " metric %u\n", iflp->te_metric);
|
|
||||||
if (IS_PARAM_SET(iflp, LP_MAX_BW) && iflp->max_bw != iflp->default_bw)
|
|
||||||
vty_out(vty, " max-bw %g\n", iflp->max_bw);
|
|
||||||
if (IS_PARAM_SET(iflp, LP_MAX_RSV_BW)
|
|
||||||
&& iflp->max_rsv_bw != iflp->default_bw)
|
|
||||||
vty_out(vty, " max-rsv-bw %g\n", iflp->max_rsv_bw);
|
|
||||||
if (IS_PARAM_SET(iflp, LP_UNRSV_BW)) {
|
|
||||||
for (i = 0; i < 8; i++)
|
|
||||||
if (iflp->unrsv_bw[i] != iflp->default_bw)
|
|
||||||
vty_out(vty, " unrsv-bw %d %g\n", i,
|
|
||||||
iflp->unrsv_bw[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
snprintf(
|
|
||||||
xpath, sizeof(xpath),
|
|
||||||
"/frr-interface:lib/interface[name='%s']/frr-zebra:zebra/link-params",
|
|
||||||
ifp->name);
|
|
||||||
dnode = yang_dnode_get(running_config->dnode, xpath);
|
|
||||||
if (dnode)
|
|
||||||
nb_cli_show_dnode_cmds(vty, dnode, false);
|
|
||||||
|
|
||||||
if (IS_PARAM_SET(iflp, LP_DELAY)) {
|
|
||||||
vty_out(vty, " delay %u", iflp->av_delay);
|
|
||||||
if (IS_PARAM_SET(iflp, LP_MM_DELAY)) {
|
|
||||||
vty_out(vty, " min %u", iflp->min_delay);
|
|
||||||
vty_out(vty, " max %u", iflp->max_delay);
|
|
||||||
}
|
|
||||||
vty_out(vty, "\n");
|
|
||||||
}
|
|
||||||
if (IS_PARAM_SET(iflp, LP_DELAY_VAR))
|
|
||||||
vty_out(vty, " delay-variation %u\n", iflp->delay_var);
|
|
||||||
if (IS_PARAM_SET(iflp, LP_PKT_LOSS))
|
|
||||||
vty_out(vty, " packet-loss %f\n",
|
|
||||||
(double)iflp->pkt_loss * LOSS_PRECISION);
|
|
||||||
if (IS_PARAM_SET(iflp, LP_AVA_BW))
|
|
||||||
vty_out(vty, " ava-bw %g\n", iflp->ava_bw);
|
|
||||||
if (IS_PARAM_SET(iflp, LP_RES_BW))
|
|
||||||
vty_out(vty, " res-bw %g\n", iflp->res_bw);
|
|
||||||
if (IS_PARAM_SET(iflp, LP_USE_BW))
|
|
||||||
vty_out(vty, " use-bw %g\n", iflp->use_bw);
|
|
||||||
if (IS_PARAM_SET(iflp, LP_RMT_AS))
|
|
||||||
vty_out(vty, " neighbor %pI4 as %u\n", &iflp->rmt_ip,
|
|
||||||
iflp->rmt_as);
|
|
||||||
|
|
||||||
vty_out(vty, " exit-link-params\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int if_config_write(struct vty *vty)
|
|
||||||
{
|
|
||||||
struct vrf *vrf;
|
|
||||||
struct interface *ifp;
|
|
||||||
|
|
||||||
zebra_ptm_write(vty);
|
|
||||||
|
|
||||||
RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name)
|
|
||||||
FOR_ALL_INTERFACES (vrf, ifp) {
|
|
||||||
struct zebra_if *if_data;
|
|
||||||
struct connected *ifc;
|
|
||||||
struct prefix *p;
|
|
||||||
|
|
||||||
if_data = ifp->info;
|
|
||||||
|
|
||||||
if_vty_config_start(vty, ifp);
|
|
||||||
|
|
||||||
if (if_data) {
|
|
||||||
if (if_data->shutdown == IF_ZEBRA_DATA_ON)
|
|
||||||
vty_out(vty, " shutdown\n");
|
|
||||||
|
|
||||||
zebra_ptm_if_write(vty, if_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ifp->desc)
|
|
||||||
vty_out(vty, " description %s\n", ifp->desc);
|
|
||||||
|
|
||||||
/* Assign bandwidth here to avoid unnecessary interface
|
|
||||||
flap
|
|
||||||
while processing config script */
|
|
||||||
if (ifp->bandwidth != 0)
|
|
||||||
vty_out(vty, " bandwidth %u\n", ifp->bandwidth);
|
|
||||||
|
|
||||||
if (!CHECK_FLAG(ifp->status,
|
|
||||||
ZEBRA_INTERFACE_LINKDETECTION))
|
|
||||||
vty_out(vty, " no link-detect\n");
|
|
||||||
|
|
||||||
frr_each (if_connected, ifp->connected, ifc) {
|
|
||||||
if (CHECK_FLAG(ifc->conf,
|
|
||||||
ZEBRA_IFC_CONFIGURED)) {
|
|
||||||
char buf[INET6_ADDRSTRLEN];
|
|
||||||
p = ifc->address;
|
|
||||||
vty_out(vty, " ip%s address %s",
|
|
||||||
p->family == AF_INET ? ""
|
|
||||||
: "v6",
|
|
||||||
inet_ntop(p->family,
|
|
||||||
&p->u.prefix, buf,
|
|
||||||
sizeof(buf)));
|
|
||||||
if (CONNECTED_PEER(ifc)) {
|
|
||||||
p = ifc->destination;
|
|
||||||
vty_out(vty, " peer %s",
|
|
||||||
inet_ntop(p->family,
|
|
||||||
&p->u.prefix,
|
|
||||||
buf,
|
|
||||||
sizeof(buf)));
|
|
||||||
}
|
|
||||||
vty_out(vty, "/%d", p->prefixlen);
|
|
||||||
|
|
||||||
if (ifc->label)
|
|
||||||
vty_out(vty, " label %s",
|
|
||||||
ifc->label);
|
|
||||||
|
|
||||||
vty_out(vty, "\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (if_data) {
|
|
||||||
if (if_data->multicast == IF_ZEBRA_DATA_ON)
|
|
||||||
vty_out(vty, " multicast enable\n");
|
|
||||||
else if (if_data->multicast == IF_ZEBRA_DATA_OFF)
|
|
||||||
vty_out(vty, " multicast disable\n");
|
|
||||||
|
|
||||||
if (if_data->mpls_config == IF_ZEBRA_DATA_ON)
|
|
||||||
vty_out(vty, " mpls enable\n");
|
|
||||||
else if (if_data->mpls_config ==
|
|
||||||
IF_ZEBRA_DATA_OFF)
|
|
||||||
vty_out(vty, " mpls disable\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
hook_call(zebra_if_config_wr, vty, ifp);
|
|
||||||
zebra_evpn_mh_if_write(vty, ifp);
|
|
||||||
link_params_config_write(vty, ifp);
|
|
||||||
|
|
||||||
if_vty_config_end(vty);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate and initialize interface vector. */
|
/* Allocate and initialize interface vector. */
|
||||||
|
@ -4840,7 +4917,7 @@ void zebra_if_init(void)
|
||||||
hook_register_prio(if_del, 0, if_zebra_delete_hook);
|
hook_register_prio(if_del, 0, if_zebra_delete_hook);
|
||||||
|
|
||||||
/* Install configuration write function. */
|
/* Install configuration write function. */
|
||||||
if_cmd_init(if_config_write);
|
if_cmd_init_default();
|
||||||
install_node(&link_params_node);
|
install_node(&link_params_node);
|
||||||
|
|
||||||
install_element(VIEW_NODE, &show_interface_cmd);
|
install_element(VIEW_NODE, &show_interface_cmd);
|
||||||
|
|
|
@ -218,8 +218,6 @@ struct zebra_if {
|
||||||
|
|
||||||
DECLARE_HOOK(zebra_if_extra_info, (struct vty * vty, struct interface *ifp),
|
DECLARE_HOOK(zebra_if_extra_info, (struct vty * vty, struct interface *ifp),
|
||||||
(vty, ifp));
|
(vty, ifp));
|
||||||
DECLARE_HOOK(zebra_if_config_wr, (struct vty * vty, struct interface *ifp),
|
|
||||||
(vty, ifp));
|
|
||||||
|
|
||||||
#define IS_ZEBRA_IF_VRF(ifp) \
|
#define IS_ZEBRA_IF_VRF(ifp) \
|
||||||
(((struct zebra_if *)(ifp->info))->zif_type == ZEBRA_IF_VRF)
|
(((struct zebra_if *)(ifp->info))->zif_type == ZEBRA_IF_VRF)
|
||||||
|
|
|
@ -694,7 +694,6 @@ DEFUN (ip_irdp_debug_disable,
|
||||||
|
|
||||||
void irdp_if_init(void)
|
void irdp_if_init(void)
|
||||||
{
|
{
|
||||||
hook_register(zebra_if_config_wr, irdp_config_write);
|
|
||||||
hook_register(if_del, irdp_if_delete);
|
hook_register(if_del, irdp_if_delete);
|
||||||
|
|
||||||
install_element(INTERFACE_NODE, &ip_irdp_broadcast_cmd);
|
install_element(INTERFACE_NODE, &ip_irdp_broadcast_cmd);
|
||||||
|
|
356
zebra/rtadv.c
356
zebra/rtadv.c
|
@ -31,6 +31,7 @@
|
||||||
#include "zebra/zebra_vrf.h"
|
#include "zebra/zebra_vrf.h"
|
||||||
#include "zebra/zebra_errors.h"
|
#include "zebra/zebra_errors.h"
|
||||||
#include "zebra/zebra_router.h"
|
#include "zebra/zebra_router.h"
|
||||||
|
#include "zebra/zebra_nb.h"
|
||||||
|
|
||||||
extern struct zebra_privs_t zserv_privs;
|
extern struct zebra_privs_t zserv_privs;
|
||||||
|
|
||||||
|
@ -1568,6 +1569,17 @@ DEFPY_YANG (ipv6_nd_ra_fast_retrans,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_fast_retransmit_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
bool fast_retransmit = yang_dnode_get_bool(dnode, NULL);
|
||||||
|
|
||||||
|
if (!fast_retransmit)
|
||||||
|
vty_out(vty, " no ipv6 nd ra-fast-retrans\n");
|
||||||
|
else if (show_defaults)
|
||||||
|
vty_out(vty, " ipv6 nd ra-fast-retrans\n");
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY_YANG (ipv6_nd_ra_hop_limit,
|
DEFPY_YANG (ipv6_nd_ra_hop_limit,
|
||||||
ipv6_nd_ra_hop_limit_cmd,
|
ipv6_nd_ra_hop_limit_cmd,
|
||||||
"[no] ipv6 nd ra-hop-limit ![(0-255)$hopcount]",
|
"[no] ipv6 nd ra-hop-limit ![(0-255)$hopcount]",
|
||||||
|
@ -1588,6 +1600,14 @@ DEFPY_YANG (ipv6_nd_ra_hop_limit,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_cur_hop_limit_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
uint8_t hop_limit = yang_dnode_get_uint8(dnode, NULL);
|
||||||
|
|
||||||
|
vty_out(vty, " ipv6 nd ra-hop-limit %u\n", hop_limit);
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY_YANG (ipv6_nd_ra_retrans_interval,
|
DEFPY_YANG (ipv6_nd_ra_retrans_interval,
|
||||||
ipv6_nd_ra_retrans_interval_cmd,
|
ipv6_nd_ra_retrans_interval_cmd,
|
||||||
"[no] ipv6 nd ra-retrans-interval ![(0-4294967295)$interval]",
|
"[no] ipv6 nd ra-retrans-interval ![(0-4294967295)$interval]",
|
||||||
|
@ -1608,6 +1628,14 @@ DEFPY_YANG (ipv6_nd_ra_retrans_interval,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_retrans_timer_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
uint32_t retrans_timer = yang_dnode_get_uint32(dnode, NULL);
|
||||||
|
|
||||||
|
vty_out(vty, " ipv6 nd ra-retrans-interval %u\n", retrans_timer);
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY_YANG (ipv6_nd_suppress_ra,
|
DEFPY_YANG (ipv6_nd_suppress_ra,
|
||||||
ipv6_nd_suppress_ra_cmd,
|
ipv6_nd_suppress_ra_cmd,
|
||||||
"[no] ipv6 nd suppress-ra",
|
"[no] ipv6 nd suppress-ra",
|
||||||
|
@ -1627,6 +1655,17 @@ DEFPY_YANG (ipv6_nd_suppress_ra,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_send_advertisements_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
bool send_advertisements = yang_dnode_get_bool(dnode, NULL);
|
||||||
|
|
||||||
|
if (send_advertisements)
|
||||||
|
vty_out(vty, " no ipv6 nd suppress-ra\n");
|
||||||
|
else if (show_defaults)
|
||||||
|
vty_out(vty, " ipv6 nd suppress-ra\n");
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY_YANG (ipv6_nd_ra_interval,
|
DEFPY_YANG (ipv6_nd_ra_interval,
|
||||||
ipv6_nd_ra_interval_cmd,
|
ipv6_nd_ra_interval_cmd,
|
||||||
"[no] ipv6 nd ra-interval ![<(1-1800)$sec|msec (70-1800000)$msec>]",
|
"[no] ipv6 nd ra-interval ![<(1-1800)$sec|msec (70-1800000)$msec>]",
|
||||||
|
@ -1657,6 +1696,19 @@ DEFPY_YANG (ipv6_nd_ra_interval,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_max_rtr_adv_interval_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
uint32_t max_rtr_adv_interval = yang_dnode_get_uint32(dnode, NULL);
|
||||||
|
|
||||||
|
if (max_rtr_adv_interval % 1000)
|
||||||
|
vty_out(vty, " ipv6 nd ra-interval msec %u\n",
|
||||||
|
max_rtr_adv_interval);
|
||||||
|
else
|
||||||
|
vty_out(vty, " ipv6 nd ra-interval %u\n",
|
||||||
|
max_rtr_adv_interval / 1000);
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY_YANG (ipv6_nd_ra_lifetime,
|
DEFPY_YANG (ipv6_nd_ra_lifetime,
|
||||||
ipv6_nd_ra_lifetime_cmd,
|
ipv6_nd_ra_lifetime_cmd,
|
||||||
"[no] ipv6 nd ra-lifetime ![(0-9000)$lifetime]",
|
"[no] ipv6 nd ra-lifetime ![(0-9000)$lifetime]",
|
||||||
|
@ -1677,6 +1729,14 @@ DEFPY_YANG (ipv6_nd_ra_lifetime,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_default_lifetime_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
uint16_t default_lifetime = yang_dnode_get_uint16(dnode, NULL);
|
||||||
|
|
||||||
|
vty_out(vty, " ipv6 nd ra-lifetime %u\n", default_lifetime);
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY_YANG (ipv6_nd_reachable_time,
|
DEFPY_YANG (ipv6_nd_reachable_time,
|
||||||
ipv6_nd_reachable_time_cmd,
|
ipv6_nd_reachable_time_cmd,
|
||||||
"[no] ipv6 nd reachable-time ![(1-3600000)$msec]",
|
"[no] ipv6 nd reachable-time ![(1-3600000)$msec]",
|
||||||
|
@ -1697,6 +1757,14 @@ DEFPY_YANG (ipv6_nd_reachable_time,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_reachable_time_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
uint32_t reachable_time = yang_dnode_get_uint32(dnode, NULL);
|
||||||
|
|
||||||
|
vty_out(vty, " ipv6 nd reachable-time %u\n", reachable_time);
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY_YANG (ipv6_nd_homeagent_preference,
|
DEFPY_YANG (ipv6_nd_homeagent_preference,
|
||||||
ipv6_nd_homeagent_preference_cmd,
|
ipv6_nd_homeagent_preference_cmd,
|
||||||
"[no] ipv6 nd home-agent-preference ![(0-65535)$pref]",
|
"[no] ipv6 nd home-agent-preference ![(0-65535)$pref]",
|
||||||
|
@ -1717,6 +1785,15 @@ DEFPY_YANG (ipv6_nd_homeagent_preference,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_home_agent_preference_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
uint16_t home_agent_preference = yang_dnode_get_uint16(dnode, NULL);
|
||||||
|
|
||||||
|
vty_out(vty, " ipv6 nd home-agent-preference %u\n",
|
||||||
|
home_agent_preference);
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY_YANG (ipv6_nd_homeagent_lifetime,
|
DEFPY_YANG (ipv6_nd_homeagent_lifetime,
|
||||||
ipv6_nd_homeagent_lifetime_cmd,
|
ipv6_nd_homeagent_lifetime_cmd,
|
||||||
"[no] ipv6 nd home-agent-lifetime ![(1-65520)$lifetime]",
|
"[no] ipv6 nd home-agent-lifetime ![(1-65520)$lifetime]",
|
||||||
|
@ -1737,6 +1814,14 @@ DEFPY_YANG (ipv6_nd_homeagent_lifetime,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_home_agent_lifetime_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
uint16_t home_agent_lifetime = yang_dnode_get_uint16(dnode, NULL);
|
||||||
|
|
||||||
|
vty_out(vty, " ipv6 nd home-agent-lifetime %u\n", home_agent_lifetime);
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY_YANG (ipv6_nd_managed_config_flag,
|
DEFPY_YANG (ipv6_nd_managed_config_flag,
|
||||||
ipv6_nd_managed_config_flag_cmd,
|
ipv6_nd_managed_config_flag_cmd,
|
||||||
"[no] ipv6 nd managed-config-flag",
|
"[no] ipv6 nd managed-config-flag",
|
||||||
|
@ -1756,6 +1841,17 @@ DEFPY_YANG (ipv6_nd_managed_config_flag,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_managed_flag_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
bool managed_flag = yang_dnode_get_bool(dnode, NULL);
|
||||||
|
|
||||||
|
if (managed_flag)
|
||||||
|
vty_out(vty, " ipv6 nd managed-config-flag\n");
|
||||||
|
else if (show_defaults)
|
||||||
|
vty_out(vty, " no ipv6 nd managed-config-flag\n");
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY_YANG (ipv6_nd_homeagent_config_flag,
|
DEFPY_YANG (ipv6_nd_homeagent_config_flag,
|
||||||
ipv6_nd_homeagent_config_flag_cmd,
|
ipv6_nd_homeagent_config_flag_cmd,
|
||||||
"[no] ipv6 nd home-agent-config-flag",
|
"[no] ipv6 nd home-agent-config-flag",
|
||||||
|
@ -1775,6 +1871,17 @@ DEFPY_YANG (ipv6_nd_homeagent_config_flag,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_home_agent_flag_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
bool home_agent_flag = yang_dnode_get_bool(dnode, NULL);
|
||||||
|
|
||||||
|
if (home_agent_flag)
|
||||||
|
vty_out(vty, " ipv6 nd home-agent-config-flag\n");
|
||||||
|
else if (show_defaults)
|
||||||
|
vty_out(vty, " no ipv6 nd home-agent-config-flag\n");
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY_YANG (ipv6_nd_adv_interval_config_option,
|
DEFPY_YANG (ipv6_nd_adv_interval_config_option,
|
||||||
ipv6_nd_adv_interval_config_option_cmd,
|
ipv6_nd_adv_interval_config_option_cmd,
|
||||||
"[no] ipv6 nd adv-interval-option",
|
"[no] ipv6 nd adv-interval-option",
|
||||||
|
@ -1794,6 +1901,17 @@ DEFPY_YANG (ipv6_nd_adv_interval_config_option,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_advertisement_interval_option_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
bool advertisement_interval_option = yang_dnode_get_bool(dnode, NULL);
|
||||||
|
|
||||||
|
if (advertisement_interval_option)
|
||||||
|
vty_out(vty, " ipv6 nd adv-interval-option\n");
|
||||||
|
else if (show_defaults)
|
||||||
|
vty_out(vty, " no ipv6 nd adv-interval-option\n");
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY_YANG (ipv6_nd_other_config_flag,
|
DEFPY_YANG (ipv6_nd_other_config_flag,
|
||||||
ipv6_nd_other_config_flag_cmd,
|
ipv6_nd_other_config_flag_cmd,
|
||||||
"[no] ipv6 nd other-config-flag",
|
"[no] ipv6 nd other-config-flag",
|
||||||
|
@ -1813,6 +1931,17 @@ DEFPY_YANG (ipv6_nd_other_config_flag,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_other_config_flag_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
bool other_config_flag = yang_dnode_get_bool(dnode, NULL);
|
||||||
|
|
||||||
|
if (other_config_flag)
|
||||||
|
vty_out(vty, " ipv6 nd other-config-flag\n");
|
||||||
|
else if (show_defaults)
|
||||||
|
vty_out(vty, " no ipv6 nd other-config-flag\n");
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY_YANG (ipv6_nd_prefix,
|
DEFPY_YANG (ipv6_nd_prefix,
|
||||||
ipv6_nd_prefix_cmd,
|
ipv6_nd_prefix_cmd,
|
||||||
"[no] ipv6 nd prefix X:X::X:X/M$prefix [<(0-4294967295)|infinite>$valid <(0-4294967295)|infinite>$preferred] [{router-address$routeraddr|off-link$offlink|no-autoconfig$noautoconf}]",
|
"[no] ipv6 nd prefix X:X::X:X/M$prefix [<(0-4294967295)|infinite>$valid <(0-4294967295)|infinite>$preferred] [{router-address$routeraddr|off-link$offlink|no-autoconfig$noautoconf}]",
|
||||||
|
@ -1876,6 +2005,47 @@ DEFPY_YANG (ipv6_nd_prefix,
|
||||||
prefix_str);
|
prefix_str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
const char *prefix = yang_dnode_get_string(dnode, "prefix-spec");
|
||||||
|
struct lyd_node *valid = yang_dnode_get(dnode, "valid-lifetime");
|
||||||
|
struct lyd_node *preferred = yang_dnode_get(dnode, "preferred-lifetime");
|
||||||
|
bool router_address_flag = yang_dnode_get_bool(dnode,
|
||||||
|
"router-address-flag");
|
||||||
|
bool on_link_flag = yang_dnode_get_bool(dnode, "on-link-flag");
|
||||||
|
bool autonomous_flag = yang_dnode_get_bool(dnode, "autonomous-flag");
|
||||||
|
|
||||||
|
vty_out(vty, " ipv6 nd prefix %s", prefix);
|
||||||
|
|
||||||
|
if (!yang_dnode_is_default(valid, NULL) ||
|
||||||
|
!yang_dnode_is_default(preferred, NULL) || show_defaults) {
|
||||||
|
uint32_t valid_lifetime = yang_dnode_get_uint32(valid, NULL);
|
||||||
|
uint32_t preferred_lifetime = yang_dnode_get_uint32(preferred,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
if (valid_lifetime == UINT32_MAX)
|
||||||
|
vty_out(vty, " infinite");
|
||||||
|
else
|
||||||
|
vty_out(vty, " %u", valid_lifetime);
|
||||||
|
if (preferred_lifetime == UINT32_MAX)
|
||||||
|
vty_out(vty, " infinite");
|
||||||
|
else
|
||||||
|
vty_out(vty, " %u", preferred_lifetime);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!on_link_flag)
|
||||||
|
vty_out(vty, " off-link");
|
||||||
|
|
||||||
|
if (!autonomous_flag)
|
||||||
|
vty_out(vty, " no-autoconfig");
|
||||||
|
|
||||||
|
if (router_address_flag)
|
||||||
|
vty_out(vty, " router-address");
|
||||||
|
|
||||||
|
vty_out(vty, "\n");
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY_YANG (ipv6_nd_router_preference,
|
DEFPY_YANG (ipv6_nd_router_preference,
|
||||||
ipv6_nd_router_preference_cmd,
|
ipv6_nd_router_preference_cmd,
|
||||||
"[no] ipv6 nd router-preference ![<high|medium|low>$pref]",
|
"[no] ipv6 nd router-preference ![<high|medium|low>$pref]",
|
||||||
|
@ -1898,6 +2068,16 @@ DEFPY_YANG (ipv6_nd_router_preference,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_default_router_preference_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
const char *default_router_preference = yang_dnode_get_string(dnode,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
vty_out(vty, " ipv6 nd router-preference %s\n",
|
||||||
|
default_router_preference);
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY_YANG (ipv6_nd_mtu,
|
DEFPY_YANG (ipv6_nd_mtu,
|
||||||
ipv6_nd_mtu_cmd,
|
ipv6_nd_mtu_cmd,
|
||||||
"[no] ipv6 nd mtu ![(1-65535)]",
|
"[no] ipv6 nd mtu ![(1-65535)]",
|
||||||
|
@ -1918,6 +2098,14 @@ DEFPY_YANG (ipv6_nd_mtu,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_link_mtu_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
uint16_t link_mtu = yang_dnode_get_uint32(dnode, NULL);
|
||||||
|
|
||||||
|
vty_out(vty, " ipv6 nd mtu %u\n", link_mtu);
|
||||||
|
}
|
||||||
|
|
||||||
static struct rtadv_rdnss *rtadv_rdnss_new(void)
|
static struct rtadv_rdnss *rtadv_rdnss_new(void)
|
||||||
{
|
{
|
||||||
return XCALLOC(MTYPE_RTADV_RDNSS, sizeof(struct rtadv_rdnss));
|
return XCALLOC(MTYPE_RTADV_RDNSS, sizeof(struct rtadv_rdnss));
|
||||||
|
@ -2044,6 +2232,25 @@ DEFPY_YANG (ipv6_nd_rdnss,
|
||||||
addr_str);
|
addr_str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_rdnss_rdnss_address_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
const char *address = yang_dnode_get_string(dnode, "address");
|
||||||
|
|
||||||
|
vty_out(vty, " ipv6 nd rdnss %s", address);
|
||||||
|
|
||||||
|
if (yang_dnode_exists(dnode, "lifetime")) {
|
||||||
|
uint32_t lifetime = yang_dnode_get_uint32(dnode, "lifetime");
|
||||||
|
|
||||||
|
if (lifetime == UINT32_MAX)
|
||||||
|
vty_out(vty, " infinite");
|
||||||
|
else
|
||||||
|
vty_out(vty, " %u", lifetime);
|
||||||
|
}
|
||||||
|
|
||||||
|
vty_out(vty, "\n");
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY_YANG (ipv6_nd_dnssl,
|
DEFPY_YANG (ipv6_nd_dnssl,
|
||||||
ipv6_nd_dnssl_cmd,
|
ipv6_nd_dnssl_cmd,
|
||||||
"[no] ipv6 nd dnssl SUFFIX [<(0-4294967295)|infinite>]$lifetime",
|
"[no] ipv6 nd dnssl SUFFIX [<(0-4294967295)|infinite>]$lifetime",
|
||||||
|
@ -2092,6 +2299,24 @@ DEFPY_YANG (ipv6_nd_dnssl,
|
||||||
dnssl.name);
|
dnssl.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_dnssl_dnssl_domain_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
const char *domain = yang_dnode_get_string(dnode, "domain");
|
||||||
|
|
||||||
|
vty_out(vty, " ipv6 nd dnssl %s", domain);
|
||||||
|
|
||||||
|
if (yang_dnode_exists(dnode, "lifetime")) {
|
||||||
|
uint32_t lifetime = yang_dnode_get_uint32(dnode, "lifetime");
|
||||||
|
|
||||||
|
if (lifetime == UINT32_MAX)
|
||||||
|
vty_out(vty, " infinite");
|
||||||
|
else
|
||||||
|
vty_out(vty, " %u", lifetime);
|
||||||
|
}
|
||||||
|
|
||||||
|
vty_out(vty, "\n");
|
||||||
|
}
|
||||||
|
|
||||||
/* Dump interface ND information to vty. */
|
/* Dump interface ND information to vty. */
|
||||||
static int nd_dump_vty(struct vty *vty, struct interface *ifp)
|
static int nd_dump_vty(struct vty *vty, struct interface *ifp)
|
||||||
|
@ -2163,136 +2388,6 @@ static int nd_dump_vty(struct vty *vty, struct interface *ifp)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Write configuration about router advertisement. */
|
|
||||||
static int rtadv_config_write(struct vty *vty, struct interface *ifp)
|
|
||||||
{
|
|
||||||
struct zebra_if *zif;
|
|
||||||
struct listnode *node;
|
|
||||||
struct rtadv_prefix *rprefix;
|
|
||||||
struct rtadv_rdnss *rdnss;
|
|
||||||
struct rtadv_dnssl *dnssl;
|
|
||||||
int interval;
|
|
||||||
|
|
||||||
zif = ifp->info;
|
|
||||||
|
|
||||||
if (!if_is_loopback(ifp)) {
|
|
||||||
if (zif->rtadv.AdvSendAdvertisements
|
|
||||||
&& CHECK_FLAG(zif->rtadv.ra_configured, VTY_RA_CONFIGURED))
|
|
||||||
vty_out(vty, " no ipv6 nd suppress-ra\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
interval = zif->rtadv.MaxRtrAdvInterval;
|
|
||||||
if (CHECK_FLAG(zif->rtadv.ra_configured, VTY_RA_INTERVAL_CONFIGURED)) {
|
|
||||||
if (interval % 1000)
|
|
||||||
vty_out(vty, " ipv6 nd ra-interval msec %d\n",
|
|
||||||
interval);
|
|
||||||
else if (interval != RTADV_MAX_RTR_ADV_INTERVAL)
|
|
||||||
vty_out(vty, " ipv6 nd ra-interval %d\n",
|
|
||||||
interval / 1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (zif->rtadv.AdvIntervalOption)
|
|
||||||
vty_out(vty, " ipv6 nd adv-interval-option\n");
|
|
||||||
|
|
||||||
if (!zif->rtadv.UseFastRexmit)
|
|
||||||
vty_out(vty, " no ipv6 nd ra-fast-retrans\n");
|
|
||||||
|
|
||||||
if (zif->rtadv.AdvRetransTimer != 0)
|
|
||||||
vty_out(vty, " ipv6 nd ra-retrans-interval %u\n",
|
|
||||||
zif->rtadv.AdvRetransTimer);
|
|
||||||
|
|
||||||
if (zif->rtadv.AdvCurHopLimit != RTADV_DEFAULT_HOPLIMIT)
|
|
||||||
vty_out(vty, " ipv6 nd ra-hop-limit %d\n",
|
|
||||||
zif->rtadv.AdvCurHopLimit);
|
|
||||||
|
|
||||||
if (zif->rtadv.AdvDefaultLifetime != -1)
|
|
||||||
vty_out(vty, " ipv6 nd ra-lifetime %d\n",
|
|
||||||
zif->rtadv.AdvDefaultLifetime);
|
|
||||||
|
|
||||||
if (zif->rtadv.HomeAgentPreference)
|
|
||||||
vty_out(vty, " ipv6 nd home-agent-preference %u\n",
|
|
||||||
zif->rtadv.HomeAgentPreference);
|
|
||||||
|
|
||||||
if (zif->rtadv.HomeAgentLifetime != -1)
|
|
||||||
vty_out(vty, " ipv6 nd home-agent-lifetime %u\n",
|
|
||||||
zif->rtadv.HomeAgentLifetime);
|
|
||||||
|
|
||||||
if (zif->rtadv.AdvHomeAgentFlag)
|
|
||||||
vty_out(vty, " ipv6 nd home-agent-config-flag\n");
|
|
||||||
|
|
||||||
if (zif->rtadv.AdvReachableTime)
|
|
||||||
vty_out(vty, " ipv6 nd reachable-time %d\n",
|
|
||||||
zif->rtadv.AdvReachableTime);
|
|
||||||
|
|
||||||
if (zif->rtadv.AdvManagedFlag)
|
|
||||||
vty_out(vty, " ipv6 nd managed-config-flag\n");
|
|
||||||
|
|
||||||
if (zif->rtadv.AdvOtherConfigFlag)
|
|
||||||
vty_out(vty, " ipv6 nd other-config-flag\n");
|
|
||||||
|
|
||||||
if (zif->rtadv.DefaultPreference != RTADV_PREF_MEDIUM)
|
|
||||||
vty_out(vty, " ipv6 nd router-preference %s\n",
|
|
||||||
rtadv_pref_strs[zif->rtadv.DefaultPreference]);
|
|
||||||
|
|
||||||
if (zif->rtadv.AdvLinkMTU)
|
|
||||||
vty_out(vty, " ipv6 nd mtu %d\n", zif->rtadv.AdvLinkMTU);
|
|
||||||
|
|
||||||
frr_each (rtadv_prefixes, zif->rtadv.prefixes, rprefix) {
|
|
||||||
if ((rprefix->AdvPrefixCreate == PREFIX_SRC_MANUAL)
|
|
||||||
|| (rprefix->AdvPrefixCreate == PREFIX_SRC_BOTH)) {
|
|
||||||
vty_out(vty, " ipv6 nd prefix %pFX", &rprefix->prefix);
|
|
||||||
if ((rprefix->AdvValidLifetime != RTADV_VALID_LIFETIME)
|
|
||||||
|| (rprefix->AdvPreferredLifetime
|
|
||||||
!= RTADV_PREFERRED_LIFETIME)) {
|
|
||||||
if (rprefix->AdvValidLifetime == UINT32_MAX)
|
|
||||||
vty_out(vty, " infinite");
|
|
||||||
else
|
|
||||||
vty_out(vty, " %u",
|
|
||||||
rprefix->AdvValidLifetime);
|
|
||||||
if (rprefix->AdvPreferredLifetime == UINT32_MAX)
|
|
||||||
vty_out(vty, " infinite");
|
|
||||||
else
|
|
||||||
vty_out(vty, " %u",
|
|
||||||
rprefix->AdvPreferredLifetime);
|
|
||||||
}
|
|
||||||
if (!rprefix->AdvOnLinkFlag)
|
|
||||||
vty_out(vty, " off-link");
|
|
||||||
if (!rprefix->AdvAutonomousFlag)
|
|
||||||
vty_out(vty, " no-autoconfig");
|
|
||||||
if (rprefix->AdvRouterAddressFlag)
|
|
||||||
vty_out(vty, " router-address");
|
|
||||||
vty_out(vty, "\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (ALL_LIST_ELEMENTS_RO(zif->rtadv.AdvRDNSSList, node, rdnss)) {
|
|
||||||
char buf[INET6_ADDRSTRLEN];
|
|
||||||
|
|
||||||
vty_out(vty, " ipv6 nd rdnss %s",
|
|
||||||
inet_ntop(AF_INET6, &rdnss->addr, buf, sizeof(buf)));
|
|
||||||
if (rdnss->lifetime_set) {
|
|
||||||
if (rdnss->lifetime == UINT32_MAX)
|
|
||||||
vty_out(vty, " infinite");
|
|
||||||
else
|
|
||||||
vty_out(vty, " %u", rdnss->lifetime);
|
|
||||||
}
|
|
||||||
vty_out(vty, "\n");
|
|
||||||
}
|
|
||||||
for (ALL_LIST_ELEMENTS_RO(zif->rtadv.AdvDNSSLList, node, dnssl)) {
|
|
||||||
vty_out(vty, " ipv6 nd dnssl %s", dnssl->name);
|
|
||||||
if (dnssl->lifetime_set) {
|
|
||||||
if (dnssl->lifetime == UINT32_MAX)
|
|
||||||
vty_out(vty, " infinite");
|
|
||||||
else
|
|
||||||
vty_out(vty, " %u", dnssl->lifetime);
|
|
||||||
}
|
|
||||||
vty_out(vty, "\n");
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void rtadv_event(struct zebra_vrf *zvrf, enum rtadv_event event, int val)
|
static void rtadv_event(struct zebra_vrf *zvrf, enum rtadv_event event, int val)
|
||||||
{
|
{
|
||||||
struct rtadv *rtadv;
|
struct rtadv *rtadv;
|
||||||
|
@ -2438,7 +2533,6 @@ void rtadv_cmd_init(void)
|
||||||
interfaces_configured_for_ra_from_bgp = 0;
|
interfaces_configured_for_ra_from_bgp = 0;
|
||||||
|
|
||||||
hook_register(zebra_if_extra_info, nd_dump_vty);
|
hook_register(zebra_if_extra_info, nd_dump_vty);
|
||||||
hook_register(zebra_if_config_wr, rtadv_config_write);
|
|
||||||
|
|
||||||
install_element(VIEW_NODE, &show_ipv6_nd_ra_if_cmd);
|
install_element(VIEW_NODE, &show_ipv6_nd_ra_if_cmd);
|
||||||
|
|
||||||
|
|
|
@ -3300,42 +3300,6 @@ void zebra_evpn_es_show_esi(struct vty *vty, bool uj, esi_t *esi)
|
||||||
vty_json(vty, json);
|
vty_json(vty, json);
|
||||||
}
|
}
|
||||||
|
|
||||||
int zebra_evpn_mh_if_write(struct vty *vty, struct interface *ifp)
|
|
||||||
{
|
|
||||||
struct zebra_if *zif = ifp->info;
|
|
||||||
char buf[ETHER_ADDR_STRLEN];
|
|
||||||
bool type_3_esi = false;
|
|
||||||
char esi_buf[ESI_STR_LEN];
|
|
||||||
|
|
||||||
if (zif->es_info.lid) {
|
|
||||||
vty_out(vty, " evpn mh es-id %u\n", zif->es_info.lid);
|
|
||||||
type_3_esi = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!is_zero_mac(&zif->es_info.sysmac)) {
|
|
||||||
vty_out(vty, " evpn mh es-sys-mac %s\n",
|
|
||||||
prefix_mac2str(&zif->es_info.sysmac,
|
|
||||||
buf, sizeof(buf)));
|
|
||||||
type_3_esi = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!type_3_esi
|
|
||||||
&& memcmp(&zif->es_info.esi, zero_esi, sizeof(*zero_esi)))
|
|
||||||
vty_out(vty, " evpn mh es-id %s\n",
|
|
||||||
esi_to_str(&zif->es_info.esi, esi_buf, sizeof(esi_buf)));
|
|
||||||
|
|
||||||
if (zif->es_info.df_pref != EVPN_MH_DF_PREF_DEFAULT)
|
|
||||||
vty_out(vty, " evpn mh es-df-pref %u\n", zif->es_info.df_pref);
|
|
||||||
|
|
||||||
if (zif->flags & ZIF_FLAG_EVPN_MH_UPLINK)
|
|
||||||
vty_out(vty, " evpn mh uplink\n");
|
|
||||||
|
|
||||||
if (zif->es_info.flags & ZIF_CFG_ES_FLAG_BYPASS)
|
|
||||||
vty_out(vty, " evpn mh bypass\n");
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void zebra_evpn_mh_if_init(struct zebra_if *zif)
|
void zebra_evpn_mh_if_init(struct zebra_if *zif)
|
||||||
{
|
{
|
||||||
zif->es_info.df_pref = EVPN_MH_DF_PREF_DEFAULT;
|
zif->es_info.df_pref = EVPN_MH_DF_PREF_DEFAULT;
|
||||||
|
@ -3356,6 +3320,18 @@ DEFPY_HIDDEN(zebra_evpn_es_bypass, zebra_evpn_es_bypass_cmd,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_evpn_mh_bypass_cli_write(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode,
|
||||||
|
bool show_defaults)
|
||||||
|
{
|
||||||
|
bool bypass = yang_dnode_get_bool(dnode, NULL);
|
||||||
|
|
||||||
|
if (bypass)
|
||||||
|
vty_out(vty, " evpn mh bypass\n");
|
||||||
|
else if (show_defaults)
|
||||||
|
vty_out(vty, " no evpn mh bypass\n");
|
||||||
|
}
|
||||||
|
|
||||||
/* CLI for configuring DF preference part for an ES */
|
/* CLI for configuring DF preference part for an ES */
|
||||||
DEFPY_YANG (zebra_evpn_es_pref,
|
DEFPY_YANG (zebra_evpn_es_pref,
|
||||||
zebra_evpn_es_pref_cmd,
|
zebra_evpn_es_pref_cmd,
|
||||||
|
@ -3377,6 +3353,14 @@ DEFPY_YANG (zebra_evpn_es_pref,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_evpn_mh_df_preference_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
uint16_t df_pref = yang_dnode_get_uint16(dnode, NULL);
|
||||||
|
|
||||||
|
vty_out(vty, " evpn mh es-df-pref %u\n", df_pref);
|
||||||
|
}
|
||||||
|
|
||||||
/* CLI for setting up sysmac part of ESI on an access port */
|
/* CLI for setting up sysmac part of ESI on an access port */
|
||||||
DEFPY_YANG (zebra_evpn_es_sys_mac,
|
DEFPY_YANG (zebra_evpn_es_sys_mac,
|
||||||
zebra_evpn_es_sys_mac_cmd,
|
zebra_evpn_es_sys_mac_cmd,
|
||||||
|
@ -3399,6 +3383,18 @@ DEFPY_YANG (zebra_evpn_es_sys_mac,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_evpn_mh_type_3_system_mac_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
char buf[ETHER_ADDR_STRLEN];
|
||||||
|
struct ethaddr mac;
|
||||||
|
|
||||||
|
yang_dnode_get_mac(&mac, dnode, NULL);
|
||||||
|
|
||||||
|
vty_out(vty, " evpn mh es-sys-mac %s\n",
|
||||||
|
prefix_mac2str(&mac, buf, sizeof(buf)));
|
||||||
|
}
|
||||||
|
|
||||||
/* CLI for setting up local-ID part of ESI on an access port */
|
/* CLI for setting up local-ID part of ESI on an access port */
|
||||||
DEFPY_YANG (zebra_evpn_es_id,
|
DEFPY_YANG (zebra_evpn_es_id,
|
||||||
zebra_evpn_es_id_cmd,
|
zebra_evpn_es_id_cmd,
|
||||||
|
@ -3432,6 +3428,22 @@ DEFPY_YANG (zebra_evpn_es_id,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_evpn_mh_type_0_esi_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
const char *esi_str = yang_dnode_get_string(dnode, NULL);
|
||||||
|
|
||||||
|
vty_out(vty, " evpn mh es-id %s\n", esi_str);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_evpn_mh_type_3_local_discriminator_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
|
||||||
|
{
|
||||||
|
uint32_t es_lid = yang_dnode_get_uint32(dnode, NULL);
|
||||||
|
|
||||||
|
vty_out(vty, " evpn mh es-id %u\n", es_lid);
|
||||||
|
}
|
||||||
|
|
||||||
/* CLI for tagging an interface as an uplink */
|
/* CLI for tagging an interface as an uplink */
|
||||||
DEFPY_YANG (zebra_evpn_mh_uplink,
|
DEFPY_YANG (zebra_evpn_mh_uplink,
|
||||||
zebra_evpn_mh_uplink_cmd,
|
zebra_evpn_mh_uplink_cmd,
|
||||||
|
@ -3450,6 +3462,18 @@ DEFPY_YANG (zebra_evpn_mh_uplink,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_evpn_mh_uplink_cli_write(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode,
|
||||||
|
bool show_defaults)
|
||||||
|
{
|
||||||
|
bool uplink = yang_dnode_get_bool(dnode, NULL);
|
||||||
|
|
||||||
|
if (uplink)
|
||||||
|
vty_out(vty, " evpn mh uplink\n");
|
||||||
|
else if (show_defaults)
|
||||||
|
vty_out(vty, " no evpn mh uplink\n");
|
||||||
|
}
|
||||||
|
|
||||||
void zebra_evpn_mh_json(json_object *json)
|
void zebra_evpn_mh_json(json_object *json)
|
||||||
{
|
{
|
||||||
json_object *json_array;
|
json_object *json_array;
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include "zebra_vxlan.h"
|
#include "zebra_vxlan.h"
|
||||||
#include "zebra_vxlan_private.h"
|
#include "zebra_vxlan_private.h"
|
||||||
#include "zebra_nhg.h"
|
#include "zebra_nhg.h"
|
||||||
|
#include "zebra_nb.h"
|
||||||
|
|
||||||
#define EVPN_MH_VTY_STR "Multihoming\n"
|
#define EVPN_MH_VTY_STR "Multihoming\n"
|
||||||
|
|
||||||
|
@ -337,7 +338,6 @@ extern bool zebra_evpn_es_mac_ref_entry(struct zebra_mac *mac,
|
||||||
extern bool zebra_evpn_es_mac_ref(struct zebra_mac *mac, const esi_t *esi);
|
extern bool zebra_evpn_es_mac_ref(struct zebra_mac *mac, const esi_t *esi);
|
||||||
extern struct zebra_evpn_es *zebra_evpn_es_find(const esi_t *esi);
|
extern struct zebra_evpn_es *zebra_evpn_es_find(const esi_t *esi);
|
||||||
extern void zebra_evpn_interface_init(void);
|
extern void zebra_evpn_interface_init(void);
|
||||||
extern int zebra_evpn_mh_if_write(struct vty *vty, struct interface *ifp);
|
|
||||||
extern void zebra_evpn_acc_vl_show(struct vty *vty, bool uj);
|
extern void zebra_evpn_acc_vl_show(struct vty *vty, bool uj);
|
||||||
extern void zebra_evpn_acc_vl_show_detail(struct vty *vty, bool uj);
|
extern void zebra_evpn_acc_vl_show_detail(struct vty *vty, bool uj);
|
||||||
extern void zebra_evpn_if_es_print(struct vty *vty, json_object *json,
|
extern void zebra_evpn_if_es_print(struct vty *vty, json_object *json,
|
||||||
|
|
|
@ -99,6 +99,7 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-zebra:zebra/ptm-enable",
|
.xpath = "/frr-zebra:zebra/ptm-enable",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = zebra_ptm_enable_modify,
|
.modify = zebra_ptm_enable_modify,
|
||||||
|
.cli_show = zebra_ptm_enable_cli_write,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
|
@ -316,6 +317,7 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv4-addrs",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv4-addrs",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.create = lib_interface_zebra_ipv4_addrs_create,
|
.create = lib_interface_zebra_ipv4_addrs_create,
|
||||||
|
.cli_show = lib_interface_zebra_ipv4_addrs_cli_write,
|
||||||
.destroy = lib_interface_zebra_ipv4_addrs_destroy,
|
.destroy = lib_interface_zebra_ipv4_addrs_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -330,6 +332,7 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv4-p2p-addrs",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv4-p2p-addrs",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.create = lib_interface_zebra_ipv4_p2p_addrs_create,
|
.create = lib_interface_zebra_ipv4_p2p_addrs_create,
|
||||||
|
.cli_show = lib_interface_zebra_ipv4_p2p_addrs_cli_write,
|
||||||
.destroy = lib_interface_zebra_ipv4_p2p_addrs_destroy,
|
.destroy = lib_interface_zebra_ipv4_p2p_addrs_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -344,6 +347,7 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-addrs",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-addrs",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.create = lib_interface_zebra_ipv6_addrs_create,
|
.create = lib_interface_zebra_ipv6_addrs_create,
|
||||||
|
.cli_show = lib_interface_zebra_ipv6_addrs_cli_write,
|
||||||
.destroy = lib_interface_zebra_ipv6_addrs_destroy,
|
.destroy = lib_interface_zebra_ipv6_addrs_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -351,6 +355,7 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/multicast",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/multicast",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_multicast_modify,
|
.modify = lib_interface_zebra_multicast_modify,
|
||||||
|
.cli_show = lib_interface_zebra_multicast_cli_write,
|
||||||
.destroy = lib_interface_zebra_multicast_destroy,
|
.destroy = lib_interface_zebra_multicast_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -358,12 +363,14 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-detect",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-detect",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_link_detect_modify,
|
.modify = lib_interface_zebra_link_detect_modify,
|
||||||
|
.cli_show = lib_interface_zebra_link_detect_cli_write,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/enabled",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/enabled",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_enabled_modify,
|
.modify = lib_interface_zebra_enabled_modify,
|
||||||
|
.cli_show = lib_interface_zebra_enabled_cli_write,
|
||||||
.destroy = lib_interface_zebra_enabled_destroy,
|
.destroy = lib_interface_zebra_enabled_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -371,6 +378,7 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/bandwidth",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/bandwidth",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_bandwidth_modify,
|
.modify = lib_interface_zebra_bandwidth_modify,
|
||||||
|
.cli_show = lib_interface_zebra_bandwidth_cli_write,
|
||||||
.destroy = lib_interface_zebra_bandwidth_destroy,
|
.destroy = lib_interface_zebra_bandwidth_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -378,6 +386,7 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/mpls",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/mpls",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_mpls_modify,
|
.modify = lib_interface_zebra_mpls_modify,
|
||||||
|
.cli_show = lib_interface_zebra_mpls_cli_write,
|
||||||
.destroy = lib_interface_zebra_mpls_destroy,
|
.destroy = lib_interface_zebra_mpls_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -386,12 +395,15 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.create = lib_interface_zebra_link_params_create,
|
.create = lib_interface_zebra_link_params_create,
|
||||||
.destroy = lib_interface_zebra_link_params_destroy,
|
.destroy = lib_interface_zebra_link_params_destroy,
|
||||||
|
.cli_show = lib_interface_zebra_link_params_cli_write,
|
||||||
|
.cli_show_end = lib_interface_zebra_link_params_cli_write_end,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/metric",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/metric",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_link_params_metric_modify,
|
.modify = lib_interface_zebra_link_params_metric_modify,
|
||||||
|
.cli_show = lib_interface_zebra_link_params_metric_cli_write,
|
||||||
.destroy = lib_interface_zebra_link_params_metric_destroy,
|
.destroy = lib_interface_zebra_link_params_metric_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -399,6 +411,7 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/max-bandwidth",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/max-bandwidth",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_link_params_max_bandwidth_modify,
|
.modify = lib_interface_zebra_link_params_max_bandwidth_modify,
|
||||||
|
.cli_show = lib_interface_zebra_link_params_max_bandwidth_cli_write,
|
||||||
.destroy = lib_interface_zebra_link_params_max_bandwidth_destroy,
|
.destroy = lib_interface_zebra_link_params_max_bandwidth_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -406,6 +419,7 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/max-reservable-bandwidth",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/max-reservable-bandwidth",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_link_params_max_reservable_bandwidth_modify,
|
.modify = lib_interface_zebra_link_params_max_reservable_bandwidth_modify,
|
||||||
|
.cli_show = lib_interface_zebra_link_params_max_reservable_bandwidth_cli_write,
|
||||||
.destroy = lib_interface_zebra_link_params_max_reservable_bandwidth_destroy,
|
.destroy = lib_interface_zebra_link_params_max_reservable_bandwidth_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -413,6 +427,7 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/unreserved-bandwidths/unreserved-bandwidth",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/unreserved-bandwidths/unreserved-bandwidth",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.create = lib_interface_zebra_link_params_unreserved_bandwidths_unreserved_bandwidth_create,
|
.create = lib_interface_zebra_link_params_unreserved_bandwidths_unreserved_bandwidth_create,
|
||||||
|
.cli_show = lib_interface_zebra_link_params_unreserved_bandwidths_unreserved_bandwidth_cli_write,
|
||||||
.destroy = lib_interface_zebra_link_params_unreserved_bandwidths_unreserved_bandwidth_destroy,
|
.destroy = lib_interface_zebra_link_params_unreserved_bandwidths_unreserved_bandwidth_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -426,6 +441,7 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/residual-bandwidth",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/residual-bandwidth",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_link_params_residual_bandwidth_modify,
|
.modify = lib_interface_zebra_link_params_residual_bandwidth_modify,
|
||||||
|
.cli_show = lib_interface_zebra_link_params_residual_bandwidth_cli_write,
|
||||||
.destroy = lib_interface_zebra_link_params_residual_bandwidth_destroy,
|
.destroy = lib_interface_zebra_link_params_residual_bandwidth_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -433,6 +449,7 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/available-bandwidth",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/available-bandwidth",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_link_params_available_bandwidth_modify,
|
.modify = lib_interface_zebra_link_params_available_bandwidth_modify,
|
||||||
|
.cli_show = lib_interface_zebra_link_params_available_bandwidth_cli_write,
|
||||||
.destroy = lib_interface_zebra_link_params_available_bandwidth_destroy,
|
.destroy = lib_interface_zebra_link_params_available_bandwidth_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -440,6 +457,7 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/utilized-bandwidth",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/utilized-bandwidth",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_link_params_utilized_bandwidth_modify,
|
.modify = lib_interface_zebra_link_params_utilized_bandwidth_modify,
|
||||||
|
.cli_show = lib_interface_zebra_link_params_utilized_bandwidth_cli_write,
|
||||||
.destroy = lib_interface_zebra_link_params_utilized_bandwidth_destroy,
|
.destroy = lib_interface_zebra_link_params_utilized_bandwidth_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -475,6 +493,7 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/neighbor",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/neighbor",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.create = lib_interface_zebra_link_params_neighbor_create,
|
.create = lib_interface_zebra_link_params_neighbor_create,
|
||||||
|
.cli_show = lib_interface_zebra_link_params_neighbor_cli_write,
|
||||||
.destroy = lib_interface_zebra_link_params_neighbor_destroy,
|
.destroy = lib_interface_zebra_link_params_neighbor_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -494,6 +513,7 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/delay",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/delay",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_link_params_delay_modify,
|
.modify = lib_interface_zebra_link_params_delay_modify,
|
||||||
|
.cli_show = lib_interface_zebra_link_params_delay_cli_write,
|
||||||
.destroy = lib_interface_zebra_link_params_delay_destroy,
|
.destroy = lib_interface_zebra_link_params_delay_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -520,6 +540,7 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/delay-variation",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/delay-variation",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_link_params_delay_variation_modify,
|
.modify = lib_interface_zebra_link_params_delay_variation_modify,
|
||||||
|
.cli_show = lib_interface_zebra_link_params_delay_variation_cli_write,
|
||||||
.destroy = lib_interface_zebra_link_params_delay_variation_destroy,
|
.destroy = lib_interface_zebra_link_params_delay_variation_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -527,6 +548,7 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/packet-loss",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/link-params/packet-loss",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_link_params_packet_loss_modify,
|
.modify = lib_interface_zebra_link_params_packet_loss_modify,
|
||||||
|
.cli_show = lib_interface_zebra_link_params_packet_loss_cli_write,
|
||||||
.destroy = lib_interface_zebra_link_params_packet_loss_destroy,
|
.destroy = lib_interface_zebra_link_params_packet_loss_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -534,6 +556,7 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/evpn-mh/type-0/esi",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/evpn-mh/type-0/esi",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_evpn_mh_type_0_esi_modify,
|
.modify = lib_interface_zebra_evpn_mh_type_0_esi_modify,
|
||||||
|
.cli_show = lib_interface_zebra_evpn_mh_type_0_esi_cli_write,
|
||||||
.destroy = lib_interface_zebra_evpn_mh_type_0_esi_destroy,
|
.destroy = lib_interface_zebra_evpn_mh_type_0_esi_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -541,6 +564,7 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/evpn-mh/type-3/system-mac",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/evpn-mh/type-3/system-mac",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_evpn_mh_type_3_system_mac_modify,
|
.modify = lib_interface_zebra_evpn_mh_type_3_system_mac_modify,
|
||||||
|
.cli_show = lib_interface_zebra_evpn_mh_type_3_system_mac_cli_write,
|
||||||
.destroy = lib_interface_zebra_evpn_mh_type_3_system_mac_destroy,
|
.destroy = lib_interface_zebra_evpn_mh_type_3_system_mac_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -548,6 +572,7 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/evpn-mh/type-3/local-discriminator",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/evpn-mh/type-3/local-discriminator",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_evpn_mh_type_3_local_discriminator_modify,
|
.modify = lib_interface_zebra_evpn_mh_type_3_local_discriminator_modify,
|
||||||
|
.cli_show = lib_interface_zebra_evpn_mh_type_3_local_discriminator_cli_write,
|
||||||
.destroy = lib_interface_zebra_evpn_mh_type_3_local_discriminator_destroy,
|
.destroy = lib_interface_zebra_evpn_mh_type_3_local_discriminator_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -555,18 +580,21 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/evpn-mh/df-preference",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/evpn-mh/df-preference",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_evpn_mh_df_preference_modify,
|
.modify = lib_interface_zebra_evpn_mh_df_preference_modify,
|
||||||
|
.cli_show = lib_interface_zebra_evpn_mh_df_preference_cli_write,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/evpn-mh/bypass",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/evpn-mh/bypass",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_evpn_mh_bypass_modify,
|
.modify = lib_interface_zebra_evpn_mh_bypass_modify,
|
||||||
|
.cli_show = lib_interface_zebra_evpn_mh_bypass_cli_write,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/evpn-mh/uplink",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/evpn-mh/uplink",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_evpn_mh_uplink_modify,
|
.modify = lib_interface_zebra_evpn_mh_uplink_modify,
|
||||||
|
.cli_show = lib_interface_zebra_evpn_mh_uplink_cli_write,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
#if defined(HAVE_RTADV)
|
#if defined(HAVE_RTADV)
|
||||||
|
@ -574,54 +602,63 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/send-advertisements",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/send-advertisements",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_ipv6_router_advertisements_send_advertisements_modify,
|
.modify = lib_interface_zebra_ipv6_router_advertisements_send_advertisements_modify,
|
||||||
|
.cli_show = lib_interface_zebra_ipv6_router_advertisements_send_advertisements_cli_write,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/max-rtr-adv-interval",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/max-rtr-adv-interval",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_ipv6_router_advertisements_max_rtr_adv_interval_modify,
|
.modify = lib_interface_zebra_ipv6_router_advertisements_max_rtr_adv_interval_modify,
|
||||||
|
.cli_show = lib_interface_zebra_ipv6_router_advertisements_max_rtr_adv_interval_cli_write,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/managed-flag",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/managed-flag",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_ipv6_router_advertisements_managed_flag_modify,
|
.modify = lib_interface_zebra_ipv6_router_advertisements_managed_flag_modify,
|
||||||
|
.cli_show = lib_interface_zebra_ipv6_router_advertisements_managed_flag_cli_write,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/other-config-flag",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/other-config-flag",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_ipv6_router_advertisements_other_config_flag_modify,
|
.modify = lib_interface_zebra_ipv6_router_advertisements_other_config_flag_modify,
|
||||||
|
.cli_show = lib_interface_zebra_ipv6_router_advertisements_other_config_flag_cli_write,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/home-agent-flag",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/home-agent-flag",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_ipv6_router_advertisements_home_agent_flag_modify,
|
.modify = lib_interface_zebra_ipv6_router_advertisements_home_agent_flag_modify,
|
||||||
|
.cli_show = lib_interface_zebra_ipv6_router_advertisements_home_agent_flag_cli_write,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/link-mtu",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/link-mtu",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_ipv6_router_advertisements_link_mtu_modify,
|
.modify = lib_interface_zebra_ipv6_router_advertisements_link_mtu_modify,
|
||||||
|
.cli_show = lib_interface_zebra_ipv6_router_advertisements_link_mtu_cli_write,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/reachable-time",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/reachable-time",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_ipv6_router_advertisements_reachable_time_modify,
|
.modify = lib_interface_zebra_ipv6_router_advertisements_reachable_time_modify,
|
||||||
|
.cli_show = lib_interface_zebra_ipv6_router_advertisements_reachable_time_cli_write,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/retrans-timer",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/retrans-timer",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_ipv6_router_advertisements_retrans_timer_modify,
|
.modify = lib_interface_zebra_ipv6_router_advertisements_retrans_timer_modify,
|
||||||
|
.cli_show = lib_interface_zebra_ipv6_router_advertisements_retrans_timer_cli_write,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/cur-hop-limit",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/cur-hop-limit",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_ipv6_router_advertisements_cur_hop_limit_modify,
|
.modify = lib_interface_zebra_ipv6_router_advertisements_cur_hop_limit_modify,
|
||||||
|
.cli_show = lib_interface_zebra_ipv6_router_advertisements_cur_hop_limit_cli_write,
|
||||||
.destroy = lib_interface_zebra_ipv6_router_advertisements_cur_hop_limit_destroy,
|
.destroy = lib_interface_zebra_ipv6_router_advertisements_cur_hop_limit_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -629,6 +666,7 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/default-lifetime",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/default-lifetime",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_ipv6_router_advertisements_default_lifetime_modify,
|
.modify = lib_interface_zebra_ipv6_router_advertisements_default_lifetime_modify,
|
||||||
|
.cli_show = lib_interface_zebra_ipv6_router_advertisements_default_lifetime_cli_write,
|
||||||
.destroy = lib_interface_zebra_ipv6_router_advertisements_default_lifetime_destroy,
|
.destroy = lib_interface_zebra_ipv6_router_advertisements_default_lifetime_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -636,18 +674,21 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/fast-retransmit",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/fast-retransmit",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_ipv6_router_advertisements_fast_retransmit_modify,
|
.modify = lib_interface_zebra_ipv6_router_advertisements_fast_retransmit_modify,
|
||||||
|
.cli_show = lib_interface_zebra_ipv6_router_advertisements_fast_retransmit_cli_write,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/advertisement-interval-option",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/advertisement-interval-option",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_ipv6_router_advertisements_advertisement_interval_option_modify,
|
.modify = lib_interface_zebra_ipv6_router_advertisements_advertisement_interval_option_modify,
|
||||||
|
.cli_show = lib_interface_zebra_ipv6_router_advertisements_advertisement_interval_option_cli_write,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/home-agent-preference",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/home-agent-preference",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_ipv6_router_advertisements_home_agent_preference_modify,
|
.modify = lib_interface_zebra_ipv6_router_advertisements_home_agent_preference_modify,
|
||||||
|
.cli_show = lib_interface_zebra_ipv6_router_advertisements_home_agent_preference_cli_write,
|
||||||
.destroy = lib_interface_zebra_ipv6_router_advertisements_home_agent_preference_destroy,
|
.destroy = lib_interface_zebra_ipv6_router_advertisements_home_agent_preference_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -655,6 +696,7 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/home-agent-lifetime",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/home-agent-lifetime",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_ipv6_router_advertisements_home_agent_lifetime_modify,
|
.modify = lib_interface_zebra_ipv6_router_advertisements_home_agent_lifetime_modify,
|
||||||
|
.cli_show = lib_interface_zebra_ipv6_router_advertisements_home_agent_lifetime_cli_write,
|
||||||
.destroy = lib_interface_zebra_ipv6_router_advertisements_home_agent_lifetime_destroy,
|
.destroy = lib_interface_zebra_ipv6_router_advertisements_home_agent_lifetime_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -662,12 +704,14 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/default-router-preference",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/default-router-preference",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_ipv6_router_advertisements_default_router_preference_modify,
|
.modify = lib_interface_zebra_ipv6_router_advertisements_default_router_preference_modify,
|
||||||
|
.cli_show = lib_interface_zebra_ipv6_router_advertisements_default_router_preference_cli_write,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/prefix-list/prefix",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/prefix-list/prefix",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.create = lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_create,
|
.create = lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_create,
|
||||||
|
.cli_show = lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_cli_write,
|
||||||
.destroy = lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_destroy,
|
.destroy = lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -675,6 +719,7 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/dnssl/dnssl-domain",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/dnssl/dnssl-domain",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.create = lib_interface_zebra_ipv6_router_advertisements_dnssl_dnssl_domain_create,
|
.create = lib_interface_zebra_ipv6_router_advertisements_dnssl_dnssl_domain_create,
|
||||||
|
.cli_show = lib_interface_zebra_ipv6_router_advertisements_dnssl_dnssl_domain_cli_write,
|
||||||
.destroy = lib_interface_zebra_ipv6_router_advertisements_dnssl_dnssl_domain_destroy,
|
.destroy = lib_interface_zebra_ipv6_router_advertisements_dnssl_dnssl_domain_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -719,6 +764,7 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/rdnss/rdnss-address",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/rdnss/rdnss-address",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.create = lib_interface_zebra_ipv6_router_advertisements_rdnss_rdnss_address_create,
|
.create = lib_interface_zebra_ipv6_router_advertisements_rdnss_rdnss_address_create,
|
||||||
|
.cli_show = lib_interface_zebra_ipv6_router_advertisements_rdnss_rdnss_address_cli_write,
|
||||||
.destroy = lib_interface_zebra_ipv6_router_advertisements_rdnss_rdnss_address_destroy,
|
.destroy = lib_interface_zebra_ipv6_router_advertisements_rdnss_rdnss_address_destroy,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -735,6 +781,7 @@ const struct frr_yang_module_info frr_zebra_info = {
|
||||||
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ptm-enable",
|
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ptm-enable",
|
||||||
.cbs = {
|
.cbs = {
|
||||||
.modify = lib_interface_zebra_ptm_enable_modify,
|
.modify = lib_interface_zebra_ptm_enable_modify,
|
||||||
|
.cli_show = lib_interface_zebra_ptm_enable_cli_write,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
|
|
143
zebra/zebra_nb.h
143
zebra/zebra_nb.h
|
@ -46,6 +46,8 @@ int zebra_allow_external_route_update_destroy(struct nb_cb_destroy_args *args);
|
||||||
int zebra_dplane_queue_limit_modify(struct nb_cb_modify_args *args);
|
int zebra_dplane_queue_limit_modify(struct nb_cb_modify_args *args);
|
||||||
#if HAVE_BFDD == 0
|
#if HAVE_BFDD == 0
|
||||||
int zebra_ptm_enable_modify(struct nb_cb_modify_args *args);
|
int zebra_ptm_enable_modify(struct nb_cb_modify_args *args);
|
||||||
|
void zebra_ptm_enable_cli_write(struct vty *vty, const struct lyd_node *dnode,
|
||||||
|
bool show_defaults);
|
||||||
#endif
|
#endif
|
||||||
int zebra_debugs_debug_events_modify(struct nb_cb_modify_args *args);
|
int zebra_debugs_debug_events_modify(struct nb_cb_modify_args *args);
|
||||||
int zebra_debugs_debug_events_destroy(struct nb_cb_destroy_args *args);
|
int zebra_debugs_debug_events_destroy(struct nb_cb_destroy_args *args);
|
||||||
|
@ -84,178 +86,319 @@ int zebra_debugs_debug_dplane_detail_destroy(struct nb_cb_destroy_args *args);
|
||||||
int zebra_debugs_debug_mlag_modify(struct nb_cb_modify_args *args);
|
int zebra_debugs_debug_mlag_modify(struct nb_cb_modify_args *args);
|
||||||
int zebra_debugs_debug_mlag_destroy(struct nb_cb_destroy_args *args);
|
int zebra_debugs_debug_mlag_destroy(struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_ipv4_addrs_create(struct nb_cb_create_args *args);
|
int lib_interface_zebra_ipv4_addrs_create(struct nb_cb_create_args *args);
|
||||||
|
void lib_interface_zebra_ipv4_addrs_cli_write(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode,
|
||||||
|
bool show_defaults);
|
||||||
int lib_interface_zebra_ipv4_addrs_destroy(struct nb_cb_destroy_args *args);
|
int lib_interface_zebra_ipv4_addrs_destroy(struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_ipv4_addrs_label_modify(struct nb_cb_modify_args *args);
|
int lib_interface_zebra_ipv4_addrs_label_modify(struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_ipv4_addrs_label_cli_write(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode,
|
||||||
|
bool show_defaults);
|
||||||
int lib_interface_zebra_ipv4_addrs_label_destroy(struct nb_cb_destroy_args *args);
|
int lib_interface_zebra_ipv4_addrs_label_destroy(struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_ipv4_p2p_addrs_create(struct nb_cb_create_args *args);
|
int lib_interface_zebra_ipv4_p2p_addrs_create(struct nb_cb_create_args *args);
|
||||||
|
void lib_interface_zebra_ipv4_p2p_addrs_cli_write(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode,
|
||||||
|
bool show_defaults);
|
||||||
int lib_interface_zebra_ipv4_p2p_addrs_destroy(struct nb_cb_destroy_args *args);
|
int lib_interface_zebra_ipv4_p2p_addrs_destroy(struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_ipv4_p2p_addrs_label_modify(
|
int lib_interface_zebra_ipv4_p2p_addrs_label_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_ipv4_p2p_addrs_label_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv4_p2p_addrs_label_destroy(
|
int lib_interface_zebra_ipv4_p2p_addrs_label_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_ipv6_addrs_create(struct nb_cb_create_args *args);
|
int lib_interface_zebra_ipv6_addrs_create(struct nb_cb_create_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_addrs_cli_write(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode,
|
||||||
|
bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_addrs_destroy(struct nb_cb_destroy_args *args);
|
int lib_interface_zebra_ipv6_addrs_destroy(struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_multicast_modify(struct nb_cb_modify_args *args);
|
int lib_interface_zebra_multicast_modify(struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_multicast_cli_write(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode,
|
||||||
|
bool show_defaults);
|
||||||
int lib_interface_zebra_multicast_destroy(struct nb_cb_destroy_args *args);
|
int lib_interface_zebra_multicast_destroy(struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_link_detect_modify(struct nb_cb_modify_args *args);
|
int lib_interface_zebra_link_detect_modify(struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_link_detect_cli_write(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode,
|
||||||
|
bool show_defaults);
|
||||||
int lib_interface_zebra_enabled_modify(struct nb_cb_modify_args *args);
|
int lib_interface_zebra_enabled_modify(struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_enabled_cli_write(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode,
|
||||||
|
bool show_defaults);
|
||||||
int lib_interface_zebra_enabled_destroy(struct nb_cb_destroy_args *args);
|
int lib_interface_zebra_enabled_destroy(struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_bandwidth_modify(struct nb_cb_modify_args *args);
|
int lib_interface_zebra_bandwidth_modify(struct nb_cb_modify_args *args);
|
||||||
int lib_interface_zebra_bandwidth_destroy(struct nb_cb_destroy_args *args);
|
int lib_interface_zebra_bandwidth_destroy(struct nb_cb_destroy_args *args);
|
||||||
|
void lib_interface_zebra_bandwidth_cli_write(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode,
|
||||||
|
bool show_defaults);
|
||||||
int lib_interface_zebra_mpls_modify(struct nb_cb_modify_args *args);
|
int lib_interface_zebra_mpls_modify(struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_mpls_cli_write(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode,
|
||||||
|
bool show_defaults);
|
||||||
int lib_interface_zebra_mpls_destroy(struct nb_cb_destroy_args *args);
|
int lib_interface_zebra_mpls_destroy(struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_link_params_create(struct nb_cb_create_args *args);
|
int lib_interface_zebra_link_params_create(struct nb_cb_create_args *args);
|
||||||
|
void lib_interface_zebra_link_params_cli_write(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode,
|
||||||
|
bool show_defaults);
|
||||||
|
void lib_interface_zebra_link_params_cli_write_end(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode);
|
||||||
int lib_interface_zebra_link_params_destroy(struct nb_cb_destroy_args *args);
|
int lib_interface_zebra_link_params_destroy(struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_link_params_metric_modify(struct nb_cb_modify_args *args);
|
int lib_interface_zebra_link_params_metric_modify(struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_link_params_metric_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_link_params_metric_destroy(
|
int lib_interface_zebra_link_params_metric_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_link_params_max_bandwidth_modify(
|
int lib_interface_zebra_link_params_max_bandwidth_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_link_params_max_bandwidth_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_link_params_max_bandwidth_destroy(
|
int lib_interface_zebra_link_params_max_bandwidth_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_link_params_max_reservable_bandwidth_modify(
|
int lib_interface_zebra_link_params_max_reservable_bandwidth_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_link_params_max_reservable_bandwidth_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_link_params_max_reservable_bandwidth_destroy(
|
int lib_interface_zebra_link_params_max_reservable_bandwidth_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_link_params_unreserved_bandwidths_unreserved_bandwidth_create(
|
int lib_interface_zebra_link_params_unreserved_bandwidths_unreserved_bandwidth_create(
|
||||||
struct nb_cb_create_args *args);
|
struct nb_cb_create_args *args);
|
||||||
|
void lib_interface_zebra_link_params_unreserved_bandwidths_unreserved_bandwidth_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_link_params_unreserved_bandwidths_unreserved_bandwidth_destroy(
|
int lib_interface_zebra_link_params_unreserved_bandwidths_unreserved_bandwidth_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_link_params_unreserved_bandwidths_unreserved_bandwidth_unreserved_bandwidth_modify(
|
int lib_interface_zebra_link_params_unreserved_bandwidths_unreserved_bandwidth_unreserved_bandwidth_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_link_params_unreserved_bandwidths_unreserved_bandwidth_unreserved_bandwidth_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_link_params_residual_bandwidth_modify(
|
int lib_interface_zebra_link_params_residual_bandwidth_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_link_params_residual_bandwidth_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_link_params_residual_bandwidth_destroy(
|
int lib_interface_zebra_link_params_residual_bandwidth_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_link_params_available_bandwidth_modify(
|
int lib_interface_zebra_link_params_available_bandwidth_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_link_params_available_bandwidth_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_link_params_available_bandwidth_destroy(
|
int lib_interface_zebra_link_params_available_bandwidth_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_link_params_utilized_bandwidth_modify(
|
int lib_interface_zebra_link_params_utilized_bandwidth_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_link_params_utilized_bandwidth_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_link_params_utilized_bandwidth_destroy(
|
int lib_interface_zebra_link_params_utilized_bandwidth_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_legacy_admin_group_modify(
|
int lib_interface_zebra_legacy_admin_group_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_link_params_legacy_admin_group_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_legacy_admin_group_destroy(
|
int lib_interface_zebra_legacy_admin_group_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_affinity_create(struct nb_cb_create_args *args);
|
int lib_interface_zebra_affinity_create(struct nb_cb_create_args *args);
|
||||||
|
void lib_interface_zebra_link_params_affinities_affinity_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_affinity_destroy(struct nb_cb_destroy_args *args);
|
int lib_interface_zebra_affinity_destroy(struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_affinity_mode_modify(struct nb_cb_modify_args *args);
|
int lib_interface_zebra_affinity_mode_modify(struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_link_params_affinity_mode_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_link_params_neighbor_create(
|
int lib_interface_zebra_link_params_neighbor_create(
|
||||||
struct nb_cb_create_args *args);
|
struct nb_cb_create_args *args);
|
||||||
|
void lib_interface_zebra_link_params_neighbor_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_link_params_neighbor_destroy(
|
int lib_interface_zebra_link_params_neighbor_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_link_params_neighbor_remote_as_modify(
|
int lib_interface_zebra_link_params_neighbor_remote_as_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_link_params_neighbor_remote_as_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_link_params_neighbor_ipv4_remote_id_modify(
|
int lib_interface_zebra_link_params_neighbor_ipv4_remote_id_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_link_params_neighbor_ipv4_remote_id_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_link_params_delay_modify(struct nb_cb_modify_args *args);
|
int lib_interface_zebra_link_params_delay_modify(struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_link_params_delay_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_link_params_delay_destroy(
|
int lib_interface_zebra_link_params_delay_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_link_params_min_max_delay_create(
|
int lib_interface_zebra_link_params_min_max_delay_create(
|
||||||
struct nb_cb_create_args *args);
|
struct nb_cb_create_args *args);
|
||||||
|
void lib_interface_zebra_link_params_min_max_delay_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_link_params_min_max_delay_destroy(
|
int lib_interface_zebra_link_params_min_max_delay_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_link_params_min_max_delay_delay_min_modify(
|
int lib_interface_zebra_link_params_min_max_delay_delay_min_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_link_params_min_max_delay_delay_min_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_link_params_min_max_delay_delay_max_modify(
|
int lib_interface_zebra_link_params_min_max_delay_delay_max_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_link_params_min_max_delay_delay_max_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_link_params_delay_variation_modify(
|
int lib_interface_zebra_link_params_delay_variation_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_link_params_delay_variation_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_link_params_delay_variation_destroy(
|
int lib_interface_zebra_link_params_delay_variation_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_link_params_packet_loss_modify(
|
int lib_interface_zebra_link_params_packet_loss_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_link_params_packet_loss_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_link_params_packet_loss_destroy(
|
int lib_interface_zebra_link_params_packet_loss_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_evpn_mh_type_0_esi_modify(struct nb_cb_modify_args *args);
|
int lib_interface_zebra_evpn_mh_type_0_esi_modify(struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_evpn_mh_type_0_esi_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_evpn_mh_type_0_esi_destroy(
|
int lib_interface_zebra_evpn_mh_type_0_esi_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_evpn_mh_type_3_system_mac_modify(
|
int lib_interface_zebra_evpn_mh_type_3_system_mac_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_evpn_mh_type_3_system_mac_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_evpn_mh_type_3_system_mac_destroy(
|
int lib_interface_zebra_evpn_mh_type_3_system_mac_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_evpn_mh_type_3_local_discriminator_modify(
|
int lib_interface_zebra_evpn_mh_type_3_local_discriminator_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_evpn_mh_type_3_local_discriminator_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_evpn_mh_type_3_local_discriminator_destroy(
|
int lib_interface_zebra_evpn_mh_type_3_local_discriminator_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_evpn_mh_df_preference_modify(
|
int lib_interface_zebra_evpn_mh_df_preference_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_evpn_mh_df_preference_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_evpn_mh_bypass_modify(struct nb_cb_modify_args *args);
|
int lib_interface_zebra_evpn_mh_bypass_modify(struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_evpn_mh_bypass_cli_write(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode,
|
||||||
|
bool show_defaults);
|
||||||
int lib_interface_zebra_evpn_mh_uplink_modify(struct nb_cb_modify_args *args);
|
int lib_interface_zebra_evpn_mh_uplink_modify(struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_evpn_mh_uplink_cli_write(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode,
|
||||||
|
bool show_defaults);
|
||||||
#if defined(HAVE_RTADV)
|
#if defined(HAVE_RTADV)
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_send_advertisements_modify(
|
int lib_interface_zebra_ipv6_router_advertisements_send_advertisements_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_send_advertisements_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_max_rtr_adv_interval_modify(
|
int lib_interface_zebra_ipv6_router_advertisements_max_rtr_adv_interval_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_max_rtr_adv_interval_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_managed_flag_modify(
|
int lib_interface_zebra_ipv6_router_advertisements_managed_flag_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_managed_flag_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_other_config_flag_modify(
|
int lib_interface_zebra_ipv6_router_advertisements_other_config_flag_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_other_config_flag_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_home_agent_flag_modify(
|
int lib_interface_zebra_ipv6_router_advertisements_home_agent_flag_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_home_agent_flag_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_link_mtu_modify(
|
int lib_interface_zebra_ipv6_router_advertisements_link_mtu_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_link_mtu_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_reachable_time_modify(
|
int lib_interface_zebra_ipv6_router_advertisements_reachable_time_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_reachable_time_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_retrans_timer_modify(
|
int lib_interface_zebra_ipv6_router_advertisements_retrans_timer_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_retrans_timer_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_cur_hop_limit_modify(
|
int lib_interface_zebra_ipv6_router_advertisements_cur_hop_limit_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_cur_hop_limit_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_cur_hop_limit_destroy(
|
int lib_interface_zebra_ipv6_router_advertisements_cur_hop_limit_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_default_lifetime_modify(
|
int lib_interface_zebra_ipv6_router_advertisements_default_lifetime_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_default_lifetime_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_default_lifetime_destroy(
|
int lib_interface_zebra_ipv6_router_advertisements_default_lifetime_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_fast_retransmit_modify(
|
int lib_interface_zebra_ipv6_router_advertisements_fast_retransmit_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_fast_retransmit_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_advertisement_interval_option_modify(
|
int lib_interface_zebra_ipv6_router_advertisements_advertisement_interval_option_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_advertisement_interval_option_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_home_agent_preference_modify(
|
int lib_interface_zebra_ipv6_router_advertisements_home_agent_preference_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_home_agent_preference_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_home_agent_preference_destroy(
|
int lib_interface_zebra_ipv6_router_advertisements_home_agent_preference_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_home_agent_lifetime_modify(
|
int lib_interface_zebra_ipv6_router_advertisements_home_agent_lifetime_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_home_agent_lifetime_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_home_agent_lifetime_destroy(
|
int lib_interface_zebra_ipv6_router_advertisements_home_agent_lifetime_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_default_router_preference_modify(
|
int lib_interface_zebra_ipv6_router_advertisements_default_router_preference_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_default_router_preference_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_create(
|
int lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_create(
|
||||||
struct nb_cb_create_args *args);
|
struct nb_cb_create_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_destroy(
|
int lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_valid_lifetime_modify(
|
int lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_valid_lifetime_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_valid_lifetime_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_on_link_flag_modify(
|
int lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_on_link_flag_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_on_link_flag_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_preferred_lifetime_modify(
|
int lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_preferred_lifetime_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_preferred_lifetime_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_autonomous_flag_modify(
|
int lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_autonomous_flag_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_autonomous_flag_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_router_address_flag_modify(
|
int lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_router_address_flag_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_prefix_list_prefix_router_address_flag_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_rdnss_rdnss_address_create(
|
int lib_interface_zebra_ipv6_router_advertisements_rdnss_rdnss_address_create(
|
||||||
struct nb_cb_create_args *args);
|
struct nb_cb_create_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_rdnss_rdnss_address_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_rdnss_rdnss_address_destroy(
|
int lib_interface_zebra_ipv6_router_advertisements_rdnss_rdnss_address_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_rdnss_rdnss_address_lifetime_modify(
|
int lib_interface_zebra_ipv6_router_advertisements_rdnss_rdnss_address_lifetime_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_rdnss_rdnss_address_lifetime_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_rdnss_rdnss_address_lifetime_destroy(
|
int lib_interface_zebra_ipv6_router_advertisements_rdnss_rdnss_address_lifetime_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_dnssl_dnssl_domain_create(
|
int lib_interface_zebra_ipv6_router_advertisements_dnssl_dnssl_domain_create(
|
||||||
struct nb_cb_create_args *args);
|
struct nb_cb_create_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_dnssl_dnssl_domain_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_dnssl_dnssl_domain_destroy(
|
int lib_interface_zebra_ipv6_router_advertisements_dnssl_dnssl_domain_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_dnssl_dnssl_domain_lifetime_modify(
|
int lib_interface_zebra_ipv6_router_advertisements_dnssl_dnssl_domain_lifetime_modify(
|
||||||
struct nb_cb_modify_args *args);
|
struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_ipv6_router_advertisements_dnssl_dnssl_domain_lifetime_cli_write(
|
||||||
|
struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
|
||||||
int lib_interface_zebra_ipv6_router_advertisements_dnssl_dnssl_domain_lifetime_destroy(
|
int lib_interface_zebra_ipv6_router_advertisements_dnssl_dnssl_domain_lifetime_destroy(
|
||||||
struct nb_cb_destroy_args *args);
|
struct nb_cb_destroy_args *args);
|
||||||
#endif /* defined(HAVE_RTADV) */
|
#endif /* defined(HAVE_RTADV) */
|
||||||
#if HAVE_BFDD == 0
|
#if HAVE_BFDD == 0
|
||||||
int lib_interface_zebra_ptm_enable_modify(struct nb_cb_modify_args *args);
|
int lib_interface_zebra_ptm_enable_modify(struct nb_cb_modify_args *args);
|
||||||
|
void lib_interface_zebra_ptm_enable_cli_write(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode,
|
||||||
|
bool show_defaults);
|
||||||
#endif
|
#endif
|
||||||
struct yang_data *
|
struct yang_data *
|
||||||
lib_interface_zebra_state_up_count_get_elem(struct nb_cb_get_elem_args *args);
|
lib_interface_zebra_state_up_count_get_elem(struct nb_cb_get_elem_args *args);
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include "zebra/zebra_ptm_redistribute.h"
|
#include "zebra/zebra_ptm_redistribute.h"
|
||||||
#include "zebra/zebra_router.h"
|
#include "zebra/zebra_router.h"
|
||||||
#include "zebra_vrf.h"
|
#include "zebra_vrf.h"
|
||||||
|
#include "zebra_nb.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Choose the BFD implementation that we'll use.
|
* Choose the BFD implementation that we'll use.
|
||||||
|
@ -293,6 +294,17 @@ DEFUN_YANG (no_zebra_ptm_enable,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void zebra_ptm_enable_cli_write(struct vty *vty, const struct lyd_node *dnode,
|
||||||
|
bool show_defaults)
|
||||||
|
{
|
||||||
|
bool enable = yang_dnode_get_bool(dnode, NULL);
|
||||||
|
|
||||||
|
if (enable)
|
||||||
|
vty_out(vty, "ptm-enable\n");
|
||||||
|
else if (show_defaults)
|
||||||
|
vty_out(vty, "no ptm-enable\n");
|
||||||
|
}
|
||||||
|
|
||||||
void zebra_if_ptm_enable(struct interface *ifp)
|
void zebra_if_ptm_enable(struct interface *ifp)
|
||||||
{
|
{
|
||||||
struct zebra_if *if_data;
|
struct zebra_if *if_data;
|
||||||
|
@ -365,12 +377,26 @@ DEFUN_YANG (no_zebra_ptm_enable_if,
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lib_interface_zebra_ptm_enable_cli_write(struct vty *vty,
|
||||||
|
const struct lyd_node *dnode,
|
||||||
|
bool show_defaults)
|
||||||
|
{
|
||||||
|
bool enable = yang_dnode_get_bool(dnode, NULL);
|
||||||
|
|
||||||
|
if (!enable)
|
||||||
|
vty_out(vty, " no ptm-enable\n");
|
||||||
|
else if (show_defaults)
|
||||||
|
vty_out(vty, " ptm-enable\n");
|
||||||
|
}
|
||||||
|
|
||||||
void zebra_ptm_write(struct vty *vty)
|
void zebra_ptm_write(struct vty *vty)
|
||||||
{
|
{
|
||||||
if (ptm_cb.ptm_enable)
|
struct lyd_node *dnode;
|
||||||
vty_out(vty, "ptm-enable\n");
|
|
||||||
|
|
||||||
return;
|
dnode = yang_dnode_get(running_config->dnode,
|
||||||
|
"/frr-zebra:zebra/ptm-enable");
|
||||||
|
if (dnode)
|
||||||
|
nb_cli_show_dnode_cmds(vty, dnode, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int zebra_ptm_socket_init(void)
|
static int zebra_ptm_socket_init(void)
|
||||||
|
@ -1184,12 +1210,6 @@ void zebra_ptm_if_set_ptm_state(struct interface *ifp,
|
||||||
ifp->ptm_enable = zebra_ifp->ptm_enable;
|
ifp->ptm_enable = zebra_ifp->ptm_enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
void zebra_ptm_if_write(struct vty *vty, struct zebra_if *zebra_ifp)
|
|
||||||
{
|
|
||||||
if (zebra_ifp->ptm_enable == ZEBRA_IF_PTM_ENABLE_OFF)
|
|
||||||
vty_out(vty, " no ptm-enable\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
#else /* HAVE_BFDD */
|
#else /* HAVE_BFDD */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1557,11 +1577,6 @@ void zebra_ptm_write(struct vty *vty __attribute__((__unused__)))
|
||||||
/* NOTHING */
|
/* NOTHING */
|
||||||
}
|
}
|
||||||
|
|
||||||
void zebra_ptm_if_write(struct vty *vty __attribute__((__unused__)),
|
|
||||||
struct zebra_if *zifp __attribute__((__unused__)))
|
|
||||||
{
|
|
||||||
/* NOTHING */
|
|
||||||
}
|
|
||||||
void zebra_ptm_if_set_ptm_state(struct interface *i __attribute__((__unused__)),
|
void zebra_ptm_if_set_ptm_state(struct interface *i __attribute__((__unused__)),
|
||||||
struct zebra_if *zi __attribute__((__unused__)))
|
struct zebra_if *zi __attribute__((__unused__)))
|
||||||
{
|
{
|
||||||
|
|
|
@ -81,7 +81,6 @@ void zebra_ptm_show_status(struct vty *vty, json_object *json,
|
||||||
void zebra_ptm_if_init(struct zebra_if *zebra_ifp);
|
void zebra_ptm_if_init(struct zebra_if *zebra_ifp);
|
||||||
void zebra_ptm_if_set_ptm_state(struct interface *ifp,
|
void zebra_ptm_if_set_ptm_state(struct interface *ifp,
|
||||||
struct zebra_if *zebra_ifp);
|
struct zebra_if *zebra_ifp);
|
||||||
void zebra_ptm_if_write(struct vty *vty, struct zebra_if *zebra_ifp);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
#include "zebra/zebra_script.h"
|
#include "zebra/zebra_script.h"
|
||||||
#include "zebra/rtadv.h"
|
#include "zebra/rtadv.h"
|
||||||
#include "zebra/zebra_neigh.h"
|
#include "zebra/zebra_neigh.h"
|
||||||
|
#include "zebra/zebra_ptm.h"
|
||||||
|
|
||||||
/* context to manage dumps in multiple tables or vrfs */
|
/* context to manage dumps in multiple tables or vrfs */
|
||||||
struct route_show_ctx {
|
struct route_show_ctx {
|
||||||
|
@ -3971,6 +3972,8 @@ DEFPY (zebra_nexthop_group_keep,
|
||||||
|
|
||||||
static int config_write_protocol(struct vty *vty)
|
static int config_write_protocol(struct vty *vty)
|
||||||
{
|
{
|
||||||
|
zebra_ptm_write(vty);
|
||||||
|
|
||||||
if (zrouter.allow_delete)
|
if (zrouter.allow_delete)
|
||||||
vty_out(vty, "allow-external-route-update\n");
|
vty_out(vty, "allow-external-route-update\n");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue