Class RadiotapDataChannel

java.lang.Object
org.pcap4j.packet.RadiotapDataChannel
All Implemented Interfaces:
Serializable, RadiotapPacket.RadiotapData

public final class RadiotapDataChannel extends Object implements RadiotapPacket.RadiotapData
Radiotap Channel field. Tx/Rx frequency in MHz and flags.
Since:
pcap4j 1.6.5
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • LENGTH

      private static final int LENGTH
      See Also:
    • 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 Details

  • Method Details

    • newInstance

      public static RadiotapDataChannel newInstance(byte[] rawData, int offset, int length) throws IllegalRawDataException
      A static factory method. This method validates the arguments by ByteArrays.validateBounds(byte[], int, int), which may throw exceptions undocumented here.
      Parameters:
      rawData - rawData
      offset - offset
      length - 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:
      length in interface RadiotapPacket.RadiotapData
      Returns:
      length
    • getRawData

      public byte[] getRawData()
      Specified by:
      getRawData in interface RadiotapPacket.RadiotapData
      Returns:
      raw data
    • getBuilder

      public RadiotapDataChannel.Builder getBuilder()
      Returns:
      a new Builder object populated with this object's fields.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toString

      public String toString(String indent)
      Specified by:
      toString in interface RadiotapPacket.RadiotapData
      Parameters:
      indent - indent
      Returns:
      String representation of this object.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object