summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2023-10-17 16:01:00 +0300
committerDonatas Abraitis <donatas@opensourcerouting.org>2023-10-17 16:01:00 +0300
commit6ece98ecc10aedc89ddff224fff947c784bc2908 (patch)
treedce28df401a0220c19b83828d500d6dffffd2be8
parent1fb08e91d7a349475e6d0b8a39bc85a3cee07675 (diff)
bgpd: Reuse orf_type_str/orf_mode_str for dynamic capabilities code
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
-rw-r--r--bgpd/bgp_open.c17
-rw-r--r--bgpd/bgp_open.h2
2 files changed, 10 insertions, 9 deletions
diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c
index 866930c732..545da7c559 100644
--- a/bgpd/bgp_open.c
+++ b/bgpd/bgp_open.c
@@ -340,15 +340,14 @@ static void bgp_capability_orf_not_support(struct peer *peer, iana_afi_t afi,
peer->host, afi, safi, type, mode);
}
-static const struct message orf_type_str[] = {
- {ORF_TYPE_RESERVED, "Reserved"},
- {ORF_TYPE_PREFIX, "Prefixlist"},
- {0}};
-
-static const struct message orf_mode_str[] = {{ORF_MODE_RECEIVE, "Receive"},
- {ORF_MODE_SEND, "Send"},
- {ORF_MODE_BOTH, "Both"},
- {0}};
+const struct message orf_type_str[] = { { ORF_TYPE_RESERVED, "Reserved" },
+ { ORF_TYPE_PREFIX, "Prefixlist" },
+ { 0 } };
+
+const struct message orf_mode_str[] = { { ORF_MODE_RECEIVE, "Receive" },
+ { ORF_MODE_SEND, "Send" },
+ { ORF_MODE_BOTH, "Both" },
+ { 0 } };
static int bgp_capability_orf_entry(struct peer *peer,
struct capability_header *hdr)
diff --git a/bgpd/bgp_open.h b/bgpd/bgp_open.h
index a92c56d1b5..34f4b7619e 100644
--- a/bgpd/bgp_open.h
+++ b/bgpd/bgp_open.h
@@ -108,5 +108,7 @@ extern void bgp_capability_vty_out(struct vty *vty, struct peer *peer,
bool use_json, json_object *json_neigh);
extern as_t peek_for_as4_capability(struct peer *peer, uint16_t length);
extern const struct message capcode_str[];
+extern const struct message orf_type_str[];
+extern const struct message orf_mode_str[];
#endif /* _QUAGGA_BGP_OPEN_H */