dos_machine
where dos_machine is one of:
B_DIG B_STIM W_DIG W_STIM G_DIG G_STIM EYE_DIG STIM1 STIM2 STIM3 SERVER
Note that dos_machine must first be placed in server mode by entering
the command "server" (see below).
This method is distinctly different from the standard dos ftp transfer in that the transfer takes place at a linux machine, and requires a little legwork in that the user must first put the target dos machine in server mode, then walk to a linux machine to perform the file transfer, then when done walk back to the dos machine to take it out of server mode.
The ncftp program handles the actual file transfer. ncftp commands are almost identical to ftp commands, for a summary enter the command ’help’ at the ncftp prompt, or see ’man ncftp’ for complete information. Anyone familiar with ftp commands should have no problem with ncftp.
The difference between transfer types ’ascii’ and ’binary’ is simply a matter of whether or not the file is converted during transfer. When the transfer type is set to ’ascii’ a conversion called end-of-line translation is performed on the file as it is transferred; when the transfer type is set to ’binary’ no conversion is performed. End-of-line translation is often desireable when transferring text files because the invisible end-of-line control characters are automatically converted to the convention used by the destination machine (the DOS end-of-line is two characters, a CR followed by LF, or hex 0d 0a; the linux end-of-line is the single character LF, or hex 0a).
The transfer type is set by entering either ’ascii’ or ’binary’ at the ncftp prompt; to check the current setting, enter ’type’.
Always use a transfer type of ’binary’ to transfer binary files like .crw and .log files because they should be transferred as-is with no translation. Never use type ’ascii’ to transfer binary files because some of the characters in them may coincidentally correspond to end-of-line characters and be translated, resulting in a destination file that is different from the source file.
It is preferable to transfer text files like scenario files using a transfer type of ’ascii’ so that end-of-line translation is performed appropriately. Note that when doing so the destination file may be a slightly different size than the source file, which is to be expected due to the changes in the number of end-of-line characters. It is OK to transfer text files using type ’binary’, but no end-of-line translation will be done and the destination file will likely appear strangely formatted on the destination machine.
D:\EXPT2> server
Then, from any linux machine, open a connection to B_DIG by entering its name (each dos machine should have its name displayed on its monitor, note they are all in upper case):
mk12:~$ B_DIG
NcFTP 3.0.2 (October 19, 2000) by Mike Gleason (ncftp@ncftp.com).
Connecting to 172.16.6.105...
PC Resident FTP 2.2TN/TC-D server, ready
Logging in...
User logged in
Logged in to B_DIG.
ncftp D:/EXPT2 >
Use get/put/mget/mput to perform the desired file transfer(s), then enter ’quit’ when done:
ncftp D:/EXPT2 > get sub11.log
sub11.log: 24384 bytes 809.84 kB/s
ncftp D:/EXPT2 > quit
**************************************************************
PLEASE GO BACK TO B_DIG AND PRESS ESC
TO TAKE IT OUT OF SERVER MODE
**************************************************************
On exit a reminder is displayed to take the dos machine out of server mode (by pressing ESC). It is somewhat important to do this, otherwise the dos machine is left indefinitely in an insecure state waiting for connections. The risk that a hacker could or would tamper with it is low, but the risk does exist while the machine is in server mode.