Class: PacketGen::Plugin::SMB::Trans::Response
- Inherits:
-
Header::Base
- Object
- Header::Base
- PacketGen::Plugin::SMB::Trans::Response
- Defined in:
- lib/packetgen/plugin/smb/trans/response.rb
Overview
Transaction Response.
See also Blocks, as Response is a specialization of Blocks#words and Blocks#bytes.
Instance Attribute Summary collapse
- #body ⇒ String
- #byte_count ⇒ Integer
-
#data_count ⇒ Integer
16-bit number of transaction data bytes sent in this response.
-
#data_displacement ⇒ Integer
16-bit offset (in bytes) relative to all of the transaction data bytes in this transaction response at which this block of data bytes SHOULD be placed.
-
#data_offset ⇒ Integer
16-bit offset (in bytes) from the start of the SMB header to the start of the data field.
-
#pad1 ⇒ Integer
Padding before #body to align it on 32-bit boundary.
-
#param_count ⇒ Integer
16-bit number of transaction parameter bytes sent in this response.
-
#param_displacement ⇒ Integer
16-bit offset (in bytes) relative to all of the transaction parameter bytes in this transaction response at which this block of parameter bytes SHOULD be placed.
-
#param_offset ⇒ Integer
16-bit offset (in bytes) from the start of the SMB header to the start of the transaction parameters.
-
#rsv1 ⇒ Integer
16-bit reserved field.
-
#rsv3 ⇒ Integer
8-bit reserved field.
-
#setup ⇒ ArrayPacketGen::
Array of 2-byte words.
-
#setup_count ⇒ Object
8-bit number of setup words (ie 16-bit words) contained in #setup field.
-
#total_data_count ⇒ Integer
The total number of transaction data bytes.
-
#total_param_count ⇒ Integer
The total number of transaction parameter bytes.
-
#word_count ⇒ Integer
The size, in 2-byte words, of the SMB command parameters.
Class Method Summary collapse
-
.protocol_name ⇒ String
Give protocol name for this class.
Instance Attribute Details
#body ⇒ String
84 |
# File 'lib/packetgen/plugin/smb/trans/response.rb', line 84 define_field :body, PacketGen::Types::String |
#byte_count ⇒ Integer
76 |
# File 'lib/packetgen/plugin/smb/trans/response.rb', line 76 define_field :byte_count, PacketGen::Types::Int16le |
#data_count ⇒ Integer
16-bit number of transaction data bytes sent in this response.
52 |
# File 'lib/packetgen/plugin/smb/trans/response.rb', line 52 define_field :data_count, PacketGen::Types::Int16le |
#data_displacement ⇒ Integer
16-bit offset (in bytes) relative to all of the transaction data bytes in this transaction response at which this block of data bytes SHOULD be placed.
62 |
# File 'lib/packetgen/plugin/smb/trans/response.rb', line 62 define_field :data_displacement, PacketGen::Types::Int16le |
#data_offset ⇒ Integer
16-bit offset (in bytes) from the start of the SMB header to the start of the data field.
57 |
# File 'lib/packetgen/plugin/smb/trans/response.rb', line 57 define_field :data_offset, PacketGen::Types::Int16le |
#pad1 ⇒ Integer
Padding before #body to align it on 32-bit boundary
80 81 |
# File 'lib/packetgen/plugin/smb/trans/response.rb', line 80 define_field :pad1, PacketGen::Types::String, default: "\0" * 4, builder: ->(h, t) { t.new(length_from: -> { h.data_offset - SMB.new.sz - (h.offset_of(:byte_count) + h[:byte_count].sz) }) } |
#param_count ⇒ Integer
16-bit number of transaction parameter bytes sent in this response.
37 |
# File 'lib/packetgen/plugin/smb/trans/response.rb', line 37 define_field :param_count, PacketGen::Types::Int16le |
#param_displacement ⇒ Integer
16-bit offset (in bytes) relative to all of the transaction parameter bytes in this transaction response at which this block of parameter bytes SHOULD be placed.
48 |
# File 'lib/packetgen/plugin/smb/trans/response.rb', line 48 define_field :param_displacement, PacketGen::Types::Int16le |
#param_offset ⇒ Integer
16-bit offset (in bytes) from the start of the SMB header to the start of the transaction parameters.
42 |
# File 'lib/packetgen/plugin/smb/trans/response.rb', line 42 define_field :param_offset, PacketGen::Types::Int16le |
#rsv1 ⇒ Integer
16-bit reserved field
33 |
# File 'lib/packetgen/plugin/smb/trans/response.rb', line 33 define_field :rsv1, PacketGen::Types::Int16le, default: 0 |
#rsv3 ⇒ Integer
8-bit reserved field
69 |
# File 'lib/packetgen/plugin/smb/trans/response.rb', line 69 define_field :rsv2, PacketGen::Types::Int8 |
#setup ⇒ ArrayPacketGen::
Array of 2-byte words.
73 |
# File 'lib/packetgen/plugin/smb/trans/response.rb', line 73 define_field :setup, PacketGen::Types::ArrayOfInt16le, builder: ->(h, t) { t.new(counter: h[:setup_count]) } |
#setup_count ⇒ Object
8-bit number of setup words (ie 16-bit words) contained in #setup field.
65 |
# File 'lib/packetgen/plugin/smb/trans/response.rb', line 65 define_field :setup_count, PacketGen::Types::Int8 |
#total_data_count ⇒ Integer
The total number of transaction data bytes.
29 |
# File 'lib/packetgen/plugin/smb/trans/response.rb', line 29 define_field :total_data_count, PacketGen::Types::Int16le |
#total_param_count ⇒ Integer
The total number of transaction parameter bytes.
25 |
# File 'lib/packetgen/plugin/smb/trans/response.rb', line 25 define_field :total_param_count, PacketGen::Types::Int16le |
#word_count ⇒ Integer
The size, in 2-byte words, of the SMB command parameters. It should be 14 setup_count+.
21 |
# File 'lib/packetgen/plugin/smb/trans/response.rb', line 21 define_field :word_count, PacketGen::Types::Int8, default: 10 |
Class Method Details
.protocol_name ⇒ String
Give protocol name for this class
88 89 90 |
# File 'lib/packetgen/plugin/smb/trans/response.rb', line 88 def self.protocol_name 'SMB::Trans::Response' end |