lib/packetgen/plugin/smb/close.rb in packetgen-plugin-smb-0.1.0 vs lib/packetgen/plugin/smb/close.rb in packetgen-plugin-smb-0.2.0
- old
+ new
@@ -1,17 +1,16 @@
# This file is part of PacketGen
-# See https://github.com/sdaubert/packetgen for more informations
+# See https://github.com/sdaubert/packetgen-plugin-smb for more informations
# Copyright (C) 2016 Sylvain Daubert <sylvain.daubert@laposte.net>
# This program is published under MIT license.
# frozen_string_literal: true
module PacketGen::Plugin
class SMB
# Close Request.
# @author Sylvain Daubert
- # @since 0.1.0
class CloseRequest < PacketGen::Header::Base
# @!attribute word_count
# The size, in 2-byte words, of the SMB command parameters. It should
# be +3+.
# @return [Integer]
@@ -30,10 +29,16 @@
define_field :last_modified, PacketGen::Types::Int32le
# @!attribute byte_count
# Should be 0.
# @return [Integer]
define_field :byte_count, PacketGen::Types::Int16le, default: 0
+
+ # Give protocol name for this class
+ # @return [String]
+ def protocol_name
+ 'SMB::CloseRequest'
+ end
end
# Close Response.
#
# This is a void container. {#word_count} and {#byte_count} should be 0.
@@ -48,9 +53,15 @@
define_field :last_modified, PacketGen::Types::Int32le
# @!attribute byte_count
# Should be 0.
# @return [Integer]
define_field :byte_count, PacketGen::Types::Int16le, default: 0
+
+ # Give protocol name for this class
+ # @return [String]
+ def protocol_name
+ 'SMB::CloseResponse'
+ end
end
self.bind_command 'close'
end
end