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

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

Overview

An SMB2 Error packet for when an incomplete response comes back

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from GenericPacket

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

Instance Attribute Details

#original_commandObject

Returns the value of attribute original_command.



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

def original_command
  @original_command
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


13
14
15
16
# File 'lib/ruby_smb/smb2/packet/error_packet.rb', line 13

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