use of org.batfish.representation.juniper.FwFromIcmpType in project batfish by batfish.
the class ConfigurationBuilder method exitFftf_icmp_type.
@Override
public void exitFftf_icmp_type(Fftf_icmp_typeContext ctx) {
if (_currentFirewallFamily == Family.INET6) {
// TODO: support icmpv6
return;
}
SubRange icmpTypeRange;
if (ctx.subrange() != null) {
icmpTypeRange = toSubRange(ctx.subrange());
} else if (ctx.icmp_type() != null) {
int icmpType = toIcmpType(ctx.icmp_type());
icmpTypeRange = new SubRange(icmpType, icmpType);
} else {
throw new BatfishException("Invalid icmp-type");
}
FwFrom from = new FwFromIcmpType(icmpTypeRange);
_currentFwTerm.getFroms().add(from);
}
Aggregations