WHY/HOW TO USE THIS PROGRAM ?
Working on different Maschines with different accounts, I had to move lots
of files between them. It took a lot of time to use ftp again and again.
So I decided to write this nice little program which facilitates this task.
Consider a host where you want to put some files from another host to. All
you have to do is:
1) Start the program (Server part) with a portnumber of your choice
(portnumbers between 1025 and 32767 are always legal unless they are
in use--then simply choose another portnumber):
Example:
pftp 1234
2) Now start the program (Client part) on that host where you want to
send files from. You have to choose the same portnumber as is chosen
with the server part of the program at the destination host. So in
our example this is '1234'. Then enter the name of the host which
will receive the files, and finaly the files you want to send:
Example:
pftp 1234 destinationhost files
RETURN STATUSES USING `-q'
The following lists pftp's return statuses which will be useful when using
pftp within script files.
Name Number Meaning
---- ------ -------
PFTP_NO_ERR 0x00 no error occured
PFTP_ALLOCATION_ERR 0x01 memory allocation error
PFTP_IOCTL_TTY_ERR 0x02 cannot get or set tty modes
PFTP_OPEN_RC_ERR 0x03 cannot open pftp resource file
PFTP_FGET_STDIN_ERR 0x04 cannot get characters from stdin
PFTP_PRINTLIST_ERR 0x05 no host list found in variable
PFTP_MCLOPTION_ERR 0x06 misused command line option
PFTP_UUSER_ERR 0x07 cannot resolve user name
PFTP_CHDIR_ERR 0x08 cannot change directory
PFTP_FILE_OPEN_ERR 0x09 unable to open the file
PFTP_WRITETODISK_ERR 0x0a cannot write to disk
PFTP_FILTER_ERR 0x0b filter variable is not set
PFTP_NETBUF_ERR 0x0c netbuf variable is not set
PFTP_BANDWIDTH_ERR 0x0d bandwidth variable is not set
PFTP_HOSTNAME_ERR 0x0e no host name specified
PFTP_PORT_ERR 0x0f missing or illegal a port number
PFTP_FORK_ERR 0x10 cannot create a new child process
PFTP_NO_ROOT 0x11 missing root privileges
PFTP_INVHOST_ERR 0x12 invalid host name specified
PFTP_CONNECTION_ERR 0x13 connection was refused by remote host
PFTP_NO_DAEMON_ERR 0x14 no daemon is running on remote host
PFTP_NO_SERVER_ERR 0x15 no server is running on remote host
PFTP_WRITETONET_ERR 0x16 cannot write to net
PFTP_NO_ANSWER_ERR 0x17 missing COME ON from remote host
PFTP_REMOTE_ERR 0x18 remote host broke connection
PFTP_FILE_SEEK_ERR 0x19 error seeking position in file
PFTP_SETSOCKOPT_ERR 0x1a setsockopt error occured
PFTP_OPEN_LOG_ERR 0x1b cannot open log file
PFTP_LISTEN_ERR 0x1c a listen error occured
PFTP_ACCEPT_ERR 0x1d an accept error occured
PFTP_INPUT_ERR 0x1e wrong input from stdin
PFTP_PROG_ERR 0x1f cannot execute external program
PFTP_PIPE_ERR 0x20 cannot open pipe to program
PFTP_ENVIRON_ERR 0x21 insufficient space in the environment
PFTP_NO_TTY_ERR 0x22 cannot write to tty
PFTP_SIGNALMASK_ERR 0x23 error setting the signal mask
PFTP_SIGACTION_ERR 0x24 error performing signal action
PFTP_RES_HOST_ERR 0x25 error resolving remote host name
PFTP_UHOST_ERR 0x26 unknown host name
PFTP_SOCKET_ERR 0x27 cannot create socket
PFTP_MULTICAST_ERR 0x28 cannot join multicast group
PFTP_INTERFACE_ERR 0x29 cannot use interface
PFTP_BIND_ERR 0x2a cannot bind name to socket
PFTP_RECEIVE_ERR 0x2b error receiving data
PFTP_OUTPUT_ERR 0x2c cannot write to stdout
PFTP_READ_DISK_ERR 0x2d cannot read open file
PFTP_DIR_OPEN_ERR 0x2e unable to open the directory
PFTP_UPLOADDIR_ERR 0x2f upload directory variable is not set
PFTP_PFM_ERR 0x30 there's another pfm running
PFTP_NEW_DATA 0x31 there's new data in the upload directory
PFTP_RESPONSE_ERR 0x32 the server doesn't respond after sending
PFTP_TIMEOUT_ERR 0x33 connection timed out
NEW FEATURES
Version 0.4.X
1) '-r' send/receive directories recursively
2) '-' send/receive standard input
Version 0.5.X
1) `-a' always overwrite existing files
2) `-s' always skip existing files
3) `PFTPLOG' environment variable
4) `.pftprc' resource file containing default host names
Version 0.6.X
1) `-c host_names' accept specified clients only
2) `-f' use filter specified by PFTPCFILTER resp. PFTPSFILTER
3) `PFTPCLIENTS' environment variable
4) `-oN' send file beginning at N bytes from file
Version 0.7.X
1) pftp may receive more than one file at once
2) support for POSIX Threads if libraries are avaible
3) manually buffered standard input
4) environment variables may be specified in the resource file
5) `-b' buffered stdin/stdout
6) `-B' same as `-b32767'
7) `-q' run silently
8) `PFTPSLOG' environment variable for `-q'
Version 0.8.X
1) `-i' server started by inetd
2) `-d' daemon started by user or root
3) PFTPNOROOT environment variable to allow root if set to 0
4) PFTPASS holds alternativ password
5) `-e' create a normal password with crypt()
6) `-n' send data to a friend if daemon or inetd server is present
7) PFTPRECEIVE holds the absolute path of the upload directory
8) PFTPUPLIMIT maximum amount of kilo bytes in `PFTPRECEIVE'
10) internal pager for the simple file and directory manager
11) PFTPEDITOR holds the name of an external editor
12) PFTPAGER holds the name of an external pager
13) PFTPSORTBY determines sorting within the pfm
14) `-N' to peek for new data
15) PFTPBANDWID bandwidth in bytes per second (`-w')
16) Host names may look like this user@hostname
17) Read file names from standard input
Version 0.9.X
1) Do not follow symbolic links with option `-L'
Some options changed! See `pftp -h' or rtfm.
2) `-Q' used by the not existing pftp front end.
3) `-x' exit after first connection.
4) `-p' send all received data to stdout.
5) `-T' tcp based net performance test.
6) `-P' set datagram priority (IPv6)
7) `-v' output more information
8) `-o' allow only one connection at a time.
9) `-u' transfer data using UDP (for AUDIO and VIDEO streams).
10) `-s' UDP: display received bytes.
11) `-m' for multicasting
12) `-mg' for multicast group
13) `-mi' for multicast interface
14) `-ml' for multicast loop back
15) `-mt' for multicast time to live
Version 1.0.X
1) `-ANUM' specify the number of clients accepted at once.
2) `-F' Determine MPEG AUDIO bitrate.
3) PFTPAUSER holds alias names for login names.
4) `-D=DIR' change to directory DIR before receiving data.
5) PFTPIUPDATE interval between pfm's main menu update.
6) Introduced host specific variable setting.
7) PFTPCFVAR and PFTPSFVAR are variables for the filter.
Version 1.1.X
1) `-nl' starts host name list followed by the pfm.
2) `-N[NUM]' peek for new data in host specific upload directories.
3) interactive help for the internal pager.
4) PFTPRENAME automatically rename new files if they exist.
5) `-R' command line option for PFTPRENAME.
6) PFTPSINFO client/server: always send and set file information.
7) `-I' command line option for PFTPSINFO.
8) PFTPAINFO daemon: accept setting file and directory information.
9) `-G' sets optimized values for Gigabit Ethernet links.
10) PFTPGIGASTR set a different string size for `-G'.
11) PFTPGIGANET set a different net buffer size for `-G'.
Please peruse the manual page for further information!
--> Every comment via e-mail will be appreciated!
Author: Ben Schluricke
E-Mail: support@pftp.de
This program is dedicated to my girl-friend, Heather O'Rourke.