Class: PacketGen::Header::SNAP
- Defined in:
- lib/packetgen/header/llc.rb
Overview
Sub-Network Access Protocol
A SNAP header consists of:
-
a #oui (
BinStruct::OUI
), -
a #proto_id (
BinStruct::Int16
), -
and a #body (a
BinStruct::String
or another PacketGen::Headerable class).
Instance Attribute Summary collapse
-
#body ⇒ BinStruct::String, Headerable
SNAP header.
-
#oui ⇒ BinStruct::OUI
If
00:00:00
, #proto_id is an EtherType. -
#proto_id ⇒ Integer
16-bit protocol id.
Method Summary
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, #to_s
Constructor Details
This class inherits a constructor from PacketGen::Header::Base
Instance Attribute Details
#body ⇒ BinStruct::String, Headerable
SNAP header
62 |
# File 'lib/packetgen/header/llc.rb', line 62 define_attr :body, BinStruct::String |
#oui ⇒ BinStruct::OUI
54 |
# File 'lib/packetgen/header/llc.rb', line 54 define_attr :oui, BinStruct::OUI |
#proto_id ⇒ Integer
16-bit protocol id
58 |
# File 'lib/packetgen/header/llc.rb', line 58 define_attr :proto_id, BinStruct::Int16 |