Package org.pcap4j.core.NativeMappings

Examples of org.pcap4j.core.NativeMappings.timeval


      throw new PcapNativeException(errbuf.toString());
    }

    if (timeoutMillis == 0 && Platform.isSolaris()) {
      // disable buffering
      timeval to = new timeval();
      to.tv_sec = new NativeLong(0);
      to.tv_usec = new NativeLong(0);

      int rc = PcapLibrary.INSTANCE.strioctl(
                 NativeMappings.getFdFromPcapT(handle),
                 NativeMappings.SBIOCSTIME,
                 to.size(),
                 to.getPointer()
               );

      if (rc < 0) {
        throw new PcapNativeException(
                "SBIOCSTIME: "
View Full Code Here


      throw new NotOpenException();
    }

    pcap_pkthdr header = new pcap_pkthdr();
    header.len = header.caplen = packet.length();
    header.ts = new timeval();
    header.ts.tv_sec = new NativeLong(timestampSec);
    header.ts.tv_usec = new NativeLong(timestampMicros);

    if (!dumperLock.readLock().tryLock()) {
      throw new NotOpenException();
View Full Code Here

TOP

Related Classes of org.pcap4j.core.NativeMappings.timeval

Copyright © 2018 www.massapicom. 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.