summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_common.c')
-rw-r--r--bgpd/bgp_common.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/bgpd/bgp_common.c b/bgpd/bgp_common.c
index 90281ff5..8b2b6cea 100644
--- a/bgpd/bgp_common.c
+++ b/bgpd/bgp_common.c
@@ -62,6 +62,7 @@ qafx_num(qafx_bit_t bit)
/*==============================================================================
* Conversion tables for qafx_num => qAFI and qSAFI
* and qafx_num => iAFI and iSAFI
+ * and qafx_num => pAF
*/
const qAFI_t qAFI_map[] =
@@ -108,6 +109,17 @@ const iSAFI_t iSAFI_map[] =
[qafx_num_other] = iSAFI_Reserved,
} ;
+const pAF_t pAF_map[] =
+ {
+ [qafx_ipv4_unicast] = AF_INET,
+ [qafx_ipv4_multicast] = AF_INET,
+ [qafx_ipv4_mpls_vpn] = AF_INET,
+ [qafx_ipv6_unicast] = AF_INET6,
+ [qafx_ipv6_multicast] = AF_INET6,
+ [qafx_ipv6_mpls_vpn] = AF_INET6,
+ [qafx_num_other] = AF_UNSPEC,
+ } ;
+
/*==============================================================================
* Convert iAFI/iSAFI => qafx_num_t -- tolerates unknown/reserved
* and qAFI/qSAFI => qafx_num_t -- tolerates undef, but not unknown