summaryrefslogtreecommitdiff
path: root/bgpd/bgp_vty.c
diff options
context:
space:
mode:
authorpaul <paul>2003-08-13 00:32:49 +0000
committerpaul <paul>2003-08-13 00:32:49 +0000
commit848973c71e75424d07c2cd52ba991aae1b9df12a (patch)
tree0a46f5b0fea868dd2003a475d860108b14786fe1 /bgpd/bgp_vty.c
parente8f2984c00d406781eff42db7afcdae5d5a6a366 (diff)
2003-08-13 kunihiro <kunihiro@zebra.org>
* bgpd/bgp{_fsm.c,_vty.c,d.c,d.h}: Add support for "bgp log-neighbor-changes" command.
Diffstat (limited to 'bgpd/bgp_vty.c')
-rw-r--r--bgpd/bgp_vty.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 6514ac22..39a43c04 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -878,6 +878,34 @@ DEFUN (no_bgp_bestpath_aspath_ignore,
return CMD_SUCCESS;
}
+/* "bgp log-neighbor-changes" configuration. */
+DEFUN (bgp_log_neighbor_changes,
+ bgp_log_neighbor_changes_cmd,
+ "bgp log-neighbor-changes",
+ "BGP specific commands\n"
+ "Log neighbor up/down and reset reason\n")
+{
+ struct bgp *bgp;
+
+ bgp = vty->index;
+ bgp_flag_set (bgp, BGP_FLAG_LOG_NEIGHBOR_CHANGES);
+ return CMD_SUCCESS;
+}
+
+DEFUN (no_bgp_log_neighbor_changes,
+ no_bgp_log_neighbor_changes_cmd,
+ "no bgp log-neighbor-changes",
+ NO_STR
+ "BGP specific commands\n"
+ "Log neighbor up/down and reset reason\n")
+{
+ struct bgp *bgp;
+
+ bgp = vty->index;
+ bgp_flag_unset (bgp, BGP_FLAG_LOG_NEIGHBOR_CHANGES);
+ return CMD_SUCCESS;
+}
+
/* "bgp bestpath med" configuration. */
DEFUN (bgp_bestpath_med,
bgp_bestpath_med_cmd,
@@ -6660,6 +6688,9 @@ bgp_show_peer (struct vty *vty, struct peer *p)
p->established, p->dropped,
VTY_NEWLINE);
+ vty_out (vty, " Last reset %s%s", p->dropped ? peer_uptime (p->resettime, timebuf, BGP_UPTIME_LEN) : "never",
+ VTY_NEWLINE);
+
if (CHECK_FLAG (p->sflags, PEER_STATUS_PREFIX_OVERFLOW))
{
vty_out (vty, " Peer had exceeded the max. no. of prefixes configured.%s", VTY_NEWLINE);
@@ -7743,6 +7774,10 @@ bgp_vty_init ()
install_element (BGP_NODE, &bgp_bestpath_aspath_ignore_cmd);
install_element (BGP_NODE, &no_bgp_bestpath_aspath_ignore_cmd);
+ /* "bgp log-neighbor-changes" commands */
+ install_element (BGP_NODE, &bgp_log_neighbor_changes_cmd);
+ install_element (BGP_NODE, &no_bgp_log_neighbor_changes_cmd);
+
/* "bgp bestpath med" commands */
install_element (BGP_NODE, &bgp_bestpath_med_cmd);
install_element (BGP_NODE, &bgp_bestpath_med2_cmd);