TFTP - TFTP Client class
$tftp = new TFTP("some.host.name");
TFTP is a class implementing a simple TFTP client in Perl as described in RFC783.
TFTP stands for Trivial File Transfer Protocol.
This is the constructor for a new TFTP object. HOST is the name of the remote host to which a TFTP connection is required.
OPTIONS are passed in a hash like fashion, using key and value pairs. Possible options are:
Port - The port number to connect to on the remote machine for the TFTP connection
Mode - Set the transfer mode [NETASCII, OCTET] (defaults to NETASCII)
Timeout - Set the timeout value before retry (defaults to 2 sec)
MaxTimeout - Set the maximum timeout value before retry (defaults to 8 sec)
Retries - Set the number of retries (defaults to 3 with arithmetic backoff)
This method will set the mode to be used with the remote TFTP server to specify the type of data transfer. The return value is the previous value.
Synonyms for mode with the first argument set accordingly
Get REMOTE_FILE from the server and store locally. LOCAL_FILE may be a filename or a filehandle. If not specified the the file will be stored in the current directory with the same leafname as the remote file.
Returns LOCAL_FILE, or the generated local file name if LOCAL_FILE is not given.
Put a file on the remote server. LOCAL_FILE may be a name or a filehandle. If LOCAL_FILE is a filehandle then REMOTE_FILE must be specified. If REMOTE_FILE is not specified then the file will be stored in the current directory with the same leafname as LOCAL_FILE.
Returns REMOTE_FILE, or the generated remote filename if REMOTE_FILE is not given.
Close the current socket and release any resources. A more complete way to release resources is to call 'undef $tftp;' on the session object.
When reporting bugs/problems please include as much information as possible. It may be difficult for me to reproduce the problem as almost every setup is different.
A small script which yields the problem will probably be of help. It would also be useful if this script was run with the extra options debug = 1> passed to the constructor, and the output sent with the bug report. If you cannot include a small script then please include a Debug trace from a run of your program which does yield the problem.
G. S. Marzot <firstname.lastname@example.org>
tftp(1), tftpd(8), RFC 783 http://info.internet.isi.edu:80/in-notes/rfc/files/rfc783.txt
Copyright (c) 1998 G. S. Marzot. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install TFTP, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.