home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1998 September / PCO_0998.ISO / filesbbs / os2 / af_511.arj / DEVELOP.ZIP / INTERNET.DOC < prev    next >
Encoding:
Text File  |  1998-02-08  |  7.9 KB  |  155 lines

  1. (******************************************************************************)
  2. (*                          ALLFIX sample procedures                          *)
  3. (*    Copyright (C) 1992,98 Harms Software Engineering, all rights reserved   *)
  4. (*                                                                            *)
  5. (*                 All information in this documentation is                   *)
  6. (*                  subject to change without prior notice                    *)
  7. (******************************************************************************)
  8.  
  9.         This file explains the structure of encoded email messages which
  10.         are used to send files and messages via the internet to other
  11.         fidonet technology nodes.
  12.  
  13.         All files (with files we also mean messages such as netmails)
  14.         are split up into sections of at most 16 kb. Each email message
  15.         contains a number of fields that identify the contents. There
  16.         are two types of message contents, files and netmail messages.
  17.         Most of the keywords are the same. Each keyword, also referred
  18.         to as a verb, is followed by a value. The following list of
  19.         keywords are used for both types of emails:
  20.  
  21.         ALLFIX_MSG_ID:                  The message identifier. The
  22.                                         format of the identifier is
  23.                                         explained below.
  24.  
  25.         ALLFIX_MSG_ORIG_ADDRS:          The origin fidonet address.
  26.  
  27.         ALLFIX_MSG_DEST_ADDRS:          The destination fidonet address.
  28.  
  29.         ALLFIX_MSG_FROM:                The name of the person who
  30.                                         wrote the message.
  31.  
  32.         ALLFIX_MSG_TO:                  The name of the person to whom
  33.                                         the messageis addressed.
  34.  
  35.         ALLFIX_MSG_SUBJ:                The subject of the netmail.
  36.  
  37.         ALLFIX_MSG_DATE:                The date of the message in the
  38.                                         same format as in a .MSG file
  39.                                         header.
  40.  
  41.         ALLFIX_MSG_FLAGS:               The message flags. The "Direct"
  42.                                         flag is coded as bit number 10.
  43.  
  44.  
  45.         The following list of keywords are used for encoding netmail
  46.         messages:
  47.  
  48.         ALLFIX_MSG_PART_CRC:            The 32 bit Crc of this message
  49.                                         part. The Crc is calculated on
  50.                                         the uncoded message part.
  51.                                         Therefore, when checking the
  52.                                         Crc, first decode the message
  53.                                         part and then calculate the Crc.
  54.  
  55.         ALLFIX_MSG_PART_BEGIN:          The encoded message body follows
  56.                                         on the next line after this
  57.                                         keyword. The body is encoded
  58.                                         using the coding technique
  59.                                         explained below.
  60.  
  61.         ALLFIX_MSG_PART_END             This keyword signals the end of
  62.                                         the message body part. This is
  63.                                         one of the two keywords that is
  64.                                         not followed by any extra
  65.                                         values.
  66.  
  67.         The following list of keywords are used for encoding files:
  68.  
  69.         ALLFIX_FILE_NAME:               The name of the file being sent.
  70.  
  71.         ALLFIX_FILE_SIZE:               The size of the file being sent.
  72.                                         This is the size of the entire
  73.                                         file and NOT the current part.
  74.  
  75.         ALLFIX_FILE_TIME:               The date and time of the file
  76.                                         being sent. When recreating the
  77.                                         file, the date and time are set
  78.                                         to this value. The file time is
  79.                                         stored in DOS format.
  80.  
  81.         ALLFIX_FILE_PART_CRC:           The 32 bit Crc of this message
  82.                                         part. The Crc is calculated on
  83.                                         the uncoded message part.
  84.                                         Therefore, when checking the
  85.                                         Crc, first decode the message
  86.                                         part and then calculate the Crc.
  87.                                         The CRC is stored in hexadecimal
  88.                                         format.
  89.  
  90.         ALLFIX_FILE_PART_BEGIN:         This keyword signals that a file
  91.                                         part will begin on the line
  92.                                         following this keyword. Directly
  93.                                         following this keyword is the
  94.                                         part number followed by the
  95.                                         total number of parts, seperated
  96.                                         from the part number with a
  97.                                         front-slash. For example 1/10.
  98.  
  99.         ALLFIX_FILE_PART_END            This keyword signals that the
  100.                                         end of a file part has been
  101.                                         reached. This is one of the two
  102.                                         keywords that is not followed by
  103.                                         any extra values.
  104.  
  105.  
  106.         The ALLFIX_MSG_ID's consist of two parts. The first part is
  107.         the dos system date in hexadecimal format. The second part is
  108.         a followup number. Each time an email is written, the followup
  109.         number is incremented. An example ALLFIX_MSG_ID is:
  110.  
  111.                 22F93403-00000746
  112.  
  113.  
  114.         The message ID's are unique. The first part is unique for "file"
  115.         that is being sent. In other words, if a large file is being
  116.         sent, which is split up into 10 parts, each part will have the
  117.         "main" ID number. Only the followup number will be different.
  118.  
  119.         ALLFIX sends all messages and files using email messages. The
  120.         netmail messages are encoded into one email and the files may be
  121.         split up into several parts. When all these parts have arrived,
  122.         they are simply appended to each other to create the original
  123.         file. It is easy to know if all parts have been received because
  124.         each email contains a part number and also the total number of
  125.         parts.
  126.  
  127.         When an email is correctly received, ALLFIX will send an
  128.         acknowlegement back to the sender. The acknowledgement message
  129.         contains one keyword, namely:
  130.  
  131.         ALLFIX_ACK:                     This keyword contains the
  132.                                         ALLFIX_MSG_ID of the email being
  133.                                         acknowledged.
  134.  
  135.         When an email is incorrectly received (i.e. the Crc is
  136.         incorrect), an error is sent back to the sender. The error
  137.         message contains one keyword, namely:
  138.  
  139.         ALLFIX_ERR:                     This keyword contains the
  140.                                         ALLFIX_MSG_ID of the email that
  141.                                         was incorrectly received.
  142.  
  143.  
  144.         The encoding technique used by ALLFIX is a variation of the
  145.         commonly known UUENCODE technique. The only real diference is
  146.         that the length of the lines have been extended to 80
  147.         characters. The reason that this was done was to prevent other
  148.         other software from recognizing the file attaches. If a normal
  149.         UUENCODE technique was used, the files may be detached from the
  150.         actual email, hence interfering with ALLFIX.
  151.  
  152.         For sample code for encoding and decoding, please refer to the
  153.         UUENCODE.PAS source file.
  154.  
  155.