Class: PacketGen::Header::SCTP::SupportedAddrTypesParameter

Inherits:
Parameter
  • Object
show all
Defined in:
lib/packetgen/header/sctp/parameter.rb,
lib/packetgen/header/sctp/parameter.rb

Overview

Supported address types parameter. æ Parameter whose value is an array of supported address types (as BinStruct::Int16).

Author:

  • Sylvain Daubert

  • LemonTree55

Since:

  • 3.4.0

  • 4.1.0 Subclass of Parameter. No more include ParameterMixin.

Constant Summary

Constants inherited from Parameter

Parameter::TYPES

Instance Method Summary collapse

Methods inherited from Parameter

#from_human, #parameter_name

Methods included from Padded32

#padded?, #to_s

Instance Method Details

#to_human::String

Get human-readable description

Returns:

  • (::String)

Since:

  • 3.4.0

  • 4.1.0 Subclass of Parameter. No more include ParameterMixin.



129
130
131
132
133
134
# File 'lib/packetgen/header/sctp/parameter.rb', line 129

def to_human
  types = self[:value].map(&:to_i).map do |int16|
    Parameter::TYPES.key(int16) || int16.to_s
  end.join(',')
  "<#{parameter_name}: #{types}>"
end