}
void bfd_cli_show_header(struct vty *vty,
- struct lyd_node *dnode __attribute__((__unused__)),
+ const struct lyd_node *dnode
+ __attribute__((__unused__)),
bool show_defaults __attribute__((__unused__)))
{
vty_out(vty, "!\nbfd\n");
}
-void bfd_cli_show_header_end(struct vty *vty,
- struct lyd_node *dnode __attribute__((__unused__)))
+void bfd_cli_show_header_end(struct vty *vty, const struct lyd_node *dnode
+ __attribute__((__unused__)))
{
vty_out(vty, "exit\n");
vty_out(vty, "!\n");
return nb_cli_apply_changes(vty, NULL);
}
-static void _bfd_cli_show_peer(struct vty *vty, struct lyd_node *dnode,
+static void _bfd_cli_show_peer(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults __attribute__((__unused__)),
bool mhop)
{
vty_out(vty, "\n");
}
-void bfd_cli_show_single_hop_peer(struct vty *vty,
- struct lyd_node *dnode,
+void bfd_cli_show_single_hop_peer(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
_bfd_cli_show_peer(vty, dnode, show_defaults, false);
}
-void bfd_cli_show_multi_hop_peer(struct vty *vty,
- struct lyd_node *dnode,
- bool show_defaults)
+void bfd_cli_show_multi_hop_peer(struct vty *vty, const struct lyd_node *dnode,
+ bool show_defaults)
{
_bfd_cli_show_peer(vty, dnode, show_defaults, true);
}
-void bfd_cli_show_peer_end(struct vty *vty,
- struct lyd_node *dnode __attribute__((__unused__)))
+void bfd_cli_show_peer_end(struct vty *vty, const struct lyd_node *dnode
+ __attribute__((__unused__)))
{
vty_out(vty, " exit\n");
vty_out(vty, " !\n");
return nb_cli_apply_changes(vty, NULL);
}
-void bfd_cli_show_shutdown(struct vty *vty, struct lyd_node *dnode,
+void bfd_cli_show_shutdown(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " %sshutdown\n",
return nb_cli_apply_changes(vty, NULL);
}
-void bfd_cli_show_passive(struct vty *vty, struct lyd_node *dnode,
+void bfd_cli_show_passive(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " %spassive-mode\n",
return nb_cli_apply_changes(vty, NULL);
}
-void bfd_cli_show_minimum_ttl(struct vty *vty, struct lyd_node *dnode,
+void bfd_cli_show_minimum_ttl(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " minimum-ttl %s\n", yang_dnode_get_string(dnode, NULL));
return nb_cli_apply_changes(vty, NULL);
}
-void bfd_cli_show_mult(struct vty *vty, struct lyd_node *dnode,
+void bfd_cli_show_mult(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " detect-multiplier %s\n",
return nb_cli_apply_changes(vty, NULL);
}
-void bfd_cli_show_rx(struct vty *vty, struct lyd_node *dnode,
+void bfd_cli_show_rx(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
uint32_t value = yang_dnode_get_uint32(dnode, NULL);
return nb_cli_apply_changes(vty, NULL);
}
-void bfd_cli_show_tx(struct vty *vty, struct lyd_node *dnode,
+void bfd_cli_show_tx(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
uint32_t value = yang_dnode_get_uint32(dnode, NULL);
return nb_cli_apply_changes(vty, NULL);
}
-void bfd_cli_show_echo(struct vty *vty, struct lyd_node *dnode,
- bool show_defaults)
+void bfd_cli_show_echo(struct vty *vty, const struct lyd_node *dnode,
+ bool show_defaults)
{
vty_out(vty, " %secho-mode\n",
yang_dnode_get_bool(dnode, NULL) ? "" : "no ");
return nb_cli_apply_changes(vty, NULL);
}
-void bfd_cli_show_desired_echo_transmission_interval(struct vty *vty,
- struct lyd_node *dnode, bool show_defaults)
+void bfd_cli_show_desired_echo_transmission_interval(
+ struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
{
uint32_t value = yang_dnode_get_uint32(dnode, NULL);
}
void bfd_cli_show_required_echo_receive_interval(struct vty *vty,
- struct lyd_node *dnode, bool show_defaults)
+ const struct lyd_node *dnode,
+ bool show_defaults)
{
uint32_t value = yang_dnode_get_uint32(dnode, NULL);
return nb_cli_apply_changes(vty, NULL);
}
-void bfd_cli_show_profile(struct vty *vty, struct lyd_node *dnode,
+void bfd_cli_show_profile(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " profile %s\n", yang_dnode_get_string(dnode, "./name"));
return nb_cli_apply_changes(vty, NULL);
}
-void bfd_cli_peer_profile_show(struct vty *vty, struct lyd_node *dnode,
+void bfd_cli_peer_profile_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " profile %s\n", yang_dnode_get_string(dnode, NULL));
struct nb_cb_get_elem_args *args);
/* Optional 'cli_show' callbacks. */
-void bfd_cli_show_header(struct vty *vty, struct lyd_node *dnode,
+void bfd_cli_show_header(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void bfd_cli_show_header_end(struct vty *vty, struct lyd_node *dnode);
-void bfd_cli_show_single_hop_peer(struct vty *vty, struct lyd_node *dnode,
+void bfd_cli_show_header_end(struct vty *vty, const struct lyd_node *dnode);
+void bfd_cli_show_single_hop_peer(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void bfd_cli_show_multi_hop_peer(struct vty *vty, struct lyd_node *dnode,
+void bfd_cli_show_multi_hop_peer(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void bfd_cli_show_peer_end(struct vty *vty, struct lyd_node *dnode);
-void bfd_cli_show_mult(struct vty *vty, struct lyd_node *dnode,
+void bfd_cli_show_peer_end(struct vty *vty, const struct lyd_node *dnode);
+void bfd_cli_show_mult(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void bfd_cli_show_tx(struct vty *vty, struct lyd_node *dnode,
+void bfd_cli_show_tx(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void bfd_cli_show_rx(struct vty *vty, struct lyd_node *dnode,
+void bfd_cli_show_rx(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void bfd_cli_show_shutdown(struct vty *vty, struct lyd_node *dnode,
+void bfd_cli_show_shutdown(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void bfd_cli_show_echo(struct vty *vty, struct lyd_node *dnode,
+void bfd_cli_show_echo(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
void bfd_cli_show_desired_echo_transmission_interval(
- struct vty *vty, struct lyd_node *dnode, bool show_defaults);
-void bfd_cli_show_required_echo_receive_interval(
- struct vty *vty, struct lyd_node *dnode, bool show_defaults);
-void bfd_cli_show_profile(struct vty *vty, struct lyd_node *dnode,
+ struct vty *vty, const struct lyd_node *dnode, bool show_defaults);
+void bfd_cli_show_required_echo_receive_interval(struct vty *vty,
+ const struct lyd_node *dnode,
+ bool show_defaults);
+void bfd_cli_show_profile(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void bfd_cli_peer_profile_show(struct vty *vty, struct lyd_node *dnode,
+void bfd_cli_peer_profile_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void bfd_cli_show_passive(struct vty *vty, struct lyd_node *dnode,
+void bfd_cli_show_passive(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void bfd_cli_show_minimum_ttl(struct vty *vty, struct lyd_node *dnode,
+void bfd_cli_show_minimum_ttl(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
#endif /* _FRR_BFDD_NB_H_ */
return nb_cli_apply_changes_clear_pending(vty, NULL);
}
-void eigrp_cli_show_header(struct vty *vty, struct lyd_node *dnode,
+void eigrp_cli_show_header(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *asn = yang_dnode_get_string(dnode, "./asn");
vty_out(vty, "\n");
}
-void eigrp_cli_show_end_header(struct vty *vty, struct lyd_node *dnode)
+void eigrp_cli_show_end_header(struct vty *vty, const struct lyd_node *dnode)
{
vty_out(vty, "exit\n");
vty_out(vty, "!\n");
return nb_cli_apply_changes(vty, NULL);
}
-void eigrp_cli_show_router_id(struct vty *vty, struct lyd_node *dnode,
+void eigrp_cli_show_router_id(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *router_id = yang_dnode_get_string(dnode, NULL);
return nb_cli_apply_changes(vty, NULL);
}
-void eigrp_cli_show_passive_interface(struct vty *vty, struct lyd_node *dnode,
+void eigrp_cli_show_passive_interface(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
const char *ifname = yang_dnode_get_string(dnode, NULL);
return nb_cli_apply_changes(vty, NULL);
}
-void eigrp_cli_show_active_time(struct vty *vty, struct lyd_node *dnode,
+void eigrp_cli_show_active_time(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *timer = yang_dnode_get_string(dnode, NULL);
return nb_cli_apply_changes(vty, NULL);
}
-void eigrp_cli_show_variance(struct vty *vty, struct lyd_node *dnode,
+void eigrp_cli_show_variance(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *variance = yang_dnode_get_string(dnode, NULL);
return nb_cli_apply_changes(vty, NULL);
}
-void eigrp_cli_show_maximum_paths(struct vty *vty, struct lyd_node *dnode,
+void eigrp_cli_show_maximum_paths(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *maximum_paths = yang_dnode_get_string(dnode, NULL);
return nb_cli_apply_changes(vty, NULL);
}
-void eigrp_cli_show_metrics(struct vty *vty, struct lyd_node *dnode,
+void eigrp_cli_show_metrics(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *k1, *k2, *k3, *k4, *k5, *k6;
return nb_cli_apply_changes(vty, NULL);
}
-void eigrp_cli_show_network(struct vty *vty, struct lyd_node *dnode,
+void eigrp_cli_show_network(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *prefix = yang_dnode_get_string(dnode, NULL);
return nb_cli_apply_changes(vty, NULL);
}
-void eigrp_cli_show_neighbor(struct vty *vty, struct lyd_node *dnode,
- bool show_defaults)
+void eigrp_cli_show_neighbor(struct vty *vty, const struct lyd_node *dnode,
+ bool show_defaults)
{
const char *prefix = yang_dnode_get_string(dnode, NULL);
return nb_cli_apply_changes(vty, NULL);
}
-void eigrp_cli_show_redistribute(struct vty *vty, struct lyd_node *dnode,
+void eigrp_cli_show_redistribute(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *proto = yang_dnode_get_string(dnode, "./protocol");
return nb_cli_apply_changes(vty, NULL);
}
-void eigrp_cli_show_delay(struct vty *vty, struct lyd_node *dnode,
+void eigrp_cli_show_delay(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *delay = yang_dnode_get_string(dnode, NULL);
return nb_cli_apply_changes(vty, NULL);
}
-void eigrp_cli_show_bandwidth(struct vty *vty, struct lyd_node *dnode,
+void eigrp_cli_show_bandwidth(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *bandwidth = yang_dnode_get_string(dnode, NULL);
}
-void eigrp_cli_show_hello_interval(struct vty *vty, struct lyd_node *dnode,
+void eigrp_cli_show_hello_interval(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
const char *hello = yang_dnode_get_string(dnode, NULL);
return nb_cli_apply_changes(vty, NULL);
}
-void eigrp_cli_show_hold_time(struct vty *vty, struct lyd_node *dnode,
+void eigrp_cli_show_hold_time(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *holdtime = yang_dnode_get_string(dnode, NULL);
return nb_cli_apply_changes(vty, NULL);
}
-void eigrp_cli_show_summarize_address(struct vty *vty, struct lyd_node *dnode,
+void eigrp_cli_show_summarize_address(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
- const struct lyd_node *instance = yang_dnode_get_parent(dnode, "instance");
+ const struct lyd_node *instance =
+ yang_dnode_get_parent(dnode, "instance");
uint16_t asn = yang_dnode_get_uint16(instance, "./asn");
const char *summarize_address = yang_dnode_get_string(dnode, NULL);
return nb_cli_apply_changes(vty, NULL);
}
-void eigrp_cli_show_authentication(struct vty *vty, struct lyd_node *dnode,
+void eigrp_cli_show_authentication(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
- const struct lyd_node *instance = yang_dnode_get_parent(dnode, "instance");
+ const struct lyd_node *instance =
+ yang_dnode_get_parent(dnode, "instance");
uint16_t asn = yang_dnode_get_uint16(instance, "./asn");
const char *crypt = yang_dnode_get_string(dnode, NULL);
return nb_cli_apply_changes(vty, NULL);
}
-void eigrp_cli_show_keychain(struct vty *vty, struct lyd_node *dnode,
+void eigrp_cli_show_keychain(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
- const struct lyd_node *instance = yang_dnode_get_parent(dnode, "instance");
+ const struct lyd_node *instance =
+ yang_dnode_get_parent(dnode, "instance");
uint16_t asn = yang_dnode_get_uint16(instance, "./asn");
const char *keychain = yang_dnode_get_string(dnode, NULL);
static int eigrp_config_write(struct vty *vty)
{
- struct lyd_node *dnode;
+ const struct lyd_node *dnode;
int written = 0;
dnode = yang_dnode_get(running_config->dnode, "/frr-eigrpd:eigrpd");
static int eigrp_write_interface(struct vty *vty)
{
- struct lyd_node *dnode;
+ const struct lyd_node *dnode;
struct interface *ifp;
struct vrf *vrf;
int written = 0;
#define _EIGRP_CLI_H_
/*Prototypes*/
-extern void eigrp_cli_show_header(struct vty *vty, struct lyd_node *dnode,
+extern void eigrp_cli_show_header(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-extern void eigrp_cli_show_end_header(struct vty *vty, struct lyd_node *dnode);
-extern void eigrp_cli_show_router_id(struct vty *vty, struct lyd_node *dnode,
+extern void eigrp_cli_show_end_header(struct vty *vty,
+ const struct lyd_node *dnode);
+extern void eigrp_cli_show_router_id(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
extern void eigrp_cli_show_passive_interface(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults);
-extern void eigrp_cli_show_active_time(struct vty *vty, struct lyd_node *dnode,
+extern void eigrp_cli_show_active_time(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-extern void eigrp_cli_show_variance(struct vty *vty, struct lyd_node *dnode,
+extern void eigrp_cli_show_variance(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
extern void eigrp_cli_show_maximum_paths(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults);
-extern void eigrp_cli_show_metrics(struct vty *vty, struct lyd_node *dnode,
+extern void eigrp_cli_show_metrics(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-extern void eigrp_cli_show_network(struct vty *vty, struct lyd_node *dnode,
+extern void eigrp_cli_show_network(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-extern void eigrp_cli_show_neighbor(struct vty *vty, struct lyd_node *dnode,
+extern void eigrp_cli_show_neighbor(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-extern void eigrp_cli_show_redistribute(struct vty *vty, struct lyd_node *dnode,
+extern void eigrp_cli_show_redistribute(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-extern void eigrp_cli_show_delay(struct vty *vty, struct lyd_node *dnode,
+extern void eigrp_cli_show_delay(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-extern void eigrp_cli_show_bandwidth(struct vty *vty, struct lyd_node *dnode,
+extern void eigrp_cli_show_bandwidth(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
extern void eigrp_cli_show_hello_interval(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults);
-extern void eigrp_cli_show_hold_time(struct vty *vty, struct lyd_node *dnode,
+extern void eigrp_cli_show_hold_time(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
extern void eigrp_cli_show_summarize_address(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults);
extern void eigrp_cli_show_authentication(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults);
-extern void eigrp_cli_show_keychain(struct vty *vty, struct lyd_node *dnode,
+extern void eigrp_cli_show_keychain(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
extern void eigrp_cli_init(void);
vrf_name);
}
-void cli_show_router_isis(struct vty *vty, struct lyd_node *dnode,
+void cli_show_router_isis(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *vrf = NULL;
vty_out(vty, "\n");
}
-void cli_show_router_isis_end(struct vty *vty, struct lyd_node *dnode)
+void cli_show_router_isis_end(struct vty *vty, const struct lyd_node *dnode)
{
vty_out(vty, "exit\n");
}
"Routing process tag\n")
{
char inst_xpath[XPATH_MAXLEN];
- struct lyd_node *if_dnode, *inst_dnode;
+ const struct lyd_node *if_dnode, *inst_dnode;
const char *circ_type = NULL;
const char *vrf_name;
struct interface *ifp;
"Routing process tag\n")
{
char inst_xpath[XPATH_MAXLEN];
- struct lyd_node *if_dnode, *inst_dnode;
+ const struct lyd_node *if_dnode, *inst_dnode;
const char *circ_type = NULL;
const char *vrf_name;
struct interface *ifp;
"Routing process tag\n"
VRF_CMD_HELP_STR)
-void cli_show_ip_isis_ipv4(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_ipv4(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
yang_dnode_get_string(dnode, "../area-tag"));
}
-void cli_show_ip_isis_ipv6(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_ipv6(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_ip_isis_bfd_monitoring(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_bfd_monitoring(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, "./enabled")) {
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_isis_area_address(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_area_address(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " net %s\n", yang_dnode_get_string(dnode, NULL));
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_isis_is_type(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_is_type(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
int is_type = yang_dnode_get_enum(dnode, NULL);
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_isis_dynamic_hostname(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_dynamic_hostname(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_isis_overload(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_overload(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_isis_attached_send(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_attached_send(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_isis_attached_receive(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_attached_receive(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_isis_metric_style(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_metric_style(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
int metric = yang_dnode_get_enum(dnode, NULL);
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_isis_area_pwd(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_area_pwd(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *snp;
return nb_cli_apply_changes(vty, "./%s", cmd);
}
-void cli_show_isis_domain_pwd(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_domain_pwd(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *snp;
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_isis_lsp_timers(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_lsp_timers(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *l1_refresh =
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_isis_lsp_mtu(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_lsp_mtu(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " lsp-mtu %s\n", yang_dnode_get_string(dnode, NULL));
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_isis_spf_min_interval(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_spf_min_interval(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
const char *l1 = yang_dnode_get_string(dnode, "./level-1");
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_isis_spf_ietf_backoff(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_spf_ietf_backoff(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty,
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_isis_spf_prefix_priority(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_spf_prefix_priority(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " spf prefix-priority %s %s\n",
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_isis_purge_origin(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_purge_origin(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_isis_mpls_te(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_mpls_te(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " mpls-te on\n");
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_isis_mpls_te_router_addr(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_mpls_te_router_addr(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " mpls-te router-address %s\n",
level);
}
-static void vty_print_def_origin(struct vty *vty, struct lyd_node *dnode,
+static void vty_print_def_origin(struct vty *vty, const struct lyd_node *dnode,
const char *family, const char *level,
bool show_defaults)
{
vty_out(vty, "\n");
}
-void cli_show_isis_def_origin_ipv4(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_def_origin_ipv4(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
const char *level = yang_dnode_get_string(dnode, "./level");
vty_print_def_origin(vty, dnode, "ipv4", level, show_defaults);
}
-void cli_show_isis_def_origin_ipv6(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_def_origin_ipv6(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
const char *level = yang_dnode_get_string(dnode, "./level");
level);
}
-static void vty_print_redistribute(struct vty *vty, struct lyd_node *dnode,
+static void vty_print_redistribute(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults, const char *family)
{
const char *level = yang_dnode_get_string(dnode, "./level");
vty_out(vty, "\n");
}
-void cli_show_isis_redistribute_ipv4(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_redistribute_ipv4(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_print_redistribute(vty, dnode, show_defaults, "ipv4");
}
-void cli_show_isis_redistribute_ipv6(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_redistribute_ipv6(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_print_redistribute(vty, dnode, show_defaults, "ipv6");
return nb_cli_apply_changes(vty, base_xpath);
}
-void cli_show_isis_mt_ipv4_multicast(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_mt_ipv4_multicast(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " topology ipv4-multicast");
vty_out(vty, "\n");
}
-void cli_show_isis_mt_ipv4_mgmt(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_mt_ipv4_mgmt(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " topology ipv4-mgmt");
vty_out(vty, "\n");
}
-void cli_show_isis_mt_ipv6_unicast(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_mt_ipv6_unicast(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " topology ipv6-unicast");
vty_out(vty, "\n");
}
-void cli_show_isis_mt_ipv6_multicast(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_mt_ipv6_multicast(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " topology ipv6-multicast");
vty_out(vty, "\n");
}
-void cli_show_isis_mt_ipv6_mgmt(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_mt_ipv6_mgmt(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " topology ipv6-mgmt");
vty_out(vty, "\n");
}
-void cli_show_isis_mt_ipv6_dstsrc(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_mt_ipv6_dstsrc(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " topology ipv6-dstsrc");
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_isis_sr_enabled(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_sr_enabled(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_isis_label_blocks(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_label_blocks(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " segment-routing global-block %s %s",
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_isis_node_msd(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_node_msd(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " segment-routing node-msd %s\n",
prefix_str);
}
-void cli_show_isis_prefix_sid(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_prefix_sid(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *prefix;
}
void cli_show_isis_frr_lfa_priority_limit(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " fast-reroute priority-limit %s %s\n",
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_isis_frr_lfa_tiebreaker(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_frr_lfa_tiebreaker(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " fast-reroute lfa tiebreaker %s index %s %s\n",
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_isis_frr_lfa_load_sharing(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_frr_lfa_load_sharing(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_isis_frr_remote_lfa_plist(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_frr_remote_lfa_plist(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " fast-reroute remote-lfa prefix-list %s %s\n",
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_ip_isis_passive(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_passive(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_ip_isis_password(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_password(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " isis password %s %s\n",
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_ip_isis_metric(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_metric(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *l1 = yang_dnode_get_string(dnode, "./level-1");
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_ip_isis_hello_interval(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_hello_interval(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
const char *l1 = yang_dnode_get_string(dnode, "./level-1");
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_ip_isis_hello_multi(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_hello_multi(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *l1 = yang_dnode_get_string(dnode, "./level-1");
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_ip_isis_threeway_shake(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_threeway_shake(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
if (yang_dnode_get_bool(dnode, NULL))
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_ip_isis_hello_padding(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_hello_padding(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_ip_isis_csnp_interval(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_csnp_interval(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
const char *l1 = yang_dnode_get_string(dnode, "./level-1");
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_ip_isis_psnp_interval(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_psnp_interval(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
const char *l1 = yang_dnode_get_string(dnode, "./level-1");
vty, "./frr-isisd:isis/multi-topology/%s", topology);
}
-void cli_show_ip_isis_mt_ipv4_unicast(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_mt_ipv4_unicast(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
vty_out(vty, " isis topology ipv4-unicast\n");
}
-void cli_show_ip_isis_mt_ipv4_multicast(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_mt_ipv4_multicast(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
vty_out(vty, " isis topology ipv4-multicast\n");
}
-void cli_show_ip_isis_mt_ipv4_mgmt(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_mt_ipv4_mgmt(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
vty_out(vty, " isis topology ipv4-mgmt\n");
}
-void cli_show_ip_isis_mt_ipv6_unicast(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_mt_ipv6_unicast(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
vty_out(vty, " isis topology ipv6-unicast\n");
}
-void cli_show_ip_isis_mt_ipv6_multicast(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_mt_ipv6_multicast(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
vty_out(vty, " isis topology ipv6-multicast\n");
}
-void cli_show_ip_isis_mt_ipv6_mgmt(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_mt_ipv6_mgmt(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
vty_out(vty, " isis topology ipv6-mgmt\n");
}
-void cli_show_ip_isis_mt_ipv6_dstsrc(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_mt_ipv6_dstsrc(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
"Level-2 only adjacencies are formed\n")
{
char inst_xpath[XPATH_MAXLEN];
- struct lyd_node *if_dnode, *inst_dnode;
+ const struct lyd_node *if_dnode, *inst_dnode;
const char *vrf_name;
const char *tag;
const char *circ_type = NULL;
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_ip_isis_circ_type(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_circ_type(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
int level = yang_dnode_get_enum(dnode, NULL);
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_ip_isis_network_type(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_network_type(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
if (yang_dnode_get_enum(dnode, NULL) != CIRCUIT_T_P2P)
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_ip_isis_priority(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_priority(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *l1 = yang_dnode_get_string(dnode, "./level-1");
/*
* XPath: /frr-interface:lib/interface/frr-isisd:isis/fast-reroute
*/
-void cli_show_ip_isis_frr(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_frr(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
bool l1_enabled, l2_enabled;
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_frr_lfa_exclude_interface(struct vty *vty, struct lyd_node *dnode,
+void cli_show_frr_lfa_exclude_interface(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " isis fast-reroute lfa %s exclude interface %s\n",
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_frr_remote_lfa_max_metric(struct vty *vty, struct lyd_node *dnode,
+void cli_show_frr_remote_lfa_max_metric(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " isis fast-reroute remote-lfa maximum-metric %s %s\n",
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_isis_log_adjacency(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_log_adjacency(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_isis_mpls_ldp_sync(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_mpls_ldp_sync(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " mpls ldp-sync\n");
}
void cli_show_isis_mpls_ldp_sync_holddown(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " mpls ldp-sync holddown %s\n",
}
-void cli_show_isis_mpls_if_ldp_sync(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_mpls_if_ldp_sync(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
}
void cli_show_isis_mpls_if_ldp_sync_holddown(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " isis mpls ldp-sync holddown %s\n",
struct nb_cb_apply_finish_args *args);
/* Optional 'cli_show' callbacks. */
-void cli_show_router_isis(struct vty *vty, struct lyd_node *dnode,
+void cli_show_router_isis(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_router_isis_end(struct vty *vty, struct lyd_node *dnode);
-void cli_show_ip_isis_ipv4(struct vty *vty, struct lyd_node *dnode,
+void cli_show_router_isis_end(struct vty *vty, const struct lyd_node *dnode);
+void cli_show_ip_isis_ipv4(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_isis_ipv6(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_ipv6(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_isis_bfd_monitoring(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_bfd_monitoring(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_area_address(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_area_address(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_is_type(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_is_type(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_dynamic_hostname(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_dynamic_hostname(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_attached_send(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_attached_send(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_attached_receive(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_attached_receive(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_overload(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_overload(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_metric_style(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_metric_style(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_area_pwd(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_area_pwd(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_domain_pwd(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_domain_pwd(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_lsp_timers(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_lsp_timers(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_lsp_mtu(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_lsp_mtu(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_spf_min_interval(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_spf_min_interval(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_spf_ietf_backoff(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_spf_ietf_backoff(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_spf_prefix_priority(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_spf_prefix_priority(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_purge_origin(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_purge_origin(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_mpls_te(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_mpls_te(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_mpls_te_router_addr(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_mpls_te_router_addr(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_def_origin_ipv4(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_def_origin_ipv4(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_def_origin_ipv6(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_def_origin_ipv6(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_redistribute_ipv4(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_redistribute_ipv4(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_redistribute_ipv6(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_redistribute_ipv6(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_mt_ipv4_multicast(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_mt_ipv4_multicast(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_mt_ipv4_mgmt(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_mt_ipv4_mgmt(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_mt_ipv6_unicast(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_mt_ipv6_unicast(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_mt_ipv6_multicast(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_mt_ipv6_multicast(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_mt_ipv6_mgmt(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_mt_ipv6_mgmt(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_mt_ipv6_dstsrc(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_mt_ipv6_dstsrc(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_sr_enabled(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_sr_enabled(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_label_blocks(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_label_blocks(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_node_msd(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_node_msd(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_prefix_sid(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_prefix_sid(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
void cli_show_isis_frr_lfa_priority_limit(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_frr_lfa_tiebreaker(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_frr_lfa_tiebreaker(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_frr_lfa_load_sharing(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_frr_lfa_load_sharing(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_frr_remote_lfa_plist(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_frr_remote_lfa_plist(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_isis_passive(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_passive(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_isis_password(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_password(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_isis_metric(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_metric(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_isis_hello_interval(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_hello_interval(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_isis_hello_multi(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_hello_multi(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_isis_threeway_shake(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_threeway_shake(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_isis_hello_padding(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_hello_padding(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_isis_csnp_interval(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_csnp_interval(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_isis_psnp_interval(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_psnp_interval(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_isis_mt_ipv4_unicast(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_mt_ipv4_unicast(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_isis_mt_ipv4_multicast(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_mt_ipv4_multicast(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_isis_mt_ipv4_mgmt(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_mt_ipv4_mgmt(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_isis_mt_ipv6_unicast(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_mt_ipv6_unicast(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_isis_mt_ipv6_multicast(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_mt_ipv6_multicast(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_isis_mt_ipv6_mgmt(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_mt_ipv6_mgmt(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_isis_mt_ipv6_dstsrc(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_mt_ipv6_dstsrc(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_isis_frr(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_frr(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_frr_lfa_exclude_interface(struct vty *vty, struct lyd_node *dnode,
+void cli_show_frr_lfa_exclude_interface(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_frr_remote_lfa_max_metric(struct vty *vty, struct lyd_node *dnode,
+void cli_show_frr_remote_lfa_max_metric(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_isis_circ_type(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_circ_type(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_isis_network_type(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_network_type(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_isis_priority(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_isis_priority(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_log_adjacency(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_log_adjacency(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_mpls_ldp_sync(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_mpls_ldp_sync(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
void cli_show_isis_mpls_ldp_sync_holddown(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_isis_mpls_if_ldp_sync(struct vty *vty, struct lyd_node *dnode,
+void cli_show_isis_mpls_if_ldp_sync(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
void cli_show_isis_mpls_if_ldp_sync_holddown(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults);
/* Notifications. */
struct lyd_node;
struct vty;
-extern int access_list_cmp(struct lyd_node *dnode1, struct lyd_node *dnode2);
-extern void access_list_show(struct vty *vty, struct lyd_node *dnode,
+extern int access_list_cmp(const struct lyd_node *dnode1,
+ const struct lyd_node *dnode2);
+extern void access_list_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-extern void access_list_remark_show(struct vty *vty, struct lyd_node *dnode,
+extern void access_list_remark_show(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-extern int prefix_list_cmp(struct lyd_node *dnode1, struct lyd_node *dnode2);
-extern void prefix_list_show(struct vty *vty, struct lyd_node *dnode,
+extern int prefix_list_cmp(const struct lyd_node *dnode1,
+ const struct lyd_node *dnode2);
+extern void prefix_list_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-extern void prefix_list_remark_show(struct vty *vty, struct lyd_node *dnode,
+extern void prefix_list_remark_show(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
void filter_cli_init(void);
ACCESS_LIST_REMARK_STR
ACCESS_LIST_REMARK_LINE_STR)
-int access_list_cmp(struct lyd_node *dnode1, struct lyd_node *dnode2)
+int access_list_cmp(const struct lyd_node *dnode1,
+ const struct lyd_node *dnode2)
{
uint32_t seq1 = yang_dnode_get_uint32(dnode1, "./sequence");
uint32_t seq2 = yang_dnode_get_uint32(dnode2, "./sequence");
return seq1 - seq2;
}
-void access_list_show(struct vty *vty, struct lyd_node *dnode,
+void access_list_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
int type = yang_dnode_get_enum(dnode, "../type");
vty_out(vty, "\n");
}
-void access_list_remark_show(struct vty *vty, struct lyd_node *dnode,
+void access_list_remark_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
int type = yang_dnode_get_enum(dnode, "../type");
ACCESS_LIST_REMARK_STR
ACCESS_LIST_REMARK_LINE_STR)
-int prefix_list_cmp(struct lyd_node *dnode1, struct lyd_node *dnode2)
+int prefix_list_cmp(const struct lyd_node *dnode1,
+ const struct lyd_node *dnode2)
{
uint32_t seq1 = yang_dnode_get_uint32(dnode1, "./sequence");
uint32_t seq2 = yang_dnode_get_uint32(dnode2, "./sequence");
return seq1 - seq2;
}
-void prefix_list_show(struct vty *vty, struct lyd_node *dnode,
+void prefix_list_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
int type = yang_dnode_get_enum(dnode, "../type");
vty_out(vty, "\n");
}
-void prefix_list_remark_show(struct vty *vty, struct lyd_node *dnode,
+void prefix_list_remark_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
int type = yang_dnode_get_enum(dnode, "../type");
ifname, vrf_name);
}
-static void cli_show_interface(struct vty *vty, struct lyd_node *dnode,
- bool show_defaults)
+static void cli_show_interface(struct vty *vty, const struct lyd_node *dnode,
+ bool show_defaults)
{
const char *vrf;
vty_out(vty, "\n");
}
-static void cli_show_interface_end(struct vty *vty, struct lyd_node *dnode)
+static void cli_show_interface_end(struct vty *vty,
+ const struct lyd_node *dnode)
{
vty_out(vty, "exit\n");
}
return nb_cli_apply_changes(vty, NULL);
}
-static void cli_show_interface_desc(struct vty *vty, struct lyd_node *dnode,
- bool show_defaults)
+static void cli_show_interface_desc(struct vty *vty,
+ const struct lyd_node *dnode,
+ bool show_defaults)
{
vty_out(vty, " description %s\n", yang_dnode_get_string(dnode, NULL));
}
* >0 when the CLI command for the dnode2 should be printed first
* 0 when there is no difference
*/
- int (*cli_cmp)(struct lyd_node *dnode1, struct lyd_node *dnode2);
+ int (*cli_cmp)(const struct lyd_node *dnode1,
+ const struct lyd_node *dnode2);
/*
* Optional callback to show the CLI command associated to the given
* nodes, in which case it might be desirable to hide one or more
* parts of the command when this parameter is set to false.
*/
- void (*cli_show)(struct vty *vty, struct lyd_node *dnode,
+ void (*cli_show)(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
/*
* libyang data node that should be shown in the form of a CLI
* command.
*/
- void (*cli_show_end)(struct vty *vty, struct lyd_node *dnode);
+ void (*cli_show_end)(struct vty *vty, const struct lyd_node *dnode);
};
struct nb_dependency_callbacks {
LYD_VALIDATE_NO_STATE, NULL);
}
-static int lyd_node_cmp(struct lyd_node **dnode1, struct lyd_node **dnode2)
+static int lyd_node_cmp(const struct lyd_node **dnode1,
+ const struct lyd_node **dnode2)
{
struct nb_node *nb_node = (*dnode1)->schema->priv;
return nb_node->cbs.cli_cmp(*dnode1, *dnode2);
}
-static void show_dnode_children_cmds(struct vty *vty, struct lyd_node *root,
+static void show_dnode_children_cmds(struct vty *vty,
+ const struct lyd_node *root,
bool with_defaults)
{
struct nb_node *nb_node, *sort_node = NULL;
}
}
-void nb_cli_show_dnode_cmds(struct vty *vty, struct lyd_node *root,
+void nb_cli_show_dnode_cmds(struct vty *vty, const struct lyd_node *root,
bool with_defaults)
{
struct nb_node *nb_node;
* show_defaults
* Specify whether to display default configuration values or not.
*/
-extern void nb_cli_show_dnode_cmds(struct vty *vty, struct lyd_node *dnode,
+extern void nb_cli_show_dnode_cmds(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
/*
extern const struct frr_yang_module_info frr_route_map_info;
/* routemap_cli.c */
-extern int route_map_instance_cmp(struct lyd_node *dnode1,
- struct lyd_node *dnode2);
-extern void route_map_instance_show(struct vty *vty, struct lyd_node *dnode,
+extern int route_map_instance_cmp(const struct lyd_node *dnode1,
+ const struct lyd_node *dnode2);
+extern void route_map_instance_show(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
extern void route_map_instance_show_end(struct vty *vty,
- struct lyd_node *dnode);
-extern void route_map_condition_show(struct vty *vty, struct lyd_node *dnode,
+ const struct lyd_node *dnode);
+extern void route_map_condition_show(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-extern void route_map_action_show(struct vty *vty, struct lyd_node *dnode,
+extern void route_map_action_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-extern void route_map_exit_policy_show(struct vty *vty, struct lyd_node *dnode,
+extern void route_map_exit_policy_show(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-extern void route_map_call_show(struct vty *vty, struct lyd_node *dnode,
+extern void route_map_call_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
extern void route_map_description_show(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults);
extern void route_map_optimization_disabled_show(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults);
extern void route_map_cli_init(void);
return nb_cli_apply_changes(vty, NULL);
}
-int route_map_instance_cmp(struct lyd_node *dnode1, struct lyd_node *dnode2)
+int route_map_instance_cmp(const struct lyd_node *dnode1,
+ const struct lyd_node *dnode2)
{
uint16_t seq1 = yang_dnode_get_uint16(dnode1, "./sequence");
uint16_t seq2 = yang_dnode_get_uint16(dnode2, "./sequence");
return seq1 - seq2;
}
-void route_map_instance_show(struct vty *vty, struct lyd_node *dnode,
+void route_map_instance_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *name = yang_dnode_get_string(dnode, "../name");
}
-void route_map_instance_show_end(struct vty *vty, struct lyd_node *dnode)
+void route_map_instance_show_end(struct vty *vty, const struct lyd_node *dnode)
{
vty_out(vty, "exit\n");
vty_out(vty, "!\n");
return nb_cli_apply_changes(vty, NULL);
}
-void route_map_condition_show(struct vty *vty, struct lyd_node *dnode,
+void route_map_condition_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *condition = yang_dnode_get_string(dnode, "./condition");
- struct lyd_node *ln;
+ const struct lyd_node *ln;
const char *acl;
if (IS_MATCH_INTERFACE(condition)) {
}
-void route_map_action_show(struct vty *vty, struct lyd_node *dnode,
+void route_map_action_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *action = yang_dnode_get_string(dnode, "./action");
- struct lyd_node *ln;
+ const struct lyd_node *ln;
const char *acl;
if (IS_SET_IPv4_NH(action)) {
"Continue on a different entry within the route-map\n"
"Route-map entry sequence number\n")
-void route_map_exit_policy_show(struct vty *vty, struct lyd_node *dnode,
+void route_map_exit_policy_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
int exit_policy = yang_dnode_get_enum(dnode, NULL);
return nb_cli_apply_changes(vty, NULL);
}
-void route_map_call_show(struct vty *vty, struct lyd_node *dnode,
+void route_map_call_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " call %s\n", yang_dnode_get_string(dnode, NULL));
return nb_cli_apply_changes(vty, NULL);
}
-void route_map_description_show(struct vty *vty, struct lyd_node *dnode,
+void route_map_description_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " description %s\n", yang_dnode_get_string(dnode, NULL));
}
void route_map_optimization_disabled_show(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults)
{
const char *name = yang_dnode_get_string(dnode, "../name");
static int route_map_config_write(struct vty *vty)
{
- struct lyd_node *dnode;
+ const struct lyd_node *dnode;
int written = 0;
dnode = yang_dnode_get(running_config->dnode,
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_srte_segment_list(struct vty *vty, struct lyd_node *dnode,
+void cli_show_srte_segment_list(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " segment-list %s\n",
yang_dnode_get_string(dnode, "./name"));
}
-void cli_show_srte_segment_list_end(struct vty *vty, struct lyd_node *dnode)
+void cli_show_srte_segment_list_end(struct vty *vty,
+ const struct lyd_node *dnode)
{
vty_out(vty, " exit\n");
}
}
void cli_show_srte_segment_list_segment(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " index %s", yang_dnode_get_string(dnode, "./index"));
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_srte_policy(struct vty *vty, struct lyd_node *dnode,
+void cli_show_srte_policy(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " policy color %s endpoint %s\n",
yang_dnode_get_string(dnode, "./endpoint"));
}
-void cli_show_srte_policy_end(struct vty *vty, struct lyd_node *dnode)
+void cli_show_srte_policy_end(struct vty *vty, const struct lyd_node *dnode)
{
vty_out(vty, " exit\n");
}
}
-void cli_show_srte_policy_name(struct vty *vty, struct lyd_node *dnode,
- bool show_defaults)
+void cli_show_srte_policy_name(struct vty *vty, const struct lyd_node *dnode,
+ bool show_defaults)
{
vty_out(vty, " name %s\n", yang_dnode_get_string(dnode, NULL));
}
}
void cli_show_srte_policy_binding_sid(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " binding-sid %s\n", yang_dnode_get_string(dnode, NULL));
}
void cli_show_srte_policy_candidate_path(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults)
{
float bandwidth;
}
void cli_show_srte_policy_candidate_path_end(struct vty *vty,
- struct lyd_node *dnode)
+ const struct lyd_node *dnode)
{
const char *type = yang_dnode_get_string(dnode, "./type");
{
struct vty *vty = arg;
- nb_cli_show_dnode_cmds(vty, (struct lyd_node *)dnode, false);
+ nb_cli_show_dnode_cmds(vty, dnode, false);
return YANG_ITER_CONTINUE;
}
void pathd_apply_finish(struct nb_cb_apply_finish_args *args);
/* Optional 'cli_show' callbacks. */
-void cli_show_srte_segment_list(struct vty *vty, struct lyd_node *dnode,
+void cli_show_srte_segment_list(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_srte_segment_list_end(struct vty *vty, struct lyd_node *dnode);
-void cli_show_srte_segment_list_segment(struct vty *vty, struct lyd_node *dnode,
+void cli_show_srte_segment_list_end(struct vty *vty,
+ const struct lyd_node *dnode);
+void cli_show_srte_segment_list_segment(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_srte_policy(struct vty *vty, struct lyd_node *dnode,
+void cli_show_srte_policy(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_srte_policy_end(struct vty *vty, struct lyd_node *dnode);
-void cli_show_srte_policy_name(struct vty *vty, struct lyd_node *dnode,
+void cli_show_srte_policy_end(struct vty *vty, const struct lyd_node *dnode);
+void cli_show_srte_policy_name(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_srte_policy_binding_sid(struct vty *vty, struct lyd_node *dnode,
+void cli_show_srte_policy_binding_sid(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
void cli_show_srte_policy_candidate_path(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults);
void cli_show_srte_policy_candidate_path_end(struct vty *vty,
- struct lyd_node *dnode);
+ const struct lyd_node *dnode);
/* Utility functions */
typedef void (*of_pref_cp_t)(enum objfun_type type, void *arg);
return nb_cli_apply_changes_clear_pending(vty, NULL);
}
-void cli_show_router_rip(struct vty *vty, struct lyd_node *dnode,
+void cli_show_router_rip(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *vrf_name;
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_rip_allow_ecmp(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_allow_ecmp(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
}
void cli_show_rip_default_information_originate(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_rip_default_metric(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_default_metric(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " default-metric %s\n",
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_rip_distance(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_distance(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
if (yang_dnode_is_default(dnode, NULL))
prefix_str);
}
-void cli_show_rip_distance_source(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_distance_source(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " distance %s %s",
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_rip_neighbor(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_neighbor(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " neighbor %s\n", yang_dnode_get_string(dnode, NULL));
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_rip_network_prefix(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_network_prefix(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " network %s\n", yang_dnode_get_string(dnode, NULL));
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_rip_network_interface(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_network_interface(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " network %s\n", yang_dnode_get_string(dnode, NULL));
ifname ? ifname : "*", direction);
}
-void cli_show_rip_offset_list(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_offset_list(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *interface;
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_rip_passive_default(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_passive_default(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_rip_passive_interface(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_passive_interface(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " passive-interface %s\n",
yang_dnode_get_string(dnode, NULL));
}
-void cli_show_rip_non_passive_interface(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_non_passive_interface(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " no passive-interface %s\n",
protocol);
}
-void cli_show_rip_redistribute(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_redistribute(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " redistribute %s",
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_rip_route(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_route(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " route %s\n", yang_dnode_get_string(dnode, NULL));
return nb_cli_apply_changes(vty, "./timers");
}
-void cli_show_rip_timers(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_timers(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " timers basic %s %s %s\n",
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_rip_version(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_version(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
/*
return nb_cli_apply_changes(vty, "./frr-ripd:rip");
}
-void cli_show_ip_rip_split_horizon(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_rip_split_horizon(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
int value;
return nb_cli_apply_changes(vty, "./frr-ripd:rip");
}
-void cli_show_ip_rip_v2_broadcast(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_rip_v2_broadcast(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
return nb_cli_apply_changes(vty, "./frr-ripd:rip");
}
-void cli_show_ip_rip_receive_version(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_rip_receive_version(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
switch (yang_dnode_get_enum(dnode, NULL)) {
return nb_cli_apply_changes(vty, "./frr-ripd:rip");
}
-void cli_show_ip_rip_send_version(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_rip_send_version(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
switch (yang_dnode_get_enum(dnode, NULL)) {
}
void cli_show_ip_rip_authentication_scheme(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults)
{
switch (yang_dnode_get_enum(dnode, "./mode")) {
}
void cli_show_ip_rip_authentication_string(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " ip rip authentication string %s\n",
}
void cli_show_ip_rip_authentication_key_chain(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " ip rip authentication key-chain %s\n",
void ripd_instance_timers_apply_finish(struct nb_cb_apply_finish_args *args);
/* Optional 'cli_show' callbacks. */
-void cli_show_router_rip(struct vty *vty, struct lyd_node *dnode,
+void cli_show_router_rip(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_rip_allow_ecmp(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_allow_ecmp(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
void cli_show_rip_default_information_originate(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_rip_default_metric(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_default_metric(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_rip_distance(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_distance(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_rip_distance_source(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_distance_source(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_rip_neighbor(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_neighbor(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_rip_network_prefix(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_network_prefix(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_rip_network_interface(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_network_interface(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_rip_offset_list(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_offset_list(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_rip_passive_default(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_passive_default(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_rip_passive_interface(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_passive_interface(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_rip_non_passive_interface(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_non_passive_interface(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_rip_redistribute(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_redistribute(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_rip_route(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_route(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_rip_timers(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_timers(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_rip_version(struct vty *vty, struct lyd_node *dnode,
+void cli_show_rip_version(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_rip_split_horizon(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_rip_split_horizon(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_rip_v2_broadcast(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_rip_v2_broadcast(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_rip_receive_version(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_rip_receive_version(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip_rip_send_version(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip_rip_send_version(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
void cli_show_ip_rip_authentication_scheme(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults);
void cli_show_ip_rip_authentication_string(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults);
void cli_show_ip_rip_authentication_key_chain(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults);
/* Notifications. */
return nb_cli_apply_changes_clear_pending(vty, NULL);
}
-void cli_show_router_ripng(struct vty *vty, struct lyd_node *dnode,
- bool show_defaults)
+void cli_show_router_ripng(struct vty *vty, const struct lyd_node *dnode,
+ bool show_defaults)
{
const char *vrf_name;
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_ripng_allow_ecmp(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ripng_allow_ecmp(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
}
void cli_show_ripng_default_information_originate(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_ripng_default_metric(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ripng_default_metric(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " default-metric %s\n",
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_ripng_network_prefix(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ripng_network_prefix(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " network %s\n", yang_dnode_get_string(dnode, NULL));
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_ripng_network_interface(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ripng_network_interface(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " network %s\n", yang_dnode_get_string(dnode, NULL));
ifname ? ifname : "*", direction);
}
-void cli_show_ripng_offset_list(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ripng_offset_list(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *interface;
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_ripng_passive_interface(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ripng_passive_interface(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " passive-interface %s\n",
protocol);
}
-void cli_show_ripng_redistribute(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ripng_redistribute(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " redistribute %s",
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_ripng_route(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ripng_route(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " route %s\n", yang_dnode_get_string(dnode, NULL));
return nb_cli_apply_changes(vty, NULL);
}
-void cli_show_ripng_aggregate_address(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ripng_aggregate_address(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " aggregate-address %s\n",
return nb_cli_apply_changes(vty, "./timers");
}
-void cli_show_ripng_timers(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ripng_timers(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " timers basic %s %s %s\n",
return nb_cli_apply_changes(vty, "./frr-ripngd:ripng");
}
-void cli_show_ipv6_ripng_split_horizon(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ipv6_ripng_split_horizon(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults)
{
int value;
void ripngd_instance_timers_apply_finish(struct nb_cb_apply_finish_args *args);
/* Optional 'cli_show' callbacks. */
-void cli_show_router_ripng(struct vty *vty, struct lyd_node *dnode,
+void cli_show_router_ripng(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ripng_allow_ecmp(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ripng_allow_ecmp(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
void cli_show_ripng_default_information_originate(struct vty *vty,
- struct lyd_node *dnode,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ripng_default_metric(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ripng_default_metric(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ripng_network_prefix(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ripng_network_prefix(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ripng_network_interface(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ripng_network_interface(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ripng_offset_list(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ripng_offset_list(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ripng_passive_interface(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ripng_passive_interface(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ripng_redistribute(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ripng_redistribute(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ripng_route(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ripng_route(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ripng_aggregate_address(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ripng_aggregate_address(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ripng_timers(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ripng_timers(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ipv6_ripng_split_horizon(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ipv6_ripng_split_horizon(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
#endif /* _FRR_RIPNG_NB_H_ */
table_str, false, color_str);
}
-void static_cli_show(struct vty *vty, struct lyd_node *dnode,
+void static_cli_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *vrf;
vty_out(vty, "vrf %s\n", vrf);
}
-void static_cli_show_end(struct vty *vty, struct lyd_node *dnode)
+void static_cli_show_end(struct vty *vty, const struct lyd_node *dnode)
{
const char *vrf;
vty_out(vty, "\n");
}
-void static_nexthop_cli_show(struct vty *vty, struct lyd_node *dnode,
+void static_nexthop_cli_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const struct lyd_node *path = yang_dnode_get_parent(dnode, "path-list");
nexthop_cli_show(vty, route, NULL, path, dnode, show_defaults);
}
-void static_src_nexthop_cli_show(struct vty *vty, struct lyd_node *dnode,
+void static_src_nexthop_cli_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const struct lyd_node *path = yang_dnode_get_parent(dnode, "path-list");
nexthop_cli_show(vty, route, src, path, dnode, show_defaults);
}
-int static_nexthop_cli_cmp(struct lyd_node *dnode1, struct lyd_node *dnode2)
+int static_nexthop_cli_cmp(const struct lyd_node *dnode1,
+ const struct lyd_node *dnode2)
{
enum static_nh_type nh_type1, nh_type2;
struct prefix prefix1, prefix2;
yang_dnode_get_string(dnode2, "./vrf"));
}
-int static_route_list_cli_cmp(struct lyd_node *dnode1, struct lyd_node *dnode2)
+int static_route_list_cli_cmp(const struct lyd_node *dnode1,
+ const struct lyd_node *dnode2)
{
const char *afi_safi1, *afi_safi2;
afi_t afi1, afi2;
return prefix_cmp(&prefix1, &prefix2);
}
-int static_src_list_cli_cmp(struct lyd_node *dnode1, struct lyd_node *dnode2)
+int static_src_list_cli_cmp(const struct lyd_node *dnode1,
+ const struct lyd_node *dnode2)
{
struct prefix prefix1, prefix2;
return prefix_cmp(&prefix1, &prefix2);
}
-int static_path_list_cli_cmp(struct lyd_node *dnode1, struct lyd_node *dnode2)
+int static_path_list_cli_cmp(const struct lyd_node *dnode1,
+ const struct lyd_node *dnode2)
{
uint32_t table_id1, table_id2;
uint8_t distance1, distance2;
extern "C" {
#endif
-void static_cli_show(struct vty *vty, struct lyd_node *dnode,
+void static_cli_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void static_cli_show_end(struct vty *vty, struct lyd_node *dnode);
-void static_nexthop_cli_show(struct vty *vty, struct lyd_node *dnode,
+void static_cli_show_end(struct vty *vty, const struct lyd_node *dnode);
+void static_nexthop_cli_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void static_src_nexthop_cli_show(struct vty *vty, struct lyd_node *dnode,
+void static_src_nexthop_cli_show(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-int static_nexthop_cli_cmp(struct lyd_node *dnode1, struct lyd_node *dnode2);
-int static_route_list_cli_cmp(struct lyd_node *dnode1, struct lyd_node *dnode2);
-int static_src_list_cli_cmp(struct lyd_node *dnode1, struct lyd_node *dnode2);
-int static_path_list_cli_cmp(struct lyd_node *dnode1, struct lyd_node *dnode2);
+int static_nexthop_cli_cmp(const struct lyd_node *dnode1,
+ const struct lyd_node *dnode2);
+int static_route_list_cli_cmp(const struct lyd_node *dnode1,
+ const struct lyd_node *dnode2);
+int static_src_list_cli_cmp(const struct lyd_node *dnode1,
+ const struct lyd_node *dnode2);
+int static_path_list_cli_cmp(const struct lyd_node *dnode1,
+ const struct lyd_node *dnode2);
void static_vty_init(void);
return nb_cli_apply_changes(vty, VRRP_XPATH_ENTRY, vrid);
}
-void cli_show_vrrp(struct vty *vty, struct lyd_node *dnode, bool show_defaults)
+void cli_show_vrrp(struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
{
const char *vrid = yang_dnode_get_string(dnode, "./virtual-router-id");
const char *ver = yang_dnode_get_string(dnode, "./version");
return nb_cli_apply_changes(vty, VRRP_XPATH_ENTRY, vrid);
}
-void cli_show_shutdown(struct vty *vty, struct lyd_node *dnode,
+void cli_show_shutdown(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *vrid = yang_dnode_get_string(dnode, "../virtual-router-id");
return nb_cli_apply_changes(vty, VRRP_XPATH_ENTRY, vrid);
}
-void cli_show_priority(struct vty *vty, struct lyd_node *dnode,
+void cli_show_priority(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *vrid = yang_dnode_get_string(dnode, "../virtual-router-id");
return nb_cli_apply_changes(vty, VRRP_XPATH_ENTRY, vrid);
}
-void cli_show_advertisement_interval(struct vty *vty, struct lyd_node *dnode,
+void cli_show_advertisement_interval(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *vrid = yang_dnode_get_string(dnode, "../virtual-router-id");
return nb_cli_apply_changes(vty, VRRP_XPATH_ENTRY, vrid);
}
-void cli_show_ip(struct vty *vty, struct lyd_node *dnode, bool show_defaults)
+void cli_show_ip(struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
{
const char *vrid =
yang_dnode_get_string(dnode, "../../virtual-router-id");
return nb_cli_apply_changes(vty, VRRP_XPATH_ENTRY, vrid);
}
-void cli_show_ipv6(struct vty *vty, struct lyd_node *dnode, bool show_defaults)
+void cli_show_ipv6(struct vty *vty, const struct lyd_node *dnode, bool show_defaults)
{
const char *vrid =
yang_dnode_get_string(dnode, "../../virtual-router-id");
return nb_cli_apply_changes(vty, VRRP_XPATH_ENTRY, vrid);
}
-void cli_show_preempt(struct vty *vty, struct lyd_node *dnode,
+void cli_show_preempt(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
const char *vrid = yang_dnode_get_string(dnode, "../virtual-router-id");
struct interface *ifp;
FOR_ALL_INTERFACES (vrf, ifp) {
- struct lyd_node *dnode;
+ const struct lyd_node *dnode;
dnode = yang_dnode_getf(
running_config->dnode,
void vrrp_vty_init(void);
/* Northbound callbacks */
-void cli_show_vrrp(struct vty *vty, struct lyd_node *dnode, bool show_defaults);
-void cli_show_shutdown(struct vty *vty, struct lyd_node *dnode,
+void cli_show_vrrp(struct vty *vty, const struct lyd_node *dnode,
+ bool show_defaults);
+void cli_show_shutdown(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_priority(struct vty *vty, struct lyd_node *dnode,
+void cli_show_priority(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_advertisement_interval(struct vty *vty, struct lyd_node *dnode,
+void cli_show_advertisement_interval(struct vty *vty,
+ const struct lyd_node *dnode,
bool show_defaults);
-void cli_show_ip(struct vty *vty, struct lyd_node *dnode, bool show_defaults);
-void cli_show_ipv6(struct vty *vty, struct lyd_node *dnode, bool show_defaults);
-void cli_show_preempt(struct vty *vty, struct lyd_node *dnode,
+void cli_show_ip(struct vty *vty, const struct lyd_node *dnode,
+ bool show_defaults);
+void cli_show_ipv6(struct vty *vty, const struct lyd_node *dnode,
+ bool show_defaults);
+void cli_show_preempt(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults);
#endif /* __VRRP_VTY_H__ */