Examples of bpf_program


Examples of org.pcap4j.core.NativeMappings.bpf_program

    }
    if (!open) {
      throw new NotOpenException();
    }

    bpf_program prog;
    if (!handleLock.readLock().tryLock()) {
      throw new NotOpenException();
    }
    try {
      if (!open) {
        throw new NotOpenException();
      }

      prog = new bpf_program();
      int rc = NativeMappings.pcap_compile(
                 handle, prog, bpfExpression, mode.getValue(),
                 ByteArrays.getInt(ByteArrays.toByteArray(netmask), 0)
               );
      if (rc < 0) {
View Full Code Here

Examples of org.pcap4j.core.NativeMappings.bpf_program

    try {
      if (!open) {
        throw new NotOpenException();
      }

      bpf_program prog = new bpf_program();
      try {
        int mask = ByteArrays.getInt(ByteArrays.toByteArray(netmask), 0);
        int rc = NativeMappings.pcap_compile(
                   handle, prog, bpfExpression, mode.getValue(), mask
                 );
View Full Code Here

Examples of org.pcap4j.core.NativeMappings.bpf_program

        .append(" mode: ").append(mode)
        .append(" netmask: ").append(netmask);
      throw new NullPointerException(sb.toString());
    }

    bpf_program prog = new bpf_program();
    int rc = NativeMappings.pcap_compile_nopcap(
               snaplen, dlt.value(), prog, bpfExpression, mode.getValue(),
               ByteArrays.getInt(ByteArrays.toByteArray(netmask), 0)
             );
    if (rc < 0) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.