Search in sources :

Example 1 with Route4FilterLineLengthRange

use of org.batfish.representation.juniper.Route4FilterLineLengthRange 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)

Aggregations

Route4FilterLine (org.batfish.representation.juniper.Route4FilterLine)1 Route4FilterLineLengthRange (org.batfish.representation.juniper.Route4FilterLineLengthRange)1 Route6FilterLine (org.batfish.representation.juniper.Route6FilterLine)1 Route6FilterLineLengthRange (org.batfish.representation.juniper.Route6FilterLineLengthRange)1