home *** CD-ROM | disk | FTP | other *** search
- (*
- ** Prime request processor for Frontdoor structure file
- **
- ** Copyright (c) 1993,94 Tisas Development; All rights reserved.
- **
- ** Structures designed by Hans Siemons, Prime Productions and
- ** Marco Miltenburg.
- **
- **
- ** Last revision (dd/mm/yy) : 01-10-94
- **
- ** [...]
- ** This information is not necessarily final and is subject to change at any
- ** given time without further notice
- ** [...]
- *)
-
- (*
- ** General notes:
- ** date format used everywhere is the UNIXdate format.
- ** CRC's over strings are on the text only (not the size). 'A'..'Z' are
- ** casted to 'a'..'z'. (international characters are not taken in
- ** considiration!
- **
- ** CRC's over AKA's, are simply CRC's over the '8' bytes.
- **
- ** The CRC's are the standard CRC32's, used by PKZip and ZModem.
- **
- ** If you do not have any library to calculate them, use the CRC32 routines
- ** from RADUMISC.TPU (included with RADU)
- *)
-
- (*
- ** FILEBASE.RP contains the database to the filebase. The request processor
- ** only takes this file, and the magic filename database in consideration
- ** when a node requests something.
- **
- ** Duplicate files in different groups in no problem. RP will never send the
- ** same file twice.
- *)
-
- Type FIdx = record { FILEBASE.RP }
- FileName : array[1..11] of char; { filename }
- size : Longint; { filesize }
- date : Longint; { filedate }
- dir : Longint; { pointer to directory }
- pwdcrc : Longint; { crc-32 over password,-1=no password }
- group : byte; { group of file }
- end;
-
- (*
- ** Descriptions are placed in DESCRIPT.RP, and is a file of character. It just
- ** contains the pure text.
- *)
-
- DescInfoRecord=record { descinfo.rp }
- FileName : Longint; { crc-32 over filename }
- desc : Longint; { pointer to description }
- Descs : Integer; { length of description }
- Downloads : Word; { number of downloads }
- end;
-
- (*
- ** Magic names database
- ** This database is searched in first. If a file has a "magic hit", it can
- ** never have a "file hit" anymore.
- **
- ** For magic names that represent more then one file, a record is added
- ** per file. The request processor itselve handles it correctly.
- *)
- Midx = record { MAGIC.RP }
- Magicname, { crc-32 over magic name }
- Pwdcrc, { crc-32 over password,-1=no password }
- FileName : Longint; { pointer to filelist }
- size, { filesize }
- date : Longint; { filedate }
- Group : Byte; { group of file }
- MType : Byte; { 0=magic filename
- 1=function request
- 2=template request }
- end;
-
- (*
- ** FileName (Midx) and dir (Fidx) point a in straight ascii text file called
- ** "textbase.rp". If RP hits on a magic name, it extracts from "textbase.rp"
- ** the actual filename. If RP hits on a filename, it extracts the directory
- ** from it.
- *)
-
- (*
- ** the group field in the magic and filebase also contain 3 flags for
- ** marking files as free.
- **
- ** bit 0-4=group itselve
- ** bit 5=free kilobytes
- ** bit 6=free time
- ** bit 7=free match
- *)
-
- (*
- ** REQUESTD.RP contains information about what a node already requested,
- ** and is used to setup "requestlimits" per day.
- **
- ** There can be more then one record from the same node, since FDRPR
- ** stores a record per "request session".
- *)
-
- Requested=
- record { REQUESTD.RP }
- NodeCrc : Longint; {crc-32 over node#}
- FileID : Longint;
- StatKB,
- KBrequested,
- NRrequested,
- TIMErequested : Longint;
- RequestDate : Longint; { date of request, unixdate }
- Recovertime : Integer; { recovertime of node }
- end;
-
- Type
- GroupAccessType=set of 1..26;
- AvailableType=array[0..6] of set of 0..143; { timeslot variabele }
- TaskAvailableType=set of byte;
-
- (*
- ** Node definition file.
- *)
- Noderecord=
- record { nodefile.rp }
- Zone,
- Net,
- Node,
- Point : word;
- wildcard : byte; { 0=zone:net/node.point
- 1=zone:net/node.*
- 2=zone:net/*
- 3=zone:*
- }
- Name : String[40];
- Level : word;
- groups : GroupAccessType;
- Deleted : boolean;
- DenyRequest : boolean;
- TimeToRecover : Integer;
- LimitedTime : Boolean;
- TaskAvailable : TaskAvailabletype;
- LimitTask : Boolean;
- Available : AvailableType;
- end;
-
- Const MyRev=2;
-
- type PathStr=String[78];
-
- (*
- ** Available type is an array (arrays states the days, sunday=0), that contains
- ** the timeslot information.
- ** in 0 in set, then available from 00:00 till 00:10
- ** if 1 in set, then available from 00:10 till 00:20
- **
- ** [...]
- **
- ** if 143 in set, then available from 23:50 till 00:00
- *)
-
- timeslottype=
- record
- start, { minutes since 00:00 }
- stop : longint;
- end;
-
- groupsetup=
- record
- Name : string[20]; { group name }
- Paths : PathStr;
- Magics : PathStr;
- Passwords : PathStr; { file of passwords }
- minbaud : Longint;
- StopMatch : Boolean;
- FreeKB,
- FreeTime,
- FreeMatch,
- ShowPWDfailures,
- ShowNoAccess,
- {} CompileOnce,
- CDrom : Boolean;
- LimitedTime : boolean; { limit hours ;-)) }
- TaskAvailable : TaskAvailableType; { available on tasks }
- LimitTask : Boolean;
- Available : AvailableType;
- end;
- groupsetupar=array[1..26] of groupsetup;
-
- { RP reads like this:
-
- read record,
- level lower or requel to then "userlevel" : read it
- baudrate lower or equel to to then "userbaudrate" : read it
-
- These records are sorted on level and baudrate, where level is the primary key
- }
-
- LimitRecord=
- record
- level : word;
- Baudrate : longint;
- MaxMatchPT, { pt=per time slot }
- MaxTimePT,
- MaxKBPT,
- MaxMatchPS, { ps=per session }
- MaxTimePS,
- MaxKBPS : word;
- LimitedTime : boolean;
- Available : AvailableType;
- LimitTask : Boolean;
- TaskAvailable : TaskAvailableType; { available on tasks }
- end;
-
- ULnodelimittype=record { unlistednode limit type }
- Groups : GroupAccessType;
- Level : word;
- Recovertime : Integer;
- end;
-
- MailerUsedType=(FD212,FD220b,FD230,Im227); { fd 2.30 is not used yet }
-
- CtlMainHdr=
- record { setup.rpr }
- Signature : Longint; { must contain <R><P><R><#0> }
- Revision : word; { must be <myrev> }
- LimitRecSize,
- NodeRecSize : word;
- end;
- CtlHdr=
- record
- Signature : Longint; { must contain <R><P><R><#0> }
- ID : Word; { ID# for next part }
- Records, { number of records }
- RecordSize : word; { total size in bytes of these records }
- end;
-
- (*
- ** The CTLfile consist of the CtlMainHdr, followed by CtlHdr+specific fields
- ** belong with that header.
- *)
-
- Const
- CtlID_Settings=1; { Followed by CtlSettings }
- CtlID_DefaultNode=2; { Followed by NODErecord }
- CtlID_StandardLimits=3; { Followed by StandardLimits }
- CtlID_Groups=4; { followed by GroupSetupAr }
-
- Type
- StandardLimitsRecord=
- record
- nlsecure, { not listed in database, secure session }
- nlunsecure, { not listed in databse, unsecure session }
- nlnodelist : ULnodelimittype;
- { not listed in database, not listed in nodelist }
- end;
- NiceScreenSet = Set of (showfound,showhandling,scroll);
-
- CtlSettings=
- record
- Editor : PathStr; { external editor }
- LogFile : PathStr; { logfile. Empty=use frodo's log }
- CompLogFile : PathStr; { RPcomp logfile, empty use "logfile" }
- SystemPath : PathStr; { Empty=use RP.EXE's home dir }
- WorkDir : PathStr; { for cd-rom }
- ListPath, { default path for list files }
- CCpath, { *.msg dir for copies of response mess. }
- TemplatePath : PathStr; { default path for templates }
- MailerUsed : MailerUsedType; { Mailer used }
- MaxWildCards : byte; { Maximum wildcards }
- NiceScreen : NiceScreenSet;
- SwapOut : Boolean; { swap out on service requests }
- end;
-
-