Class: PacketGen::Header::SCTP::Parameter
- Inherits:
-
Object
- Object
- PacketGen::Header::SCTP::Parameter
- Includes:
- ParameterMixin
- Defined in:
- lib/packetgen/header/sctp/parameter.rb
Overview
Base class/factory for InitChunk and InitAckChunk parameters
Constant Summary collapse
- TYPES =
Paramter Types
{ 'IPv4' => 5, 'IPv6' => 6, 'StateCookie' => 7, 'Unrecognized' => 8, 'CookiePreservative' => 9, 'Hostname' => 11, 'SupportedAddrTypes' => 12, 'ECN' => 32_768 }.freeze
Instance Method Summary collapse
Methods included from ParameterMixin
Methods included from Padded32
Instance Method Details
#from_human(value) ⇒ Object
55 56 57 58 59 60 61 |
# File 'lib/packetgen/header/sctp/parameter.rb', line 55 def from_human(value) if value.is_a?(self[:value].class) self[:value] = value else self[:value].from_human(value) end end |
#to_human ⇒ ::String
50 51 52 |
# File 'lib/packetgen/header/sctp/parameter.rb', line 50 def to_human "<#{human_type}: #{self[:value].inspect}>" end |