Class: PacketGen::Header::SCTP::UnknownChunk

Inherits:
BaseChunk
  • Object
show all
Defined in:
lib/packetgen/header/sctp/chunk.rb

Overview

UnknownChunk, used when type cannot be decoded 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Chunk Type | Chunk Flags | Chunk Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ \
/ Chunk Value / \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Author:

  • Sylvain Daubert

Since:

  • 3.4.0

  • 4.1.0 Remove ErrorMixin and ParameterMixin

Constant Summary

Constants inherited from BaseChunk

BaseChunk::TYPES

Instance Attribute Summary collapse

Attributes inherited from BaseChunk

#length, #type

Method Summary

Methods inherited from BaseChunk

#calc_length, #human_type, #to_human

Methods included from Padded32

#padded?, #to_s

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

#bodyString

SCTP chunk value

Returns:

  • (String)


124
# File 'lib/packetgen/header/sctp/chunk.rb', line 124

define_attr :body, BinStruct::String, builder: ->(h, t) { t.new(length_from: -> { h.length - 4 }) }