use of org.batfish.representation.juniper.FwFromIcmpCode in project batfish by batfish.
the class ConfigurationBuilder method exitFftf_icmp_code.
@Override
public void exitFftf_icmp_code(Fftf_icmp_codeContext ctx) {
if (_currentFirewallFamily == Family.INET6) {
// TODO: support icmpv6
return;
}
SubRange icmpCodeRange;
if (ctx.subrange() != null) {
icmpCodeRange = toSubRange(ctx.subrange());
} else if (ctx.icmp_code() != null) {
int icmpCode = toIcmpCode(ctx.icmp_code());
icmpCodeRange = new SubRange(icmpCode, icmpCode);
} else {
throw new BatfishException("Invalid icmp-code");
}
FwFrom from = new FwFromIcmpCode(icmpCodeRange);
_currentFwTerm.getFroms().add(from);
}
Aggregations