Class: RubySMB::SMB1::Packet::ReadAndxRequest
- Inherits:
-
GenericPacket
- Object
- BinData::Record
- GenericPacket
- RubySMB::SMB1::Packet::ReadAndxRequest
- Defined in:
- lib/ruby_smb/smb1/packet/read_andx_request.rb
Overview
A SMB1 SMB_COM_READ_ANDX Request Packet as defined in 2.2.4.42.1 Request 2.2.4.2.1 Client Request Extensions
Defined Under Namespace
Classes: DataBlock, ParameterBlock
Constant Summary collapse
- COMMAND =
RubySMB::SMB1::Commands::SMB_COM_READ_ANDX
Instance Method Summary collapse
-
#set_64_bit_offset(is_64_bit) ⇒ Object
Specifies whether the offset is a 32-bit (default) or 64-bit value.
-
#set_read_from_named_pipe(read_from_named_pipe) ⇒ Object
Sets the read_from_named_pipe flag to
read_from_named_pipe
value (true or false).
Methods inherited from GenericPacket
describe, #display, fields_hashed, format_field, from_hex, #initialize_instance, #packet_smb_version, read, #status_code, #valid?, walk_fields
Instance Method Details
#set_64_bit_offset(is_64_bit) ⇒ Object
Specifies whether the offset is a 32-bit (default) or 64-bit value. When is_64_bit
is true, a 64-bit offset will be used and the OffsetHigh field will be added to the structure.
74 75 76 77 |
# File 'lib/ruby_smb/smb1/packet/read_andx_request.rb', line 74 def set_64_bit_offset(is_64_bit) raise ArgumentError.new, 'The value can only be true or false' unless [true, false].include?(is_64_bit) parameter_block.word_count = is_64_bit ? 0x0C : 0x0A end |
#set_read_from_named_pipe(read_from_named_pipe) ⇒ Object
Sets the read_from_named_pipe flag to read_from_named_pipe
value (true or false).
When reading from a named pipe, this flag needs to be set to true, which forces
the use of Timeout field in Timeout_or_MaxCountHigh. When set to false (default),
for regular files, MaxCountHigh field will be used instead.
65 66 67 68 |
# File 'lib/ruby_smb/smb1/packet/read_andx_request.rb', line 65 def set_read_from_named_pipe(read_from_named_pipe) raise ArgumentError.new, 'The value can only be true or false' unless [true, false].include?(read_from_named_pipe) parameter_block.read_from_named_pipe = read_from_named_pipe end |