Class PcapWriteHandler

    • Field Detail

      • logger

        private final InternalLogger logger
        Logger for logging events
      • outputStream

        private final java.io.OutputStream outputStream
        OutputStream where we'll write Pcap data.
      • captureZeroByte

        private final boolean captureZeroByte
        true if we want to capture packets with zero bytes else false.
      • writePcapGlobalHeader

        private final boolean writePcapGlobalHeader
        true if we want to write Pcap Global Header on initialization of PcapWriter else false.
      • sharedOutputStream

        private final boolean sharedOutputStream
        true if we want to synchronize on the OutputStream while writing else false.
      • sendSegmentNumber

        private int sendSegmentNumber
        TCP Sender Segment Number. It'll start with 1 and keep incrementing with number of bytes read/sent.
      • receiveSegmentNumber

        private int receiveSegmentNumber
        TCP Receiver Segment Number. It'll start with 1 and keep incrementing with number of bytes read/sent.
      • initiatorAddr

        private java.net.InetSocketAddress initiatorAddr
        Address of the initiator of the connection
      • handlerAddr

        private java.net.InetSocketAddress handlerAddr
        Address of the receiver of the connection
      • isServerPipeline

        private boolean isServerPipeline
        Set to true if this handler is registered on a server pipeline
      • state

        private final java.util.concurrent.atomic.AtomicReference<State> state
        Current of this PcapWriteHandler
    • Constructor Detail

      • PcapWriteHandler

        @Deprecated
        public PcapWriteHandler​(java.io.OutputStream outputStream)
        Deprecated.
        Create new PcapWriteHandler Instance. captureZeroByte is set to false and writePcapGlobalHeader is set to true.
        Parameters:
        outputStream - OutputStream where Pcap data will be written. Call close() to close this OutputStream.
        Throws:
        java.lang.NullPointerException - If OutputStream is null then we'll throw an NullPointerException
      • PcapWriteHandler

        @Deprecated
        public PcapWriteHandler​(java.io.OutputStream outputStream,
                                boolean captureZeroByte,
                                boolean writePcapGlobalHeader)
        Deprecated.
        Create new PcapWriteHandler Instance
        Parameters:
        outputStream - OutputStream where Pcap data will be written. Call close() to close this OutputStream.
        captureZeroByte - Set to true to enable capturing packets with empty (0 bytes) payload. Otherwise, if set to false, empty packets will be filtered out.
        writePcapGlobalHeader - Set to true to write Pcap Global Header on initialization. Otherwise, if set to false, Pcap Global Header will not be written on initialization. This could when writing Pcap data on a existing file where Pcap Global Header is already present.
        Throws:
        java.lang.NullPointerException - If OutputStream is null then we'll throw an NullPointerException