Search in sources :

Example 1 with FwFromTcpFlags

use of org.batfish.representation.juniper.FwFromTcpFlags 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);
}
Also used : TcpFlags(org.batfish.datamodel.TcpFlags) FwFromTcpFlags(org.batfish.representation.juniper.FwFromTcpFlags) ArrayList(java.util.ArrayList) FwFrom(org.batfish.representation.juniper.FwFrom) FwFromTcpFlags(org.batfish.representation.juniper.FwFromTcpFlags)

Example 2 with FwFromTcpFlags

use of org.batfish.representation.juniper.FwFromTcpFlags in project batfish by batfish.

the class ConfigurationBuilder method exitFftf_tcp_initial.

@Override
public void exitFftf_tcp_initial(Fftf_tcp_initialContext ctx) {
    List<TcpFlags> tcpFlags = new ArrayList<>();
    TcpFlags alt1 = new TcpFlags();
    alt1.setUseAck(true);
    alt1.setAck(false);
    alt1.setUseSyn(true);
    alt1.setSyn(true);
    tcpFlags.add(alt1);
    FwFrom from = new FwFromTcpFlags(tcpFlags);
    _currentFwTerm.getFroms().add(from);
}
Also used : TcpFlags(org.batfish.datamodel.TcpFlags) FwFromTcpFlags(org.batfish.representation.juniper.FwFromTcpFlags) ArrayList(java.util.ArrayList) FwFrom(org.batfish.representation.juniper.FwFrom) FwFromTcpFlags(org.batfish.representation.juniper.FwFromTcpFlags)

Example 3 with FwFromTcpFlags

use of org.batfish.representation.juniper.FwFromTcpFlags in project batfish by batfish.

the class ConfigurationBuilder method exitFftf_tcp_flags.

@Override
public void exitFftf_tcp_flags(Fftf_tcp_flagsContext ctx) {
    List<TcpFlags> tcpFlags = toTcpFlags(ctx.tcp_flags());
    FwFrom from = new FwFromTcpFlags(tcpFlags);
    _currentFwTerm.getFroms().add(from);
}
Also used : TcpFlags(org.batfish.datamodel.TcpFlags) FwFromTcpFlags(org.batfish.representation.juniper.FwFromTcpFlags) FwFrom(org.batfish.representation.juniper.FwFrom) FwFromTcpFlags(org.batfish.representation.juniper.FwFromTcpFlags)

Aggregations

TcpFlags (org.batfish.datamodel.TcpFlags)3 FwFrom (org.batfish.representation.juniper.FwFrom)3 FwFromTcpFlags (org.batfish.representation.juniper.FwFromTcpFlags)3 ArrayList (java.util.ArrayList)2