@Override protected Boolean featureValueOf(OspfAreaSummary arg0) { return arg0.getAdvertised(); } }
@Override protected Long featureValueOf(OspfAreaSummary actual) { return actual.getMetric(); } }
@Override public void exitOa_area_range(FlatJuniperParser.Oa_area_rangeContext ctx) { if (_currentAreaRangePrefix != null) { OspfAreaSummary summary = new OspfAreaSummary(!_currentAreaRangeRestrict, _currentAreaRangeMetric); _currentArea.getSummaries().put(_currentAreaRangePrefix, summary); } else { todo(ctx); } }
if (!summary.getAdvertised()) { continue; Long metric = summary.getMetric(); if (summary.getMetric() == null) {
int prefixLength = prefix.getPrefixLength(); int filterMinPrefixLength = summary.getAdvertised() ? Math.min(Prefix.MAX_PREFIX_LENGTH, prefixLength + 1) : prefixLength;
@Override public void exitRoa_range(Roa_rangeContext ctx) { Prefix prefix = Prefix.parse(ctx.prefix.getText()); boolean advertise = ctx.NOT_ADVERTISE() == null; Long cost = ctx.cost == null ? null : toLong(ctx.cost); Map<Prefix, OspfAreaSummary> area = currentVrf() .getOspfProcess() .getSummaries() .computeIfAbsent(_currentOspfArea, k -> new TreeMap<>()); area.put(prefix, new OspfAreaSummary(advertise, cost)); }
int prefixLength = prefix.getPrefixLength(); int filterMinPrefixLength = summary.getAdvertised() ? Math.min(Prefix.MAX_PREFIX_LENGTH, prefixLength + 1) : prefixLength;
@Override public void exitRo_area_range(CiscoParser.Ro_area_rangeContext ctx) { long areaNum = (ctx.area_int != null) ? toLong(ctx.area_int) : toIp(ctx.area_ip).asLong(); Prefix prefix; if (ctx.area_prefix != null) { prefix = Prefix.parse(ctx.area_prefix.getText()); } else { prefix = Prefix.create(toIp(ctx.area_ip), toIp(ctx.area_subnet)); } boolean advertise = ctx.NOT_ADVERTISE() == null; Long cost = ctx.cost == null ? null : toLong(ctx.cost); Map<Prefix, OspfAreaSummary> area = currentVrf().getOspfProcess().getSummaries().computeIfAbsent(areaNum, k -> new TreeMap<>()); area.put(prefix, new OspfAreaSummary(advertise, cost)); }