summaryrefslogtreecommitdiff
path: root/bgpd/bgp_debug.c
diff options
context:
space:
mode:
authorDaniel Walton <dwalton@cumulusnetworks.com>2016-09-22 15:15:50 +0000
committerDaniel Walton <dwalton@cumulusnetworks.com>2016-09-22 15:15:50 +0000
commit4dcadbefd00d7c4c97a16f3adc591bd4478965df (patch)
treeacecbc7c32d2478e02018dfbcb230b2a6a9d4c39 /bgpd/bgp_debug.c
parent69642336f03b4097a2122a05c92ab0bc5a1a8836 (diff)
bgpd: argv update for all but bgp_vty.c
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_debug.c')
-rw-r--r--bgpd/bgp_debug.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c
index dc0f539847..bf865afdcb 100644
--- a/bgpd/bgp_debug.c
+++ b/bgpd/bgp_debug.c
@@ -630,7 +630,7 @@ DEFUN (debug_bgp_neighbor_events_peer,
"BGP IPv6 neighbor to debug\n"
"BGP neighbor on interface to debug\n")
{
- const char *host = argv[0];
+ const char *host = argv[3]->arg;
if (!bgp_debug_neighbor_events_peers)
bgp_debug_neighbor_events_peers = list_new ();
@@ -685,7 +685,7 @@ DEFUN (no_debug_bgp_neighbor_events_peer,
"BGP neighbor on interface to debug\n")
{
int found_peer = 0;
- const char *host = argv[0];
+ const char *host = argv[4]->arg;
if (bgp_debug_neighbor_events_peers && !list_isempty(bgp_debug_neighbor_events_peers))
{
@@ -774,7 +774,7 @@ DEFUN (debug_bgp_keepalive_peer,
"BGP IPv6 neighbor to debug\n"
"BGP neighbor on interface to debug\n")
{
- const char *host = argv[0];
+ const char *host = argv[3]->arg;
if (!bgp_debug_keepalive_peers)
bgp_debug_keepalive_peers = list_new ();
@@ -829,7 +829,7 @@ DEFUN (no_debug_bgp_keepalive_peer,
"BGP neighbor on interface to debug\n")
{
int found_peer = 0;
- const char *host = argv[0];
+ const char *host = argv[4]->arg;
if (bgp_debug_keepalive_peers && !list_isempty(bgp_debug_keepalive_peers))
{
@@ -867,7 +867,7 @@ DEFUN (debug_bgp_bestpath_prefix,
int ret;
argv_p = prefix_new();
- ret = str2prefix (argv[0], argv_p);
+ ret = str2prefix (argv[3]->arg, argv_p);
if (!ret)
{
prefix_free(argv_p);
@@ -881,7 +881,7 @@ DEFUN (debug_bgp_bestpath_prefix,
if (bgp_debug_list_has_entry(bgp_debug_bestpath_prefixes, NULL, argv_p))
{
- vty_out (vty, "BGP bestptah debugging is already enabled for %s%s", argv[0], VTY_NEWLINE);
+ vty_out (vty, "BGP bestptah debugging is already enabled for %s%s", argv[3]->arg, VTY_NEWLINE);
return CMD_SUCCESS;
}
@@ -894,7 +894,7 @@ DEFUN (debug_bgp_bestpath_prefix,
else
{
TERM_DEBUG_ON (bestpath, BESTPATH);
- vty_out (vty, "BGP bestpath debugging is on for %s%s", argv[0], VTY_NEWLINE);
+ vty_out (vty, "BGP bestpath debugging is on for %s%s", argv[3]->arg, VTY_NEWLINE);
}
return CMD_SUCCESS;
@@ -916,7 +916,7 @@ DEFUN (no_debug_bgp_bestpath_prefix,
int ret;
argv_p = prefix_new();
- ret = str2prefix (argv[0], argv_p);
+ ret = str2prefix (argv[4]->arg, argv_p);
if (!ret)
{
prefix_free(argv_p);
@@ -943,9 +943,9 @@ DEFUN (no_debug_bgp_bestpath_prefix,
}
if (found_prefix)
- vty_out (vty, "BGP bestpath debugging is off for %s%s", argv[0], VTY_NEWLINE);
+ vty_out (vty, "BGP bestpath debugging is off for %s%s", argv[4]->arg, VTY_NEWLINE);
else
- vty_out (vty, "BGP bestpath debugging was not enabled for %s%s", argv[0], VTY_NEWLINE);
+ vty_out (vty, "BGP bestpath debugging was not enabled for %s%s", argv[4]->arg, VTY_NEWLINE);
return CMD_SUCCESS;
}
@@ -1006,21 +1006,21 @@ DEFUN (debug_bgp_update_direct,
"Outbound updates\n")
{
- if (strncmp ("i", argv[0], 1) == 0)
+ if (strncmp ("i", argv[3]->arg, 1) == 0)
bgp_debug_list_free(bgp_debug_update_in_peers);
else
bgp_debug_list_free(bgp_debug_update_out_peers);
if (vty->node == CONFIG_NODE)
{
- if (strncmp ("i", argv[0], 1) == 0)
+ if (strncmp ("i", argv[3]->arg, 1) == 0)
DEBUG_ON (update, UPDATE_IN);
else
DEBUG_ON (update, UPDATE_OUT);
}
else
{
- if (strncmp ("i", argv[0], 1) == 0)
+ if (strncmp ("i", argv[3]->arg, 1) == 0)
{
TERM_DEBUG_ON (update, UPDATE_IN);
vty_out (vty, "BGP updates debugging is on (inbound)%s", VTY_NEWLINE);
@@ -1046,7 +1046,7 @@ DEFUN (debug_bgp_update_direct_peer,
"BGP IPv6 neighbor to debug\n"
"BGP neighbor on interface to debug\n")
{
- const char *host = argv[1];
+ const char *host = argv[4]->arg;
int inbound;
if (!bgp_debug_update_in_peers)
@@ -1055,7 +1055,7 @@ DEFUN (debug_bgp_update_direct_peer,
if (!bgp_debug_update_out_peers)
bgp_debug_update_out_peers = list_new ();
- if (strncmp ("i", argv[0], 1) == 0)
+ if (strncmp ("i", argv[3]->arg, 1) == 0)
inbound = 1;
else
inbound = 0;
@@ -1117,12 +1117,12 @@ 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[1], VTY_NEWLINE);
+ vty_out (vty, "BGP updates debugging is on (inbound) for %s%s", argv[4]->arg, VTY_NEWLINE);
}
else
{
TERM_DEBUG_ON (update, UPDATE_OUT);
- vty_out (vty, "BGP updates debugging is on (outbound) for %s%s", argv[1], VTY_NEWLINE);
+ vty_out (vty, "BGP updates debugging is on (outbound) for %s%s", argv[4]->arg, VTY_NEWLINE);
}
}
return CMD_SUCCESS;
@@ -1138,7 +1138,7 @@ DEFUN (no_debug_bgp_update_direct,
"Inbound updates\n"
"Outbound updates\n")
{
- if (strncmp ("i", argv[0], 1) == 0)
+ if (strncmp ("i", argv[4]->arg, 1) == 0)
{
bgp_debug_list_free(bgp_debug_update_in_peers);
@@ -1185,9 +1185,9 @@ DEFUN (no_debug_bgp_update_direct_peer,
{
int inbound;
int found_peer = 0;
- const char *host = argv[1];
+ const char *host = argv[5]->arg;
- if (strncmp ("i", argv[0], 1) == 0)
+ if (strncmp ("i", argv[4]->arg, 1) == 0)
inbound = 1;
else
inbound = 0;
@@ -1275,7 +1275,7 @@ DEFUN (debug_bgp_update_prefix,
int ret;
argv_p = prefix_new();
- ret = str2prefix (argv[0], argv_p);
+ ret = str2prefix (argv[4]->arg, argv_p);
if (!ret)
{
prefix_free(argv_p);
@@ -1289,7 +1289,7 @@ 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[0], VTY_NEWLINE);
+ vty_out (vty, "BGP updates debugging is already enabled for %s%s", argv[4]->arg, VTY_NEWLINE);
return CMD_SUCCESS;
}
@@ -1302,7 +1302,7 @@ DEFUN (debug_bgp_update_prefix,
else
{
TERM_DEBUG_ON (update, UPDATE_PREFIX);
- vty_out (vty, "BGP updates debugging is on for %s%s", argv[0], VTY_NEWLINE);
+ vty_out (vty, "BGP updates debugging is on for %s%s", argv[4]->arg, VTY_NEWLINE);
}
return CMD_SUCCESS;
@@ -1325,7 +1325,7 @@ DEFUN (no_debug_bgp_update_prefix,
int ret;
argv_p = prefix_new();
- ret = str2prefix (argv[0], argv_p);
+ ret = str2prefix (argv[5]->arg, argv_p);
if (!ret)
{
prefix_free(argv_p);
@@ -1352,9 +1352,9 @@ DEFUN (no_debug_bgp_update_prefix,
}
if (found_prefix)
- vty_out (vty, "BGP updates debugging is off for %s%s", argv[0], VTY_NEWLINE);
+ vty_out (vty, "BGP updates debugging is off for %s%s", argv[5]->arg, VTY_NEWLINE);
else
- vty_out (vty, "BGP updates debugging was not enabled for %s%s", argv[0], VTY_NEWLINE);
+ vty_out (vty, "BGP updates debugging was not enabled for %s%s", argv[5]->arg, VTY_NEWLINE);
return CMD_SUCCESS;
}
@@ -1422,7 +1422,7 @@ DEFUN (debug_bgp_zebra_prefix,
int ret;
argv_p = prefix_new();
- ret = str2prefix (argv[0], argv_p);
+ ret = str2prefix (argv[4]->arg, argv_p);
if (!ret)
{
prefix_free(argv_p);
@@ -1435,7 +1435,7 @@ 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[0], VTY_NEWLINE);
+ vty_out (vty, "BGP zebra debugging is already enabled for %s%s", argv[4]->arg, VTY_NEWLINE);
return CMD_SUCCESS;
}
@@ -1446,7 +1446,7 @@ DEFUN (debug_bgp_zebra_prefix,
else
{
TERM_DEBUG_ON (zebra, ZEBRA);
- vty_out (vty, "BGP zebra debugging is on for %s%s", argv[0], VTY_NEWLINE);
+ vty_out (vty, "BGP zebra debugging is on for %s%s", argv[4]->arg, VTY_NEWLINE);
}
return CMD_SUCCESS;
@@ -1489,7 +1489,7 @@ DEFUN (no_debug_bgp_zebra_prefix,
int ret;
argv_p = prefix_new();
- ret = str2prefix (argv[0], argv_p);
+ ret = str2prefix (argv[5]->arg, argv_p);
if (!ret)
{
prefix_free(argv_p);
@@ -1514,9 +1514,9 @@ DEFUN (no_debug_bgp_zebra_prefix,
}
if (found_prefix)
- vty_out (vty, "BGP zebra debugging is off for %s%s", argv[0], VTY_NEWLINE);
+ vty_out (vty, "BGP zebra debugging is off for %s%s", argv[5]->arg, VTY_NEWLINE);
else
- vty_out (vty, "BGP zebra debugging was not enabled for %s%s", argv[0], VTY_NEWLINE);
+ vty_out (vty, "BGP zebra debugging was not enabled for %s%s", argv[5]->arg, VTY_NEWLINE);
return CMD_SUCCESS;
}