                        IPXTrans   vr. 1.0

                             



*What is this?*

IPXTrans is a program that transfers binary and ascii files over a network
running the Novell IPX protocal.


*Why do I want it?*

If you have a simple network, and need to transfer files without running 
around swapping disks.


*How do I use it?*

IPXTrans can only copy files in the current directory, so on the sending
computer, copy the file to the directory that contains IPXTrans, and type:

C:\IPXTRANS> IPXTRANS -s [filename] [socket]
               /^\    /^\    /^\      /^\
                |      |      |        |
                |      |      |        |
The program ----|      |      |        |
"-s" for sending-------|      |        |
The file to send--------------|        |
The socket.  1 is usually fine---------|

IPXTrans will then bring up its fancy shmancy screen and start looking for
the receiving computer, who has in the meantime typed this:

C:\IPXTRANS> IPXTRANS -r [socket]
               /^\    /^\    /^\
                |      |      |
                |      |      |       Notice you _don't_ need to type a file
The program ----|      |      |       name!  Through the magic of modern 
"-r" for receiving-----|      |       technology, it's transmitted for you!
Socket.  See above -----------|


The computers _must_ be using the same SOCKET and the same VERSION of
IPXTRans!  If these two things are true, the two computers should locate
each other within 45 seconds and start their thing.  If you ever play doom, they 
should connect in about the same amount of time.  After a minute, you can give 
up.


*Who will kill you if you don't mention them?*

David Welch wrote the IPX driver and packet stuff.  It was very useful despite
its annoying lack of _documentation_!

Paul Rutter and Joe Orost wrote the binary to ascii and back again software,
which was also very useful, despite an annoying lack of documentation!


*Where can I get the lastest version of IPXTrans?*

As of 12/17/95, the only version is 1.0.  You can get the latest version at
ftp.cdrom.com /pub/idgames/newstuff/ipxtrn10.zip       until it is moved to
ftp.cdrom.com /pub/idgames/utils/network/ipxtrn10.zip


*What's your E-Mail address?*

owenguy@world.std.com



Technical details.

I want to show off, so that's why I'm writing this.  You can get the source
code in C and assembly from me if you email me.

The basic algorithm for IPXTrans is reading little bits of data from the file,
converting them to ascii, adding some checksums, and then shipping it off.  If
you're already lost, don't bother reading any more.

The translating is done using the btoa 4.0 algorithm, which I discovered at
http://www.shareware.com.  I don't remember where I actually downloaded it, I
just know I ran a search and there it was.  btoa (binary to ascii, duh) takes
four characters, and then converts them to five ascii characters in base 85.  
A file is lenghtened by 25% because of this.  The checksums are of the pretty 
basic add-the-numbers-up variety.  Packets are read 720 bytes at a time, then 
converted to ascii, which results in 900 bytes of converted data.

Sending them used David Welch's IPXSTART kit, also found running a search at 
http://www.shareware.com.  Figuring out how to use it took a while, but I  
pretty much got the hang of it.

The most annoying thing to do was error trapping.  If packets didn't make it,
the whole system would be out of sync.  There is a _really_ complicated set
of DO this UNTIL that setups to get everything right.  Here it is:


_____________________________________________________________________________
|        Sending computer              |           Receiving computer       |
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
|Until recv it's online                |Until recv it's Online              |
|  Send Online                         |  Send online                       |
|get address of other computer         |get address of other computer       |
|Send filename                         |                                    |
|  If it's still looking for me...     |Send anything it gets               |
|    Send Online                       |  if it's still looking for me...   |
|      until change                    |    Send Online                     |
|                                      |      until change                  |
|  until recv correct filename         |                                    |
|Send file confirmation                |  until confirmation of filename    |
|  until recv waiting for string       |Send wait for str    <====<====q    |
|Encode string <=====<=====<=========q |  until received               I    |
|Send String     <======<======<===q I |If it's end of file, goto====>=+=q  |
|  until confirmation of str recvd I I |Send string received           I I  |
|Wait for result                   ^ I |Try to decode string           ^ I  |
|  If it was bad goto ===>===>=====d ^ |If it's no good,               I I  |
|                                    I |  Send error message           I v  |
|                                    I |  Until new string             I I  |
|                                    I |  Try again ===>====>====>=====d I  |
|  If it was OK                      ^ |else                           ^ I  |
|    If that was last str,           I |  Send string ok message       I I  |
|      goto ====>=====>=====q        I |  until new string             I v  |
|    else loop =====>====>==+====>===d |Loop ====>======>=======>======d I  |
|                           I          |                                 I  |
|Send EOF message   <====<==d          |Send EOF received <===<=====<====d  |
|  until confirmation                  |  Until nothing received(sender must|
|                                      |                       be offline)  |
|Quit                                  |Quit                                |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I discovered a wonderful function in C doing this.  sscanf.  Takes _any_,
with information seperated in any way _you_ want, and _automatically_ parses
it into little bits!  Wow!  So if have:   
"This is my header,my body,checksm: 1024", you write 

char *mystring;
char *header;
char *body;
long chksm;
strcpy(mystring,"This is my header,my body,checksm: 1024");
sscanf(mystring, "%s,%s,checksm: %li", &header, &body, &chksm);  

and it's done!  What a godsend!
Other useful function:  _setcursortype(_NOCURSOR);  
gets rid of that annoying blinking thing.
