Package org.pcap4j.packet
Class RadiotapPacket.RadiotapHeader
- java.lang.Object
-
- org.pcap4j.packet.AbstractPacket.AbstractHeader
-
- org.pcap4j.packet.RadiotapPacket.RadiotapHeader
-
- All Implemented Interfaces:
java.io.Serializable
,Packet.Header
- Enclosing class:
- RadiotapPacket
public static final class RadiotapPacket.RadiotapHeader extends AbstractPacket.AbstractHeader
Radiotap Header + Extended presence masks + Radiotap fieldsstruct ieee80211_radiotap_header { u_int8_t it_version; // currently, this is always 0 u_int8_t it_pad; // currently unused, just for for the alignment u_int16_t it_len; // entire length u_int32_t it_present; // presence mask } __attribute__((__packed__));
- Since:
- pcap4j 1.6.5
- Author:
- Kaito Yamada
- See Also:
- Radiotap, Serialized Form
-
-
Method Summary
Modifier and Type Method Description protected java.lang.String
buildString()
This method builds the valuetoString()
will return.protected int
calcHashCode()
This method builds the valuehashCode()
will return using the byte arraygetRawData()
returns.int
calcLength()
This method calculates the valuelength()
will return by adding up the lengths of byte arrays in the listgetRawFields()
returns.boolean
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one using return values ofgetRawData()
.java.util.ArrayList<RadiotapPacket.RadiotapData>
getDataFields()
short
getLength()
int
getLengthAsInt()
byte
getPad()
java.util.ArrayList<RadiotapPresentBitmask>
getPresentBitmasks()
protected java.util.List<byte[]>
getRawFields()
Returns a list of byte arrays which represents this header's fields.byte
getVersion()
int
getVersionAsInt()
-
Methods inherited from class org.pcap4j.packet.AbstractPacket.AbstractHeader
buildHexString, buildRawData, getRawData, hashCode, length, toHexString, toString
-
-
-
-
Method Detail
-
getVersion
public byte getVersion()
- Returns:
- version
-
getVersionAsInt
public int getVersionAsInt()
- Returns:
- version
-
getPad
public byte getPad()
- Returns:
- pad
-
getLength
public short getLength()
- Returns:
- length
-
getLengthAsInt
public int getLengthAsInt()
- Returns:
- length
-
getPresentBitmasks
public java.util.ArrayList<RadiotapPresentBitmask> getPresentBitmasks()
- Returns:
- presentBitmasks
-
getDataFields
public java.util.ArrayList<RadiotapPacket.RadiotapData> getDataFields()
- Returns:
- dataFields
-
getRawFields
protected java.util.List<byte[]> getRawFields()
Description copied from class:AbstractPacket.AbstractHeader
Returns a list of byte arrays which represents this header's fields. This method is called bycalcLength()
andbuildRawData()
.- Specified by:
getRawFields
in classAbstractPacket.AbstractHeader
- Returns:
- a list of byte arrays which represents this header's fields
-
calcLength
public int calcLength()
Description copied from class:AbstractPacket.AbstractHeader
This method calculates the valuelength()
will return by adding up the lengths of byte arrays in the listgetRawFields()
returns.- Overrides:
calcLength
in classAbstractPacket.AbstractHeader
- Returns:
- a calculated length
-
buildString
protected java.lang.String buildString()
Description copied from class:AbstractPacket.AbstractHeader
This method builds the valuetoString()
will return.- Overrides:
buildString
in classAbstractPacket.AbstractHeader
- Returns:
- a string representation of this object
-
equals
public boolean equals(java.lang.Object obj)
Description copied from class:AbstractPacket.AbstractHeader
Indicates whether some other object is "equal to" this one using return values ofgetRawData()
. This method should be overridden so that it does more strict comparisons more efficiently.- Overrides:
equals
in classAbstractPacket.AbstractHeader
-
calcHashCode
protected int calcHashCode()
Description copied from class:AbstractPacket.AbstractHeader
This method builds the valuehashCode()
will return using the byte arraygetRawData()
returns. This method may be better to be overridden for performance reason.- Overrides:
calcHashCode
in classAbstractPacket.AbstractHeader
- Returns:
- a calculated hash code value for the object
-
-