- java.lang.Object
-
- org.pcap4j.packet.RadiotapDataChannel
-
- All Implemented Interfaces:
java.io.Serializable,RadiotapPacket.RadiotapData
public final class RadiotapDataChannel extends java.lang.Object implements RadiotapPacket.RadiotapData
Radiotap Channel field. Tx/Rx frequency in MHz and flags.- Since:
- pcap4j 1.6.5
- See Also:
- Radiotap, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRadiotapDataChannel.Builder
-
Field Summary
Fields Modifier and Type Field Description private booleancckprivate booleandynamicCckOfdmprivate booleanfiveGhzSpectrumprivate booleanfourthLsbOfFlagsprivate shortfrequencyprivate booleangfskprivate booleangsmprivate booleanhalfRateprivate static intLENGTHprivate booleanlsbOfFlagsprivate booleanofdmprivate booleanonlyPassiveScanprivate booleanquarterRateprivate booleansecondLsbOfFlagsprivate static longserialVersionUIDprivate booleanstaticTurboprivate booleanthirdLsbOfFlagsprivate booleanturboprivate booleantwoGhzSpectrum
-
Constructor Summary
Constructors Modifier Constructor Description privateRadiotapDataChannel(byte[] rawData, int offset, int length)privateRadiotapDataChannel(RadiotapDataChannel.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)RadiotapDataChannel.BuildergetBuilder()booleangetFourthLsbOfFlags()shortgetFrequency()Tx/Rx frequency in MHzintgetFrequencyAsInt()Tx/Rx frequency in MHzbooleangetLsbOfFlags()byte[]getRawData()booleangetSecondLsbOfFlags()booleangetThirdLsbOfFlags()inthashCode()booleanisCck()booleanisDynamicCckOfdm()booleanisFiveGhzSpectrum()booleanisGfsk()booleanisGsm()booleanisHalfRate()booleanisOfdm()booleanisOnlyPassiveScan()booleanisQuarterRate()booleanisStaticTurbo()booleanisTurbo()booleanisTwoGhzSpectrum()intlength()static RadiotapDataChannelnewInstance(byte[] rawData, int offset, int length)A static factory method.java.lang.StringtoString()java.lang.StringtoString(java.lang.String indent)
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
LENGTH
private static final int LENGTH
- See Also:
- Constant Field Values
-
frequency
private final short frequency
-
lsbOfFlags
private final boolean lsbOfFlags
-
secondLsbOfFlags
private final boolean secondLsbOfFlags
-
thirdLsbOfFlags
private final boolean thirdLsbOfFlags
-
fourthLsbOfFlags
private final boolean fourthLsbOfFlags
-
turbo
private final boolean turbo
-
cck
private final boolean cck
-
ofdm
private final boolean ofdm
-
twoGhzSpectrum
private final boolean twoGhzSpectrum
-
fiveGhzSpectrum
private final boolean fiveGhzSpectrum
-
onlyPassiveScan
private final boolean onlyPassiveScan
-
dynamicCckOfdm
private final boolean dynamicCckOfdm
-
gfsk
private final boolean gfsk
-
gsm
private final boolean gsm
-
staticTurbo
private final boolean staticTurbo
-
halfRate
private final boolean halfRate
-
quarterRate
private final boolean quarterRate
-
-
Constructor Detail
-
RadiotapDataChannel
private RadiotapDataChannel(byte[] rawData, int offset, int length) throws IllegalRawDataException- Throws:
IllegalRawDataException
-
RadiotapDataChannel
private RadiotapDataChannel(RadiotapDataChannel.Builder builder)
-
-
Method Detail
-
newInstance
public static RadiotapDataChannel newInstance(byte[] rawData, int offset, int length) throws IllegalRawDataException
A static factory method. This method validates the arguments byByteArrays.validateBounds(byte[], int, int), which may throw exceptions undocumented here.- Parameters:
rawData- rawDataoffset- offsetlength- length- Returns:
- a new RadiotapChannel object.
- Throws:
IllegalRawDataException- if parsing the raw data fails.
-
getFrequency
public short getFrequency()
Tx/Rx frequency in MHz- Returns:
- frequency (unit: MHz)
-
getFrequencyAsInt
public int getFrequencyAsInt()
Tx/Rx frequency in MHz- Returns:
- frequency (unit: MHz)
-
getLsbOfFlags
public boolean getLsbOfFlags()
- Returns:
- true if the LSB of the flags field is set to 1; otherwise false.
-
getSecondLsbOfFlags
public boolean getSecondLsbOfFlags()
- Returns:
- true if the second LSB of the flags field is set to 1; otherwise false.
-
getThirdLsbOfFlags
public boolean getThirdLsbOfFlags()
- Returns:
- true if the third LSB of the flags field is set to 1; otherwise false.
-
getFourthLsbOfFlags
public boolean getFourthLsbOfFlags()
- Returns:
- true if the fourth LSB of the flags field is set to 1; otherwise false.
-
isTurbo
public boolean isTurbo()
- Returns:
- turbo
-
isCck
public boolean isCck()
- Returns:
- cck
-
isOfdm
public boolean isOfdm()
- Returns:
- ofdm
-
isTwoGhzSpectrum
public boolean isTwoGhzSpectrum()
- Returns:
- twoGhzSpectrum
-
isFiveGhzSpectrum
public boolean isFiveGhzSpectrum()
- Returns:
- fiveGhzSpectrum
-
isOnlyPassiveScan
public boolean isOnlyPassiveScan()
- Returns:
- onlyPassiveScan
-
isDynamicCckOfdm
public boolean isDynamicCckOfdm()
- Returns:
- dynamicCckOfdm
-
isGfsk
public boolean isGfsk()
- Returns:
- gfsk
-
isGsm
public boolean isGsm()
- Returns:
- gsm
-
isStaticTurbo
public boolean isStaticTurbo()
- Returns:
- staticTurbo
-
isHalfRate
public boolean isHalfRate()
- Returns:
- halfRate
-
isQuarterRate
public boolean isQuarterRate()
- Returns:
- quarterRate
-
length
public int length()
- Specified by:
lengthin interfaceRadiotapPacket.RadiotapData- Returns:
- length
-
getRawData
public byte[] getRawData()
- Specified by:
getRawDatain interfaceRadiotapPacket.RadiotapData- Returns:
- raw data
-
getBuilder
public RadiotapDataChannel.Builder getBuilder()
- Returns:
- a new Builder object populated with this object's fields.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toString
public java.lang.String toString(java.lang.String indent)
- Specified by:
toStringin interfaceRadiotapPacket.RadiotapData- Parameters:
indent- indent- Returns:
- String representation of this object.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-