Search in sources :

Example 1 with Route6FilterLine

use of org.batfish.representation.juniper.Route6FilterLine in project batfish by batfish.

the class ConfigurationBuilder method enterPopsfrf_exact.

@Override
public void enterPopsfrf_exact(Popsfrf_exactContext ctx) {
    if (_currentRouteFilterPrefix != null) {
        // ipv4
        Route4FilterLine line = new Route4FilterLineExact(_currentRouteFilterPrefix);
        _currentRouteFilterLine = _currentRouteFilter.insertLine(line, Route4FilterLine.class);
    } else if (_currentRoute6FilterPrefix != null) {
        // ipv6
        Route6FilterLine line = new Route6FilterLineExact(_currentRoute6FilterPrefix);
        _currentRoute6FilterLine = _currentRouteFilter.insertLine(line, Route6FilterLine.class);
    }
}
Also used : Route6FilterLine(org.batfish.representation.juniper.Route6FilterLine) Route4FilterLineExact(org.batfish.representation.juniper.Route4FilterLineExact) Route6FilterLineExact(org.batfish.representation.juniper.Route6FilterLineExact) Route4FilterLine(org.batfish.representation.juniper.Route4FilterLine)

Example 2 with Route6FilterLine

use of org.batfish.representation.juniper.Route6FilterLine in project batfish by batfish.

the class ConfigurationBuilder method enterPopsfrf_orlonger.

@Override
public void enterPopsfrf_orlonger(Popsfrf_orlongerContext ctx) {
    if (_currentRouteFilterPrefix != null) {
        // ipv4
        Route4FilterLine line = new Route4FilterLineOrLonger(_currentRouteFilterPrefix);
        _currentRouteFilterLine = _currentRouteFilter.insertLine(line, Route4FilterLine.class);
    } else if (_currentRoute6FilterPrefix != null) {
        // ipv6
        Route6FilterLine line = new Route6FilterLineOrLonger(_currentRoute6FilterPrefix);
        _currentRoute6FilterLine = _currentRouteFilter.insertLine(line, Route6FilterLine.class);
    }
}
Also used : Route6FilterLine(org.batfish.representation.juniper.Route6FilterLine) Route6FilterLineOrLonger(org.batfish.representation.juniper.Route6FilterLineOrLonger) Route4FilterLine(org.batfish.representation.juniper.Route4FilterLine) Route4FilterLineOrLonger(org.batfish.representation.juniper.Route4FilterLineOrLonger)

Example 3 with Route6FilterLine

use of org.batfish.representation.juniper.Route6FilterLine in project batfish by batfish.

the class ConfigurationBuilder method enterPopsfrf_prefix_length_range.

@Override
public void enterPopsfrf_prefix_length_range(Popsfrf_prefix_length_rangeContext ctx) {
    int minPrefixLength = toInt(ctx.low);
    int maxPrefixLength = toInt(ctx.high);
    if (_currentRouteFilterPrefix != null) {
        // ipv4
        Route4FilterLine line = new Route4FilterLineLengthRange(_currentRouteFilterPrefix, minPrefixLength, maxPrefixLength);
        _currentRouteFilterLine = _currentRouteFilter.insertLine(line, Route4FilterLine.class);
    } else if (_currentRoute6FilterPrefix != null) {
        // ipv6
        Route6FilterLine line = new Route6FilterLineLengthRange(_currentRoute6FilterPrefix, minPrefixLength, maxPrefixLength);
        _currentRoute6FilterLine = _currentRouteFilter.insertLine(line, Route6FilterLine.class);
    }
}
Also used : Route6FilterLine(org.batfish.representation.juniper.Route6FilterLine) Route4FilterLine(org.batfish.representation.juniper.Route4FilterLine) Route4FilterLineLengthRange(org.batfish.representation.juniper.Route4FilterLineLengthRange) Route6FilterLineLengthRange(org.batfish.representation.juniper.Route6FilterLineLengthRange)

Example 4 with Route6FilterLine

use of org.batfish.representation.juniper.Route6FilterLine in project batfish by batfish.

the class ConfigurationBuilder method enterPopsfrf_through.

