home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / lora299s.zip / STRUC299.H < prev    next >
C/C++ Source or Header  |  1998-05-12  |  32KB  |  773 lines

  1.  
  2. // LoraBBS Version 2.99 Free Edition
  3. // Copyright (C) 1987-98 Marco Maccaferri
  4. //
  5. // This program is free software; you can redistribute it and/or modify
  6. // it under the terms of the GNU General Public License as published by
  7. // the Free Software Foundation; either version 2 of the License, or
  8. // (at your option) any later version.
  9. //
  10. // This program is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. // GNU General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU General Public License
  16. // along with this program; if not, write to the Free Software
  17. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. #ifndef _STRUC299_H
  20. #define _STRUC299_H
  21.  
  22. /////////////////////////////////////////////////////////////////////////
  23. // Global definitions                                                  //
  24. /////////////////////////////////////////////////////////////////////////
  25.  
  26. #define VERSION            "2.99.41"
  27. #define VER_MAJOR          2
  28. #define VER_MINOR          99
  29. #define PRODUCT_ID         0x4E
  30.  
  31. /////////////////////////////////////////////////////////////////////////
  32. // Index file for message and file areas                               //
  33. /////////////////////////////////////////////////////////////////////////
  34.  
  35. #ifndef IDX_DELETED
  36. #define IDX_DELETED        0x0001
  37.  
  38. typedef struct {
  39.    CHAR   Key[16];
  40.    USHORT Level;
  41.    ULONG  AccessFlags;
  42.    ULONG  DenyFlags;
  43.    ULONG  Position;
  44.    USHORT Flags;
  45. } INDEX;
  46.  
  47. #endif
  48.  
  49. /////////////////////////////////////////////////////////////////////////
  50. // Message areas structure (msg.dat / msg.idx)                         //
  51. /////////////////////////////////////////////////////////////////////////
  52.  
  53. // Message base type identification numbers
  54. #define ST_JAM             0
  55. #define ST_SQUISH          1
  56. #define ST_USENET          2
  57. #define ST_FIDO            3
  58. #define ST_ADEPT           4
  59. #define ST_HUDSON          5     // Not implemented
  60. #define ST_GOLDBASE        6     // Not implemented
  61. #define ST_PASSTHROUGH     7
  62.  
  63. // Special values for origin index
  64. #define OIDX_DEFAULT       0
  65. #define OIDX_RANDOM        -1
  66.  
  67. typedef struct {
  68.    USHORT Size;                     // Size of this structure
  69.    CHAR   Display[128];             // Area's description
  70.    CHAR   Key[16];                  // Area's name
  71.    USHORT Level;                    // Access level
  72.    ULONG  AccessFlags;              // Access flags
  73.    ULONG  DenyFlags;                // Deny flags
  74.    USHORT WriteLevel;               // Write level
  75.    ULONG  WriteFlags;               // Write flags
  76.    ULONG  DenyWriteFlags;           // Deny write flags
  77.    UCHAR  Age;                      // Minimum age to access the area
  78.    USHORT Storage;                  // Message base type
  79.    CHAR   Path[128];                // Path to message base files
  80.    USHORT Board;                    // Board number (for Goldbase and Hudson)
  81.    USHORT Flags;                    // Flags
  82.    USHORT Group;                    // Group number
  83.    CHAR   EchoMail;                 // TRUE=This is an echomail area
  84.    CHAR   ShowGlobal;               // TRUE=Show this area in global areas list
  85.    CHAR   UpdateNews;               // TRUE=Update messages from newsserver
  86.    CHAR   Offline;                  // TRUE=Can be used with the Offline-reader
  87.    CHAR   MenuName[32];             // Menu name for this area
  88.    CHAR   Moderator[64];            // Name of this area's moderator
  89.    ULONG  Cost;                     // Cost to access this area
  90.    USHORT DaysOld;                  // Number of days to keep messages
  91.    USHORT RecvDaysOld;              // Number of days to keep a received message
  92.    USHORT MaxMessages;              // Maximum number of messages to keep
  93.    ULONG  ActiveMsgs;               // Number of messages in this area
  94.    CHAR   NewsGroup[128];           // Usenet newsgroup name
  95.    ULONG  Highest;                  // Highest message retrived from the newsserver
  96.    CHAR   EchoTag[64];              // EchoMail tag name
  97.    SHORT  OriginIndex;              // Index to the origin line or special value
  98.    CHAR   Origin[80];               // Origin da usare al posto di quella di default
  99.    ULONG  HighWaterMark;            // Highest message number sent
  100.    CHAR   Address[48];              // Address to use when sending echomail messages
  101.    ULONG  FirstMessage;             // First message number in area
  102.    ULONG  LastMessage;              // Last message number in area
  103.    ULONG  NewsHWM;                  // High water mark for newsgroup areas
  104. } MESSAGE;
  105.  
  106. /////////////////////////////////////////////////////////////////////////
  107. // EchoMail link file structure (echolink.dat)                         //
  108. /////////////////////////////////////////////////////////////////////////
  109.  
  110. typedef struct {
  111.    USHORT Free;                     // TRUE=Free record
  112.    ULONG  EchoTag;                  // 32bit CRC of echomail tag name
  113.    USHORT Zone;                     // Zone number
  114.    USHORT Net;                      // Net number
  115.    USHORT Node;                     // Node number
  116.    USHORT Point;                    // Point number
  117.    CHAR   Domain[32];               // Domain name
  118.    UCHAR  SendOnly;                 // TRUE=Node can only send messages
  119.    UCHAR  ReceiveOnly;              // TRUE=Node can only receive messages
  120.    UCHAR  PersonalOnly;             // TRUE=Node receive only messages for the Sysop
  121.    UCHAR  Passive;                  // TRUE=Passive mode (message are not exported)
  122.    UCHAR  Skip;                     // Used internally
  123. } ECHOLINK;
  124.  
  125. /////////////////////////////////////////////////////////////////////////
  126. // File areas structures (file.dat / file.idx)                         //
  127. /////////////////////////////////////////////////////////////////////////
  128.  
  129. typedef struct {
  130.    USHORT Size;                     // Size of this structure
  131.    CHAR   Display[128];             // Area's description
  132.    CHAR   Key[16];                  // Area's name
  133.    USHORT Level;                    // Access level
  134.    ULONG  AccessFlags;              // Access flags
  135.    ULONG  DenyFlags;                // Deny flags
  136.    USHORT UploadLevel;              // Upload level
  137.    ULONG  UploadFlags;              // Upload flags
  138.    ULONG  UploadDenyFlags;          // Deny upload flags
  139.    USHORT DownloadLevel;            // Download level
  140.    ULONG  DownloadFlags;            // Download flags
  141.    ULONG  DownloadDenyFlags;        // Deny download flags
  142.    UCHAR  Age;                      // Minimum age to access the area
  143.    CHAR   Download[128];            // Path where download files are stored
  144.    CHAR   Upload[128];              // Path where uploaded files are to be stored
  145.    CHAR   CdRom;                    // TRUE=The are is on CDROM
  146.    CHAR   FreeDownload;             // TRUE=No download limits
  147.    CHAR   ShowGlobal;               // TRUE=Show in global lists
  148.    CHAR   MenuName[32];             // Name of the menu file for this area
  149.    CHAR   Moderator[64];            // Name of the manager of this area
  150.    ULONG  Cost;                     // Cost to access this area
  151.    ULONG  ActiveFiles;              // Number of files in this area
  152.    ULONG  UnapprovedFiles;          // Number of unapproved files
  153.    CHAR   EchoTag[64];              // Fileecho (TIC) tag name
  154.    UCHAR  UseFilesBBS;              // Uses the files.bbs instead of the filebase
  155.    UCHAR  DlCost;                   // Cost for download each file
  156.    CHAR   FileList[128];            // Alternative files list
  157. } FILES;
  158.  
  159. /////////////////////////////////////////////////////////////////////////
  160. // FileBase structures (filebase.dat / filebase.idx)                   //
  161. /////////////////////////////////////////////////////////////////////////
  162.  
  163. #define DATA_EXT           ".dat"
  164. #define INDEX_EXT          ".idx"
  165.  
  166. #define FILE_DELETED       0x8000
  167. #define FILE_OFFLINE       0x4000
  168. #define FILE_UNAPPROVED    0x2000
  169. #define FILE_CDROM         0x1000
  170.  
  171. #define FILEBASE_ID        0x602C789FL
  172.  
  173. typedef struct {
  174.    ULONG  Id;                       // Must be FILEBASE_ID
  175.    CHAR   Area[32];                 // File area name
  176.    CHAR   Name[32];                 // File name
  177.    CHAR   Complete[128];            // Fully qualified pathfilename
  178.    USHORT Description;              // Description length
  179.    USHORT Uploader;                 // Uploader name length
  180.    CHAR   Keyword[32];              // Optional keywords
  181.    ULONG  Size;                     // Size in bytes
  182.    ULONG  DlTimes;                  // Number of downloads
  183.    ULONG  FileDate;                 // File's creation date and time (seconds since 1970)
  184.    ULONG  UploadDate;               // File's upload date and time
  185.    ULONG  Cost;                     // Cost for download this file
  186.    ULONG  Password;                 // 32bit CRC of file's download password
  187.    USHORT Level;                    // Security level
  188.    ULONG  AccessFlags;              // Access flags
  189.    ULONG  DenyFlags;                // Deny flags
  190.    USHORT Flags;                    // Miscellaneous flags
  191. } FILEDATA;
  192.  
  193. typedef struct {
  194.    ULONG  Area;                     // 32bit CRC of file's area name
  195.    CHAR   Name[32];                 // File name
  196.    ULONG  UploadDate;               // File's upload date and time
  197.    ULONG  Offset;                   // Offset of the FILEDATA structure
  198.    USHORT Flags;                    // Miscellaneous flags
  199. } FILEINDEX;
  200.  
  201. /////////////////////////////////////////////////////////////////////////
  202. // Users database structures (user.dat / user.idx)                     //
  203. /////////////////////////////////////////////////////////////////////////
  204.  
  205. typedef struct {
  206.    USHORT Deleted;                  // Record is deleted
  207.    ULONG  NameCrc;                  // User's name 32bit CRC
  208.    ULONG  RealNameCrc;              // User's real name 32bit CRC
  209.    ULONG  Position;
  210. } UINDEX;
  211.  
  212. typedef struct {
  213.    USHORT Size;                     // Size of the record
  214.    CHAR   Name[48];                 // Name or nickname
  215.    ULONG  Password;                 // Password as a 32bit CRC
  216.    CHAR   RealName[48];             // Real name
  217.    CHAR   Company[36];              // Company name (if allowed)
  218.    CHAR   Address[48];              // First line of the address
  219.    CHAR   City[48];                 // Second line of the address
  220.    CHAR   DayPhone[26];             // Daytime phone number
  221.    CHAR   Ansi;                     // TRUE=User can display ANSI
  222.    CHAR   Avatar;                   // TRUE=User can display AVATAR
  223.    CHAR   Color;                    // TRUE=User can display color informations
  224.    CHAR   HotKey;                   // TRUE=User can use hot keyed menus
  225.    CHAR   System;                   // System type (see above)
  226.    CHAR   Sex;                      // M=Male, F=Female (no other sex allowed at this writing)
  227.    UCHAR  FullEd;                   // TRUE=Use fullscreen editor
  228.    UCHAR  FullReader;               // TRUE=Use fullscreen reader
  229.    UCHAR  NoDisturb;                // TRUE=Do not disturb
  230.    UCHAR  AccessFailed;             // TRUE=Last access attempt failed
  231.    USHORT ScreenHeight;             // User's screen width
  232.    USHORT ScreenWidth;              // User's screen height
  233.    USHORT Level;                    // Level
  234.    ULONG  AccessFlags;              // Access flags
  235.    ULONG  DenyFlags;                // Deny access flags
  236.    ULONG  CreationDate;             // Record's creation date as a Unix-style timestamp
  237.    ULONG  LastCall;                 // User's last call date/time as a Unix-style timestamp
  238.    CHAR   MailBox[32];              // User's mailbox name
  239.    CHAR   LimitClass[16];           // Class of limits
  240.    ULONG  TotalCalls;               // Number of calls to the system
  241.    ULONG  TodayTime;                // Number of minutes on-line today
  242.    ULONG  WeekTime;                 // Number of minutes on-line this week
  243.    ULONG  MonthTime;                // Number of minutes on-line this month
  244.    ULONG  YearTime;                 // Number of minutes on-line this year
  245.    CHAR   Language[16];             // Currently selected language (if any)
  246.    CHAR   FtpHost[48];              // Host name for FTP transfers
  247.    CHAR   FtpName[32];              // User name for FTP transfers
  248.    CHAR   FtpPwd[32];               // Password for FTP transfers
  249.    CHAR   LastMsgArea[16];          // Last message area visited
  250.    CHAR   LastFileArea[16];         // Last file area visited
  251.    USHORT UploadFiles;              // Number of uploaded files
  252.    ULONG  UploadBytes;              // Total size of the uploaded files
  253.    USHORT DownloadFiles;            // Number of downloaded files
  254.    ULONG  DownloadBytes;            // Total size of the downloaded files
  255.    USHORT FilesToday;               // Files downloaded today
  256.    ULONG  BytesToday;               // Size of today downloaded files
  257.    UCHAR  ImportPOP3Mail;           // TRUE=Import e-mail from POP3 server
  258.    UCHAR  UseInetAddress;           // TRUE=Use the personal Inet address
  259.    CHAR   InetAddress[64];          // Personal E-Mail address
  260.    CHAR   Pop3Pwd[32];              // Password for POP3 mail server
  261.    CHAR   Archiver[16];             // Default archiver
  262.    CHAR   Protocol[16];             // Default protocol
  263.    CHAR   Signature[64];            // Personal signature
  264.    CHAR   FullScreen;               // TRUE=Full screen enhancements
  265.    CHAR   IBMChars;                 // TRUE=Can display IBM characters
  266.    CHAR   MorePrompt;               // TRUE=Display More? prompt at each page
  267.    CHAR   ScreenClear;              // TRUE=Send screen clear codes
  268.    CHAR   InUserList;               // TRUE=Display in user list
  269.    CHAR   Kludges;                  // TRUE=Display message's kludge lines
  270.    CHAR   MailCheck;                // TRUE=Mail check at logon
  271.    CHAR   NewFileCheck;             // TRUE=Check for new files at logon
  272.    UCHAR  BirthDay;                 // Day of birthdate
  273.    UCHAR  BirthMonth;               // Month of birthdate
  274.    USHORT BirthYear;                // Year of birthdate
  275.    ULONG  LastPwdChange;            // Time of last password change
  276.    USHORT PwdLength;                // Length of text password
  277.    CHAR   PwdText[32];              // Text password, encrypted
  278. } USER;
  279.  
  280. /////////////////////////////////////////////////////////////////////////
  281. // Tagged message areas for offline reader (msgtags.dat)               //
  282. /////////////////////////////////////////////////////////////////////////
  283.  
  284. typedef struct {
  285.    UCHAR  Free;                     // TRUE=Record is free
  286.    UCHAR  Tagged;                   // TRUE=Tagged for offline mail packing
  287.    ULONG  UserId;                   // CRC32 of user's name
  288.    CHAR   Area[16];                 // Area name
  289.    ULONG  LastRead;                 // Number of last message read
  290.    ULONG  OlderMsg;                 // Timestamp of the older message to pack
  291. } MSGTAGS;
  292.  
  293. /////////////////////////////////////////////////////////////////////////
  294. // Files tagged for later download (filetags.dat)                      //
  295. /////////////////////////////////////////////////////////////////////////
  296.  
  297. typedef struct {
  298.    UCHAR  Free;                     // TRUE=Record is free
  299.    ULONG  UserId;                   // CRC32 of user's name
  300.    USHORT Index;                    // Reserved for internal use
  301.    CHAR   Area[16];                 // Area name
  302.    CHAR   Name[32];                 // Name of tagged file
  303.    ULONG  Size;                     // Size in bytes
  304.    CHAR   Complete[128];            // Complete path and file name
  305.    USHORT DeleteAfter;              // Delete file after transfer
  306.    USHORT CdRom;                    // The file is on a CD-ROM drive
  307. } FILETAGS;
  308.  
  309. /////////////////////////////////////////////////////////////////////////
  310. // Files and magic names available for file requests (okfile.dat)      //
  311. /////////////////////////////////////////////////////////////////////////
  312.  
  313. typedef struct {
  314.    USHORT Size;                     // Size of this structure
  315.    CHAR   Name[32];                 // File or magic-name
  316.    CHAR   Path[128];                // Complete pathname to the file
  317.    CHAR   Pwd[32];                  // Optional password
  318.    CHAR   Normal;                   // TRUE=Available for unknown nodes
  319.    CHAR   Known;                    // TRUE=Available for known nodes only
  320.    CHAR   Protected;                // TRUE=Available for password-protected nodes
  321. } OKFILE;
  322.  
  323. /////////////////////////////////////////////////////////////////////////
  324. // FidoNet address structure (address.dat)                             //
  325. /////////////////////////////////////////////////////////////////////////
  326.  
  327. typedef struct {
  328.    USHORT Zone;                     // Zone number
  329.    USHORT Net;                      // Net number
  330.    USHORT Node;                     // Node number
  331.    USHORT Point;                    // Point number
  332.    CHAR   Domain[32];               // Domain name
  333.    USHORT FakeNet;                  // 3d point fake net address
  334. } MAILADDRESS;
  335.  
  336. /////////////////////////////////////////////////////////////////////////
  337. // Main configuration file (config.dat)                                //
  338. /////////////////////////////////////////////////////////////////////////
  339.  
  340. #define CONFIG_VERSION     2942
  341.  
  342. #define NO                 0
  343. #define YES                1
  344. #define ASK                2
  345. #define AUTO               2
  346. #define REQUIRED           2
  347. #define PROMPT             3
  348.  
  349. typedef struct {
  350.    USHORT Size;
  351.    USHORT Version;
  352.  
  353.    CHAR   Device[32];               // Communication Device (COM2, COM3, etc.)
  354.    ULONG  Speed;                    // DTE Maximum Speed
  355.    USHORT LockSpeed;
  356.    CHAR   Initialize[3][48];        // Initialization Strings
  357.    CHAR   Answer[48];               // Command to Answer an Incoming Call
  358.    CHAR   Dial[48];                 // Command to Dial to Another Modem
  359.    CHAR   Hangup[48];               // Command to Hangup the Line
  360.    CHAR   OffHook[48];              // Command to Bring the Modem OffHook
  361.    USHORT DialTimeout;
  362.    USHORT CarrierDropTimeout;
  363.    USHORT StripDashes;
  364.    CHAR   FaxMessage[48];
  365.    CHAR   FaxCommand[64];
  366.  
  367.    CHAR   SystemName[64];
  368.    CHAR   SysopName[48];
  369.    CHAR   Location[48];
  370.    CHAR   Phone[32];
  371.    CHAR   NodelistFlags[64];
  372.  
  373.    USHORT NewUserLevel;
  374.    ULONG  NewUserFlags;
  375.    ULONG  NewUserDenyFlags;
  376.    CHAR   NewUserLimits[16];
  377.  
  378.    UCHAR  LoginType;
  379.    UCHAR  UseAnsi;
  380.    UCHAR  AskAlias;
  381.    UCHAR  AskCompanyName;
  382.    UCHAR  AskAddress;
  383.    UCHAR  AskCity;
  384.    UCHAR  AskPhoneNumber;
  385.    UCHAR  AskGender;
  386.  
  387.    CHAR   LogFile[64];
  388.  
  389.    CHAR   SystemPath[64];
  390.    CHAR   UserFile[64];
  391.    CHAR   NormalInbound[64];
  392.    CHAR   KnownInbound[64];
  393.    CHAR   ProtectedInbound[64];
  394.    CHAR   Outbound[64];
  395.    CHAR   NodelistPath[64];
  396.    CHAR   UsersHomePath[64];
  397.    CHAR   MenuPath[64];
  398.    CHAR   LanguageFile[64];
  399.    CHAR   TextFiles[64];
  400.    CHAR   SchedulerFile[64];
  401.  
  402.    CHAR   MainMenu[32];
  403.  
  404.    CHAR   HostName[48];
  405.    CHAR   NewsServer[48];
  406.    CHAR   MailServer[48];
  407.    CHAR   PopServer[48];
  408.  
  409.    USHORT FakeNet;
  410.  
  411.    USHORT MailStorage;
  412.    CHAR   MailPath[64];
  413.    USHORT NetMailStorage;
  414.    CHAR   NetMailPath[64];
  415.    USHORT BadStorage;
  416.    CHAR   BadPath[64];
  417.    USHORT DupeStorage;
  418.    CHAR   DupePath[64];
  419.  
  420.    USHORT TelnetServer;
  421.    USHORT TelnetPort;
  422.    USHORT FtpServer;
  423.    USHORT FtpPort;
  424.    USHORT WebServer;
  425.    USHORT WebPort;
  426.    USHORT SMTPServer;
  427.    USHORT SMTPPort;
  428.    USHORT POP3Server;
  429.    USHORT POP3Port;
  430.    USHORT NNTPServer;
  431.    USHORT NNTPPort;
  432.  
  433.    USHORT WaZoo;
  434.    USHORT EMSI;
  435.    USHORT Janus;
  436.  
  437.    USHORT NewAreasStorage;
  438.    CHAR   NewAreasPath[64];
  439.    USHORT NewAreasLevel;
  440.    ULONG  NewAreasFlags;
  441.    ULONG  NewAreasDenyFlags;
  442.    USHORT NewAreasWriteLevel;
  443.    ULONG  NewAreasWriteFlags;
  444.    ULONG  NewAreasDenyWriteFlags;
  445.  
  446.    UCHAR  Ansi;
  447.    UCHAR  IEMSI;
  448.  
  449.    UCHAR  ImportEmpty;
  450.    UCHAR  ReplaceTear;
  451.    CHAR   TearLine[32];
  452.    UCHAR  ForceIntl;
  453.    UCHAR  Secure;
  454.    UCHAR  KeepNetMail;
  455.    UCHAR  TrackNetMail;
  456.  
  457.    CHAR   MailOnly[64];
  458.    CHAR   EnterBBS[64];
  459.  
  460.    CHAR   ImportCmd[64];
  461.    CHAR   ExportCmd[64];
  462.    CHAR   SinglePassCmd[64];
  463.    CHAR   PackCmd[64];
  464.    CHAR   NewsgroupCmd[64];
  465.  
  466.    UCHAR  UseSinglePass;
  467.    UCHAR  SeparateNetMail;
  468.  
  469.    CHAR   AreasBBS[64];
  470.    UCHAR  UseAreasBBS;
  471.    UCHAR  UpdateAreasBBS;
  472.  
  473.    CHAR   AfterCallerCmd[64];
  474.    CHAR   AfterMailCmd[64];
  475.  
  476.    CHAR   Ring[32];
  477.    UCHAR  ZModemTelnet;
  478.    UCHAR  EnablePPP;
  479.    USHORT PPPTimeLimit;
  480.    CHAR   PPPCmd[64];
  481.  
  482.    CHAR   TempPath[64];
  483.    CHAR   OLRPacketName[16];
  484.    USHORT OLRMaxMessages;
  485.  
  486.    UCHAR  ExternalFax;
  487.    UCHAR  FaxFormat;
  488.    CHAR   FaxPath[64];
  489.    CHAR   AfterFaxCmd[64];
  490.    CHAR   FaxAlertNodes[64];
  491.    CHAR   FaxAlertUser[64];
  492.  
  493.    UCHAR  ReloadLog;
  494.    UCHAR  MakeProcessLog;
  495.    USHORT RetriveMaxMessages;
  496.  
  497.    UCHAR  UseAvatar;
  498.    UCHAR  UseColor;
  499.    UCHAR  UseFullScreenEditor;
  500.    UCHAR  UseHotKey;
  501.    UCHAR  UseIBMChars;
  502.    UCHAR  AskLines;
  503.    UCHAR  UsePause;
  504.    UCHAR  UseScreenClear;
  505.    UCHAR  AskBirthDate;
  506.    UCHAR  AskMailCheck;
  507.    UCHAR  AskFileCheck;
  508.  
  509.    UCHAR  ExternalEditor;
  510.    CHAR   EditorCmd[64];
  511.  
  512.    CHAR   HudsonPath[64];
  513.    CHAR   GoldPath[64];
  514.    USHORT BadBoard;
  515.    USHORT DupeBoard;
  516.    USHORT MailBoard;
  517.    USHORT NetMailBoard;
  518.  
  519.    UCHAR  UseFullScreenReader;
  520.    UCHAR  UseFullScreenLists;
  521.    UCHAR  UseFullScreenAreaLists;
  522.  
  523.    UCHAR  AreafixActive;
  524.    UCHAR  AllowRescan;
  525.    UCHAR  CheckZones;
  526.    UCHAR  RaidActive;
  527.    CHAR   AreafixNames[64];
  528.    CHAR   AreafixHelp[64];
  529.    CHAR   RaidNames[64];
  530.    CHAR   RaidHelp[64];
  531.    CHAR   NewTicPath[64];           // Path for new TIC file areas
  532.  
  533.    UCHAR  TextPasswords;            // Uses text-mode (encrypted) password
  534. } CONFIG;
  535.  
  536. /////////////////////////////////////////////////////////////////////////
  537. // Line-specific configuration options (channel.dat)                   //
  538. /////////////////////////////////////////////////////////////////////////
  539.  
  540. typedef struct {
  541.    USHORT TaskNumber;
  542.    CHAR   Device[32];               // Communication Device (COM2, COM3, etc.)
  543.    ULONG  Speed;                    // DTE Maximum Speed
  544.    USHORT LockSpeed;
  545.    CHAR   Initialize[3][48];        // Initialization Strings
  546.    CHAR   Answer[48];               // Command to Answer an Incoming Call
  547.    CHAR   Dial[48];                 // Command to Dial to Another Modem
  548.    CHAR   Hangup[48];               // Command to Hangup the Line
  549.    CHAR   OffHook[48];              // Command to Bring the Modem OffHook
  550.    USHORT DialTimeout;
  551.    USHORT CarrierDropTimeout;
  552.    USHORT StripDashes;
  553.    CHAR   FaxMessage[48];
  554.    CHAR   FaxCommand[64];
  555.    CHAR   SchedulerFile[64];
  556.    CHAR   MainMenu[32];
  557.    CHAR   Ring[32];
  558.    UCHAR  ManualAnswer;
  559.    UCHAR  LimitedHours;
  560.    USHORT StartTime;
  561.    USHORT EndTime;
  562.    CHAR   CallIf[64];
  563.    CHAR   DontCallIf[64];
  564. } CHANNEL;
  565.  
  566. /////////////////////////////////////////////////////////////////////////
  567. // FidoNet nodes definitions (nodes.dat)                               //
  568. /////////////////////////////////////////////////////////////////////////
  569.  
  570. typedef struct {
  571.    CHAR   Address[64];              // Node's address
  572.    CHAR   SystemName[64];           // System name
  573.    CHAR   SysopName[48];            // Sysop name
  574.    CHAR   Location[48];             // Location of this node (city/state)
  575.    ULONG  Speed;                    // Maximum connection speed
  576.    ULONG  MinSpeed;                 // Minimum connection speed allowed
  577.    CHAR   Phone[48];                // Phone number
  578.    CHAR   Flags[48];                // Nodelist-type flags
  579.    CHAR   DialCmd[32];              // Special dialing command for this node
  580.    CHAR   SessionPwd[32];           // Mail session password
  581.    CHAR   AreaMgrPwd[32];           // AreaManager (Echomail and Tic) password
  582.    CHAR   OutPktPwd[9];             // Outbound packet password
  583.    CHAR   InPktPwd[9];              // Inbound packet password
  584.    CHAR   TicPwd[32];               // Password for TIC maintenance
  585.    UCHAR  RemapMail;                // TRUE=Remap mail directed to SysopName
  586.    UCHAR  UsePkt22;                 // TRUE=Use mail packet type 2.2
  587.    UCHAR  CreateNewAreas;           // TRUE=Can create new echomail areas
  588.    CHAR   NewAreasFilter[128];      // Filter for new echomail areas
  589.    CHAR   Packer[16];               // Compresso to use for this node
  590.    UCHAR  ImportPOP3Mail;           // TRUE=Import e-mail from POP3 server
  591.    UCHAR  UseInetAddress;           // TRUE=Use the personal Inet address
  592.    CHAR   InetAddress[64];          // Personal E-Mail address
  593.    CHAR   Pop3Pwd[32];              // Password for POP3 mail server
  594.    USHORT Level;                    // Access level for echomail areas
  595.    ULONG  AccessFlags;              // Access flags for echomail areas
  596.    ULONG  DenyFlags;                // Deny flags for echomail areas
  597.    USHORT TicLevel;                 // Access level for TIC areas
  598.    ULONG  TicAccessFlags;           // Access flags for TIC areas
  599.    ULONG  TicDenyFlags;             // Deny flags for TIC areas
  600.    UCHAR  LinkNewEcho;              // TRUE=Link to new echo areas
  601.    UCHAR  EchoMaint;                // TRUE=Can do remote echomail maintenance
  602.    UCHAR  ChangeEchoTag;            // TRUE=Can change echomail tags
  603.    UCHAR  NotifyAreafix;            // TRUE=Notify of echomail changes
  604.    UCHAR  CreateNewTic;             // TRUE=Can create new TIC areas
  605.    UCHAR  LinkNewTic;               // TRUE=Link to new TIC areas
  606.    UCHAR  TicMaint;                 // TRUE=Can do remote TIC maintenance
  607.    UCHAR  ChangeTicTag;             // TRUE=Can change TIC tags
  608.    UCHAR  NotifyRaid;               // TRUE=Notify of TIC changes
  609.    CHAR   MailerAka[48];
  610.    CHAR   EchoAka[48];
  611.    CHAR   TicAka[48];
  612.    CHAR   NewTicFilter[128];        // Filter for new Tic areas
  613. } NODES;
  614.  
  615. /////////////////////////////////////////////////////////////////////////
  616. // Compressors definition (packer.dat)                                 //
  617. /////////////////////////////////////////////////////////////////////////
  618.  
  619. #define OS_DOS             0x0001
  620. #define OS_OS2             0x0002
  621. #define OS_WINDOWS         0x0004
  622. #define OS_LINUX           0x0008
  623.  
  624. typedef struct {
  625.    CHAR   Key[16];
  626.    CHAR   Display[32];
  627.    CHAR   PackCmd[128];
  628.    CHAR   UnpackCmd[128];
  629.    CHAR   Id[32];
  630.    LONG   Position;
  631.    USHORT OS;
  632. } PACKER;
  633.  
  634. /////////////////////////////////////////////////////////////////////////
  635. // Event scheduler records (events.dat)                                //
  636. /////////////////////////////////////////////////////////////////////////
  637.  
  638. #define DAY_SUNDAY         0x01
  639. #define DAY_MONDAY         0x02
  640. #define DAY_TUESDAY        0x04
  641. #define DAY_WEDNESDAY      0x08
  642. #define DAY_THURSDAY       0x10
  643. #define DAY_FRIDAY         0x20
  644. #define DAY_SATURDAY       0x40
  645.  
  646. typedef struct {
  647.    CHAR   Label[32];                // Reference label
  648.    UCHAR  Hour;
  649.    UCHAR  Minute;
  650.    USHORT WeekDays;
  651.    USHORT Length;                   // Duration of this event (if applicable)
  652.    USHORT LastDay;
  653.    UCHAR  Dynamic;
  654.    UCHAR  Force;                    // Force execution of this event
  655.    UCHAR  MailOnly;
  656.    UCHAR  ForceCall;                // TRUE=Force a call to the node specified
  657.    CHAR   Address[32];              // Fidonet address to call
  658.    UCHAR  SendNormal;
  659.    UCHAR  SendCrash;
  660.    UCHAR  SendDirect;
  661.    UCHAR  SendImmediate;
  662.    USHORT CallDelay;
  663.    UCHAR  StartImport;
  664.    UCHAR  StartExport;
  665.    UCHAR  ExportMail;
  666.    UCHAR  ImportNormal;
  667.    UCHAR  ImportKnown;
  668.    UCHAR  ImportProtected;
  669.    CHAR   RouteCmd[64];
  670.    CHAR   Command[128];
  671.    USHORT MaxCalls;
  672.    USHORT MaxConnects;
  673.    UCHAR  AllowRequests;
  674.    UCHAR  MakeRequests;
  675.    UCHAR  ProcessTIC;
  676.    UCHAR  ClockAdjustment;
  677.    UCHAR  Completed;                // If dynamic, tells that the event has been completed
  678.    UCHAR  Dummy[127];
  679. } EVENT;
  680.  
  681. /////////////////////////////////////////////////////////////////////////
  682. // External file transfer protocols (protocol.dat)                     //
  683. /////////////////////////////////////////////////////////////////////////
  684.  
  685. typedef struct {
  686.    USHORT Size;
  687.    CHAR   Key[16];
  688.    CHAR   Description[64];
  689.    UCHAR  Active;
  690.    UCHAR  Batch;
  691.    UCHAR  DisablePort;
  692.    UCHAR  ChangeToUploadPath;
  693.    CHAR   DownloadCmd[64];
  694.    CHAR   UploadCmd[64];
  695.    CHAR   LogFileName[64];
  696.    CHAR   CtlFileName[64];
  697.    CHAR   DownloadCtlString[32];
  698.    CHAR   UploadCtlString[32];
  699.    CHAR   DownloadKeyword[32];
  700.    CHAR   UploadKeyword[32];
  701.    USHORT FileNamePos;
  702.    USHORT SizePos;
  703.    USHORT CpsPos;
  704. } PROTOCOL;
  705.  
  706. /////////////////////////////////////////////////////////////////////////
  707. // Nodelist flags mapping for dialing (nodeflag.dat)                   //
  708. /////////////////////////////////////////////////////////////////////////
  709.  
  710. typedef struct {
  711.    USHORT Size;                     // Size of this structure
  712.    CHAR   Flags[64];                // Flags handled by this entry (comma-separated)
  713.    CHAR   Cmd[64];                  // Dialing command
  714. } NODEFLAGS;
  715.  
  716. /////////////////////////////////////////////////////////////////////////
  717. // Translation table structure (cost.dat)                              //
  718. /////////////////////////////////////////////////////////////////////////
  719.  
  720. #define DAY_SUNDAY         0x01
  721. #define DAY_MONDAY         0x02
  722. #define DAY_TUESDAY        0x04
  723. #define DAY_WEDNESDAY      0x08
  724. #define DAY_THURSDAY       0x10
  725. #define DAY_FRIDAY         0x20
  726. #define DAY_SATURDAY       0x40
  727.  
  728. #define MAXCOST            7
  729.  
  730. typedef struct {
  731.    USHORT Size;                     // Size of this structure
  732.    CHAR   Location[48];             // Name of the location this data is referring to
  733.    CHAR   Search[32];               // Phone number prefix to translate
  734.    CHAR   Traslate[64];             // Translated prefix
  735.    struct {
  736.       USHORT Days;                  // Week days
  737.       USHORT Start;                 // Starting time
  738.       USHORT Stop;                  // Ending time
  739.       USHORT CostFirst;             // Cost for TimeFirst seconds of conversation
  740.       USHORT TimeFirst;             // Seconds for CostFirst
  741.       USHORT Cost;                  // Cost for Time seconds of conversation or fraction
  742.       USHORT Time;                  // Time for Cost
  743.    } Cost[MAXCOST];
  744. } TRANSLATION;
  745.  
  746. /////////////////////////////////////////////////////////////////////////
  747. // User limits structure (limits.dat)                                  //
  748. /////////////////////////////////////////////////////////////////////////
  749.  
  750. typedef struct {
  751.    USHORT Size;                     // Size of this structure
  752.    CHAR   Key[16];                  // Name of the user-limit
  753.    CHAR   Description[32];          // Description
  754.    USHORT Level;                    // Numeric level
  755.    ULONG  Flags;                    // Access flags
  756.    ULONG  DenyFlags;                // Deny flags
  757.    USHORT CallTimeLimit;            // Time limit (in minutes) per call
  758.    USHORT DayTimeLimit;             // Time limit (in minutes) per day
  759.    USHORT DownloadLimit;            // Download limit (in KB) per day
  760.    USHORT DownloadAt2400;           // Download limit (in KB) per day, speed up to 2400 bps
  761.    USHORT DownloadAt9600;           // Download limit (in KB) per day, speed up to 9600 bps
  762.    USHORT DownloadAt14400;          // Download limit (in KB) per day, speed up to 14400 bps
  763.    USHORT DownloadAt28800;          // Download limit (in KB) per day, speed up to 28800 bps
  764.    USHORT DownloadAt33600;          // Download limit (in KB) per day, speed up to 33600 bps
  765.    USHORT DownloadRatio;            // Maximum Download/Upload ratio
  766.    USHORT RatioStart;               // Ratio start after RatioStart KB of downloads
  767.    ULONG  DownloadSpeed;            // Minimum speed at which download is possible
  768.    CHAR   FreeSpace[64];            // Space for future extensions
  769. } LIMITS;
  770.  
  771. #endif
  772.  
  773.