Search in sources :

Example 1 with Bgp_address_familyContext

use of org.batfish.grammar.cisco.CiscoParser.Bgp_address_familyContext in project batfish by batfish.

the class CiscoControlPlaneExtractor method enterAddress_family_header.

@Override
public void enterAddress_family_header(Address_family_headerContext ctx) {
    String addressFamilyStr = ctx.addressFamilyStr;
    if (_inBlockNeighbor) {
        if (_currentBlockNeighborAddressFamilies.contains(addressFamilyStr)) {
            popPeer();
            _inBlockNeighbor = false;
            _currentBlockNeighborAddressFamilies.clear();
        } else {
            _currentBlockNeighborAddressFamilies.add(addressFamilyStr);
        }
    }
    Bgp_address_familyContext af = ctx.af;
    if (af.VPNV4() != null || af.VPNV6() != null || af.MDT() != null || af.MULTICAST() != null) {
        pushPeer(_dummyPeerGroup);
    } else {
        pushPeer(_currentPeerGroup);
    }
    if (af.IPV6() != null) {
        _inIpv6BgpPeer = true;
    }
    _currentAddressFamily = addressFamilyStr;
}
Also used : Bgp_address_familyContext(org.batfish.grammar.cisco.CiscoParser.Bgp_address_familyContext)

Aggregations

Bgp_address_familyContext (org.batfish.grammar.cisco.CiscoParser.Bgp_address_familyContext)1