@Override
public void enterPopsfrf_through(Popsfrf_throughContext ctx) {
    if (_currentRouteFilterPrefix != null) {
        // ipv4
        Prefix throughPrefix = Prefix.parse(ctx.IP_PREFIX().getText());
        Route4FilterLine line = new Route4FilterLineThrough(_currentRouteFilterPrefix, throughPrefix);
        _currentRouteFilterLine = _currentRouteFilter.insertLine(line, Route4FilterLine.class);
    } else if (_currentRoute6FilterPrefix != null) {
        // ipv6
        Prefix6 throughPrefix6 = new Prefix6(ctx.IPV6_PREFIX().getText());
        Route6FilterLine line = new Route6FilterLineThrough(_currentRoute6FilterPrefix, throughPrefix6);
        _currentRoute6FilterLine = _currentRouteFilter.insertLine(line, Route6FilterLine.class);
    }
}
Also used : Route6FilterLine(org.batfish.representation.juniper.Route6FilterLine) Route6FilterLineThrough(org.batfish.representation.juniper.Route6FilterLineThrough) Route4FilterLineThrough(org.batfish.representation.juniper.Route4FilterLineThrough) Route4FilterLine(org.batfish.representation.juniper.Route4FilterLine) Prefix(org.batfish.datamodel.Prefix) Prefix6(org.batfish.datamodel.Prefix6)

Example 5 with Route6FilterLine

use of org.batfish.representation.juniper.Route6FilterLine in project batfish by batfish.

the class ConfigurationBuilder method enterPopsfrf_longer.

@Override
public void enterPopsfrf_longer(Popsfrf_longerContext ctx) {
    if (_currentRouteFilterPrefix != null) {
        // ipv4
        Route4FilterLine line = new Route4FilterLineLonger(_currentRouteFilterPrefix);
        _currentRouteFilterLine = _currentRouteFilter.insertLine(line, Route4FilterLine.class);
    } else if (_currentRoute6FilterPrefix != null) {
        // ipv6
        Route6FilterLine line = new Route6FilterLineLonger(_currentRoute6FilterPrefix);
        _currentRoute6FilterLine = _currentRouteFilter.insertLine(line, Route6FilterLine.class);
    }
}
Also used : Route6FilterLine(org.batfish.representation.juniper.Route6FilterLine) Route4FilterLineLonger(org.batfish.representation.juniper.Route4FilterLineLonger) Route4FilterLine(org.batfish.representation.juniper.Route4FilterLine) Route6FilterLineLonger(org.batfish.representation.juniper.Route6FilterLineLonger)

Aggregations

Route4FilterLine (org.batfish.representation.juniper.Route4FilterLine)7 Route6FilterLine (org.batfish.representation.juniper.Route6FilterLine)7 Prefix (org.batfish.datamodel.Prefix)1 Prefix6 (org.batfish.datamodel.Prefix6)1 Route4FilterLineExact (org.batfish.representation.juniper.Route4FilterLineExact)1 Route4FilterLineLengthRange (org.batfish.representation.juniper.Route4FilterLineLengthRange)1 Route4FilterLineLonger (org.batfish.representation.juniper.Route4FilterLineLonger)1 Route4FilterLineOrLonger (org.batfish.representation.juniper.Route4FilterLineOrLonger)1 Route4FilterLineThrough (org.batfish.representation.juniper.Route4FilterLineThrough)1 Route4FilterLineUpTo (org.batfish.representation.juniper.Route4FilterLineUpTo)1 Route6FilterLineExact (org.batfish.representation.juniper.Route6FilterLineExact)1 Route6FilterLineLengthRange (org.batfish.representation.juniper.Route6FilterLineLengthRange)1 Route6FilterLineLonger (org.batfish.representation.juniper.Route6FilterLineLonger)1 Route6FilterLineOrLonger (org.batfish.representation.juniper.Route6FilterLineOrLonger)1 Route6FilterLineThrough (org.batfish.representation.juniper.Route6FilterLineThrough)1 Route6FilterLineUpTo (org.batfish.representation.juniper.Route6FilterLineUpTo)1