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.c213
1 files changed, 112 insertions, 101 deletions
diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c
index 8a2ec3b498..5538402070 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_out (vty, VTYNL);
}
/* 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++;
}
@@ -299,7 +299,7 @@ bgp_debug_list_conf_print (struct vty *vty, const char *desc, struct list *list)
}
static void
-bgp_debug_list_add_entry(struct list *list, const char *host, struct prefix *p)
+bgp_debug_list_add_entry(struct list *list, const char *host, const struct prefix *p)
{
struct bgp_debug_filter *filter;
@@ -313,7 +313,8 @@ bgp_debug_list_add_entry(struct list *list, const char *host, struct prefix *p)
else if (p)
{
filter->host = NULL;
- filter->p = p;
+ filter->p = prefix_new();
+ prefix_copy (filter->p, p);
}
listnode_add(list, filter);
@@ -347,7 +348,7 @@ bgp_debug_list_remove_entry(struct list *list, const char *host, struct prefix *
}
static int
-bgp_debug_list_has_entry(struct list *list, const char *host, struct prefix *p)
+bgp_debug_list_has_entry(struct list *list, const char *host, const struct prefix *p)
{
struct bgp_debug_filter *filter;
struct listnode *node, *nnode;
@@ -582,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;
}
@@ -600,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;
}
@@ -618,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;
}
@@ -637,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;
}
@@ -657,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;
}
@@ -680,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;
}
@@ -691,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;
}
@@ -711,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;
}
@@ -745,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;
}
@@ -765,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;
}
@@ -783,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;
}
@@ -803,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;
}
@@ -826,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;
}
@@ -837,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;
}
@@ -857,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;
}
@@ -891,17 +895,21 @@ 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;
}
+#ifndef VTYSH_EXTRACT_PL
+#include "bgp_debug_clippy.c"
+#endif
+
/* debug bgp bestpath */
-DEFUN (debug_bgp_bestpath_prefix,
+DEFPY (debug_bgp_bestpath_prefix,
debug_bgp_bestpath_prefix_cmd,
- "debug bgp bestpath <A.B.C.D/M|X:X::X:X/M>",
+ "debug bgp bestpath <A.B.C.D/M|X:X::X:X/M>$bestpath",
DEBUG_STR
BGP_STR
"BGP bestpath\n"
@@ -909,30 +917,16 @@ DEFUN (debug_bgp_bestpath_prefix,
"IPv6 prefix\n")
{
- int idx_ipv4_ipv6_prefixlen = 3;
- struct prefix *argv_p;
- int ret;
-
- argv_p = prefix_new();
- ret = str2prefix (argv[idx_ipv4_ipv6_prefixlen]->arg, argv_p);
- if (!ret)
- {
- prefix_free(argv_p);
- vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE);
- return CMD_WARNING;
- }
-
-
if (!bgp_debug_bestpath_prefixes)
bgp_debug_bestpath_prefixes = list_new ();
- if (bgp_debug_list_has_entry(bgp_debug_bestpath_prefixes, NULL, argv_p))
+ if (bgp_debug_list_has_entry(bgp_debug_bestpath_prefixes, NULL, bestpath))
{
- vty_out (vty, "BGP bestptah debugging is already enabled for %s%s", argv[idx_ipv4_ipv6_prefixlen]->arg, VTY_NEWLINE);
+ vty_outln (vty, "BGP bestpath debugging is already enabled for %s", bestpath_str);
return CMD_SUCCESS;
}
- bgp_debug_list_add_entry(bgp_debug_bestpath_prefixes, NULL, argv_p);
+ bgp_debug_list_add_entry(bgp_debug_bestpath_prefixes, NULL, bestpath);
if (vty->node == CONFIG_NODE)
{
@@ -941,7 +935,7 @@ DEFUN (debug_bgp_bestpath_prefix,
else
{
TERM_DEBUG_ON (bestpath, BESTPATH);
- vty_out (vty, "BGP bestpath debugging is on for %s%s", argv[idx_ipv4_ipv6_prefixlen]->arg, VTY_NEWLINE);
+ vty_outln (vty, "BGP bestpath debugging is on for %s", bestpath_str);
}
return CMD_SUCCESS;
@@ -968,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;
}
@@ -985,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;
}
@@ -1013,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;
}
@@ -1039,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;
}
@@ -1072,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;
@@ -1115,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;
}
}
@@ -1124,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;
}
}
@@ -1168,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;
@@ -1201,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
@@ -1215,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)");
}
}
@@ -1258,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");
}
}
}
@@ -1275,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");
}
}
@@ -1302,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;
}
@@ -1334,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;
}
@@ -1344,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;
}
@@ -1357,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;
@@ -1385,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;
}
@@ -1402,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;
}
@@ -1441,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;
}
@@ -1459,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;
}
@@ -1484,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;
}
@@ -1493,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;
}
@@ -1504,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;
@@ -1525,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;
}
@@ -1552,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;
}
@@ -1567,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;
}
@@ -1592,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;
}
@@ -1610,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;
}
@@ -1629,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;
}
@@ -1647,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;
}
@@ -1680,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;
}
@@ -1692,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",
@@ -1713,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",
@@ -1735,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_out (vty, VTYNL);
return CMD_SUCCESS;
}
@@ -1791,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++;
}
@@ -1821,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++;
}
@@ -1853,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
@@ -1865,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++;
}