use of org.batfish.representation.juniper.FwFromSourcePort in project batfish by batfish.
the class ConfigurationBuilder method exitFftf_source_port.
@Override
public void exitFftf_source_port(Fftf_source_portContext ctx) {
if (ctx.port() != null) {
int port = getPortNumber(ctx.port());
SubRange subrange = new SubRange(port, port);
FwFrom from = new FwFromSourcePort(subrange);
_currentFwTerm.getFroms().add(from);
} else if (ctx.range() != null) {
for (SubrangeContext subrangeContext : ctx.range().range_list) {
SubRange subrange = toSubRange(subrangeContext);
FwFrom from = new FwFromSourcePort(subrange);
_currentFwTerm.getFroms().add(from);
}
}
}
Aggregations