Class: PacketGen::Header::SNAP

Inherits:
Base
  • Object
show all
Defined in:
lib/packetgen/header/llc.rb

Overview

Sub-Network Access Protocol

A SNAP header consists of:

Author:

  • Sylvain Daubert

Since:

  • 1.4.0

Instance Attribute Summary collapse

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

#bodyBinStruct::String, Headerable

SNAP header

Returns:



62
# File 'lib/packetgen/header/llc.rb', line 62

define_attr :body, BinStruct::String

#ouiBinStruct::OUI

If 00:00:00, #proto_id is an EtherType. Else, #proto_id is specified by organization specified BY OUI.

Returns:

  • (BinStruct::OUI)


54
# File 'lib/packetgen/header/llc.rb', line 54

define_attr :oui, BinStruct::OUI

#proto_idInteger

16-bit protocol id

Returns:

  • (Integer)


58
# File 'lib/packetgen/header/llc.rb', line 58

define_attr :proto_id, BinStruct::Int16