class RubySMB::Dispatcher::Base

Provides the base class for the packet dispatcher.

Public Instance Methods

nbss(packet) click to toggle source

Creates a NetBIOS Session Service (NBSS) header

@param packet [#do_num_bytes] the packet to be sent @return [String] NBSS header to go in front of `packet`

# File lib/ruby_smb/dispatcher/base.rb, line 9
def nbss(packet)
  nbss = RubySMB::Nbss::SessionHeader.new
  nbss.session_packet_type = RubySMB::Nbss::SESSION_MESSAGE
  nbss.stream_protocol_length = packet.do_num_bytes.to_i
  nbss.to_binary_s
end
recv_packet() click to toggle source

@abstract

# File lib/ruby_smb/dispatcher/base.rb, line 22
def recv_packet
  raise NotImplementedError
end
send_packet(_packet) click to toggle source

@abstract

# File lib/ruby_smb/dispatcher/base.rb, line 17
def send_packet(_packet)
  raise NotImplementedError
end