use of org.batfish.representation.cisco.StandardIpv6AccessListLine in project batfish by batfish.
the class CiscoControlPlaneExtractor method exitStandard_ipv6_access_list_tail.
@Override
public void exitStandard_ipv6_access_list_tail(Standard_ipv6_access_list_tailContext ctx) {
LineAction action = toLineAction(ctx.ala);
Ip6 srcIp = getIp(ctx.ipr);
Ip6 srcWildcard = getWildcard(ctx.ipr);
Set<Integer> dscps = new TreeSet<>();
Set<Integer> ecns = new TreeSet<>();
for (Standard_access_list_additional_featureContext feature : ctx.features) {
if (feature.DSCP() != null) {
int dscpType = toDscpType(feature.dscp_type());
dscps.add(dscpType);
} else if (feature.ECN() != null) {
int ecn = toInteger(feature.ecn);
ecns.add(ecn);
}
}
String name;
if (ctx.num != null) {
name = ctx.num.getText();
} else {
name = getFullText(ctx).trim();
}
StandardIpv6AccessListLine line = new StandardIpv6AccessListLine(name, action, new Ip6Wildcard(srcIp, srcWildcard), dscps, ecns);
_currentStandardIpv6Acl.addLine(line);
}
Aggregations