home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / program / c / bts310b5 / bink.h < prev    next >
C/C++ Source or Header  |  1993-07-11  |  20KB  |  738 lines

  1. #ifndef H_BINK
  2. #define H_BINK
  3. /*--------------------------------------------------------------------------*/
  4. /*                                                                            */
  5. /*                                                                            */
  6. /*        ------------         Bit-Bucket Software, Co.                        */
  7. /*        \ 10001101 /         Writers and Distributors of                    */
  8. /*         \ 011110 /          Freely Available<tm> Software.                 */
  9. /*          \ 1011 /                                                            */
  10. /*           ------                                                            */
  11. /*                                                                            */
  12. /*    (C) Copyright 1987-90, Bit Bucket Software Co., a Delaware Corporation. */
  13. /*                                                                            */
  14. /*                                                                            */
  15. /*                   Major definitions used in BinkleyTerm                    */
  16. /*                                                                            */
  17. /*                                                                            */
  18. /*      For complete    details  of the licensing restrictions, please refer    */
  19. /*      to the License  agreement,  which  is published in its entirety in    */
  20. /*      the MAKEFILE and BT.C, and also contained in the file LICENSE.240.    */
  21. /*                                                                            */
  22. /*      USE  OF THIS FILE IS SUBJECT TO THE  RESTRICTIONS CONTAINED IN THE    */
  23. /*      BINKLEYTERM  LICENSING  AGREEMENT.  IF YOU DO NOT FIND THE TEXT OF    */
  24. /*      THIS    AGREEMENT IN ANY OF THE  AFOREMENTIONED FILES,    OR IF YOU DO    */
  25. /*      NOT HAVE THESE FILES,  YOU  SHOULD  IMMEDIATELY CONTACT BIT BUCKET    */
  26. /*      SOFTWARE CO.    AT ONE OF THE  ADDRESSES  LISTED BELOW.  IN NO EVENT    */
  27. /*      SHOULD YOU  PROCEED TO USE THIS FILE    WITHOUT HAVING    ACCEPTED THE    */
  28. /*      TERMS  OF  THE  BINKLEYTERM  LICENSING  AGREEMENT,  OR  SUCH OTHER    */
  29. /*      AGREEMENT AS YOU ARE ABLE TO REACH WITH BIT BUCKET SOFTWARE, CO.        */
  30. /*                                                                            */
  31. /*                                                                            */
  32. /* You can contact Bit Bucket Software Co. at any one of the following        */
  33. /* addresses:                                                                */
  34. /*                                                                            */
  35. /* Bit Bucket Software Co.          FidoNet  1:104/501, 1:132/491, 1:141/491    */
  36. /* P.O. Box 460398                  AlterNet 7:491/0                            */
  37. /* Aurora, CO 80046               BBS-Net  86:2030/1                        */
  38. /*                                  Internet f491.n132.z1.fidonet.org         */
  39. /*                                                                            */
  40. /* Please feel free to contact us at any time to share your comments about    */
  41. /* our software and/or licensing policies.                                    */
  42. /*                                                                            */
  43. /*--------------------------------------------------------------------------*/
  44. /* bink.h
  45.  *
  46.  * General defines and structures used by everything
  47.  *--------------------------------------------------------------------------*/
  48.  
  49. /*
  50.  * Compilation options
  51.  */
  52.  
  53. #define NEW                /* Include various updates */
  54. #define MULTIPOINT        /* Include SWG's code for extended address and multipoint operation */
  55. #define EMSI            /* Enable EMSI protocol */
  56. #define IOS                /* Include new code for IOS ?AT packet types */
  57.  
  58. #ifdef _DEBUG
  59.   #define DEBUG
  60. #endif
  61.  
  62. #if (defined(M68000) || defined(ATARIST))
  63. #define GENERIC            /* Don't assume byte ordering */
  64. #endif
  65.  
  66. #ifdef ATARIST
  67. #undef MULTITASK        /* Use M'task display for free memory instead */
  68. #else
  69. #define MULTITASK
  70. #endif
  71.  
  72. /*
  73.  * Define which language version for the keyboard to use
  74.  * Only these two are recognised at the moment.
  75.  * Update keybd.h to add more versions
  76.  */
  77.  
  78. #define ENGLISH
  79. /* #define FRENCH */
  80.  
  81.  
  82. /*--------------------------------------------------------------------------*/
  83. /* LEGIBLE SECTION.  Definitions to make "C" look like a real language.     */
  84. /*--------------------------------------------------------------------------*/
  85.  
  86. #ifndef max
  87. #define max(a,b)     ((a)>(b)?(a):(b))
  88. #endif
  89.  
  90. #ifndef min
  91. #define min(a,b)     ((a)<=(b)?(a):(b))
  92. #endif
  93.  
  94.  
  95. /*
  96.  * updcrc macro derived from article Copyright (C) 1986 Stephen Satchell.
  97.  *    NOTE: First srgument must be in range 0 to 255.
  98.  *          Second argument is referenced twice.
  99.  *
  100.  * Programmers may incorporate any or all code into their programs,
  101.  * giving proper credit within the source. Publication of the
  102.  * source routines is permitted so long as proper credit is given
  103.  * to Stephen Satchell, Satchell Evaluations and Chuck Forsberg,
  104.  * Omen Technology.
  105.  */
  106.  
  107. /* #define updcrc(cp, crc) ( crctab[((crc >> 8) & 255) ^ cp] ^ (crc << 8)) */
  108.  
  109. /* We need it the other way around for BinkleyTerm */
  110. #ifndef __PUREC__
  111.     #define xcrc(crc,cp) ( crctab[((crc >> 8) & 255) ^ cp] ^ (crc << 8))
  112. #else
  113.     unsigned int    xcrc(unsigned int crc,unsigned int cp);
  114. #endif
  115.  
  116. /*
  117.  * Machine data types
  118.  */
  119.  
  120. #ifdef ATARIST
  121.  
  122. #include <portab.h>
  123.  
  124. #ifdef LATTICE
  125. #include <dos.h>
  126. #endif
  127.  
  128. #ifndef FMSIZE
  129. #define FMSIZE FILENAME_MAX
  130. #endif
  131.  
  132.  
  133. #ifdef __TOS__
  134. #define mkdir(s) Dcreate(s)
  135. #endif
  136.  
  137. typedef UBYTE byte;    /* This is defined in dos.h */
  138. typedef UWORD word;
  139.  
  140. #ifndef FALSE
  141. typedef int BOOLEAN;
  142. #define FALSE 0
  143. #define TRUE 1
  144. #endif
  145.  
  146. #else
  147.  
  148. typedef unsigned bit;
  149. typedef unsigned int word;
  150. typedef unsigned char byte;
  151. typedef short WORD;
  152. typedef char BYTE;
  153. typedef unsigned short UWORD;
  154. typedef short WORD;
  155. typedef long LONG;
  156. typedef unsigned long ULONG;
  157.  
  158. #endif
  159.  
  160. #ifdef LATTICE
  161. #define cdecl __stdargs
  162. #endif
  163.  
  164. /*
  165.  * fopen() mode parameters
  166.  * since the the PC is using non-ansi "t" mode for ascii files
  167.  */
  168.  
  169. #if defined(__TOS__)
  170. #define append_ascii      "a"
  171. #define read_ascii           "r"
  172. #define read_ascii_plus  "r+"
  173. #define write_ascii      "w"
  174. #define append_binary      "a+b"
  175. #define read_binary      "rb"
  176. #define read_binary_plus "r+b"
  177. #define write_binary      "wb"
  178. #define cputs(str)         printf("%s", str)
  179. #elif defined(LATTICE)
  180. #define append_ascii      "aa"
  181. #define read_ascii           "ra"
  182. #define read_ascii_plus  "ra+"
  183. #define write_ascii      "wa"
  184. #define append_binary      "ab"
  185. #define read_binary      "rb"
  186. #define read_binary_plus "rb+"
  187. #define write_binary      "wb"
  188. #else
  189. /* QuickC */
  190. #define append_ascii       "at"
  191. #define read_ascii          "rt"
  192. #define read_ascii_plus  "rt+"
  193. #define write_ascii      "wt"
  194. #define append_binary      "ab"
  195. #define read_binary      "rb"
  196. #define read_binary_plus "rb+"
  197. #define write_binary      "wb"
  198. #endif
  199.  
  200. #define rb_plus "rb+"
  201.  
  202. /*
  203.  * Machine independant structure for a transmitted word in MSDOS format
  204.  *
  205.  * If you are not using an 8086 architecture, then you should define the
  206.  * symbol GENERIC.
  207.  *
  208.  * You can define it on a PC but it will only slow things down a little bit.
  209.  */
  210.  
  211.  
  212. typedef struct {
  213.         byte lo;
  214.         byte hi;
  215. } LOHIWORD;
  216.  
  217. typedef union {
  218.     word w;
  219.     LOHIWORD lohi;
  220. } MWORD;
  221.  
  222. typedef struct {
  223.     byte lo;
  224.     byte mid1;
  225.     byte mid2;
  226.     byte hi;
  227. } LOHILONG;
  228.  
  229. typedef union {
  230.     unsigned long l;
  231.     LOHILONG lohi;
  232. } MLONG;
  233.  
  234.  
  235. #ifndef LATTICE            /* This is defined in <dos.h> */
  236.  struct FILEINFO
  237.  {
  238.    char rsvd[21];
  239.    char attr;
  240.    long time;
  241.    long size;
  242.    char name[13];
  243.    char nill;
  244.  };
  245. #endif
  246.  
  247. typedef struct pnums
  248. {
  249.    char prenum[40];
  250.    char sufnum[40];
  251.    char prematch[40];
  252.    char sufmatch[40];
  253.    size_t prelen;
  254.    size_t suflen;
  255.    struct pnums *next;
  256. } PN_TRNS;
  257.  
  258. typedef struct mnums
  259. {
  260.    byte mdm;
  261.    char pre[50];
  262.    char suf[50];
  263.    struct mnums *next;
  264. } MDM_TRNS;
  265.  
  266.  
  267. struct prototable
  268. {
  269.    char first_char;
  270.    int entry;
  271. };
  272.  
  273. typedef struct j_types
  274. {
  275.    char j_match[30];
  276.    struct j_types *next;
  277. } J_TYPES, *J_TYPESP;
  278.  
  279. /* mailtypes bit field definitions */
  280. #define MAIL_CRASH     0x0001
  281. #define MAIL_HOLD     0x0002
  282. #define MAIL_DIRECT  0x0004
  283. #define MAIL_NORMAL  0x0008
  284. #define MAIL_REQUEST 0x0010
  285. #define MAIL_WILLGO  0x0020
  286. #define MAIL_TRIED     0x0040
  287. #define MAIL_TOOBAD  0x0080
  288. #define MAIL_UNKNOWN 0x0100
  289. #define MAIL_RES0200 0x0200
  290. #define MAIL_RES0400 0x0400
  291. #define MAIL_RES0800 0x0800
  292. #define MAIL_RES1000 0x1000
  293. #define MAIL_RES2000 0x2000
  294. #define MAIL_RES4000 0x4000
  295. #define MAIL_RES8000 0x8000
  296.  
  297. typedef struct finfo
  298. {
  299.    int info_size;
  300.    char curr_fossil;
  301.    char curr_rev;
  302.    char *id_string;
  303.    int ibufr;
  304.    int ifree;
  305.    int obufr;
  306.    int ofree;
  307.    byte swidth;
  308.    byte sheight;
  309.    char baud;
  310. } FOSINFO;
  311.  
  312. typedef int (*PFI3) (int, int, int, int);
  313.  
  314. typedef struct {
  315.    unsigned char background;
  316.    unsigned char settings;
  317.    unsigned char history;
  318.    unsigned char hold;
  319.    unsigned char call;
  320.    unsigned char file;
  321.    unsigned char calling;
  322.    unsigned char popup;
  323.    unsigned char headers;
  324.    unsigned char borders;
  325. } COLORS;
  326.  
  327. /*--------------------------------------------------------------------------*/
  328. /* Sealink and Telink header structure                                        */
  329. /*--------------------------------------------------------------------------*/
  330. #define HEADER_NAMESIZE  17
  331.  
  332. struct zero_block
  333. {
  334.    long size;                                     /* file length                    */
  335.    long time;                                     /* file date/time stamp           */
  336.    char name[HEADER_NAMESIZE];                     /* original file name               */
  337.    char moi[15];                                 /* sending program name           */
  338.    char noacks;                                  /* for SLO                        */
  339. };
  340.  
  341.  
  342. /* File transfer structures */
  343.  
  344. typedef struct
  345. {
  346.    unsigned char block_num;
  347.    unsigned char block_num_comp;
  348.    unsigned char data_bytes[128];
  349.    unsigned char data_check[2];
  350. } XMDATA, *XMDATAP;
  351.  
  352. typedef struct
  353. {
  354.    unsigned char block_num;
  355.    unsigned char block_num_comp;
  356. #ifdef GENERIC
  357.    byte filelength[4];            /* Low comes first */
  358.    byte time[2];                /* MSDOS format */
  359.    byte date[2];                /* MSDOS format */
  360. #else
  361.    long filelength;
  362.    union
  363.    {
  364.    struct
  365.       {
  366.       unsigned time;
  367.       unsigned date;
  368.       } twowords;
  369.  
  370.    struct
  371.       {
  372.       unsigned long timedate;
  373.       } oneword;
  374.    } filetime;
  375. #endif
  376.    char filename[16];
  377.    char nullbyte;
  378.    char sendingprog[15];
  379.    char noacks;
  380.    unsigned char crcmode;
  381.    char fill[86];
  382.    unsigned char data_check[2];
  383. } TLDATA, *TLDATAP;
  384.  
  385. typedef struct
  386. {
  387.    unsigned char block_num;
  388.    unsigned char block_num_comp;
  389. #ifdef GENERIC
  390.    byte filelength[4];
  391.    byte time[2];    /* 0..4: seconds/2, 5..10: minutes, 11..15: hours */
  392.    byte date[2];    /* 0..4: days, 5..8: month, 9..15: year-1980      */
  393. #else
  394.    long filelength;
  395.    unsigned long timedate;
  396. #endif
  397.  
  398.    char filename[17];
  399.    char sendingprog[15];
  400.    char SLO;
  401.    char Resync;
  402.    char MACFLOW;
  403.    char fill[85];
  404.    unsigned char data_check[2];
  405. } SEADATA, *SEADATAP;
  406.  
  407. typedef struct {
  408.    unsigned int SEAlink:1; /* Can do SEAlink */
  409.    unsigned int SLO:1;       /* Can do SEAlink with Overdrive */
  410.    unsigned int Resync:1;  /* Can do SEAlink with Resync */
  411.    unsigned int MacFlow:1; /* Can do SEAlink with Macintosh flow control */
  412.    unsigned int do_CRC:1;  /* Should do CRC instead of checksum */
  413.    unsigned int TeLink:1;  /* We saw a TeLink header */
  414. } TRANS, *TRANSP;
  415.  
  416. typedef struct {
  417.    const char *state_name;
  418.    int cdecl (*state_func)(void *, ...);
  419. } STATES, *STATEP;
  420.  
  421. typedef struct {
  422.    TRANS options;     /* Transfer options */
  423.    int result;         /* Result from last operation */
  424.    int sub_results;  /* Extra result codes */
  425.    long T1;          /* General purpose timer */
  426.    long T2;          /* General purpose timer */
  427.    int Window;         /* SEAlink window size */
  428.    long SendBLK;     /* Current block to be sent */
  429.    long NextBLK;     /* Next block we will try to send */
  430.    long ACKBLK;      /* Block that was last ACK'd */
  431.    long LastBlk;     /* Last block in file */
  432.    long ARBLK;         /* Used in ACK Check calculations */
  433.    long WriteBLK;     /* Block number to write to file */
  434.    long filelen;     /* Length of file being sent */
  435.    long curr_byte;     /* Current byte offset of sending or receiving */
  436.    long prev_bytes;  /* Bytes that we are resyncing over */
  437.    long total_blocks;/* Total number of blocks in file to be received */
  438.    long resync_block;/* Block number we received to resync to */
  439.    int NumNAK;         /* Number of NAK's received this block */
  440.    int ACKsRcvd;     /* Number of ACK's received since file start */
  441.    int ACKST;         /* Current state of the ack/nak state variable */
  442.    int tries;         /* Number of tries thus far */
  443.    int goodfile;     /* 0 if file was bad, 1 if file was good */
  444.    size_t datalen;     /* Length of data in this block */
  445.    int recblock;     /* Block number received */
  446.    int sent_ACK;     /* Whether or not we sent an ACK already */
  447.    int tot_errs;     /* Total number of errors */
  448.    unsigned char ARBLK8;   /* 8 bit value of ARBLK */
  449.    unsigned char blocknum; /* 8 bit value of SendBLK */
  450.    unsigned char check;    /* checksum value */
  451.    unsigned char save_header; /* Received header from first block */
  452.    int CHR;                /* General purpose receive character */
  453.    union                   /* File date and time in Telink or SEAlink format */
  454.    {
  455.    struct
  456.       {
  457.       unsigned time;
  458.       unsigned date;
  459.       } twowords;
  460.  
  461.    struct
  462.       {
  463.       unsigned long timedate;
  464.       } oneword;
  465.    } save_filetime;
  466.    char received_name[20]; /* Received filename from Telink or SEAlink */
  467.    char m7name[12];        /* Filename in Modem7 format */
  468.    char *filename;           /* The filename to be sent or received */
  469.    char *path;               /* Just the path to the file to be sent/received */
  470.    char *fptr;               /* Pointer into character fields */
  471.    char *temp_name;        /* Temporary name for receiving */
  472.    FILE *file_pointer;       /* The pointer for read/write/seek operations */
  473.  
  474.    unsigned char header;
  475.    XMDATA datablock;
  476. } XMARGS, *XMARGSP;
  477.  
  478. #define DID_RESYNC 1
  479.  
  480. typedef struct {
  481.    int tries;
  482.    size_t barklen;
  483.    int barkok;
  484.    long T1;
  485.    int nfiles;
  486.    char *inbound;
  487.    char *filename;
  488.    char barkpacket[128];
  489.    char *barkpw;
  490.    char *barktime;
  491. } BARKARGS, *BARKARGSP;
  492.  
  493. /*--------------------------------------------------------------------------*/
  494. /* FIDONET ADDRESS STRUCTURE                                                */
  495. /*--------------------------------------------------------------------------*/
  496. typedef struct _ADDRESS
  497. {
  498.    word  Zone;
  499.    word  Net;
  500.    word  Node;
  501.    word  Point;
  502.    char  *Domain;
  503. } ADDR;
  504.  
  505. #ifdef MULTIPOINT
  506. /* Extended addressing to include fakenet and phone number */
  507.  
  508. typedef struct {
  509.     /*
  510.      * Same as address...
  511.      * I did make it "ADDR Ad"
  512.      * but it is too much hassle to change all the references
  513.      */
  514.     ADDR ad;
  515.     /*
  516.      * Extra stuff
  517.      */
  518.     word fakenet;        /* Fakenet for this address [points and nodes] */
  519.     char *phone;        /* Phone number of boss (points only) */
  520.     struct {
  521.         BOOLEAN use4d:1;    /* Use 4D addressing with BOSS */
  522.         BOOLEAN usenet:1;    /* Use Fakenet when calling our net */
  523.     } flags;
  524. } ADDRESS;
  525.  
  526. typedef struct s_addrlist {
  527.     struct s_addrlist *next;        /* Linked list next */
  528.     ADDR ad;
  529. } ADDR_LIST;
  530.  
  531. /* Key structure */
  532.  
  533. typedef struct s_adkey {
  534.     struct s_adkey *next;    /* Stored as a singly linked list */
  535.     ADDR ad;                /* Address to take action */
  536.     /*
  537.      * Bits are set for wild cards
  538.      * I did consider using special values, e.g. 0 or -1
  539.      * within the address but they may be valid numbers!
  540.      * This also makes it more general, e.g. 2:ALL/0 is all zone gates
  541.      */
  542.     struct {
  543.         BOOLEAN zone:1;
  544.         BOOLEAN net:1;
  545.         BOOLEAN node:1;
  546.         BOOLEAN point:1;
  547.         BOOLEAN domain:1;
  548.     } wild;
  549.     char *password;        /* Session Password... NULL means none */
  550.     char *phone;        /* Phone number... or NULL */
  551.     char *prefix;        /* Calling prefix.. e.g. ATB1&G1DT */
  552.     char call_slot;        /* Character which defines Pollslot */
  553.     ADDRESS *alias;        /* which of our addresses this is... NULL means none */
  554. } ADKEY;
  555.  
  556. /*
  557.  * Linked list of strings
  558.  *
  559.  * Used for the lists of HoldOnUs and NoEMSI
  560.  */
  561.  
  562. typedef struct s_strlist {
  563.     struct s_strlist *next;
  564.     char *str;
  565. } STR_LIST;
  566.  
  567. #endif
  568.  
  569. typedef struct mail {
  570.    ADDR mail_addr;
  571.    unsigned int mailtypes;
  572.    unsigned int calls;
  573.    unsigned int costcalls;
  574.    unsigned int files;
  575.    unsigned long size;
  576.    unsigned long oldest;
  577.     word realcost;
  578.     word nodeflags;
  579.    struct mail *next;
  580.    struct mail *prev;
  581. } MAIL, *MAILP;
  582.  
  583. typedef int (*nfunc) (ADDR *, int);
  584.  
  585. #define  MAX_EXTERN         8        /* Maximum number of external transfer protocols */
  586. #define  ALIAS_CNT           30        /* Maximum number of alias's */
  587. #define MAXDOMAIN           50        /* Maximum number of Domains */
  588.  
  589. /*--------------------------------------------------------------------------*/
  590. /* Matrix mask                                                                */
  591. /* Undefined bits are reserved by Opus                                        */
  592. /*--------------------------------------------------------------------------*/
  593. #define NO_TRAFFIC 0x0001
  594. #define LOCAL_ONLY 0x0002
  595. #define OPUS_ONLY  0x0004
  596.  
  597. #define NO_EXITS   0x2000
  598. #define MAIL_ONLY  0x4000
  599. #define TAKE_REQ   0x8000
  600.  
  601.  
  602. /*--------------------------------------------------------------------------*/
  603. /* Message packet header                                                    */
  604. /*--------------------------------------------------------------------------*/
  605.  
  606. #define PKTVER         2
  607.  
  608.  /*--------------------------------------------*/
  609.  /* POSSIBLE VALUES FOR `product' (below)       */
  610.  /* */
  611.  /* NOTE: These product codes are assigned by  */
  612.  /* the FidoNet<tm> Technical Stardards Com-   */
  613.  /* mittee.  If you are writing a program that */
  614.  /* builds packets, you will need a product    */
  615.  /* code.  Please use ZERO until you get your  */
  616.  /* own.  For more information on codes, write */
  617.  /* to FTSC at 115/333.                        */
  618.  /* */
  619.  /*--------------------------------------------*/
  620. #define isFIDO         0
  621. #define isSPARK      1
  622. #define isSEA         2
  623. #define isSlick      4
  624. #define isOPUS         5
  625. #define isHENK         6
  626. #define isTABBIE     8
  627. #define isWOLF         10
  628. #define isQMM         11
  629. #define isFD         12
  630. #define isGSPOINT     19
  631. #define isBGMAIL     20
  632. #define isCROSSBOW     21
  633. #define isDBRIDGE     26
  634. #define isBITBRAIN     0x1b
  635. #define isDAISY      30
  636. #define isPOLAR      31
  637. #define isTHEBOX     32
  638. #define isWARLOCK     33
  639. #define isTCOMM      35
  640. #define isBANANNA     36
  641. #define isAPPLE      38
  642. #define isCHAMELEON  39
  643. #define isMAJIK      40
  644. #define isDOMAIN     47
  645. #define isLESROBOT     48
  646. #define isROSE         49
  647. #define isPARAGON     50
  648. #define isBINKST     51
  649. #define isSTARNET     52
  650. #define isQUICKBBS     54
  651. #define isPBBS         56
  652. #define isTRAPDOOR     57
  653. #define isWELMAT     58
  654. #define isTIMS         66
  655. #define isISIS         67
  656.  
  657.  
  658. struct _pkthdr
  659. {
  660.         MWORD orig_node;         /* originating node               */
  661.         MWORD dest_node;         /* destination node               */
  662.         MWORD year;                 /* 0..99  when packet was created */
  663.         MWORD month;             /* 0..11  when packet was created */
  664.         MWORD day;                 /* 1..31  when packet was created */
  665.         MWORD hour;                 /* 0..23  when packet was created */
  666.         MWORD minute;             /* 0..59  when packet was created */
  667.         MWORD second;             /* 0..59  when packet was created */
  668.         MWORD rate;                 /* destination's baud rate        */
  669.         MWORD ver;                 /* packet version                   */
  670.         MWORD orig_net;             /* originating network number       */
  671.         MWORD dest_net;             /* destination network number       */
  672.         char product;            /* product type                   */
  673.         char serial;            /* serial number (some systems)   */
  674.  
  675.    /* ------------------------------ */
  676.    /* THE FOLLOWING SECTION IS NOT     */
  677.    /* THE SAME ACROSS SYSTEM LINES:  */
  678.    /* ------------------------------ */
  679.  
  680.         byte password[8];        /* session/pickup password          */
  681.         MWORD  orig_zone;         /* originating zone               */
  682.         MWORD  dest_zone;         /* Destination zone               */
  683.         byte B_fill2[16];
  684.         LONG B_fill3;
  685. };
  686.  
  687.  
  688.  
  689. /*
  690.  * Other structures (used to be in com.h)
  691.  */
  692.  
  693. struct CONTROL
  694.     {
  695.     int carrier_mask;
  696.     int handshake_mask;
  697.     };
  698.  
  699.  
  700. struct parse_list {
  701.         size_t p_length;
  702.         const char *p_string;
  703.         };
  704.  
  705. struct secure {
  706.         char *rq_OKFile;
  707.         char *rq_FILES;
  708.         char *rq_About;
  709.         char *rq_Template;
  710.         char *sc_Inbound;
  711.         int rq_Limit;
  712.         long byte_Limit;
  713.         short time_Limit;
  714.         };
  715.  
  716. struct req_accum {
  717.         int files;
  718.         long bytes;
  719.         long startTime;
  720.         int transferRate;    /* Transfer rate in cps */
  721.         };
  722.  
  723. struct baud_str {
  724.    unsigned short rate_value;
  725.    unsigned short rate_mask;
  726. };
  727.  
  728. /*
  729.  * Include these because everything needs them!
  730.  */
  731.  
  732. #include "externs.h"
  733. #include "prototyp.h"
  734. #include "logfile.h"
  735.  
  736. #endif    /* H_BINK */
  737. /* END OF FILE: bink.h */
  738.