summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_peer.h
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_peer.h')
-rw-r--r--bgpd/bgp_peer.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/bgpd/bgp_peer.h b/bgpd/bgp_peer.h
index 7e8a7e74..91070377 100644
--- a/bgpd/bgp_peer.h
+++ b/bgpd/bgp_peer.h
@@ -204,6 +204,10 @@ struct peer
#define PEER_CAP_AS4_ADV (1 << 7) /* as4 advertised */
#define PEER_CAP_AS4_RCV (1 << 8) /* as4 received */
+#define PEER_CAP_AS4_BOTH (PEER_CAP_AS4_ADV + PEER_CAP_AS4_RCV)
+#define PEER_CAP_AS4_USE(peer) \
+ (((peer)->cap & PEER_CAP_AS4_BOTH) == PEER_CAP_AS4_BOTH)
+
/* Capability flags (reset in bgp_stop) */
u_int16_t af_cap[AFI_MAX][SAFI_MAX];
#define PEER_CAP_ORF_PREFIX_SM_ADV (1 << 0) /* send-mode advertised */