Class: PacketGen::Header::SNAP

Inherits:
Base 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

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 Attribute Details

#bodyTypes::String, Header::Base



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

define_field :body, Types::String

#ouiTypes::OUI

Returns:



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

define_field :oui, Types::OUI

#proto_idInteger

Returns 16-bit protocol id.

Returns:

  • (Integer)

    16-bit protocol id



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

define_field :proto_id, Types::Int16