Class: PacketGen::Plugin::SMB::Trans::Request
- Inherits:
-
Header::Base
- Object
- Header::Base
- PacketGen::Plugin::SMB::Trans::Request
- Defined in:
- lib/packetgen/plugin/smb/trans/request.rb
Overview
Transaction Request.
See also Blocks, as Request 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 that the clients sends to the server in this request.
-
#data_offset ⇒ Integer
16-bit offset (in bytes) from the start of the SMB header to the start of the data field.
-
#flags ⇒ Integer
16-bit flags.
-
#max_data_count ⇒ Integer
The maximum number of data bytes that the client will accept in transaction response.
-
#max_param_count ⇒ Integer
The maximum number of parameter bytes that the client will accept in transaction response.
-
#max_setup_count ⇒ Integer
The maximum number of setup bytes that the client will accept in transaction response.
-
#name ⇒ String
Pathname of the mailslot or named pipe.
-
#pad1 ⇒ String
Padding to align #body on 4-byte boundary.
-
#padname ⇒ Integer
8-bit optional padding to align #name on a 2-byte boundary.
-
#param_count ⇒ Integer
16-bit number of transaction parameter bytes that the clients attempts to send to the server in this request.
-
#param_offset ⇒ Integer
16-bit offset (in bytes) from the start of the SMB header to the start of the transaction parameters.
-
#rsv1 ⇒ Integer
8-bit reserved field.
-
#rsv2 ⇒ Integer
16-bit reserved field.
-
#rsv3 ⇒ Integer
8-bit reserved field.
-
#setup ⇒ Array
Array of 2-byte words.
-
#setup_count ⇒ Object
8-bit number of setup words (ie 16-bit words) contained in #setup field.
-
#timeout ⇒ Integer
32-bit timeout.
-
#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
111 |
# File 'lib/packetgen/plugin/smb/trans/request.rb', line 111 define_field :body, PacketGen::Types::String |
#byte_count ⇒ Integer
94 |
# File 'lib/packetgen/plugin/smb/trans/request.rb', line 94 define_field :byte_count, PacketGen::Types::Int16le |
#data_count ⇒ Integer
16-bit number of transaction data bytes that the clients sends to the server in this request.
75 |
# File 'lib/packetgen/plugin/smb/trans/request.rb', line 75 define_field :data_count, 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.
80 |
# File 'lib/packetgen/plugin/smb/trans/request.rb', line 80 define_field :data_offset, PacketGen::Types::Int16le |
#flags ⇒ Integer
16-bit flags
52 |
# File 'lib/packetgen/plugin/smb/trans/request.rb', line 52 define_field :flags, PacketGen::Types::Int16le |
#max_data_count ⇒ Integer
The maximum number of data bytes that the client will accept in transaction response.
39 |
# File 'lib/packetgen/plugin/smb/trans/request.rb', line 39 define_field :max_data_count, PacketGen::Types::Int16le |
#max_param_count ⇒ Integer
The maximum number of parameter bytes that the client will accept in transaction response.
34 |
# File 'lib/packetgen/plugin/smb/trans/request.rb', line 34 define_field :max_param_count, PacketGen::Types::Int16le |
#max_setup_count ⇒ Integer
The maximum number of setup bytes that the client will accept in transaction response.
44 |
# File 'lib/packetgen/plugin/smb/trans/request.rb', line 44 define_field :max_setup_count, PacketGen::Types::Int8 |
#name ⇒ String
Pathname of the mailslot or named pipe.
103 |
# File 'lib/packetgen/plugin/smb/trans/request.rb', line 103 define_field :name, SMB::String, builder: ->(h, t) { t.new(unicode: !h.packet || h.packet.smb.flags2_unicode?) } |
#pad1 ⇒ String
Padding to align #body on 4-byte boundary.
107 108 |
# File 'lib/packetgen/plugin/smb/trans/request.rb', line 107 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(:name) + h[:name].sz) }) } |
#padname ⇒ Integer
8-bit optional padding to align #name on a 2-byte boundary. Only present if PacketGen::Plugin::SMB#flags2_unicode? is true
.
99 |
# File 'lib/packetgen/plugin/smb/trans/request.rb', line 99 define_field :padname, PacketGen::Types::Int8, optional: ->(h) { h&.packet&.smb&.flags2_unicode? } |
#param_count ⇒ Integer
16-bit number of transaction parameter bytes that the clients attempts to send to the server in this request.
65 |
# File 'lib/packetgen/plugin/smb/trans/request.rb', line 65 define_field :param_count, 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.
70 |
# File 'lib/packetgen/plugin/smb/trans/request.rb', line 70 define_field :param_offset, PacketGen::Types::Int16le |
#rsv1 ⇒ Integer
8-bit reserved field
48 |
# File 'lib/packetgen/plugin/smb/trans/request.rb', line 48 define_field :rsv1, PacketGen::Types::Int8, default: 0 |
#rsv2 ⇒ Integer
16-bit reserved field
60 |
# File 'lib/packetgen/plugin/smb/trans/request.rb', line 60 define_field :rsv2, PacketGen::Types::Int16le, default: 0 |
#rsv3 ⇒ Integer
8-bit reserved field
87 |
# File 'lib/packetgen/plugin/smb/trans/request.rb', line 87 define_field :rsv3, PacketGen::Types::Int8 |
#setup ⇒ Array
Array of 2-byte words.
91 |
# File 'lib/packetgen/plugin/smb/trans/request.rb', line 91 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.
83 |
# File 'lib/packetgen/plugin/smb/trans/request.rb', line 83 define_field :setup_count, PacketGen::Types::Int8 |
#timeout ⇒ Integer
32-bit timeout
56 |
# File 'lib/packetgen/plugin/smb/trans/request.rb', line 56 define_field :timeout, PacketGen::Types::Int32le |
#total_data_count ⇒ Integer
The total number of transaction data bytes.
29 |
# File 'lib/packetgen/plugin/smb/trans/request.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/request.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/request.rb', line 21 define_field :word_count, PacketGen::Types::Int8, default: 14 |
Class Method Details
.protocol_name ⇒ String
Give protocol name for this class
115 116 117 |
# File 'lib/packetgen/plugin/smb/trans/request.rb', line 115 def self.protocol_name 'SMB::Trans::Request' end |