]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_vty.h
bgpd: Adding BGP GR Global & Per Neighbour FSM changes
[mirror_frr.git] / bgpd / bgp_vty.h
index 5f3ce9cd8e54284a68083e53dfbb138a838e9596..3f60c7719c2dccb030895d7c477f79229108612c 100644 (file)
@@ -22,7 +22,7 @@
 #define _QUAGGA_BGP_VTY_H
 
 #include "bgpd/bgpd.h"
-
+#include "stream.h"
 struct bgp;
 
 #define BGP_INSTANCE_HELP_STR "BGP view\nBGP VRF\nView/VRF name\n"
@@ -46,6 +46,28 @@ struct bgp;
        "Address Family modifier\n"                                            \
        "Address Family modifier\n"
 
+#define SHOW_GR_HEADER \
+       "Codes: GR - Graceful Restart," \
+       " * -  Inheriting Global GR Config,\n" \
+       "       Restart - GR Mode-Restarting," \
+       " Helper - GR Mode-Helper,\n" \
+       "       Disable - GR Mode-Disable.\n\n"
+
+#define BGP_SHOW_PEER_GR_CAPABILITY( \
+                       vty, p, use_json, json) \
+       do {                    \
+               bgp_show_neighbor_graceful_restart_local_mode( \
+                               vty, p, use_json, json);                \
+               bgp_show_neighbor_graceful_restart_remote_mode( \
+                               vty, p, use_json, json); \
+               bgp_show_neighnor_graceful_restart_rbit( \
+                               vty, p, use_json, json);        \
+               bgp_show_neighbor_graceful_restart_time( \
+                               vty, p, use_json, json);        \
+               bgp_show_neighbor_graceful_restart_capability_per_afi_safi(\
+                                               vty, p, use_json, json); \
+       } while (0)
+
 extern void bgp_vty_init(void);
 extern const char *get_afi_safi_str(afi_t afi, safi_t safi, bool for_json);
 extern int bgp_get_vty(struct bgp **bgp, as_t *as, const char *name,