Class: RubySMB::Dcerpc::Svcctl::OpenServiceWRequest
- Inherits:
-
BinData::Record
- Object
- BinData::Record
- RubySMB::Dcerpc::Svcctl::OpenServiceWRequest
- Defined in:
- lib/ruby_smb/dcerpc/svcctl/open_service_w_request.rb
Overview
Instance Attribute Summary collapse
-
#opnum ⇒ Object
readonly
Returns the value of attribute opnum.
Instance Method Summary collapse
- #initialize_instance ⇒ Object
-
#pad_length(prev_element) ⇒ Object
Determines the correct length for the padding, so that the next field is 4-byte aligned.
Instance Attribute Details
#opnum ⇒ Object (readonly)
Returns the value of attribute opnum.
7 8 9 |
# File 'lib/ruby_smb/dcerpc/svcctl/open_service_w_request.rb', line 7 def opnum @opnum end |
Instance Method Details
#initialize_instance ⇒ Object
16 17 18 19 |
# File 'lib/ruby_smb/dcerpc/svcctl/open_service_w_request.rb', line 16 def initialize_instance super @opnum = OPEN_SERVICE_W end |
#pad_length(prev_element) ⇒ Object
Determines the correct length for the padding, so that the next field is 4-byte aligned.
23 24 25 26 |
# File 'lib/ruby_smb/dcerpc/svcctl/open_service_w_request.rb', line 23 def pad_length(prev_element) offset = (prev_element.abs_offset + prev_element.to_binary_s.length) % 4 (4 - offset) % 4 end |