home *** CD-ROM | disk | FTP | other *** search
/ BBS 1 / BBS#1.iso / maximus / fddev220.arj / C.ARJ / FDPKT.H < prev    next >
C/C++ Source or Header  |  1993-06-28  |  7KB  |  149 lines

  1. /*
  2. **  fdpkt.h
  3. **
  4. **  Structures for .FDC and .PKT files
  5. **
  6. **  Copyright 1993 Joaquim Homrighausen; All rights reserved.
  7. **
  8. **  Last revised: 93-06-21                    FrontDoor 2.11+
  9. **
  10. **  -------------------------------------------------------------------------
  11. **  This information is not necessarily final and is subject to change at any
  12. **  given time without further notice
  13. **  -------------------------------------------------------------------------
  14. */
  15. #ifndef __FDPKT_H__
  16. #define __FDPKT_H__
  17.  
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21.  
  22. /*
  23. **  Each .PKT file created by FrontDoor when packing outbound mail has an
  24. **  accompanying "shadow" file with the same base filename as the .PKT file
  25. **  but with the extension .FDC. This file is used by FrontDoor to determine
  26. **  if the system should be called, what files it should send or request,
  27. **  etc.
  28. **
  29. **  The "ScriptName" field is a Pascal-style string (length byte followed by
  30. **  data).
  31. */
  32.  
  33. /*
  34. **  The .FDC files contains one header followed by zero or more NUL
  35. **  terminated entries which denote message (file) names, file attaches,
  36. **  and file (possibly update) requests.
  37. **
  38. **  Each entry following the header has a leading type byte, followed by
  39. **  the data for the type, and terminated by a NUL character.
  40. */
  41.  
  42.     /* FDC field type flags */
  43.  
  44. #define FDC_ISFILE      0xe0                                   /*File attach*/
  45. #define FDC_ISFREQ      0xe1                                  /*File request*/
  46. #define FDC_ISFUREQ     0xe2                           /*File update request*/
  47. #define FDC_ISMSG       0xfd                                       /*Message*/
  48.  
  49.     /* Call status flags (CALLSTATUS) */
  50.  
  51. #define FDC_UNUSED      0
  52. #define FDC_FAILED      1
  53. #define FDC_SENT        2
  54. #define FDC_HOLD        3
  55. #define FDC_CRASH       4
  56. #define FDC_ACTIVE      5
  57. #define FDC_PRIORITY    6
  58. #define FDC_DELETED     7
  59.  
  60.     /* FDC header, one per .FDC file */
  61.  
  62. typedef struct
  63.     {
  64.     unsigned short int  Zone,                          /*Destination address*/
  65.                         Net,
  66.                         Node,
  67.                         Point,
  68.                         BusyRetry,     /*Number of call attempts (max->zero)*/
  69.                         Resend;      /*Number of resend attempts (max->zero)*/
  70.     unsigned long       PktTime;      /*UNIX-style timestamp with event time*/
  71.     unsigned short int  MsgCount,               /*Number of messages in .PKT*/
  72.                         FileCount,                 /*Number of files to send*/
  73.                         FReqCount,                 /*Number of file requests*/
  74.                         Cost;                    /*Cost per minute to system*/
  75.     unsigned char       CallStatus;                              /*See above*/
  76.     char                ScriptName[9];               /*Name of script to use*/
  77.     char                EventTag;     /*During which event tag it was packed*/
  78.     }
  79.     FDCHEAD;
  80.  
  81. /*
  82. **  FTS-1 (FSC-39 compliant) packet definition used by FrontDoor, TosScan,
  83. **  and FrontDoor APX among other products to create .PKT files.
  84. */
  85. #define CW_2PLUS        0x0001                 /*Support for Type 2+ bundles*/
  86. #define CW_N2PLUS       0x0100                     /*Validation for CW_2PLUS*/
  87. #define PKTVERSION      2                    /*Current packet revision level*/
  88.  
  89.     /* Packet header, one per packet */
  90.  
  91. typedef struct
  92.     {
  93.     unsigned short int  OrigNode,                         /*Originating node*/
  94.                         DestNode,                         /*Destination node*/
  95.                         Year,                     /*Year created (1993-nnnn)*/
  96.                         Month,                        /*Month created (0-11)*/
  97.                         Day,                            /*Day created (1-31)*/
  98.                         Hour,                          /*Hour created (0-23)*/
  99.                         Minute,                      /*Minute created (0-59)*/
  100.                         Second,                      /*Second created (0-59)*/
  101.                         Rate,                            /*Baudrate (unused)*/
  102.                         Version,                        /*Packet version (2)*/
  103.                         OrigNet,                           /*Originating net*/
  104.                         DestNet;                           /*Destination net*/
  105.     unsigned char       PCodeLo,                  /*Product code (low-order)*/
  106.                         PRevMajor,                           /*Major version*/
  107.                         Password[8];          /*Packet password (not ASCIIZ)*/
  108.     unsigned short int  QMOrigZone,               /*Originating zone (QMail)*/
  109.                         QMDestZone,               /*Destination zone (QMail)*/
  110.                         AuxNet,                     /*Auxillary net (unused)*/
  111.                         CWValidate;                     /*CapWord validation*/
  112.     unsigned char       PCodeHi,                 /*Product code (high-order)*/
  113.                         PRevMinor;                           /*Minor version*/
  114.     unsigned short int  CWCapWord,                            /*Capabilities*/
  115.                         OrigZone,                /*Originating zone (FSC-39)*/
  116.                         DestZone,                /*Destination zone (FSC-39)*/
  117.                         OrigPoint,              /*Originating point (FSC-39)*/
  118.                         DestPoint;              /*Destination point (FSC-39)*/
  119.     unsigned long       LongData;            /*Product dependent information*/
  120.     }
  121.     FTS1PKTHDR;
  122.  
  123.     /* Packed message, none or more per packet */
  124.  
  125. typedef struct
  126.     {
  127.     unsigned short int  Version,                        /*Packet version (2)*/
  128.                         OrigNode,                         /*Originating node*/
  129.                         DestNode,                         /*Destination node*/
  130.                         OrigNet,                           /*Originating net*/
  131.                         DestNet,                           /*Destination net*/
  132.                         Attr,                                  /*FTS1 status*/
  133.                         Cost;                              /*Cost of message*/
  134.     /*
  135.     **    The message header follows this but is of variable length ASCIIZ
  136.     **    strings in the order: AsciiDate, ToUser, FromUser, Subject, and
  137.     **    MsgText.
  138.     */
  139.     }
  140.     FTS1PKTMSG;
  141.  
  142. #ifdef __cplusplus
  143. }
  144. #endif
  145. #endif
  146.  
  147. /* end of file "fdpkt.h" */
  148.  
  149.