lib/packetgen/header/eap/tls.rb in packetgen-2.8.3 vs lib/packetgen/header/eap/tls.rb in packetgen-2.8.4
- old
+ new
@@ -16,10 +16,11 @@
# * optionally {#tls_length} ({Types::Int32}), if +#l?+ is +true+,
# * {#body} ({Types::String}).
# @author Sylvain Daubert
# @since 2.1.4
class TLS < EAP
+ update_field :type, default: 13
# @!attribute flags
# @return [Integer] 8-bit flags
define_field_before :body, :flags, Types::Int8
# @!attribute l
@@ -41,14 +42,9 @@
# TLS message or set of messages that is being fragmented. So, it
# cannot be automatically calculated (no +#calc_length+ method).
# @return [Integer] 32-bit TLS length
define_field_before :body, :tls_length, Types::Int32,
optional: ->(h) { h.l? }
-
- # @return [EAP::TLS]
- def initialize(options={})
- super({ type: 13 }.merge!(options))
- end
# @return [String]
def inspect
str = Inspect.dashed_line(self.class, 1)
fields.each do |attr|