diff options
author | Philippe Guibert <philippe.guibert@6wind.com> | 2022-11-15 16:42:40 +0100 |
---|---|---|
committer | Philippe Guibert <philippe.guibert@6wind.com> | 2023-02-10 10:19:06 +0100 |
commit | 9eb11997104e3ba5e436220f758f7881c0c0556d (patch) | |
tree | 5b23e2116716f4fa7368312c3f8582f2de010bc6 /bgpd/bgp_vty.h | |
parent | Merge pull request #12757 from opensourcerouting/fix/advance_versions_for_pac... (diff) | |
download | frr-9eb11997104e3ba5e436220f758f7881c0c0556d.tar.xz frr-9eb11997104e3ba5e436220f758f7881c0c0556d.zip |
bgpd: store the bgp as identifier in the configured as-notation
This is a preliminary work to handle various ways to configure
a BGP Autonomous System. When creating a BGP instance, the
user may want to define the AS number as a dotted value,
instead of using an integer value.
To handle both cases, an as_pretty char attribute will store
the as number as it has been given to the vtysh command:
router bgp <as number>
Whenever the as integer of the BGP instance was dumped,
the as_pretty original format is used.
The json output reuses the integer value to keep backward
compatibility with old displays.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'bgpd/bgp_vty.h')
-rw-r--r-- | bgpd/bgp_vty.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_vty.h b/bgpd/bgp_vty.h index 019789dff..8ed7c965e 100644 --- a/bgpd/bgp_vty.h +++ b/bgpd/bgp_vty.h @@ -150,7 +150,7 @@ extern void bgp_vty_init(void); extern void community_alias_vty(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, - enum bgp_instance_type inst_type); + enum bgp_instance_type inst_type, const char *as_pretty); 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); |