org.jnetpcap.protocol.tcpip
Class TcpStream
java.lang.Object
org.jnetpcap.nio.JMemory
org.jnetpcap.nio.JBuffer
org.jnetpcap.nio.JObjectBuffer
org.jnetpcap.nio.JStructBuffer
org.jnetpcap.packet.analysis.AbstractAnalysis<TcpStream,TcpStreamEvent>
org.jnetpcap.protocol.tcpip.TcpStream
- All Implemented Interfaces:
- java.lang.Iterable<JAnalysis>, JByteBuffer, JAnalysis
public class TcpStream
- extends AbstractAnalysis<TcpStream,TcpStreamEvent>
A stream in a single direction of a bi-directional stream. The parent of this
stream is a TcpDuplexStream, a stream consisting of 2 TcpStreams, one for
each direction.
- Author:
- Mark Bednarczyk, Sly Technologies, Inc.
| Methods inherited from class org.jnetpcap.packet.analysis.AbstractAnalysis |
addListener, getAnalyzer, getSupport, getText, getTitle, getType, hasAnalysis, iterator, peer, removeListener, setAnalyzer, setText |
| Methods inherited from class org.jnetpcap.nio.JBuffer |
findUTF8String, getByte, getByteArray, getByteArray, getDouble, getFloat, getInt, getLong, getShort, getUByte, getUInt, getUShort, getUTF8Char, getUTF8String, getUTF8String, getUTF8String, getUTF8String, isReadonly, order, order, peer, peer, peer, peer, setByte, setByteArray, setByteBuffer, setDouble, setFloat, setInt, setLong, setShort, setUByte, setUInt, setUShort, transferFrom, transferFrom, transferFrom, transferTo, transferTo, transferTo |
| Methods inherited from class org.jnetpcap.nio.JMemory |
check, cleanup, finalize, isInitialized, isJMemoryBasedOwner, isOwner, peer, setSize, size, toDebugString, toHexdump, toHexdump, totalActiveAllocated, totalAllocateCalls, totalAllocated, totalAllocatedSegments0To255Bytes, totalAllocatedSegments256OrAbove, totalDeAllocateCalls, totalDeAllocated, transferFrom, transferFrom, transferFromDirect, transferOwnership, transferTo, transferTo, transferTo, transferTo, transferTo |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, notify, notifyAll, toString, wait, wait, wait |
FLAG_HAS_ERRORS
public static final int FLAG_HAS_ERRORS
- See Also:
- Constant Field Values
FLAG_HAS_MSS
public static final int FLAG_HAS_MSS
- See Also:
- Constant Field Values
FLAG_HAS_WARNINGS
public static final int FLAG_HAS_WARNINGS
- See Also:
- Constant Field Values
FLAG_SACK_PERMITTED
public static final int FLAG_SACK_PERMITTED
- See Also:
- Constant Field Values
FLAG_WINDOW_SCALING
public static final int FLAG_WINDOW_SCALING
- See Also:
- Constant Field Values
TcpStream
public TcpStream()
- Parameters:
type - size -
TcpStream
public TcpStream(int hash,
TcpDuplexStream.Direction direction,
TcpDuplexStream duplex,
TcpAnalyzer analyzer)
- Parameters:
duplex - TODOsize - name -
compareTo
public int compareTo(Timeout o)
getAnalysis
public <T extends JAnalysis> T getAnalysis(T analysis)
- Specified by:
getAnalysis in interface JAnalysis- Overrides:
getAnalysis in class AbstractAnalysis<TcpStream,TcpStreamEvent>
getDestinationPort
public int getDestinationPort()
- Returns:
getRcvWIN
public final long getRcvWIN()
- Returns:
- the rcvWIN
getSndNXT
public final long getSndNXT()
- Returns:
- the sndNXT
getSndNXTNormal
public final long getSndNXTNormal()
- Returns:
- the sndNXT
getSndStart
public long getSndStart()
getSndUNA
public final long getSndUNA()
- Returns:
- the sndUNA
getSndUNANormal
public final long getSndUNANormal()
- Returns:
- the sndUNA
hasAnalysis
public <T extends JAnalysis> boolean hasAnalysis(java.lang.Class<T> analysis)
- Specified by:
hasAnalysis in interface JAnalysis- Overrides:
hasAnalysis in class AbstractAnalysis<TcpStream,TcpStreamEvent>
hasAnalysis
public <T extends JAnalysis> boolean hasAnalysis(T analysis)
- Specified by:
hasAnalysis in interface JAnalysis- Overrides:
hasAnalysis in class AbstractAnalysis<TcpStream,TcpStreamEvent>
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
hasSndStart
public boolean hasSndStart()
isTimedout
public boolean isTimedout(long timeInMillis)
setDestinationPort
public void setDestinationPort(int value)
setRcvWIN
public final void setRcvWIN(long rcvWIN)
- Parameters:
rcvWIN - the rcvWIN to set
setSndNXT
public final void setSndNXT(long sndNXT)
- Parameters:
sndNXT - the sndNXT to set
setSndNXT
public final void setSndNXT(long sndNXT,
JPacket packet)
- Parameters:
sndNXT - the sndNXT to set
setSndStart
public void setSndStart(long sequence)
- Parameters:
seq -
setSndUNA
public final void setSndUNA(long sndUNA,
JPacket packet)
- Parameters:
sndUNA - the sndUNA to set
setSndUNANormal
public final void setSndUNANormal(long sndUNA)
- Parameters:
sndUNA - the sndUNA to set
timeout
public void timeout()
addToSequenceQueue
public void addToSequenceQueue(JPacket packet)
removeFromSequenceQueue
public boolean removeFromSequenceQueue(long sequence,
JAnalysis analysis)
- Removes from queue segments that have lower sequence numbers then the one
supplied. If analysis is not null, it is also applied to all the segments
that are being removed from the queue at the same time.
- Parameters:
sequence - timeout lower sequenced numbered segmentsanalysis - apply analysis to each removed/timedout segment, if null ignored
- Returns:
- returns true if segments were removed from the queue otherwise
false
getSequenceQueue
public java.util.Queue<JPacket> getSequenceQueue()