Package nl.sidnlabs.pcap.packet
Class Packet
- java.lang.Object
-
- nl.sidnlabs.pcap.packet.Packet
-
- Direct Known Subclasses:
DNSPacket,ICMPPacket
public class Packet extends Object
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
Fields Modifier and Type Field Description protected booleandoNotFragmentprotected Stringdstprotected InetAddressdstAddrprotected intdstPortprotected booleanfragmentedprotected booleanfragmentFlagMprotected longfragOffsetprotected intipHeaderLenprotected longipIdprotected intipVersionstatic PacketLASTprotected booleanlastFragmentprotected intlenstatic PacketNULLprotected intpayloadLengthprotected byteprotocolprotected intreassembledFragmentsprotected intreassembledTCPFragmentsprotected Stringsrcprotected InetAddresssrcAddrprotected intsrcPortprotected longtcpAckprotected booleantcpFlagAckprotected booleantcpFlagCwrprotected booleantcpFlagEceprotected booleantcpFlagFinprotected booleantcpFlagNsprotected booleantcpFlagPshprotected booleantcpFlagRstprotected booleantcpFlagSynprotected booleantcpFlagUrgprotected inttcpflowprotected inttcpHandshakeRTTprotected inttcpHeaderLenprotected longtcpSeqprotected inttcpWindowSizeprotected longtsMilliprotected intttl
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DatagramgetDatagram()TCPFlowgetFlow()Get FLOW from Client to ServerTCPFlowgetReverseFlow()Get FLOW from Server to ClientbooleanisIPv4()booleanisIPv6()longnextAck()Calculate next sequence number
-
-
-
Field Detail
-
NULL
public static final Packet NULL
-
LAST
public static final Packet LAST
-
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
protected String src
-
dst
protected String dst
-
srcAddr
protected InetAddress srcAddr
-
dstAddr
protected InetAddress 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
-
-
Method Detail
-
getFlow
public TCPFlow getFlow()
Get FLOW from Client to Server- Returns:
- TCPFlow
-
getReverseFlow
public TCPFlow getReverseFlow()
Get FLOW from Server to Client- Returns:
- TCPFlow
-
getDatagram
public Datagram 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
-
-