Class: PacketGen::Header::Dot11::SubMngt Abstract

Inherits:
Base show all
Defined in:
lib/packetgen/header/dot11/sub_mngt.rb

Overview

This class is abstract.

Base class for all subtype management frames

Subclasses of this class are used to specialize Management. A SubMngt class set subtype field in Dot11 header and may add some fields.

All SubMngt subclasses have ability to have Element. These elements may be accessed through #elements.

Author:

  • Sylvain Daubert

Since:

  • 1.4.0

Direct Known Subclasses

ATIM, AssoReq, AssoResp, Auth, Beacon, DeAuth, Disas, ProbeReq, ProbeResp

Instance Method Summary collapse

Methods inherited from Base

bind, calculate_and_set_length, #header_id, inherited, #initialize, #ip_header, #ll_header

Methods included from PacketGen::Headerable

#added_to_packet, included, #method_name, #packet, #packet=, #parse?, #protocol_name, #read

Methods inherited from Types::Fields

#[], #[]=, #bits_on, define_bit_fields_on, define_field, define_field_after, define_field_before, #fields, fields, inherited, #initialize, #inspect, #offset_of, #optional?, #optional_fields, #present?, #read, remove_bit_fields_on, remove_field, #sz, #to_h, #to_s, update_field

Constructor Details

This class inherits a constructor from PacketGen::Header::Base

Instance Method Details

#add_element(type:, value:) ⇒ self

Deprecated.

Prefer use of submngt.element << {type: type, value: value}

Add an Element to header

Parameters:

  • type (Integer, String)

    element type

  • value (Object)

    element value

Returns:

  • (self)

Since:


31
32
33
34
35
36
# File 'lib/packetgen/header/dot11/sub_mngt.rb', line 31

def add_element(type:, value:)
  Deprecation.deprecated(self.class, __method__, 'elements')
  element = Element.new(type: type, value: value)
  self.elements << element
  self
end

#elementsArray<Element>

Returns:

Since:

  • 1.4.0


22
# File 'lib/packetgen/header/dot11/sub_mngt.rb', line 22

define_field :elements, ArrayOfElements