Module: PacketGen::Header::SCTP::ParameterMixin

Overview

Common methods to Init and InitAck parameters

Author:

  • Sylvain Daubert

Since:

  • 3.4.0

Instance Method Summary collapse

Methods included from Padded32

#padded?, #to_s

Instance Method Details

#parameter_nameString

Get parameter name

Returns:

  • (String)

Since:

  • 3.4.0



19
20
21
# File 'lib/packetgen/header/sctp/parameter.rb', line 19

def parameter_name
  self.class.name.split('::').last.delete_suffix('Parameter')
end

#to_humanString

Returns:

  • (String)

Since:

  • 3.4.0



24
25
26
# File 'lib/packetgen/header/sctp/parameter.rb', line 24

def to_human
  "<#{parameter_name}: #{value}>"
end