Class: RubySMB::SMB2::Packet::ErrorPacket

Inherits:
GenericPacket
  • Object
show all
Defined in:
lib/ruby_smb/smb2/packet/error_packet.rb

Overview

This class represents an SMB2 Error Response Packet as defined in 2.2.2 SMB2 ERROR Response

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from GenericPacket

describe, #display, fields_hashed, format_field, from_hex, #initialize_instance, #packet_smb_version, read, #status_code, walk_fields

Instance Attribute Details

#original_commandObject

Returns the value of attribute original_command.



7
8
9
# File 'lib/ruby_smb/smb2/packet/error_packet.rb', line 7

def original_command
  @original_command
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


17
18
19
20
21
# File 'lib/ruby_smb/smb2/packet/error_packet.rb', line 17

def valid?
  return smb2_header.protocol == RubySMB::SMB2::SMB2_PROTOCOL_ID &&
         smb2_header.command == @original_command &&
         structure_size == 9
end