1 //  This may look like C code, but it is really -*- C++ -*-
2 
3 //  ------------------------------------------------------------------
4 //  The Goldware Library
5 //  Copyright (C) 1991-1995 Gerard J. van der Land
6 //  Copyright (C) 1990-1999 Odinn Sorensen
7 //  ------------------------------------------------------------------
8 //  This library is free software; you can redistribute it and/or
9 //  modify it under the terms of the GNU Library General Public
10 //  License as published by the Free Software Foundation; either
11 //  version 2 of the License, or (at your option) any later version.
12 //
13 //  This library is distributed in the hope that it will be useful,
14 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 //  Library General Public License for more details.
17 //
18 //  You should have received a copy of the GNU Library General Public
19 //  License along with this program; if not, write to the Free
20 //  Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21 //  MA 02111-1307, USA
22 //  ------------------------------------------------------------------
23 //  $Id: gs_ge120.h,v 1.1.1.1 2000/02/25 10:12:18 asa Exp $
24 //  ------------------------------------------------------------------
25 //  System data file definitions for GEcho 1.20.b10+
26 //  ------------------------------------------------------------------
27 
28 #ifndef __gs_ge120_h
29 #define __gs_ge120_h
30 
31 
32 //  ------------------------------------------------------------------
33 
34 #include <gftnall.h>
35 
36 
37 //  ------------------------------------------------------------------
38 
39 #if defined(GOLD_CANPACK)
40 #pragma pack(1)
41 #endif
42 
43 
44 //  ------------------------------------------------------------------
45 
46 #define GE_THISREV 0x0002  // System file revision level
47 #define GE_MAJOR   1       // GEcho major revision version
48 #define GE_MINOR   20      // GEcho minor revision version
49 
50 #define AKAS               32  // Main + AKAs
51 #define OLDAKAS            11  // Not used
52 #define OLDUPLINKS         10  // Not used
53 #define OLDGROUPS          26  // Not used
54 #define USERS              10  // User names
55 #define MAXAREAS        10000  // Area records
56 #define MAXCONNECTIONS    500  // Connections per area
57 #define MAXGROUPS         256  // Group records
58 #define MAXNODES         5000  // Node records
59 #define MAXVIAS            60  // Pack "Via" records
60 #define MAXROUTES         640  // Pack "Routed node" records
61 
62 #define GROUPBYTES  ((MAXGROUPS + 7) / 8)
63 
64 
65 //  ------------------------------------------------------------------
66 //  Data types
67 
68 typedef char GROUPS[GROUPBYTES];
69 
70 /* --- Log levels */
71 
72 #define LOG_INBOUND     0x0001  /* Inbound activities */
73 #define LOG_OUTBOUND    0x0002  /* Outbound activities */
74 #define LOG_PACKETS     0x0004  /* Inbound packet info */
75 #define LOG_UNEXPECT    0x0008  /* Extended packet info */
76 #define LOG_AREAMGR     0x0010  /* Unexpected passwords */
77 #define LOG_EXTPKTINFO  0x0040  /* AreaMgr messages */
78 #define LOG_NETEXPORT   0x0100  /* Exporting of netmail */
79 #define LOG_NETIMPORT   0x0200  /* Importing of netmail */
80 #define LOG_NETPACK     0x0400  /* Packing of netmail */
81 #define LOG_NETMOVED    0x0800  /* Moving Sent/Rcvd mail */
82 #define LOG_STATISTICS  0x2000  /* GEcho's statistics */
83 #define LOG_MBUTIL      0x4000  /* MBUTIL's activities */
84 #define LOG_DEBUG       0x8000  /* DEBUG: All of the above */
85 
86 
87 /* --- Log styles */
88 
89 #define LOG_FD       0  /* FrontDoor */
90 #define LOG_BINK     1  /* BinkleyTerm */
91 #define LOG_QUICK    2  /* QuickBBS */
92 #define LOG_DBRIDGE  3  /* D'Bridge */
93 
94 
95 /* --- Setup option bits */
96 
97 #define NOKILLNULL 0x0001  /* Don't kill null netmail messages while tossing */
98 #define RESCANOK   0x0002  /* Allow %RESCAN */
99 #define KEEPREQS   0x0004  /* Keep AreaMgr requests */
100 #define NONODEADD  0x0008  /* Don't automatically add NodeMgr records */
101 #define USEHMBBUF  0x0020  /* Use Hudson buffers */
102 #define KEEPNET    0x0040  /* Don't use Kill/Sent on exported netmail */
103 #define KEEPMGR    0x0080  /* Don't use Kill/Sent on MGR receipts */
104 #define NORRQS     0x0100  /* Ignore Return receipt Requests */
105 #define KILLDUPES  0x0200  /* Kill duplicate messages */
106 #define DOS32BIT   0x0400  /* Run 32-bit DOS version on 386+ machines */
107 #define NOCRSTRIP  0x0800  /* Don't strip Soft-CRs */
108 #define REMOVEJUNK 0x1000  /* Remove "Re:" junk from JAM subjects */
109 #define NOAUTODISC 0x2000  /* Don't automatically disconnect empty PT areas */
110 #define NOCHECKEND 0x4000  /* Don't check for valid end of archives */
111 #define SETPVT     0x8000  /* Set Pvt on imported netmail messages */
112 
113 
114 /* --- Extra option bits */
115 
116 #define NOCHKDEST  0x0001  /* Don't check packet destination */
117 #define AUTOCREAT  0x0002  /* Automatically create message bases */
118 #define PAUSEOK    0x0004  /* Allow %PAUSE */
119 #define NOTIFYOK   0x0008  /* Allow %NOTIFY OFF */
120 #define ADDALLOK   0x0010  /* Allow +* */
121 #define PWDOK      0x0020  /* Allow %PWD */
122 #define PKTPWDOK   0x0040  /* Allow %PKTPWD */
123 #define NOBADPKTS  0x0080  /* Don't notify sysop about BAD/DST/LOC packets */
124 #define PKTPRGONCE 0x0100  /* Run PKT program only before the first PKT */
125 #define CREATEBUSY 0x0200  /* Create busy flags */
126 #define COMPRESSOK 0x0400  /* Allow %COMPRESS */
127 #define FROMOK     0x0800  /* Allow %FROM */
128 #define REDIR2NUL  0x1000  /* Redirect output of external utilities to NUL */
129 #define NOEXPAND   0x2000  /* Don't expand filenames of file attaches */
130 #define LOCALEXPT  0x4000  /* Export netmail to our own AKA */
131 #define OPUSDATES  0x8000  /* Use Opus style binary date/time stamps */
132 
133 
134 /* --- Compression types */
135 
136 #define PR_ARC  0  /* Compressed mail files created by ARC or PKPAK */
137 #define PR_ARJ  1  /* Compressed mail files created by ARJ */
138 #define PR_LZH  2  /* Compressed mail files created by LHA */
139 #define PR_PAK  3  /* Compressed mail files created by PAK */
140 #define PR_ZIP  4  /* Compressed mail files created by PKZIP */
141 #define PR_ZOO  5  /* Compressed mail files created by ZOO */
142 #define PR_SQZ  6  /* Compressed mail files created by SQZ */
143 #define PR_UC2  7  /* Compressed mail files created by UC II */
144 #define PR_RAR  8  /* For compressed mail files created by RAR */
145 #define PR_PKT 10  /* Uncompressed PKT files */
146 
147 
148 /* --- Locking method */
149 
150 #define LOCK_OFF    0  /* Deny Write (Exclusive) */
151 #define LOCK_RA101  1  /* RemoteAccess 1.01 (SHARE) */
152 #define LOCK_RA111  2  /* RemoteAccess 1.11 (SHARE) */
153 
154 
155 /* --- Semaphore mode */
156 
157 #define SEMAPHORE_OFF  0  /* Don't use semaphores */
158 #define SEMAPHORE_FD   1  /* FrontDoor 2.1x */
159 #define SEMAPHORE_IM   2  /* InterMail 2.2x */
160 #define SEMAPHORE_DB   3  /* D'Bridge 1.5x */
161 #define SEMAPHORE_BT   4  /* BinkleyTerm 2.5x */
162 #define SEMAPHORE_MD   5  /* MainDoor */
163 
164 
165 /* --- Check user name */
166 
167 #define CHECK_NOT        0  /* Don't check if user name exists */
168 #define CHECK_USERFILE   1  /* User file (USERS.BBS) */
169 #define CHECK_USERINDEX  2  /* User index (USERSIDX.BBS / NAMEIDX.BBS) */
170 
171 
172 /* --- Mailer type */
173 
174 #define MAILER_FD  0  /* FrontDoor */
175 #define MAILER_DB  1  /* D'Bridge */
176 #define MAILER_BT  2  /* BinkleyTerm */
177 
178 
179 /* --- BBS type */
180 
181 #define BBS_RA111     0  /* RemoteAccess 1.1x */
182 #define BBS_RA200     1  /* RemoteAccess 2.xx */
183 #define BBS_QUICK275  2  /* QuickBBS 2.7x */
184 #define BBS_SBBS116   3  /* SuperBBS 1.16 */
185 
186 
187 /* --- Change tear line */
188 
189 #define TEAR_NO       0  /* No */
190 #define TEAR_DEFAULT  1  /* Replace default */
191 #define TEAR_CUSTOM   2  /* Replace custom */
192 #define TEAR_EMPTY    3  /* Replace empty */
193 #define TEAR_REMOVE   4  /* Remove */
194 
195 
196 /* --- PCBoard options */
197 
198 #define PCB_145COMPAT  0x01  /* PCBoard 14.5 compatibility */
199 
200 
201 /* --- Wildcat! options */
202 
203 #define WC_NONOTIFY  0x01  /* Do not notify users of new mail */
204 
205 
206 typedef struct {
207   ftn_addr address;      /* Uplink address */
208   char    areafix[9];    /* AreaFix program */
209   char    password[17];  /* AreaFix password */
210   char    filename[13];  /* "Forward List" filename */
211   byte    unused[6];
212   byte    options;       /* See --- Uplink options bits */
213   byte    filetype;      /* 0 = Random, 1 = "<areaname> <description>" */
214   dword   groups;        /* Nodes must have one of these groups */
215   byte    origin;        /* Origin AKA */
216 } OLDUPLINK;
217 
218 typedef struct {
219   word zone;
220   word net;
221   byte aka;
222 } AKAMATCH;
223 
224 typedef struct {
225   byte bg_char;
226   byte headerframe;
227   byte headertext;
228   byte background;
229   byte bottomline;
230   byte bottomtext;
231   byte bottomkey;
232   byte errorframe;
233   byte errortext;
234   byte helpframe;
235   byte helptitle;
236   byte helptext;
237   byte helpfound;
238   byte winframe;
239   byte wintitle;
240   byte winline;
241   byte wintext;
242   byte winkey;
243   byte windata;
244   byte winselect;
245   byte inputdata;
246   byte exportonly;
247   byte importonly;
248   byte lockedout;
249 } COLORSET;
250 
251 
252 /* --- SETUP.GE structure */
253 
254 typedef struct {
255   word sysrev;              /* Must contain GE_THISREV */
256   word options;             /* Options bits, see --- Setup option bits */
257   word autorenum;           /* Auto renumber value */
258   word maxpktsize;          /* Maximum packet size, 0 = unlimited */
259   byte logstyle;            /* See --- Log styles */
260   byte oldnetmailboard;     /* Netmail board, must be zero now */
261   byte oldbadboard;         /* Where bad echomail is stored (0 = path) */
262   byte olddupboard;         /* Where duplicates are stored (0 = path) */
263   byte recoveryboard;       /* Recovery board (1-200, 0 = delete) */
264   byte filebuffer;          /* Size (in KB) of MBU file I/O buffer */
265   byte days;                /* Days to keep old mail around */
266   byte swapping;            /* Swapping method */
267   byte compr_default;       /* Default compresion type */
268   byte pmcolor[15];         /* Not used */
269   ftn_addr oldaka[OLDAKAS]; /* Main address and AKAs */
270   word oldpointnet[OLDAKAS];/* Pointnets for all addresses */
271   dword gekey;              /* GEcho registration key */
272   dword mbukey;             /* MBUTIL registration key */
273   char geregto[51];         /* Text used to generate the GEcho key */
274   char mburegto[51];        /* Text used to generate the MBUTIL key */
275   char username[USERS][36]; /* User names */
276   char hmbpath[53];         /* Hudson message base path */
277   char mailpath[53];        /* Netmail path */
278   char inbound_path[53];    /* Where incoming compressed mail is stored */
279   char outbound_path[53];   /* Where outgoing compressed mail is stored */
280   char echotoss_file[65];   /* The ECHOTOSS.LOG used for Squish areas */
281   char nodepath[53];        /* Not used */
282   char areasfile[65];       /* AREAS.BBS style file */
283   char logfile[65];         /* GEcho/MBUTIL log file */
284   char mgrlogfile[65];      /* AreaMgr log file */
285   char swap_path[53];       /* Swap path */
286   char tear_line[31];       /* Tearline to be placed by MBUTIL Export */
287   char originline[20][61];  /* Origin lines */
288   char compr_prog[10][13];       /* Compression program filenames */
289   char compr_switches[10][20];   /* Compression program switches */
290   char decompr_prog[10][13];     /* Decompression program filenames */
291   char decompr_switches[10][20]; /* Decompression program switches */
292   char oldgroups[26][21];   /* Descriptions of area groups */
293   byte lockmode;            /* See --- Locking method */
294   char secure_path[53];     /* From which secure PKTs are tossed */
295   char rcvdmailpath[53];    /* Not used */
296   char sentmailpath[53];    /* Not used */
297   char semaphorepath[53];   /* Where FD rescan files are stored */
298   byte version_major;       /* Major GEcho version */
299   byte version_minor;       /* Minor GEcho version */
300   byte semaphore_mode;      /* See --- Semaphore modes */
301   char badecho_path[53];    /* Where sec. violating and unknown mail is stored */
302   byte mailer_type;         /* See --- Mailer type */
303   word loglevel;            /* See --- Log level */
304   AKAMATCH akamatch[20];    /* AKA matching table */
305   char mbulogfile[65];      /* MBUTIL log file */
306   word maxqqqs;             /* Max. number of QQQ info stored in memory */
307   byte maxqqqopen;          /* Not used */
308   byte maxhandles;          /* Max. number of files used by GEcho */
309   word maxarcsize;          /* Max. archive size, 0 = unlimited */
310   word delfuture;           /* Days to delete messages in the future, 0 = disable */
311   word extraoptions;        /* See --- Extra option bits */
312   byte firstboard;          /* Not used */
313   word reserved1;           /* Reserved */
314   word copy_persmail;       /* Not used */
315   byte oldpersmailboard[USERS];  /* Personal mail board (0 = path) */
316   dword old_public_groups;  /* Public groups (bits 0-25) */
317   word dupentries;          /* Number of duplicate entries in ECHODUPE.GE */
318   byte oldrcvdboard;        /* Where Rcvd netmail is moved to (0 = path) */
319   byte oldsentboard;        /* Where Sent netmail is moved to (0 = path) */
320   byte oldakaboard[OLDAKAS];  /* Netmail boards for AKAs */
321   byte olduserboard[USERS];  /* Netmail boards for system users, 255 = use AKA board */
322   byte reserved2;           /* Reserved */
323   OLDUPLINK uplink[OLDUPLINKS];  /* Not used */
324   char persmail_path[53];   /* Not used */
325   char outpkts_path[53];    /* Where outbound packets are temp. stored */
326   word compr_mem[10];       /* Memory needed for compression programs */
327   word decompr_mem[10];     /* Memory needed for decompression programs */
328   dword pwdcrc;             /* CRC-32 of access password, -1L = no password */
329   word default_maxmsgs;     /* Maximum number of messages       (Purge) */
330   word default_maxdays;     /* Maximum age of non-Rcvd messages (Purge) */
331   char gus_prog[13];        /* General Unpack Shell program filename */
332   char gus_switches[20];    /* GUS switches */
333   word gus_mem;             /* Memory needed for GUS */
334   word default_maxrcvddays; /* Maximum age of Rcvd messages     (Purge) */
335   byte checkname;           /* See --- Check user name */
336   byte maxareacachesize;    /* Area cache size, 0 .. 64 KB */
337   char inpkts_path[53];     /* Where inbound mail packets should be stored */
338   char pkt_prog[13];        /* Called before each tossed mail packet */
339   char pkt_switches[20];    /* Command line switches */
340   word pkt_mem;             /* Memory needed */
341   word maxareas;            /* Maximum number of areas */
342   word maxconnections;      /* Maximum number of connections per area */
343   word maxnodes;            /* Maximum number of nodes */
344   word default_minmsgs;     /* Minimum number of messages       (Purge) */
345   byte bbs_type;            /* See --- BBS type */
346   byte decompress_ext;      /* 0 = 0-9, 1 = 0-F, 2 = 0-Z */
347   byte reserved3;           /* Reserved */
348   byte change_tearline;     /* See --- Change tear line */
349   word prog_notavail;       /* Bit 0-9, 1 = program not available */
350   COLORSET gscolor;         /* GSETUP color set, See COLORSET structure */
351   byte reserved4[9];        /* Reserved */
352 
353   ftn_addr aka[AKAS];        /* Main address and AKAs */
354   word pointnet[AKAS];       /* Pointnets for all addresses */
355   word akaarea[AKAS];        /* AKA netmail areas */
356   word userarea[USERS];      /* Netmail areas for system users, 0 = don't import, 65535 = use AKA area */
357   word persmailarea[USERS];  /* Personal mail area (0 = don't copy) */
358   word rcvdarea;             /* Rcvd netmail area (0 = don't move) */
359   word sentarea;             /* Sent netmail area (0 = don't move) */
360   word badarea;              /* Where bad echomail is stored (0 = path) */
361   word reserved5;            /* Not used */
362   char jampath[53];          /* JAM message base path */
363   char userbase[53];         /* User base path */
364   char dos4gw_exe[65];       /* DOS4GW.EXE protected mode run time file */
365   GROUPS public_groups;      /* Public groups (bits 0-255) */
366   word maxgroupconnections;  /* Maximum number of connections per group */
367   word maxmsgsize;           /* Maximum message size (64-1024 kB) */
368   word diskspace_threshold;  /* Amount of free disk space that causes packing */
369   byte pktsort;              /* 0 = No, 1 = Area, 2 = Area + Date/Time */
370   char wildcatpath[53];      /* Wildcat! home path */
371   byte wcoptions;            /* Wildcat! options */
372   byte pcboptions;           /* PCBoard options */
373 } SETUP_GE;
374 
375 #define IMPORTSB  0x0001  /* Import SEEN-BY lines to message base */
376 #define SECURITY  0x0002  /* Only accept mail from nodes in connections list */
377 #define PASSTHRU  0x0004  /* Mail is not imported, only forwarded */
378 #define VISIBLE   0x0008  /* Area is visible for anyone in AreaMgr's %LIST */
379 #define REMOVED   0x0010  /* Area should be removed by GSETUP Pack */
380 #define NOUNLINK  0x0020  /* Do not allow users to unlink this area */
381 #define TINYSB    0x0040  /* Tiny SEEN-BYs with only nodes in connections list */
382 #define PVT       0x0080  /* Private bits are preserved and are not stripped */
383 #define CHECKSB   0x0100  /* Use SEEN-BYs for duplicate prevention */
384 #define NOPAUSE   0x0200  /* Do not allow users to pause this area */
385 #define SDM       0x0400  /* Area is stored in *.MSG format */
386 #define HIDESB    0x0800  /* Hide imported SEEN-BY lines */
387 #define NOIMPORT  0x1000  /* AreaMgr will set new nodes to Export-Only */
388 #define DELFUTURE 0x2000  /* Del messages dated in the future */
389 #define NOTIFIED  0x4000  /* Sysop notified that area was disconnected */
390 #define UPLDISC   0x8000  /* Disconnected from uplink (only for PT areas) */
391 
392 
393 #define NODUPECHK 0x01  /* Don't do duplicate checking for this area */
394 #define NOLINKING 0x02  /* Don't do reply chain linking for this area */
395 #define HIDDEN    0x04  /* Area is hidden for everyone */
396 
397 
398 #define ECHOMAIL   0
399 #define NETMAIL    1
400 #define LOCAL      2
401 #define BADECHO    3
402 #define PERSONAL   4
403 #define NUM_TYPES  5
404 
405 
406 #define FORMAT_PT      0  /* Passthru */
407 #define FORMAT_HMB     1  /* Hudson Message Base */
408 #define FORMAT_SDM     2  /* *.MSG base */
409 #define FORMAT_JAM     3  /* Joaquim-Andrew-Mats message base proposal */
410 #define FORMAT_PCB     4  /* PCBoard 15.0 */
411 #define FORMAT_SQUISH  5  /* Squish 2.0 */
412 #define FORMAT_WC      6  /* Wildcat! 4.0 */
413 #define NUM_FORMATS    7
414 
415 
416 typedef struct {
417   word hdrsize;         /* sizeof(AREAFILE_HDR) */
418   word recsize;         /* sizeof(AREAFILE_GE) */
419   word maxconnections;  /* Maximum number of entries in connections list */
420 } AREAFILE_HDR;
421 
422 
423 typedef struct {
424   char name[51];       /* Area name must be uppercase, no spaces */
425   char comment[61];    /* Description of the topics discussed in area */
426   char path[51];       /* Path where the *.MSG files are stored */
427   char originline[61]; /* Custom origin line, used if origlinenr = 0 */
428   word areanumber;     /* Area number (1-200 = Hudson) */
429   byte group;          /* Group (0-255) */
430   word options;        /* See --- Area option bits */
431   byte originlinenr;   /* Origin line (1-20, 0 = custom) */
432   byte pkt_origin;     /* Address for the packet/Origin line (0-31) */
433   dword seenbys;       /* Addresses (bits 0-31) to add to the SEEN-BY */
434   word maxmsgs;        /* Maximum number of messages       (MBUTIL Purge) */
435   word maxdays;        /* Maximum age of non-Rcvd messages (MBUTIL Purge) */
436   word maxrcvddays;    /* Maximum age of Rcvd messages     (MBUTIL Purge) */
437   byte areatype;       /* See --- Area type */
438   byte areaformat;     /* See --- Area format */
439   byte extraoptions;   /* See --- Extra area option bits */
440 } AREAFILE_GE;
441 
442 /* --- Connection entry status bits */
443 
444 #define CONN_NOIMPORT  0x01  /* Don't accept mail from this node */
445 #define CONN_NOEXPORT  0x02  /* Don't forward mail to this node */
446 #define CONN_PAUSE     0x04  /* Temporary don't send this area to this node */
447 #define CONN_NOUNLINK  0x08  /* Don't allow this node to disconnect */
448 #define CONN_ISUPLINK  0x10  /* Node is uplink for this area */
449 
450 /* --- Connections list entry */
451 
452 typedef struct {
453   ftn_addr address;
454   byte     status;
455 } CONNECTION;
456 
457 
458 //  ------------------------------------------------------------------
459 
460 #if defined(GOLD_CANPACK)
461 #pragma pack()
462 #endif
463 
464 
465 //  ------------------------------------------------------------------
466 
467 #endif
468 
469 //  ------------------------------------------------------------------
470