home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
i
/
imail135.zip
/
IM_DEV.ZIP
/
IM_STRUC.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1992-12-20
|
25KB
|
433 lines
{=========================================================================}
{=========================================================================}
{ }
{ IMAIL DEFINITIONS AND STRUCTURES }
{ for IMAIL = 1.35 }
{ }
{=========================================================================}
{ }
{ * The contents of this file are subject to change without notice! }
{ * Fields marked reserved should NOT be used. }
{ * It is an ERROR to write to any of the configuration files }
{ * while IMAIL (or any of its companion programs) is running. }
{ * }
{ * Copyright (C) 1992 by IMAIL INC. All rights reserved. }
{ }
{=========================================================================}
{=========================================================================}
{ CONSTANT DEFINITIONS }
{=========================================================================}
const IM_MAJ_VERSION = 1;
IM_MIN_VERSION = 35;
IM_PRD_CODE = $4B;
{-------------------------------------------------------------------------}
{ Internal limits }
{-------------------------------------------------------------------------}
const MAXAKAS = 16; { Max # of addresses }
MAXPACKERS = 11; { Max # of packer def }
MAXEXPORT = 60; { Max export defs }
MAXVIA = 40; { max nodes packed via }
MAXPACK = 32; { max default pack cmd }
MAXEXCEPT = 10; { max EXCEPT nodes }
MAXFWDLINK = 10; { max fwd link structs }
MAXNOIMPT = 20; { max # of names }
ZONESDOM = 10; { zones per domain entry }
MAXTAG = 51; { Max length of an areatag }
MAXNAME = 37; { Max length of a namefield }
MAXPACKNAME = 50; { Max length of a packer entry }
MAXORIGIN = 64; { Max length of an origin }
MAXPATH = 80; { Max length of path }
MAXFILE = 11; { Max length of file }
MAXEXT = 3; { Max length of extension }
MAXFNAME = MAXFILE+MAXEXT; { Max length of a filename }
MAXDOMAIN = 21; { Max length of a domainname }
MAXPWD = 21; { Max length of a password }
{-------------------------------------------------------------------------}
{ Log Style Definitions }
{-------------------------------------------------------------------------}
const LOG_NORMAL = 0; { normal log level }
LOG_VERBOSE = 1; { verbose log level }
{-------------------------------------------------------------------------}
{ Environment Type (FroDo or Bink) }
{-------------------------------------------------------------------------}
const ENV_FRODO = 0; { FrontDoor/D'Bridge }
ENV_BINK = 1; { Binkley }
{-------------------------------------------------------------------------}
{ Sort Method (used in IMTHINGS SORT) }
{-------------------------------------------------------------------------}
const A_SORT_NAME = 1;
A_SORT_BOARD = 2;
A_SORT_GROUP = 3;
{-------------------------------------------------------------------------}
{ File Attach Message Status (used in IMAIL.ND) }
{-------------------------------------------------------------------------}
const S_NORMAL = 0;
S_HOLD = 1;
S_CRASH = 2;
{-------------------------------------------------------------------------}
{ Message Base Types }
{-------------------------------------------------------------------------}
const MSGTYPE_SDM = $01;
MSGTYPE_SQUISH = $02;
MSGTYPE_HUDSON = $03;
MSGTYPE_QBBS = $03;
MSGTYPE_PASSTH = $0F;
MSGTYPE_ECHO = $80;
MSGTYPE_LOCAL = $90;
MSGTYPE_NET = $A0;
{-------------------------------------------------------------------------}
{ Via Line Switches }
{-------------------------------------------------------------------------}
const VIA_NONE = 0;
VIA_EXP = 1;
VIA_IMP = 2;
VIA_BOTH = 3;
{-------------------------------------------------------------------------}
{ Dupe ring check switches }
{-------------------------------------------------------------------------}
const DUPE_NONE = 0;
DUPE_WARN = 1;
DUPE_ZONE = 2;
DUPE_KILL = 3;
{-------------------------------------------------------------------------}
{ Unlink Switches }
{-------------------------------------------------------------------------}
const ULNK_NONE = 0;
ULNK_PASSTH = 1;
ULNK_ALL = 2;
{-------------------------------------------------------------------------}
{ Exit Errorlevels & Error Messages }
{-------------------------------------------------------------------------}
const E_NOERR = 0; { no error }
E_ELOCK = 239; { File locking error }
E_AOPEN = 240; { Error opening IMAIL.AX }
E_BOPEN = 241; { Error opening IMAIL.BX }
E_NOIDX = 242; { Index file missing/corrupt }
E_NOCFG = 243; { IMAIL.CF not found }
E_NOARE = 244; { IMAIL.AR not found }
E_NONOD = 245; { IMAIL.ND not found }
E_BADCF = 246; { Error in IMAIL.CF }
E_BADVR = 247; { Bad version of IMAIL.CF }
E_EOPEN = 248; { Error opening file }
E_EREAD = 249; { Error reading file }
E_EWRIT = 250; { Error writing file }
E_CMDPR = 251; { Command Line Parameter error }
E_FILNF = 252; { File not found }
E_MEMRY = 253; { Memory Allocation error }
E_DISKF = 254; { Insufficient disk space }
E_UNKWN = 255; { Unknown error }
{-------------------------------------------------------------------------}
{ Special values for 'ALL' }
{-------------------------------------------------------------------------}
const ZONE_ALL = 56685; { Pack for all zones }
NET_ALL = 56685; { Pack for all nets }
NODE_ALL = 56685; { Pack for all nodes }
POINT_ALL = 56685; { Pack for all points }
{-------------------------------------------------------------------------}
{ Capability defintions }
{-------------------------------------------------------------------------}
const CAP_TYPE2 = $01; { Can make Type 2 bundles }
CAP_STONAGE = $00; { No capabalities }
{=========================================================================}
{ STRUCTURE DEFINITIONS }
{=========================================================================}
{-------------------------------------------------------------------------}
{ Structs used in IMAIL Configuration files }
{-------------------------------------------------------------------------}
TYPE
areatag = array [1..MAXTAG] of char;
origin_typ = array [1..MAXORIGIN] of char;
path_typ = array [1..MAXPATH] of char;
packer_typ = array [1..MAXPACKNAME] of char;
naddress = record { std node number ... }
zone : word; { Zone Number }
net : word; { Net Number }
node : word; { Node Number }
point : word; { Point Number }
end;
pack_struct = record { used in pack routing }
dst : naddress; { pack via this node }
nodes : array [1..MAXVIA] of naddress; { nodes to pack }
except : array[1..MAXEXCEPT] of naddress;{ exceptions }
end;
eaddress = record
dstn : naddress; { destination-address }
bitfield1 : byte;
{ exp_only : bit_0; export only to this address }
{ imp_only : bit_1; import only from this address}
{ paused : bit_2; echomail paused }
{ reserved : bit_3-7; reserved }
end;
fwd_link = record { used for forward requests }
areasfile : array [1..MAXFNAME] of char; { name of areas file }
toprogram : array [1..10] of char; { name of area manager }
password : array [1..MAXPWD] of char; { area manager password }
uplink : naddress; { address of uplink }
end;
dom = record
domain : array [1..MAXDOMAIN] of char;{ name of domain }
outbound : array [1..MAXPATH] of char; { root outbound path }
zones : array [1..ZONESDOM] of word; { zones in this domain }
akas : array [1..MAXAKAS] of byte; { =my= akas in this domain }
end;
im_stats = record { Used mainly by IUTIL }
th_day : word; { this day }
la_day : word; { last day }
th_week : word; { this week }
la_week : word; { last week }
th_month : word; { this month }
la_month : word; { last month }
th_year : word; { this year }
la_year : word; { last year }
end;
{-------------------------------------------------------------------------}
{ IMAIL.CF Structure }
{-------------------------------------------------------------------------}
TYPE
im_config_type = record
im_ver_maj : byte; { Major Version }
im_ver_min : byte; { Minor Version }
sysop : array [1..MAXNAME] of char; { name of sysop }
rsvd1 : byte; { reserved }
rsvd2 : byte; { reserved }
rsvd3 : byte; { reserved }
aka : array [1..MAXAKAS] of naddress;
{ the AKAs }
domains : array [1..MAXAKAS] of dom; { domain names & zones }
prod : array [1..10] of byte; { Type 2+ product codes }
rsvd4 : byte; { reserved }
rsvd5 : byte; { reserved }
rsvd6 : byte; { reserved }
netmail : path_typ; { net mail subdirectory }
netfile : path_typ; { inbound files directory }
in_pkt : path_typ; { Dir for inbound PKTs }
out_pkt : path_typ; { Dir for outbound PKTs }
outbound : path_typ; { outbound directory }
quickbbs : path_typ; { QuickBBS system directory }
rsvd7 : path_typ; { reserved }
rsvd8 : path_typ; { reserved }
rsvd9 : path_typ; { reserved }
semaphor : path_typ; { Semaphor directory }
logfilename : path_typ; { Log file name }
alnk_help : array [1..MAXFNAME] of char; { AreaLink help text }
new_areas : array [1..MAXFNAME] of char; { name of file for new areas}
pwd_exp_days : word; { days before pwd expired }
max_pkt_size : word; { max size of pkt to create }
max_dupes : word; { max dupes kept in dbase }
log_level : byte; { logging level }
bitfield1 : byte; { has been changed from 1.10}
{ rtnrecpt : bit_0; True if to send rtn recpt }
{ checkbad : bit_1; True if to check badmsgs }
{ ARCmail06 : bit_2; ARCmail 0.6 compatibility }
{ environment : bit_3; FroDo or Binkley }
{ pkt_open : bit_4; Keep PKT files open }
{ auto_add : bit_5; Auto-add unknown areas }
{ multi_task : bit_6; TRUE if multi-tasking }
{ forward_for : bit_7; forward PKTs not for us }
bitfield2 : byte;
{ singleextract: bit_0; extract 1 bundle at a time}
{ trunc_sent : bit_1; 1 = Trunc 0 = Delete }
{ keep_recpt : bit_2; keep areafix message }
{ prodnames : bit_3; use product names }
{ swap_ems : bit_4; swap to EMS }
{ swap_ext : bit_5; swap to extended memory }
{ newarea_passth: bit_6; set new areas to passth }
{ reserved : bit_7; reserved }
bitfield3 : byte;
{ direct_video : bit_0; use direct screen i/o }
{ forward_req : bit_1; Execute forward link req. }
newarea_group: char; { new areas default group }
dflt_origin : origin_typ; { default origin line }
before_toss : path_typ; { call before proc. PKTs }
last_run : longint; { last run of IUTIL STAT }
sem_timeout : byte; { timeout for IMBUSY.NOW }
via_line : byte; { add Via Line to netmails }
dupe_ring : byte; { Check for possible d-rings}
no_import : array [1..MAXNOIMPT] of array [1..38] of char;
{ ignore when importing }
packers : array [1..MAXPACKERS] of packer_typ;
{ Packer defintions }
arcunpak : packer_typ; { cmd to de-arc .ARC files }
arjunpak : packer_typ; { cmd to de-arc .ARJ files }
pkpakunpak : packer_typ; { cmd to de-arc .PKA files }
pkzipunpak : packer_typ; { cmd to de-arc .ZIP files }
lharcunpak : packer_typ; { cmd to de-arc .LZH files }
zoounpak : packer_typ; { cmd to de-arc .ZOO files }
pakunpak : packer_typ; { cmd to de-arc .PAK files }
sqzunpak : packer_typ; { cmd to de-arc .SQZ files }
unkunpak : packer_typ; { cmd to de-arc unknown files}
pack : array [1..MAXPACK] of pack_struct;
{ default PACK routing }
fwd : array [1..MAXFWDLINK] of fwd_link;
{ forward link requests }
unlink_req : byte; { Unlink areas without dlink}
semaphor_net : array [1..MAXFNAME] of char; { Netmail rescan semaphor file}
maint_help : array [1..MAXFNAME] of char; { Alnk Remote Maint. Helpfile}
pers_mail : byte; { use personal mail feature }
keep_alnk_req: byte; { keep arealink request }
max_arcmail_size : word; { max size of arcmail bundles}
max_msg_size : byte; { max size of netmail (split)}
filler : array [1..126] of char; { reserved }
end;
{-------------------------------------------------------------------------}
{ IMAIL.AR Structure }
{-------------------------------------------------------------------------}
TYPE
areas_record_type = record
aname : areatag; { area name }
comment : array [1..61] of char; { area comment }
origin : origin_typ; { origin line to use }
group : char; { area group }
o_addr : byte; { address for origin }
use_akas : array [1..MAXAKAS] of char; { addresses for seen-bys }
msg_base_type : byte; { message base type }
brd : byte; { board number }
msg_path : path_typ; { MSG directory }
bitfield1 : byte;
{ active : bit_0; flag area active }
{ zone_gate : bit_1; Zone-gate stripping }
{ tiny_seen : bit_2; tiny seen-by flag }
{ secure : bit_3; secure flag }
{ keep_seen : bit_4; keep seen-by flag }
{ deleted : bit_5; flag deleted area }
{ auto_added : bit_6; flag auto-added record }
{ mandatory : bit_7; area is mandatory }
bitfield2 : byte; { }
{ read_only : bit_0; area is read only }
{ unlinked : bit_1; area has been unlinked }
{ ulnk_req : bit_2; perform unlinked requests?}
{ hidden : bit_3; area ist hidden }
iutil_bits : byte; { bits for IUTIL }
user_bits : byte; { 8-bit useravailable bits}
days : byte; { days to keep messages }
msgs : word; { num messages to keep }
t_stats : im_stats; { TOSS stats }
s_stats : im_stats; { SCAN stats }
d_stats : im_stats; { dupe statistics }
creation : longint; { date/time of creation }
update : longint; { last update by STAT }
marked : longint; { used by IUTIL }
filler : array [1..10] of char;
export : array [1..MAXEXPORT] of eaddress; { export list }
end;
{ Notes: The entries in 'o_addr' and 'use_akas' are indexes into the
list of AKAs in IMAIL.CF, minus 1. eg:
im_config.aka[o_addr-1]
A value of 0 means 'no address'.
}
{-----------------------------------------------------------------------}
{ IMAIL.ND Structure }
{-----------------------------------------------------------------------}
TYPE
node_record_type = record
dstn : naddress; { Node to pack for }
sysop : array [1..MAXNAME] of char;{ name of sysop }
domain : char; { index to domain }
pwd : array [1..MAXPWD] of char;{ AreaFix/Bndl password }
status : char; { Status of file attach msg }
{ Packprogram was originally named "program" ! }
Packprogram : char; { packer to use ("packers") }
groups : array [1..27] of char; { groups node can request }
capability : word; { capability word for node }
bitfield1 : byte;
{ allow_remote : bit_0; allow remote maint. }
{ direct : bit_1; Mark ARCmail as direct }
{ auto_cap : bit_2; auto-detect capability }
{ auto_added : bit_3; record added by IMAIL }
{ newarea_add : bit_4; auto add to new areas }
{ newarea_create: bit_5; create new areas }
{ Rescan_ok : bit_6; allow node to rescan }
{ Notify : bit_7; send notify messages }
bitfield2 : byte;
{ rsvd1 : bit_0; }
{ rsvd2 : bit_1; }
{ forward_req : bit_2; send forward requests? }
user_bits : word; { 16 user-available bits }
newarea_group : char; { group for autoadded area }
pkt_password : array [1..9] of char; { password to include in PKTs }
last_pwd_change: longint; { time ALNK pwd last changed }
filler : array [1..20] of char;
end;
{-----------------------------------------------------------------------}
{ IMAIL.GR Structure }
{-----------------------------------------------------------------------}
TYPE
group_record_type = record
grp_desc : array[1..27] of char; { Group description }
msg_base_type : byte; { message base type }
msg_path : path_typ; { MSG/Squish path }
bitfield1 : byte;
{ active : bit_0; flag area active }
{ zone_gate : bit_1; Zone-gate stripping }
{ tiny_seen : bit_2; tiny seen-by flag }
{ secure : bit_3; secure flag }
{ keep_seen : bit_4; keep seen-by flag }
{ mandatory : bit_5; area is mandatory }
{ read_only : bit_6; area is read only }
{ ulnk_req : bit_7; perform unlinked requests? }
bitfield2 : byte;
{ hidden : bit_0; area is hidden }
days : byte; { days to keep messages }
msgs : word; { num messages to keep }
filler : array[1..20] of char; { reserved }
end;
{ end of IMAIL-structures }
{-----------------------------------------------------------------------}