Class: RubySMB::Dcerpc::Svcctl::ChangeServiceConfigWRequest

Inherits:
BinData::Record
  • Object
show all
Defined in:
lib/ruby_smb/dcerpc/svcctl/change_service_config_w_request.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#opnumObject (readonly)

Returns the value of attribute opnum.



9
10
11
# File 'lib/ruby_smb/dcerpc/svcctl/change_service_config_w_request.rb', line 9

def opnum
  @opnum
end

Instance Method Details

#initialize_instanceObject



32
33
34
35
# File 'lib/ruby_smb/dcerpc/svcctl/change_service_config_w_request.rb', line 32

def initialize_instance
  super
  @opnum = CHANGE_SERVICE_CONFIG_W
end

#pad_length(prev_element) ⇒ Object

Determines the correct length for the padding, so that the next field is 4-byte aligned.



39
40
41
42
# File 'lib/ruby_smb/dcerpc/svcctl/change_service_config_w_request.rb', line 39

def pad_length(prev_element)
  offset = (prev_element.abs_offset + prev_element.to_binary_s.length) % 4
  (4 - offset) % 4
end