Sha256: 4ae1e9dfa8e914818a86d8e76277e4aa7914c78e95ea6325ebaed0262533d482

Contents?: true

Size: 954 Bytes

Versions: 23

Compression:

Stored size: 954 Bytes

Contents

module RubySMB
  module Dcerpc
    # The Response PDU as defined in
    # [The response PDU](http://pubs.opengroup.org/onlinepubs/9629399/chap12.htm#tagcjh_17_06_04_10)
    class Response < BinData::Record
      endian :little

      pdu_header :pdu_header, label: 'PDU header'

      uint32 :alloc_hint,    label: 'Allocation hint',  initial_value: -> { stub.do_num_bytes }
      uint16 :p_cont_id,     label: 'Presentation context identification'
      uint8  :cancel_count,  label: 'Cancel count'
      uint8  :reserved

      string :stub,          label: 'Stub', read_length: -> { pdu_header.frag_length - stub.abs_offset - pdu_header.auth_length }

      string :auth_verifier, label: 'Authentication verifier',
        onlyif: -> { pdu_header.auth_length > 0 },
        read_length: -> { pdu_header.auth_length }

      def initialize_instance
        super
        pdu_header.ptype = RubySMB::Dcerpc::PTypes::RESPONSE
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
ruby_smb-2.0.12 lib/ruby_smb/dcerpc/response.rb
ruby_smb-2.0.11 lib/ruby_smb/dcerpc/response.rb
ruby_smb-2.0.10 lib/ruby_smb/dcerpc/response.rb
ruby_smb-2.0.9 lib/ruby_smb/dcerpc/response.rb
ruby_smb-2.0.8 lib/ruby_smb/dcerpc/response.rb
ruby_smb-2.0.7 lib/ruby_smb/dcerpc/response.rb
ruby_smb-2.0.6 lib/ruby_smb/dcerpc/response.rb
ruby_smb-2.0.5 lib/ruby_smb/dcerpc/response.rb
ruby_smb-2.0.4 lib/ruby_smb/dcerpc/response.rb
ruby_smb-2.0.3 lib/ruby_smb/dcerpc/response.rb
ruby_smb-2.0.2 lib/ruby_smb/dcerpc/response.rb
ruby_smb-2.0.1 lib/ruby_smb/dcerpc/response.rb
ruby_smb-2.0.0 lib/ruby_smb/dcerpc/response.rb
ruby_smb-1.1.0 lib/ruby_smb/dcerpc/response.rb
ruby_smb-1.0.5 lib/ruby_smb/dcerpc/response.rb
ruby_smb-1.0.4 lib/ruby_smb/dcerpc/response.rb
ruby_smb-1.0.3 lib/ruby_smb/dcerpc/response.rb
ruby_smb-1.0.2 lib/ruby_smb/dcerpc/response.rb
ruby_smb-1.0.1 lib/ruby_smb/dcerpc/response.rb
ruby_smb-1.0.0 lib/ruby_smb/dcerpc/response.rb