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);
}
}
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);
}
}
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);
}
}
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);
}
}
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);
}
}
Aggregations