summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2005-07-28 20:14:30 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2005-07-28 20:14:30 +0000
commitaf9aba972c893790ba809bbdb57eaeece88fcb1b (patch)
tree0b9deea75987fb28cd214be9ea53d4d780f638f4
parent04bc583ecad4492bd759df4d05ffad33decea50a (diff)
print the v4/v6 safi announce stuff, from wth
-rw-r--r--usr.sbin/bgpd/printconf.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/printconf.c b/usr.sbin/bgpd/printconf.c
index 08c2f2e4563..aa25203d42e 100644
--- a/usr.sbin/bgpd/printconf.c
+++ b/usr.sbin/bgpd/printconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: printconf.c,v 1.45 2005/07/01 13:38:14 claudio Exp $ */
+/* $OpenBSD: printconf.c,v 1.46 2005/07/28 20:14:29 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -32,6 +32,7 @@ void print_peer(struct peer_config *, struct bgpd_config *,
const char *);
const char *print_auth_alg(u_int8_t);
const char *print_enc_alg(u_int8_t);
+const char *print_safi(u_int8_t);
void print_rule(struct peer *, struct filter_rule *);
const char * mrt_type(enum mrt_type);
void print_mrt(u_int32_t, u_int32_t, const char *, const char *);
@@ -296,6 +297,9 @@ print_peer(struct peer_config *p, struct bgpd_config *conf, const char *c)
else if (p->auth.method == AUTH_IPSEC_IKE_ESP)
printf("%s\tipsec esp ike\n", c);
+ printf("%s\tannounce IPv4 %s\n", c, print_safi(p->capabilities.mp_v4));
+ printf("%s\tannounce IPv6 %s\n", c, print_safi(p->capabilities.mp_v6));
+
if (!TAILQ_EMPTY(&p->attrset))
printf("%s\t", c);
print_set(&p->attrset);
@@ -333,6 +337,19 @@ print_enc_alg(u_int8_t alg)
}
}
+const char *
+print_safi(u_int8_t safi)
+{
+ switch (safi) {
+ case SAFI_NONE:
+ return ("none");
+ case SAFI_UNICAST:
+ return ("unicast");
+ default:
+ return ("?");
+ }
+}
+
void
print_rule(struct peer *peer_l, struct filter_rule *r)
{