- 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
- See Also:
- IEEE802.11, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDot11ManagementPacket.Builderstatic classDot11ManagementPacket.Dot11ManagementHeaderHeader 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
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Integerfcsprivate static longserialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description protectedDot11ManagementPacket(byte[] rawData, int offset, int length, int headerLen)protectedDot11ManagementPacket(Dot11ManagementPacket.Builder builder, Dot11ManagementPacket.Dot11ManagementHeader header)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods 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.StringbuildString()This method builds the valuetoString()will return by concatenating the header's string representation and the payload's string representation.protected intcalcLength()This method calculates the valuelength()will return by adding up the header length and the payload length.abstract Dot11ManagementPacket.BuildergetBuilder()Returns a new Builder object populated with this object's fields' values.java.lang.IntegergetFcs()abstract Dot11ManagementPacket.Dot11ManagementHeadergetHeader()Returns the Header object representing this packet's header.booleanhasValidFcs()-
Methods inherited from class org.pcap4j.packet.AbstractPacket
buildHexString, calcHashCode, contains, equals, get, getOuterOf, getPayload, getRawData, hashCode, iterator, length, toHexString, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
fcs
private final java.lang.Integer fcs
-
-
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:AbstractPacketReturns 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:
getHeaderin interfacePacket- Overrides:
getHeaderin 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:AbstractPacketThis 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:
calcLengthin classAbstractPacket- Returns:
- a calculated length
-
buildRawData
protected byte[] buildRawData()
Description copied from class:AbstractPacketThis 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:
buildRawDatain classAbstractPacket- Returns:
- a raw data built
-
buildString
protected java.lang.String buildString()
Description copied from class:AbstractPacketThis 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:
buildStringin classAbstractPacket- Returns:
- a string representation of this object
-
getBuilder
public abstract Dot11ManagementPacket.Builder getBuilder()
Description copied from interface:PacketReturns a new Builder object populated with this object's fields' values.- Specified by:
getBuilderin interfacePacket- Specified by:
getBuilderin 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.
-
-