Package org.pcap4j.packet
Class Dot11ManagementPacket
- java.lang.Object
-
- org.pcap4j.packet.AbstractPacket
-
- org.pcap4j.packet.Dot11ManagementPacket
-
- Direct Known Subclasses:
Dot11ProbeRequestPacket
public abstract class Dot11ManagementPacket extends AbstractPacket
IEEE802.11 management frame- Since:
- pcap4j 1.7.0
- Author:
- Kaito Yamada
- See Also:
- IEEE802.11, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Dot11ManagementPacket.Builder
static class
Dot11ManagementPacket.Dot11ManagementHeader
Header of IEEE802.11 management frame-
Nested classes/interfaces inherited from class org.pcap4j.packet.AbstractPacket
AbstractPacket.AbstractBuilder, AbstractPacket.AbstractHeader
-
Nested classes/interfaces inherited from interface org.pcap4j.packet.Packet
Packet.Header
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Dot11ManagementPacket(byte[] rawData, int offset, int length, int headerLen)
protected
Dot11ManagementPacket(Dot11ManagementPacket.Builder builder, Dot11ManagementPacket.Dot11ManagementHeader header)
-
Method Summary
Modifier and Type Method Description protected byte[]
buildRawData()
This method builds the valuegetRawData()
will return by concatenating the header's raw data and the payload's raw data.protected java.lang.String
buildString()
This method builds the valuetoString()
will return by concatenating the header's string representation and the payload's string representation.protected int
calcLength()
This method calculates the valuelength()
will return by adding up the header length and the payload length.abstract Dot11ManagementPacket.Builder
getBuilder()
Returns a new Builder object populated with this object's fields' values.java.lang.Integer
getFcs()
abstract Dot11ManagementPacket.Dot11ManagementHeader
getHeader()
Returns the Header object representing this packet's header.boolean
hasValidFcs()
-
Methods inherited from class org.pcap4j.packet.AbstractPacket
buildHexString, calcHashCode, equals, getPayload, getRawData, hashCode, length, toHexString, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.pcap4j.packet.Packet
contains, get, getOuterOf, iterator
-
-
-
-
Constructor Detail
-
Dot11ManagementPacket
protected Dot11ManagementPacket(byte[] rawData, int offset, int length, int headerLen)
- Parameters:
rawData
- rawDataoffset
- offsetlength
- lengthheaderLen
- headerLen
-
Dot11ManagementPacket
protected Dot11ManagementPacket(Dot11ManagementPacket.Builder builder, Dot11ManagementPacket.Dot11ManagementHeader header)
- Parameters:
builder
- builderheader
- header
-
-
Method Detail
-
getHeader
public abstract Dot11ManagementPacket.Dot11ManagementHeader getHeader()
Description copied from class:AbstractPacket
Returns the Header object representing this packet's header. This subclass have to override this method if the packet represented by the subclass has a header.- Specified by:
getHeader
in interfacePacket
- Overrides:
getHeader
in classAbstractPacket
- Returns:
- the Header object representing this packet's header. May be null if the header doesn't exist
-
getFcs
public java.lang.Integer getFcs()
- Returns:
- fcs. May be null.
-
calcLength
protected int calcLength()
Description copied from class:AbstractPacket
This method calculates the valuelength()
will return by adding up the header length and the payload length. If you write this subclass which represents a packet with extra parts (e.g. a trailer), you need to override this method.- Overrides:
calcLength
in classAbstractPacket
- Returns:
- a calculated length
-
buildRawData
protected byte[] buildRawData()
Description copied from class:AbstractPacket
This method builds the valuegetRawData()
will return by concatenating the header's raw data and the payload's raw data. If you write this subclass which represents a packet with extra parts (e.g. a trailer), you need to override this method.- Overrides:
buildRawData
in classAbstractPacket
- Returns:
- a raw data built
-
buildString
protected java.lang.String buildString()
Description copied from class:AbstractPacket
This method builds the valuetoString()
will return by concatenating the header's string representation and the payload's string representation. If you write this subclass which represents a packet with extra parts (e.g. a trailer), you need to override this method.- Overrides:
buildString
in classAbstractPacket
- Returns:
- a string representation of this object
-
getBuilder
public abstract Dot11ManagementPacket.Builder getBuilder()
Description copied from interface:Packet
Returns a new Builder object populated with this object's fields' values.- Specified by:
getBuilder
in interfacePacket
- Specified by:
getBuilder
in classAbstractPacket
- Returns:
- a new Builder object populated with this object's fields values
-
hasValidFcs
public boolean hasValidFcs()
- Returns:
- true if this FCS is present and valid; false otherwise.
-
-