WMSTRUCT.220

10.6 KB 39fb21633b224fea…
WMAIL 2.2 - Copyright 1990,91 by Silvan Calarco -

    ────────────────────────────────────────
    Structures of files managed by WMAIL 2.2
    ────────────────────────────────────────

The following structures are created in Turbo Pascal; look at following
table for type compatibility.

Turbo Pascal  C language    Length
────────────  ────────────  ───────
Byte          Char          1 byte
Char          Char          1 byte
Integer       Int           2 bytes
Word          Unsigned Int  2 bytes
Longint       Long          4 bytes
────────────  ────────────  ───────

String[] format uses a byte more than the number specified in brackets, as
the first one (String[0]) contains string length.

───────────────────────────────────────────────────────────────────────────


{ ***** Configuration file structures *********************************** }


   SetRec=Record       { >>>>> file WMAIL.PRM <<<<< }
             Version:Word; { 4: WMail 2.0  5: WMail 2.1  9: WMail 2.2 }
             Sysop:String[30];
             Key:String[16];
             Aka:Array[0..10] of  { Aka 0 is primary address }
                 Record
                    Zone,Net,Node,Point:Integer;
                    Domain:String[20];
                 end;
             FakeNet:Word;
             ZoneGate:Array[1..10] of
                      Record
                         Net,Node:Integer;
                      end;
             Active_Options:Byte; { Bit mapped:
                                        0: Import dupes
                                        1: Import bad messages
                                        2: Do statistics
                                        3: Use log file
                                        4: Use nodelist files
                                        5: Create new Fido area
                                        6: Create new QBBS area
                                        7: Binkley mode on }
             Swap:Byte;           { 0: No swap; 1: Disk swap; 2: EMS swap }
             MinSpace:Word;
             Dir:Record
                    Mail,Files,Out,ArcMail,MsgBase,Dupes,
                    BadEcho,Packer,Stats,NewAreas,Nodelist:String[60];
                 end;
             Origin:Array[1..10] of String[65];
             AreaListFile:String[60];
             LogFile:String[60];
             LogLevel:Byte;        { 0: Important messages
                                     1: Important+normal messages
                                     2: Important+normal+detailed messages
                                     3: Debug mode (all sort of messages) }
             LogStyle:Byte;        { 0: Binkley Term; 1: FrontDoor }
             Active_Options2:Byte; { Bit mapped:
                                       0: Kill rcvd messages
                                       1: Sort nodes
                                       2: Write nodes in short form
                                       3: Allow user rescan
                                       5: Combine 2 tear lines
                                       6: Honour RRQs
                                       7: Kill packed messages }
             BBSInfo:Array [1..50] of
                     Record
                        Zone,Net,Node,Point:Integer;
                        Packer:Byte;
                        CmdPw1:String[20];
                        CmdPw2:String[20];
                        Level:Byte;
                        Misc:Integer; { Bit 1: Daily packets }
                        Aka:Byte;
                     end;
             RouteFile:String[60];
             Packer:Array[1..7] of { See DefPacker for packers and unpackers
                                     assignations. Packer[7] (???) can be
                                     any packer }
                       Record
                          Name:String[12];
                          Parms:String[20];
                       end;
             UnPacker:Array[1..7] of
                         Record
                            Name:String[12];
                            Parms:String[20];
                         end;
             DefPacker:Byte;        {1:ARC 2:ARJ 3:LZH 4:PAK 5:ZIP 6:ZOO}
             Def_Misc:Byte;         { Bit mapped:
                                         0: Put origin
                                         1: Put tear line
                                         2: Hide SEEN-BY
                                         3: Strip 4d address
                                         4: Add AKA's
                                         5: Put domain  }
             Unused:Array[1..1000] of Byte;
          end;


   AreasRecord=Record { >>>>> File AREAS.PRM <<<<< }
                  Titolo   : String[40];
                  Path     : String[80];
                  Tipo     : Byte; {Local=1  EchoMail=2  NetMail=3
                                   Passthru=4}
                  WEdOrigin: Byte; { Used by WEdit }
                  Tag      : String[40];
                  Def_Attr : Byte;        {Bit Mapped (used by WEdit):
                                                     Bit 0 : Pvt
                                                     Bit 1 : Crash
                                                     Bit 4 : F/A
                                                     Bit 7 : Kill/Sent}
                  ForwardTo: Array[1..3] Of String[60];
                  Aka      : Byte;
                  Misc     : Byte;  { Bits: see SetRec.Def_Misc }
                  Level    : Byte;
                  WMOrigin : Byte;
                  Fill     : Array[1..8] of Char;
               end;


