パッケージ org.pcap4j.packet
インタフェース Packet
-
- すべてのスーパーインタフェース:
Iterable<Packet>
,Serializable
- 既知のサブインタフェースのリスト:
IpPacket
,TransportPacket
- 既知の実装クラスのリスト:
AbstractPacket
,ArpPacket
,BsdLoopbackPacket
,CompressedPacket
,DnsPacket
,Dot11ManagementPacket
,Dot11ProbeRequestPacket
,Dot11Selector
,Dot1qVlanTagPacket
,EncryptedPacket
,EthernetPacket
,FragmentedPacket
,GtpSelector
,GtpV1Packet
,HdlcPppPacket
,IcmpV4CommonPacket
,IcmpV4DestinationUnreachablePacket
,IcmpV4EchoPacket
,IcmpV4EchoReplyPacket
,IcmpV4InformationReplyPacket
,IcmpV4InformationRequestPacket
,IcmpV4ParameterProblemPacket
,IcmpV4RedirectPacket
,IcmpV4SourceQuenchPacket
,IcmpV4TimeExceededPacket
,IcmpV4TimestampPacket
,IcmpV4TimestampReplyPacket
,IcmpV6CommonPacket
,IcmpV6DestinationUnreachablePacket
,IcmpV6EchoReplyPacket
,IcmpV6EchoRequestPacket
,IcmpV6HomeAgentAddressDiscoveryReplyPacket
,IcmpV6HomeAgentAddressDiscoveryRequestPacket
,IcmpV6MobilePrefixAdvertisementPacket
,IcmpV6MobilePrefixSolicitationPacket
,IcmpV6NeighborAdvertisementPacket
,IcmpV6NeighborSolicitationPacket
,IcmpV6PacketTooBigPacket
,IcmpV6ParameterProblemPacket
,IcmpV6RedirectPacket
,IcmpV6RouterAdvertisementPacket
,IcmpV6RouterSolicitationPacket
,IcmpV6TimeExceededPacket
,IllegalPacket
,IpSelector
,IpV4Packet
,IpV6ExtDestinationOptionsPacket
,IpV6ExtFragmentPacket
,IpV6ExtHopByHopOptionsPacket
,IpV6ExtOptionsPacket
,IpV6ExtRoutingPacket
,IpV6ExtUnknownPacket
,IpV6Packet
,LinuxSllPacket
,LlcPacket
,PppPacket
,PppSelector
,RadiotapPacket
,SctpPacket
,SnapPacket
,Ssh2BinaryPacket
,Ssh2DebugPacket
,Ssh2DisconnectPacket
,Ssh2IgnorePacket
,Ssh2KexDhInitPacket
,Ssh2KexDhReplyPacket
,Ssh2KexInitPacket
,Ssh2NewKeysPacket
,Ssh2ServiceAcceptPacket
,Ssh2ServiceRequestPacket
,Ssh2UnimplementedPacket
,Ssh2VersionExchangePacket
,SshPacket
,TcpPacket
,UdpPacket
,UnknownPacket
public interface Packet extends Iterable<Packet>, Serializable
The interface representing a packet which consists of a header and a payload. If you usePropertiesBasedPacketFactory
, classes which implement this interface must implement the following method:public static Packet newPacket(byte[] rawData, int offset, int length) throws IllegalRawDataException
- 導入されたバージョン:
- pcap4j 0.9.1
- 作成者:
- Kaito Yamada
-
-
ネストされたクラスの概要
ネストされたクラス 修飾子とタイプ インタフェース 説明 static interface
Packet.Builder
This interface is designed to be implemented by builder classes for packet objects.static interface
Packet.Header
The interface representing a packet's header.
-
メソッドの概要
すべてのメソッド インスタンス・メソッド abstractメソッド 修飾子とタイプ メソッド 説明 <T extends Packet>
booleancontains(Class<T> clazz)
Returns true if this packet is or its payload includes an object of specified packet class; false otherwise.<T extends Packet>
Tget(Class<T> clazz)
Traverses this packet and its payload to find an object of the specified packet class and returns the object.Packet.Builder
getBuilder()
Returns a new Builder object populated with this object's fields' values.Packet.Header
getHeader()
Returns the Header object representing this packet's header.Packet
getOuterOf(Class<? extends Packet> clazz)
Returns the outer packet object of a packet objectget(clazz)
returns.Packet
getPayload()
Returns the Packet object representing this packet's payload.byte[]
getRawData()
Returns this packet's raw data.int
length()
Returns the packet length in bytes.-
インタフェースから継承されたメソッド java.lang.Iterable
forEach, iterator, spliterator
-
-
-
-
メソッドの詳細
-
getHeader
Packet.Header getHeader()
Returns the Header object representing this packet's header.- 戻り値:
- the Header object representing this packet's header. May be null if the header doesn't exist
-
getPayload
Packet getPayload()
Returns the Packet object representing this packet's payload.- 戻り値:
- the Packet object representing this packet's payload. May be null if the payload doesn't exist
-
length
int length()
Returns the packet length in bytes.- 戻り値:
- the length of the byte stream of the packet represented by this object in bytes
-
getRawData
byte[] getRawData()
Returns this packet's raw data.- 戻り値:
- this packet's raw data, namely the byte stream which is actually sent through real network
-
get
<T extends Packet> T get(Class<T> clazz)
Traverses this packet and its payload to find an object of the specified packet class and returns the object. If there are more than one objects of the specified class in this object, this method returns the most outer one of them.- 型パラメータ:
T
- packet- パラメータ:
clazz
- the packet class of the object to get- 戻り値:
- a packet object if found; otherwise null
-
getOuterOf
Packet getOuterOf(Class<? extends Packet> clazz)
Returns the outer packet object of a packet objectget(clazz)
returns.- パラメータ:
clazz
- the packet class of the object whose outer packet object is what you want to get- 戻り値:
- a packet object if found; otherwise null
-
contains
<T extends Packet> boolean contains(Class<T> clazz)
Returns true if this packet is or its payload includes an object of specified packet class; false otherwise.- 型パラメータ:
T
- packet- パラメータ:
clazz
- the packet class of the object to search for- 戻り値:
- true if this packet is or its payload includes an object of specified packet class; false otherwise
-
getBuilder
Packet.Builder getBuilder()
Returns a new Builder object populated with this object's fields' values.- 戻り値:
- a new Builder object populated with this object's fields values
-
-