class Oxidized::TFTP
Public Instance Methods
Source
# File lib/oxidized/input/tftp.rb, line 23 def cmd(file) logger.debug "TFTP: #{file} @ #{@node.name}" config = StringIO.new @tftp.getbinary file, config config.rewind config.read end
Source
# File lib/oxidized/input/tftp.rb, line 15 def connect(node) @node = node @node.model.cfg['tftp'].each { |cb| instance_exec(&cb) } @log = File.open(Oxidized::Config::LOG + "/#{@node.ip}-tftp", 'w') if Oxidized.config.input.debug? @tftp = Net::TFTP.new @node.ip end
TFTP
utilizes UDP, there is not a connection. We simply specify an IP and send/receive data.
Private Instance Methods
Source
# File lib/oxidized/input/tftp.rb, line 33 def disconnect # TFTP uses UDP, there is no connection to close true ensure @log.close if Oxidized.config.input.debug? end