use of org.batfish.representation.juniper.FwFrom in project batfish by batfish.
the class ConfigurationBuilder method exitFftf_fragment_offset.
@Override
public void exitFftf_fragment_offset(Fftf_fragment_offsetContext ctx) {
SubRange subRange = toSubRange(ctx.subrange());
FwFrom from = new FwFromFragmentOffset(subRange, false);
_currentFwTerm.getFroms().add(from);
}
use of org.batfish.representation.juniper.FwFrom in project batfish by batfish.
the class ConfigurationBuilder method exitFftf_tcp_established.
@Override
public void exitFftf_tcp_established(Fftf_tcp_establishedContext ctx) {
List<TcpFlags> tcpFlags = new ArrayList<>();
TcpFlags alt1 = new TcpFlags();
alt1.setUseAck(true);
alt1.setAck(true);
tcpFlags.add(alt1);
TcpFlags alt2 = new TcpFlags();
alt2.setUseRst(true);
alt2.setRst(true);
tcpFlags.add(alt2);
FwFrom from = new FwFromTcpFlags(tcpFlags);
_currentFwTerm.getFroms().add(from);
}
use of org.batfish.representation.juniper.FwFrom in project batfish by batfish.
the class ConfigurationBuilder method exitFftf_destination_address.
@Override
public void exitFftf_destination_address(Fftf_destination_addressContext ctx) {
if (ctx.IP_ADDRESS() != null || ctx.IP_PREFIX() != null) {
Prefix prefix;
if (ctx.IP_PREFIX() != null) {
prefix = Prefix.parse(ctx.IP_PREFIX().getText());
} else {
prefix = new Prefix(new Ip(ctx.IP_ADDRESS().getText()), Prefix.MAX_PREFIX_LENGTH);
}
FwFrom from;
if (ctx.EXCEPT() != null) {
from = new FwFromDestinationAddressExcept(prefix);
} else {
from = new FwFromDestinationAddress(prefix);
}
_currentFwTerm.getFroms().add(from);
}
}
use of org.batfish.representation.juniper.FwFrom in project batfish by batfish.
the class ConfigurationBuilder method exitFftf_packet_length_except.
@Override
public void exitFftf_packet_length_except(Fftf_packet_length_exceptContext ctx) {
List<SubRange> range = toRange(ctx.range());
FwFrom from = new FwFromPacketLength(range, true);
_currentFwTerm.getFroms().add(from);
}
use of org.batfish.representation.juniper.FwFrom in project batfish by batfish.
the class ConfigurationBuilder method exitFftf_is_fragment.
@Override
public void exitFftf_is_fragment(Fftf_is_fragmentContext ctx) {
SubRange subRange = new SubRange(0, 0);
FwFrom from = new FwFromFragmentOffset(subRange, true);
_currentFwTerm.getFroms().add(from);
}
Aggregations