]> 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 7a9546e3ef82bfd26ed512d9d1fdf72e8c13fc38..3f60c7719c2dccb030895d7c477f79229108612c 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef _QUAGGA_BGP_VTY_H
 #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"
@@ -36,16 +38,40 @@ struct bgp;
 #define BGP_AFI_SAFI_CMD_STR    BGP_AFI_CMD_STR" "BGP_SAFI_CMD_STR
 #define BGP_AFI_SAFI_HELP_STR   BGP_AFI_HELP_STR BGP_SAFI_HELP_STR
 
-#define BGP_SAFI_WITH_LABEL_CMD_STR  "<unicast|multicast|vpn|labeled-unicast>"
+#define BGP_SAFI_WITH_LABEL_CMD_STR  "<unicast|multicast|vpn|labeled-unicast|flowspec>"
 #define BGP_SAFI_WITH_LABEL_HELP_STR                                           \
        "Address Family modifier\n"                                            \
        "Address Family modifier\n"                                            \
        "Address Family modifier\n"                                            \
+       "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 *afi_safi_print(afi_t afi, safi_t safi);
-extern const char *afi_safi_json(afi_t afi, safi_t safi);
+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,
+                      enum bgp_instance_type inst_type);
 extern void bgp_config_write_update_delay(struct vty *vty, struct bgp *bgp);
 extern void bgp_config_write_wpkt_quanta(struct vty *vty, struct bgp *bgp);
 extern void bgp_config_write_rpkt_quanta(struct vty *vty, struct bgp *bgp);
@@ -68,9 +94,9 @@ extern int argv_find_and_parse_safi(struct cmd_token **argv, int argc,
 extern int bgp_vty_find_and_parse_afi_safi_bgp(struct vty *vty,
                                               struct cmd_token **argv,
                                               int argc, int *idx, afi_t *afi,
-                                              safi_t *safi, struct bgp **bgp);
+                                              safi_t *safi, struct bgp **bgp,
+                                              bool use_json);
 extern int bgp_show_summary_vty(struct vty *vty, const char *name, afi_t afi,
-                               safi_t safi, uint8_t use_json);
-extern void bgp_vpn_policy_config_write_afi(struct vty *vty, struct bgp *bgp,
-                                           afi_t afi);
+                               safi_t safi, bool show_failed, bool use_json);
+
 #endif /* _QUAGGA_BGP_VTY_H */