{ ***** Statistics files structures ************************************* }

   Stat1=Record         { >>>>> file WMSTAT1.DAT <<<<<}
            TagArea:String[30];
            F:Array[1..3] of
              Record
                 ImpMsg,ExpMsg:Word;
              end;
         end;

{ TagArea contains the name of the area to which statistics refer.
  Record F contains number of imported (ImpMsg) and exported (ExpMsg) messages.
  F[1] contains yearly informations, F[2] monthly ones and F[3] weekly ones.
  From first record it is possible to obtain informations about the period
  for which statistics refer.
  F[1].ImpMsg contains a 4 digit number indicating the concerned year
  F[2].ImpMsg contains a number in {1,2,...12} indicating the concerned month
  F[3].ImpMsg contains number of days between 1970 and concerned period.
  Weekly statistics are made after first Monday import.

   Stat2=Record         { >>>>> file WMSTAT2.DAT <<<<< }
            Net,Node,Point:Integer;
            F:Array[1..3] of
              Record
                 NumPktImp:Integer;
                 NumMsgImp,NumBytesImp:Longint;
                 NumPktExp:Integer;
                 NumMsgExp,NumBytesExp:Longint;
              end;
         end;

{ Net,Node,Point contain the address of node to which statistics refer.
  Record F contains informations about number of imported packets (NumPktImp),
  number of imported messages (NumMsgImp) and total dimension in bytes of
  imported packets (NumBytesImp). The same informations are also present in
  export (NumPktExp, NumMsgExp,NumBytesExp). F[1] contains yearly informations
  F[2] the monthly ones and F[3] the weekly ones.
  First record contains reserved informations and must be therefore skipped. }



{ ***** W-Nodelist files structures **************************************** }

Files created by WNode are 4, and are used for indexing text nodelist in
order to speed up seeks;

*AltNode.WNL contains a queue of nodelist files used other than NodeList.*,
             so private nodelists, pointlists or alternate net nodelists.

*NodeLoc.WNL contains position of concerned field, and nodelist file in
             which are contained the informations about node every record
             refers to.

*SysList.WNL contains names of all Sysops alphabetically sorted and location
             of relative node in NodeLoc.WNL.

*NodeRec.WNL contains indexes to obtain a quick search inside NodeLoc.WNL and
             SysList.WNL. All starting positions of zones and nets, and of
             sorted sysop are put in it.


   NodeLocRec=Record             { Record of NodeLoc.WNL }
                 NodeType:Byte;  { 1:Zone coordinator
                                   2:Region coordinator
                                   4:Host
                                   8:Hub
                                  16:Pvt
                                  32:Hold
                                  64:Down
                                 128:Boss [from pointlist] }
                 Zone,Net,Node,Point:Integer;
                 FileNum:Byte;   { 1: Nodelist.* [newest file];
                                   2: AltNode.WNL [created by WNode] }
                 FilePos:Longint; { Contains absolute node position in one
                                    of two files pointed by FileNum }
              end;


   SysopRec=Record               { Record of SysList.WNL }
               Name:String[20];
               BBSRecord:Longint;{ Position of node record in NodeLoc.WNL }
            end;


   NodeRec=Record                { Record of NodeIdx.WNL }
              NodeType:Byte;     { For mapping, see NodeLocRec.NodeType.
                                   Nodes reported in this field are only of
                                   the following types:
                                   Zone coordinator
                                   Region coordinator
                                   Host
                                   Boss }
              Number:Integer;    { The significative part of address:
                                   Zone coordinator: zone number
                                   Region coordinator, Host: net number
                                   Boss: node number }
              BBSRecord:Longint; { Position of node record in NodeLoc.WNL }
              Match:Array[1..4] of Char;
                                 { The first 4 character of some of the
                                   sorted sysop names. One out of about 30
                                   names is taken. }
              SysopRecord:Longint;
                                 { Position of sysop record in SysList.WNL }
           end;

───────────────────────────────────────────────────────────────────────────
Note: The author reserves for himself right to change this document without
advice.
───────────────────────────────────────────────────────────────────────────
End of file.