summaryrefslogtreecommitdiff
path: root/bgpd/bgp_debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_debug.c')
-rw-r--r--bgpd/bgp_debug.c180
1 files changed, 100 insertions, 80 deletions
diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c
index 5a491a0842..0d11794aa7 100644
--- a/bgpd/bgp_debug.c
+++ b/bgpd/bgp_debug.c
@@ -254,7 +254,7 @@ bgp_debug_list_print (struct vty *vty, const char *desc, struct list *list)
}
}
- vty_out (vty, "%s", VTY_NEWLINE);
+ vty_outln (vty, "");
}
/* Print the command to enable the debug for each peer/prefix this debug is
@@ -274,16 +274,16 @@ bgp_debug_list_conf_print (struct vty *vty, const char *desc, struct list *list)
{
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++;
}
}
@@ -291,7 +291,7 @@ bgp_debug_list_conf_print (struct vty *vty, const char *desc, struct list *list)
if (!write)
{
- vty_out (vty, "%s%s", desc, VTY_NEWLINE);
+ vty_outln (vty, "%s", desc);
write++;
}
@@ -583,7 +583,7 @@ DEFUN (debug_bgp_as4,
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;
}
@@ -601,7 +601,7 @@ DEFUN (no_debug_bgp_as4,
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;
}
@@ -619,7 +619,7 @@ DEFUN (debug_bgp_as4_segment,
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;
}
@@ -638,7 +638,7 @@ DEFUN (no_debug_bgp_as4_segment,
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;
}
@@ -658,7 +658,7 @@ DEFUN (debug_bgp_neighbor_events,
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;
}
@@ -681,7 +681,8 @@ DEFUN (debug_bgp_neighbor_events_peer,
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;
}
@@ -692,7 +693,7 @@ DEFUN (debug_bgp_neighbor_events_peer,
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;
}
@@ -712,7 +713,7 @@ DEFUN (no_debug_bgp_neighbor_events,
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;
}
@@ -746,9 +747,10 @@ DEFUN (no_debug_bgp_neighbor_events_peer,
}
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;
}
@@ -766,7 +768,7 @@ DEFUN (debug_bgp_nht,
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;
}
@@ -784,7 +786,7 @@ DEFUN (no_debug_bgp_nht,
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;
}
@@ -804,7 +806,7 @@ DEFUN (debug_bgp_keepalive,
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;
}
@@ -827,7 +829,8 @@ DEFUN (debug_bgp_keepalive_peer,
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;
}
@@ -838,7 +841,7 @@ DEFUN (debug_bgp_keepalive_peer,
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;
}
@@ -858,7 +861,7 @@ DEFUN (no_debug_bgp_keepalive,
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;
}
@@ -892,9 +895,9 @@ DEFUN (no_debug_bgp_keepalive_peer,
}
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;
}
@@ -919,7 +922,7 @@ DEFPY (debug_bgp_bestpath_prefix,
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;
}
@@ -932,7 +935,7 @@ DEFPY (debug_bgp_bestpath_prefix,
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;
@@ -959,7 +962,7 @@ DEFUN (no_debug_bgp_bestpath_prefix,
if (!ret)
{
prefix_free(argv_p);
- vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE);
+ vty_outln (vty, "%% Malformed Prefix");
return CMD_WARNING;
}
@@ -976,15 +979,17 @@ DEFUN (no_debug_bgp_bestpath_prefix,
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;
}
@@ -1004,7 +1009,7 @@ DEFUN (no_debug_bgp_bestpath,
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;
}
@@ -1030,7 +1035,7 @@ DEFUN (debug_bgp_update,
{
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;
}
@@ -1063,12 +1068,12 @@ DEFUN (debug_bgp_update_direct,
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;
@@ -1106,7 +1111,8 @@ DEFUN (debug_bgp_update_direct_peer,
{
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;
}
}
@@ -1115,7 +1121,8 @@ DEFUN (debug_bgp_update_direct_peer,
{
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;
}
}
@@ -1159,12 +1166,14 @@ DEFUN (debug_bgp_update_direct_peer,
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;
@@ -1192,7 +1201,7 @@ DEFUN (no_debug_bgp_update_direct,
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
@@ -1206,7 +1215,7 @@ DEFUN (no_debug_bgp_update_direct,
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)");
}
}
@@ -1249,7 +1258,7 @@ DEFUN (no_debug_bgp_update_direct_peer,
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");
}
}
}
@@ -1266,7 +1275,7 @@ DEFUN (no_debug_bgp_update_direct_peer,
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");
}
}
@@ -1293,14 +1302,17 @@ DEFUN (no_debug_bgp_update_direct_peer,
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;
}
@@ -1325,7 +1337,7 @@ DEFUN (debug_bgp_update_prefix,
if (!ret)
{
prefix_free(argv_p);
- vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE);
+ vty_outln (vty, "%% Malformed Prefix");
return CMD_WARNING;
}
@@ -1335,7 +1347,8 @@ DEFUN (debug_bgp_update_prefix,
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;
}
@@ -1348,7 +1361,8 @@ DEFUN (debug_bgp_update_prefix,
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;
@@ -1376,7 +1390,7 @@ DEFUN (no_debug_bgp_update_prefix,
if (!ret)
{
prefix_free(argv_p);
- vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE);
+ vty_outln (vty, "%% Malformed Prefix");
return CMD_WARNING;
}
@@ -1393,15 +1407,17 @@ DEFUN (no_debug_bgp_update_prefix,
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;
}
@@ -1432,7 +1448,7 @@ DEFUN (no_debug_bgp_update,
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;
}
@@ -1450,7 +1466,7 @@ DEFUN (debug_bgp_zebra,
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;
}
@@ -1475,7 +1491,7 @@ DEFUN (debug_bgp_zebra_prefix,
if (!ret)
{
prefix_free(argv_p);
- vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE);
+ vty_outln (vty, "%% Malformed Prefix");
return CMD_WARNING;
}
@@ -1484,7 +1500,8 @@ DEFUN (debug_bgp_zebra_prefix,
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;
}
@@ -1495,7 +1512,8 @@ DEFUN (debug_bgp_zebra_prefix,
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;
@@ -1516,7 +1534,7 @@ DEFUN (no_debug_bgp_zebra,
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;
}
@@ -1543,7 +1561,7 @@ DEFUN (no_debug_bgp_zebra_prefix,
if (!ret)
{
prefix_free(argv_p);
- vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE);
+ vty_outln (vty, "%% Malformed Prefix");
return CMD_WARNING;
}
@@ -1558,15 +1576,17 @@ DEFUN (no_debug_bgp_zebra_prefix,
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;
}
@@ -1583,7 +1603,7 @@ DEFUN (debug_bgp_allow_martians,
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;
}
@@ -1601,7 +1621,7 @@ DEFUN (no_debug_bgp_allow_martians,
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;
}
@@ -1620,7 +1640,7 @@ DEFUN (debug_bgp_update_groups,
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;
}
@@ -1638,7 +1658,7 @@ DEFUN (no_debug_bgp_update_groups,
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;
}
@@ -1671,7 +1691,7 @@ DEFUN (no_debug_bgp,
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;
}
@@ -1683,13 +1703,13 @@ DEFUN (show_debugging_bgp,
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",
@@ -1704,10 +1724,10 @@ DEFUN (show_debugging_bgp,
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",
@@ -1726,8 +1746,8 @@ DEFUN (show_debugging_bgp,
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;
}
@@ -1782,13 +1802,13 @@ bgp_config_write_debug (struct vty *vty)
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++;
}
@@ -1812,13 +1832,13 @@ bgp_config_write_debug (struct vty *vty)
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++;
}
@@ -1844,7 +1864,7 @@ bgp_config_write_debug (struct vty *vty)
{
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
@@ -1856,7 +1876,7 @@ bgp_config_write_debug (struct vty *vty)
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++;
}