}
}
- vty_out (vty, "%s", VTY_NEWLINE);
+ vty_outln (vty, "");
}
/* Print the command to enable the debug for each peer/prefix this debug is
{
if (filter->host)
{
- vty_out (vty, "%s %s%s", desc, filter->host, VTY_NEWLINE);
+ vty_outln (vty, "%s %s", desc, filter->host);
write++;
}
if (filter->p)
{
- vty_out (vty, "%s %s/%d%s", desc,
+ vty_outln (vty, "%s %s/%d", desc,
inet_ntop (filter->p->family, &filter->p->u.prefix, buf, INET6_ADDRSTRLEN),
- filter->p->prefixlen, VTY_NEWLINE);
+ filter->p->prefixlen);
write++;
}
}
if (!write)
{
- vty_out (vty, "%s%s", desc, VTY_NEWLINE);
+ vty_outln (vty, "%s", desc);
write++;
}
else
{
TERM_DEBUG_ON (as4, AS4);
- vty_out (vty, "BGP as4 debugging is on%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP as4 debugging is on");
}
return CMD_SUCCESS;
}
else
{
TERM_DEBUG_OFF (as4, AS4);
- vty_out (vty, "BGP as4 debugging is off%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP as4 debugging is off");
}
return CMD_SUCCESS;
}
else
{
TERM_DEBUG_ON (as4, AS4_SEGMENT);
- vty_out (vty, "BGP as4 segment debugging is on%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP as4 segment debugging is on");
}
return CMD_SUCCESS;
}
else
{
TERM_DEBUG_OFF (as4, AS4_SEGMENT);
- vty_out (vty, "BGP as4 segment debugging is off%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP as4 segment debugging is off");
}
return CMD_SUCCESS;
}
else
{
TERM_DEBUG_ON (neighbor_events, NEIGHBOR_EVENTS);
- vty_out (vty, "BGP neighbor-events debugging is on%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP neighbor-events debugging is on");
}
return CMD_SUCCESS;
}
if (bgp_debug_list_has_entry(bgp_debug_neighbor_events_peers, host, NULL))
{
- vty_out (vty, "BGP neighbor-events debugging is already enabled for %s%s", host, VTY_NEWLINE);
+ vty_outln (vty, "BGP neighbor-events debugging is already enabled for %s",
+ host);
return CMD_SUCCESS;
}
else
{
TERM_DEBUG_ON (neighbor_events, NEIGHBOR_EVENTS);
- vty_out (vty, "BGP neighbor-events debugging is on for %s%s", host, VTY_NEWLINE);
+ vty_outln (vty, "BGP neighbor-events debugging is on for %s", host);
}
return CMD_SUCCESS;
}
else
{
TERM_DEBUG_OFF (neighbor_events, NEIGHBOR_EVENTS);
- vty_out (vty, "BGP neighbor-events debugging is off%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP neighbor-events debugging is off");
}
return CMD_SUCCESS;
}
}
if (found_peer)
- vty_out (vty, "BGP neighbor-events debugging is off for %s%s", host, VTY_NEWLINE);
+ vty_outln (vty, "BGP neighbor-events debugging is off for %s", host);
else
- vty_out (vty, "BGP neighbor-events debugging was not enabled for %s%s", host, VTY_NEWLINE);
+ vty_outln (vty, "BGP neighbor-events debugging was not enabled for %s",
+ host);
return CMD_SUCCESS;
}
else
{
TERM_DEBUG_ON (nht, NHT);
- vty_out (vty, "BGP nexthop tracking debugging is on%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP nexthop tracking debugging is on");
}
return CMD_SUCCESS;
}
else
{
TERM_DEBUG_OFF (nht, NHT);
- vty_out (vty, "BGP nexthop tracking debugging is off%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP nexthop tracking debugging is off");
}
return CMD_SUCCESS;
}
else
{
TERM_DEBUG_ON (keepalive, KEEPALIVE);
- vty_out (vty, "BGP keepalives debugging is on%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP keepalives debugging is on");
}
return CMD_SUCCESS;
}
if (bgp_debug_list_has_entry(bgp_debug_keepalive_peers, host, NULL))
{
- vty_out (vty, "BGP keepalive debugging is already enabled for %s%s", host, VTY_NEWLINE);
+ vty_outln (vty, "BGP keepalive debugging is already enabled for %s",
+ host);
return CMD_SUCCESS;
}
else
{
TERM_DEBUG_ON (keepalive, KEEPALIVE);
- vty_out (vty, "BGP keepalives debugging is on for %s%s", host, VTY_NEWLINE);
+ vty_outln (vty, "BGP keepalives debugging is on for %s", host);
}
return CMD_SUCCESS;
}
else
{
TERM_DEBUG_OFF (keepalive, KEEPALIVE);
- vty_out (vty, "BGP keepalives debugging is off%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP keepalives debugging is off");
}
return CMD_SUCCESS;
}
}
if (found_peer)
- vty_out (vty, "BGP keepalives debugging is off for %s%s", host, VTY_NEWLINE);
+ vty_outln (vty, "BGP keepalives debugging is off for %s", host);
else
- vty_out (vty, "BGP keepalives debugging was not enabled for %s%s", host, VTY_NEWLINE);
+ vty_outln (vty, "BGP keepalives debugging was not enabled for %s", host);
return CMD_SUCCESS;
}
if (bgp_debug_list_has_entry(bgp_debug_bestpath_prefixes, NULL, bestpath))
{
- vty_out (vty, "BGP bestpath debugging is already enabled for %s%s", bestpath_str, VTY_NEWLINE);
+ vty_outln (vty, "BGP bestpath debugging is already enabled for %s", bestpath_str);
return CMD_SUCCESS;
}
else
{
TERM_DEBUG_ON (bestpath, BESTPATH);
- vty_out (vty, "BGP bestpath debugging is on for %s%s", bestpath_str, VTY_NEWLINE);
+ vty_outln (vty, "BGP bestpath debugging is on for %s", bestpath_str);
}
return CMD_SUCCESS;
if (!ret)
{
prefix_free(argv_p);
- vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE);
+ vty_outln (vty, "%% Malformed Prefix");
return CMD_WARNING;
}
else
{
TERM_DEBUG_OFF (bestpath, BESTPATH);
- vty_out (vty, "BGP bestpath debugging (per prefix) is off%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP bestpath debugging (per prefix) is off");
}
}
}
if (found_prefix)
- vty_out (vty, "BGP bestpath debugging is off for %s%s", argv[idx_ipv4_ipv6_prefixlen]->arg, VTY_NEWLINE);
+ vty_outln (vty, "BGP bestpath debugging is off for %s",
+ argv[idx_ipv4_ipv6_prefixlen]->arg);
else
- vty_out (vty, "BGP bestpath debugging was not enabled for %s%s", argv[idx_ipv4_ipv6_prefixlen]->arg, VTY_NEWLINE);
+ vty_outln (vty, "BGP bestpath debugging was not enabled for %s",
+ argv[idx_ipv4_ipv6_prefixlen]->arg);
return CMD_SUCCESS;
}
else
{
TERM_DEBUG_OFF (bestpath, BESTPATH);
- vty_out (vty, "BGP bestpath debugging is off%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP bestpath debugging is off");
}
return CMD_SUCCESS;
}
{
TERM_DEBUG_ON (update, UPDATE_IN);
TERM_DEBUG_ON (update, UPDATE_OUT);
- vty_out (vty, "BGP updates debugging is on%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP updates debugging is on");
}
return CMD_SUCCESS;
}
if (strncmp ("i", argv[idx_in_out]->arg, 1) == 0)
{
TERM_DEBUG_ON (update, UPDATE_IN);
- vty_out (vty, "BGP updates debugging is on (inbound)%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP updates debugging is on (inbound)");
}
else
{
TERM_DEBUG_ON (update, UPDATE_OUT);
- vty_out (vty, "BGP updates debugging is on (outbound)%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP updates debugging is on (outbound)");
}
}
return CMD_SUCCESS;
{
if (bgp_debug_list_has_entry(bgp_debug_update_in_peers, host, NULL))
{
- vty_out (vty, "BGP inbound update debugging is already enabled for %s%s", host, VTY_NEWLINE);
+ vty_outln (vty, "BGP inbound update debugging is already enabled for %s",
+ host);
return CMD_SUCCESS;
}
}
{
if (bgp_debug_list_has_entry(bgp_debug_update_out_peers, host, NULL))
{
- vty_out (vty, "BGP outbound update debugging is already enabled for %s%s", host, VTY_NEWLINE);
+ vty_outln (vty, "BGP outbound update debugging is already enabled for %s",
+ host);
return CMD_SUCCESS;
}
}
if (inbound)
{
TERM_DEBUG_ON (update, UPDATE_IN);
- vty_out (vty, "BGP updates debugging is on (inbound) for %s%s", argv[idx_peer]->arg, VTY_NEWLINE);
+ vty_outln (vty, "BGP updates debugging is on (inbound) for %s",
+ argv[idx_peer]->arg);
}
else
{
TERM_DEBUG_ON (update, UPDATE_OUT);
- vty_out (vty, "BGP updates debugging is on (outbound) for %s%s", argv[idx_peer]->arg, VTY_NEWLINE);
+ vty_outln (vty, "BGP updates debugging is on (outbound) for %s",
+ argv[idx_peer]->arg);
}
}
return CMD_SUCCESS;
else
{
TERM_DEBUG_OFF (update, UPDATE_IN);
- vty_out (vty, "BGP updates debugging is off (inbound)%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP updates debugging is off (inbound)");
}
}
else
else
{
TERM_DEBUG_OFF (update, UPDATE_OUT);
- vty_out (vty, "BGP updates debugging is off (outbound)%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP updates debugging is off (outbound)");
}
}
else
{
TERM_DEBUG_OFF (update, UPDATE_IN);
- vty_out (vty, "BGP updates debugging (inbound) is off%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP updates debugging (inbound) is off");
}
}
}
else
{
TERM_DEBUG_OFF (update, UPDATE_OUT);
- vty_out (vty, "BGP updates debugging (outbound) is off%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP updates debugging (outbound) is off");
}
}
if (found_peer)
if (inbound)
- vty_out (vty, "BGP updates debugging (inbound) is off for %s%s", host, VTY_NEWLINE);
+ vty_outln (vty, "BGP updates debugging (inbound) is off for %s", host);
else
- vty_out (vty, "BGP updates debugging (outbound) is off for %s%s", host, VTY_NEWLINE);
+ vty_outln (vty, "BGP updates debugging (outbound) is off for %s",
+ host);
else
if (inbound)
- vty_out (vty, "BGP updates debugging (inbound) was not enabled for %s%s", host, VTY_NEWLINE);
+ vty_outln (vty, "BGP updates debugging (inbound) was not enabled for %s",
+ host);
else
- vty_out (vty, "BGP updates debugging (outbound) was not enabled for %s%s", host, VTY_NEWLINE);
+ vty_outln (vty, "BGP updates debugging (outbound) was not enabled for %s",
+ host);
return CMD_SUCCESS;
}
if (!ret)
{
prefix_free(argv_p);
- vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE);
+ vty_outln (vty, "%% Malformed Prefix");
return CMD_WARNING;
}
if (bgp_debug_list_has_entry(bgp_debug_update_prefixes, NULL, argv_p))
{
- vty_out (vty, "BGP updates debugging is already enabled for %s%s", argv[idx_ipv4_ipv6_prefixlen]->arg, VTY_NEWLINE);
+ vty_outln (vty, "BGP updates debugging is already enabled for %s",
+ argv[idx_ipv4_ipv6_prefixlen]->arg);
return CMD_SUCCESS;
}
else
{
TERM_DEBUG_ON (update, UPDATE_PREFIX);
- vty_out (vty, "BGP updates debugging is on for %s%s", argv[idx_ipv4_ipv6_prefixlen]->arg, VTY_NEWLINE);
+ vty_outln (vty, "BGP updates debugging is on for %s",
+ argv[idx_ipv4_ipv6_prefixlen]->arg);
}
return CMD_SUCCESS;
if (!ret)
{
prefix_free(argv_p);
- vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE);
+ vty_outln (vty, "%% Malformed Prefix");
return CMD_WARNING;
}
else
{
TERM_DEBUG_OFF (update, UPDATE_PREFIX);
- vty_out (vty, "BGP updates debugging (per prefix) is off%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP updates debugging (per prefix) is off");
}
}
}
if (found_prefix)
- vty_out (vty, "BGP updates debugging is off for %s%s", argv[idx_ipv4_ipv6_prefixlen]->arg, VTY_NEWLINE);
+ vty_outln (vty, "BGP updates debugging is off for %s",
+ argv[idx_ipv4_ipv6_prefixlen]->arg);
else
- vty_out (vty, "BGP updates debugging was not enabled for %s%s", argv[idx_ipv4_ipv6_prefixlen]->arg, VTY_NEWLINE);
+ vty_outln (vty, "BGP updates debugging was not enabled for %s",
+ argv[idx_ipv4_ipv6_prefixlen]->arg);
return CMD_SUCCESS;
}
TERM_DEBUG_OFF (update, UPDATE_IN);
TERM_DEBUG_OFF (update, UPDATE_OUT);
TERM_DEBUG_OFF (update, UPDATE_PREFIX);
- vty_out (vty, "BGP updates debugging is off%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP updates debugging is off");
}
return CMD_SUCCESS;
}
else
{
TERM_DEBUG_ON (zebra, ZEBRA);
- vty_out (vty, "BGP zebra debugging is on%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP zebra debugging is on");
}
return CMD_SUCCESS;
}
if (!ret)
{
prefix_free(argv_p);
- vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE);
+ vty_outln (vty, "%% Malformed Prefix");
return CMD_WARNING;
}
if (bgp_debug_list_has_entry(bgp_debug_zebra_prefixes, NULL, argv_p))
{
- vty_out (vty, "BGP zebra debugging is already enabled for %s%s", argv[idx_ipv4_ipv6_prefixlen]->arg, VTY_NEWLINE);
+ vty_outln (vty, "BGP zebra debugging is already enabled for %s",
+ argv[idx_ipv4_ipv6_prefixlen]->arg);
return CMD_SUCCESS;
}
else
{
TERM_DEBUG_ON (zebra, ZEBRA);
- vty_out (vty, "BGP zebra debugging is on for %s%s", argv[idx_ipv4_ipv6_prefixlen]->arg, VTY_NEWLINE);
+ vty_outln (vty, "BGP zebra debugging is on for %s",
+ argv[idx_ipv4_ipv6_prefixlen]->arg);
}
return CMD_SUCCESS;
else
{
TERM_DEBUG_OFF (zebra, ZEBRA);
- vty_out (vty, "BGP zebra debugging is off%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP zebra debugging is off");
}
return CMD_SUCCESS;
}
if (!ret)
{
prefix_free(argv_p);
- vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE);
+ vty_outln (vty, "%% Malformed Prefix");
return CMD_WARNING;
}
else
{
TERM_DEBUG_OFF (zebra, ZEBRA);
- vty_out (vty, "BGP zebra debugging is off%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP zebra debugging is off");
}
}
}
if (found_prefix)
- vty_out (vty, "BGP zebra debugging is off for %s%s", argv[idx_ipv4_ipv6_prefixlen]->arg, VTY_NEWLINE);
+ vty_outln (vty, "BGP zebra debugging is off for %s",
+ argv[idx_ipv4_ipv6_prefixlen]->arg);
else
- vty_out (vty, "BGP zebra debugging was not enabled for %s%s", argv[idx_ipv4_ipv6_prefixlen]->arg, VTY_NEWLINE);
+ vty_outln (vty, "BGP zebra debugging was not enabled for %s",
+ argv[idx_ipv4_ipv6_prefixlen]->arg);
return CMD_SUCCESS;
}
else
{
TERM_DEBUG_ON (allow_martians, ALLOW_MARTIANS);
- vty_out (vty, "BGP allow_martian next hop debugging is on%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP allow_martian next hop debugging is on");
}
return CMD_SUCCESS;
}
else
{
TERM_DEBUG_OFF (allow_martians, ALLOW_MARTIANS);
- vty_out (vty, "BGP allow martian next hop debugging is off%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP allow martian next hop debugging is off");
}
return CMD_SUCCESS;
}
else
{
TERM_DEBUG_ON (update_groups, UPDATE_GROUPS);
- vty_out (vty, "BGP update-groups debugging is on%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP update-groups debugging is on");
}
return CMD_SUCCESS;
}
else
{
TERM_DEBUG_OFF (update_groups, UPDATE_GROUPS);
- vty_out (vty, "BGP update-groups debugging is off%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP update-groups debugging is off");
}
return CMD_SUCCESS;
}
TERM_DEBUG_OFF (neighbor_events, NEIGHBOR_EVENTS);
TERM_DEBUG_OFF (zebra, ZEBRA);
TERM_DEBUG_OFF (allow_martians, ALLOW_MARTIANS);
- vty_out (vty, "All possible debugging has been turned off%s", VTY_NEWLINE);
+ vty_outln (vty, "All possible debugging has been turned off");
return CMD_SUCCESS;
}
DEBUG_STR
BGP_STR)
{
- vty_out (vty, "BGP debugging status:%s", VTY_NEWLINE);
+ vty_outln (vty, "BGP debugging status:");
if (BGP_DEBUG (as4, AS4))
- vty_out (vty, " BGP as4 debugging is on%s", VTY_NEWLINE);
+ vty_outln (vty, " BGP as4 debugging is on");
if (BGP_DEBUG (as4, AS4_SEGMENT))
- vty_out (vty, " BGP as4 aspath segment debugging is on%s", VTY_NEWLINE);
+ vty_outln (vty, " BGP as4 aspath segment debugging is on");
if (BGP_DEBUG (bestpath, BESTPATH))
bgp_debug_list_print (vty, " BGP bestpath debugging is on",
bgp_debug_neighbor_events_peers);
if (BGP_DEBUG (nht, NHT))
- vty_out (vty, " BGP next-hop tracking debugging is on%s", VTY_NEWLINE);
+ vty_outln (vty, " BGP next-hop tracking debugging is on");
if (BGP_DEBUG (update_groups, UPDATE_GROUPS))
- vty_out (vty, " BGP update-groups debugging is on%s", VTY_NEWLINE);
+ vty_outln (vty, " BGP update-groups debugging is on");
if (BGP_DEBUG (update, UPDATE_PREFIX))
bgp_debug_list_print (vty, " BGP updates debugging is on",
bgp_debug_zebra_prefixes);
if (BGP_DEBUG (allow_martians, ALLOW_MARTIANS))
- vty_out (vty, " BGP allow martian next hop debugging is on%s", VTY_NEWLINE);
- vty_out (vty, "%s", VTY_NEWLINE);
+ vty_outln (vty, " BGP allow martian next hop debugging is on");
+ vty_outln (vty, "");
return CMD_SUCCESS;
}
if (CONF_BGP_DEBUG (as4, AS4))
{
- vty_out (vty, "debug bgp as4%s", VTY_NEWLINE);
+ vty_outln (vty, "debug bgp as4");
write++;
}
if (CONF_BGP_DEBUG (as4, AS4_SEGMENT))
{
- vty_out (vty, "debug bgp as4 segment%s", VTY_NEWLINE);
+ vty_outln (vty, "debug bgp as4 segment");
write++;
}
if (CONF_BGP_DEBUG (nht, NHT))
{
- vty_out (vty, "debug bgp nht%s", VTY_NEWLINE);
+ vty_outln (vty, "debug bgp nht");
write++;
}
if (CONF_BGP_DEBUG (update_groups, UPDATE_GROUPS))
{
- vty_out (vty, "debug bgp update-groups%s", VTY_NEWLINE);
+ vty_outln (vty, "debug bgp update-groups");
write++;
}
{
if (!bgp_debug_zebra_prefixes || list_isempty(bgp_debug_zebra_prefixes))
{
- vty_out (vty, "debug bgp zebra%s", VTY_NEWLINE);
+ vty_outln (vty, "debug bgp zebra");
write++;
}
else
if (CONF_BGP_DEBUG (allow_martians, ALLOW_MARTIANS))
{
- vty_out (vty, "debug bgp allow-martians%s", VTY_NEWLINE);
+ vty_outln (vty, "debug bgp allow-martians");
write++;
}