Figure 1 Client/Server communication packet buffer

typedef struct {
  BYTE  packetID[2];  /* ................................... */
  WORD  length;       /* total number of bytes in this block */
  WORD  notlength;    /* ~ length (used for checking)        */
  WORD  cmd;          /* command to execute / result         */
  WORD  sender_id;    /* machine ID of block sender          */
  WORD  address_id;   /* machine ID of intended receiver     */
  WORD  process_id;   /* ID of sending process (for closeall)*/
  DWORD crc32;        /* crc-32 of entire block              */
  BYTE  data[];       /* misc. data                          */
} XMITBUF;

/* This assumes that only one request can be processed in either
   direction at a time, but requests can go in either direction. If
   both directions are going simultaneously, a full packet must be
   transmitted in one direction first. */

/* Each packet contains maximum 1024 bytes of actual data. */