Skip to main content

Meanwhile, Back at the Implementation,...

Each chunk of information has a header. The first byte, which is the first word (since TYPE XTP is only implemented for BYTE 36) of the chunk, is a small number, currently 6, which is the number of following words which are still in the header. Next come those six words, and then come some data words.

The six header words are:

  • Word 1: a checksum.

    This is a one's complement sum (magnitude and end-around carry) of the six header words and the following data words (but not the leading "6" itself). The sum of all words including the checksum must come out + or - zero.

  • Word 2: A sequence number.

    The first chunk is number 1, the second is number 2, etc.

  • Word 3: NDW,

    the number of data words in this chunk, following the header. Thus the total length of the chunk is 1 (the word containing NHEAD) + NHEAD +NDW. The checksum checks all but the first of these.

  • Word 4: Page number.

    If the data is a disk file page, this is the number of that page in the file's page map. Empty pages (holes) in the file are simply not sent. Note that a hole is NOT the same as a page of zeroes.

  • Word 5: ACCESS.

    The access bits associated with the page in the file's page map. (This full word quantity is put into AC2 of an SPACS by the program reading from net to disk.)

  • Word 6: TYPE.

    A code for what type of chunk this is. Currently, only type zero for a data page, and type -3 for an FDB are sent.

After the header are NDW data words. NDW is currently either 1000 octal for a data page or 25 octal for an FDB. Trailing zeroes in a disk file page will soon be discarded, making NDW less than 1000 in that case. The receiving portions of FTP server and user will accept these shortened pages. The sender doesn't happen to send them that way yet.

Verification is performed such that an error is reported if either:

  • The checksum fails,
  • The sequence number is not correct,
  • NDW is unreasonable for the given chunk type, or
  • The network file ends at some point other than immediately following the data portion of an FDB chunk.