home *** CD-ROM | disk | FTP | other *** search
-
-
- From : G0GOU
- Date/time : 14-Aug 07:28
- Title : Explanation Of YAPP Protocol
-
- YAPP FILE TRANSFER PROTOCOL EXPLANATION
- ---------------------------------------
-
- I have written this text to help anyone who wishes to write software to
- deal with YAPP file transfers. It explains step by step , how the protocol
- works.
-
- Let's assume you were downloading a file from a BBS. I will explain each
- step as it occurs.
-
- After you have selected the file you wish to download, the BBS will send
- two characters to indicate it is ready to start. These characters are:-
- CHR(5) AND CHR(1). You then reply to this prompt by sending to the BBS
- these two characters:- CHR(6) AND CHR(1). After this, the BBS will send
- a file header. This header contains the filename, length and in some
- cases a path. Let's say the file you selected was called YAPP.TXT and
- it was 3853 bytes long.
-
- To indicate the start of the header, the BBS sends a CHR(1), then it sends
- a byte containing the amount of characters in the header. It then sends the
- filename followed by a CHR(0). After this, it will send the filelength
- (in decimal) again followed by a CHR(0).
-
- So our header would take this form. Any number in the {} brackets indicates
- an ASCII value and NOT the ACTUAL character.
-
- {1}{14}YAPP.TXT{0}3853{0}
-
- Some yapp systems add spaces at certain points.
-
- {1}{16}YAPP.TXT{0} 3853{0}
- | ^^
- or |
- |
- {1}{16}YAPP.TXT {0}3853{0}
- | ^^
- --------
- |
- Note that the LENGTH changes to accomodate extra spaces. Also note that
- the LENGTH also includes the CHR(0)'s as well.
-
- Other systems may also add a path.
-
- {1}{30}FILES\YAPP\TEXT\YAPP.TXT{0}3853{0}
-
- Your program should be able to seperate the path from the filename, and
- also ignore any spaces that occur.
-
- Right! Once you have managed to pull the information you need out of the
- header, you then send two characters:- CHR(6) & CHR(2). Once the BBS
- recieves these characters, it starts to send the file.
-
- The file is divided into blocks. Each block can be a maximum of 256 bytes.
- Each block starts with a CHR(2), and is followed by another byte indicating
- how long the block is. A CHR(0) means that the block is 256 bytes long.
- Each block is sent in a RAW state. That means that all the ASCII codes from
- 0-255 are used. No translation is neccesary, all you have to do is put all
- the blocks together to end up with the original file.
-
- Once the file has been completely transferred the BBS sends two characters
- to indicate the end of the file. CHR(3) and CHR(1). You respond with a
- CHR(6) and CHR(3). The BBS responds to that with an CHR(4) and CHR(1).
- You then end the transfer with an CHR(6) and CHR(4).
-
- This end process seems a bit silly. i.e. Having to keep swapping codes
- to end the transfer. Sorry about that! But I didn't write the protocol
- you know.
-
- Due to the nature of YAPP using all the available ASCII codes, (0-255) it
- becomes nessesary to operate the file transfer in transparent mode,
- 8 bit conversion and RTS/CTS handshaking. If you don't follow these 3
- steps you will NOT succeed in transfering anything at all.
-
- 73 de Len G0GOU @ GB7BAD.#23.GBR.EU
-