Package nl.sidnlabs.pcap.packet
Class Packet
java.lang.Object
nl.sidnlabs.pcap.packet.Packet
- Direct Known Subclasses:
DNSPacket,ICMPPacket
Packet contains a combination of IP layer and UDP/TCP/DNS layer data Fragmented IP is joined into
a single Packet object Fragmented UDP is joined into a single Packet object TCP session with
multiple DNS queries in a stream before the PSH or FIN will cause multiple DNS messages to get
added to the Packet object.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Stringprotected InetAddressprotected intprotected booleanprotected booleanprotected longprotected intprotected longprotected intprotected booleanprotected intstatic final Packetprotected intprotected byteprotected intprotected intprotected Stringprotected InetAddressprotected intprotected longprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected intprotected intprotected intprotected longprotected intprotected longprotected int -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
NULL
-
len
protected int len -
tsMilli
protected long tsMilli -
ipId
protected long ipId -
ttl
protected int ttl -
ipVersion
protected int ipVersion -
ipHeaderLen
protected int ipHeaderLen -
protocol
protected byte protocol -
src
-
dst
-
srcAddr
-
dstAddr
-
fragOffset
protected long fragOffset -
fragmented
protected boolean fragmented -
lastFragment
protected boolean lastFragment -
doNotFragment
protected boolean doNotFragment -
reassembledFragments
protected int reassembledFragments -
fragmentFlagM
protected boolean fragmentFlagM -
reassembledTCPFragments
protected int reassembledTCPFragments -
srcPort
protected int srcPort -
dstPort
protected int dstPort -
tcpflow
protected int tcpflow -
tcpHeaderLen
protected int tcpHeaderLen -
tcpSeq
protected long tcpSeq -
tcpAck
protected long tcpAck -
tcpFlagNs
protected boolean tcpFlagNs -
tcpFlagCwr
protected boolean tcpFlagCwr -
tcpFlagEce
protected boolean tcpFlagEce -
tcpFlagUrg
protected boolean tcpFlagUrg -
tcpFlagAck
protected boolean tcpFlagAck -
tcpFlagPsh
protected boolean tcpFlagPsh -
tcpFlagRst
protected boolean tcpFlagRst -
tcpFlagSyn
protected boolean tcpFlagSyn -
tcpFlagFin
protected boolean tcpFlagFin -
tcpWindowSize
protected int tcpWindowSize -
payloadLength
protected int payloadLength -
tcpHandshakeRTT
protected int tcpHandshakeRTT
-
-
Constructor Details
-
Packet
public Packet() -
Packet
public Packet(byte protocol)
-
-
Method Details
-
getFlow
Get FLOW from Client to Server- Returns:
- TCPFlow
-
getReverseFlow
Get FLOW from Server to Client- Returns:
- TCPFlow
-
getDatagram
-
isIPv4
public boolean isIPv4() -
isIPv6
public boolean isIPv6() -
nextAck
public long nextAck()Calculate next sequence number- Returns:
- sequencenumber expected in the next ack for this packet
-