Class: Dot11::Dot11::SNAP
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#oui ⇒ Object
Returns the value of attribute oui.
-
#payload ⇒ Object
Returns the value of attribute payload.
Instance Method Summary collapse
Methods inherited from Packet
#=~, #initialize, new, older_new, #to_filter
Constructor Details
This class inherits a constructor from Dot11::Packet
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
937 938 939 |
# File 'lib/dot11/dot11.rb', line 937 def code @code end |
#oui ⇒ Object
Returns the value of attribute oui.
937 938 939 |
# File 'lib/dot11/dot11.rb', line 937 def oui @oui end |
#payload ⇒ Object
Returns the value of attribute payload.
937 938 939 |
# File 'lib/dot11/dot11.rb', line 937 def payload @payload end |
Instance Method Details
#/(other) ⇒ Object
957 958 959 960 |
# File 'lib/dot11/dot11.rb', line 957 def /(other) @payload = other self end |
#data ⇒ Object
939 940 941 |
# File 'lib/dot11/dot11.rb', line 939 def data [oui, code].pack("QXv") + payload.data end |
#to_s ⇒ Object
943 944 945 946 947 948 949 |
# File 'lib/dot11/dot11.rb', line 943 def to_s "SNAP\n" + "-------\n" + "oui: #{oui}\n" + "code: #{code}\n" + (if payload then "payload:\n#{payload.to_s.indent(6)}" else "" end) end |