home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS 1
/
BBS#1.iso
/
maximus
/
fddev220.arj
/
C.ARJ
/
FDPKT.H
< prev
next >
Wrap
C/C++ Source or Header
|
1993-06-28
|
7KB
|
149 lines
/*
** fdpkt.h
**
** Structures for .FDC and .PKT files
**
** Copyright 1993 Joaquim Homrighausen; All rights reserved.
**
** Last revised: 93-06-21 FrontDoor 2.11+
**
** -------------------------------------------------------------------------
** This information is not necessarily final and is subject to change at any
** given time without further notice
** -------------------------------------------------------------------------
*/
#ifndef __FDPKT_H__
#define __FDPKT_H__
#ifdef __cplusplus
extern "C" {
#endif
/*
** Each .PKT file created by FrontDoor when packing outbound mail has an
** accompanying "shadow" file with the same base filename as the .PKT file
** but with the extension .FDC. This file is used by FrontDoor to determine
** if the system should be called, what files it should send or request,
** etc.
**
** The "ScriptName" field is a Pascal-style string (length byte followed by
** data).
*/
/*
** The .FDC files contains one header followed by zero or more NUL
** terminated entries which denote message (file) names, file attaches,
** and file (possibly update) requests.
**
** Each entry following the header has a leading type byte, followed by
** the data for the type, and terminated by a NUL character.
*/
/* FDC field type flags */
#define FDC_ISFILE 0xe0 /*File attach*/
#define FDC_ISFREQ 0xe1 /*File request*/
#define FDC_ISFUREQ 0xe2 /*File update request*/
#define FDC_ISMSG 0xfd /*Message*/
/* Call status flags (CALLSTATUS) */
#define FDC_UNUSED 0
#define FDC_FAILED 1
#define FDC_SENT 2
#define FDC_HOLD 3
#define FDC_CRASH 4
#define FDC_ACTIVE 5
#define FDC_PRIORITY 6
#define FDC_DELETED 7
/* FDC header, one per .FDC file */
typedef struct
{
unsigned short int Zone, /*Destination address*/
Net,
Node,
Point,
BusyRetry, /*Number of call attempts (max->zero)*/
Resend; /*Number of resend attempts (max->zero)*/
unsigned long PktTime; /*UNIX-style timestamp with event time*/
unsigned short int MsgCount, /*Number of messages in .PKT*/
FileCount, /*Number of files to send*/
FReqCount, /*Number of file requests*/
Cost; /*Cost per minute to system*/
unsigned char CallStatus; /*See above*/
char ScriptName[9]; /*Name of script to use*/
char EventTag; /*During which event tag it was packed*/
}
FDCHEAD;
/*
** FTS-1 (FSC-39 compliant) packet definition used by FrontDoor, TosScan,
** and FrontDoor APX among other products to create .PKT files.
*/
#define CW_2PLUS 0x0001 /*Support for Type 2+ bundles*/
#define CW_N2PLUS 0x0100 /*Validation for CW_2PLUS*/
#define PKTVERSION 2 /*Current packet revision level*/
/* Packet header, one per packet */
typedef struct
{
unsigned short int OrigNode, /*Originating node*/
DestNode, /*Destination node*/
Year, /*Year created (1993-nnnn)*/
Month, /*Month created (0-11)*/
Day, /*Day created (1-31)*/
Hour, /*Hour created (0-23)*/
Minute, /*Minute created (0-59)*/
Second, /*Second created (0-59)*/
Rate, /*Baudrate (unused)*/
Version, /*Packet version (2)*/
OrigNet, /*Originating net*/
DestNet; /*Destination net*/
unsigned char PCodeLo, /*Product code (low-order)*/
PRevMajor, /*Major version*/
Password[8]; /*Packet password (not ASCIIZ)*/
unsigned short int QMOrigZone, /*Originating zone (QMail)*/
QMDestZone, /*Destination zone (QMail)*/
AuxNet, /*Auxillary net (unused)*/
CWValidate; /*CapWord validation*/
unsigned char PCodeHi, /*Product code (high-order)*/
PRevMinor; /*Minor version*/
unsigned short int CWCapWord, /*Capabilities*/
OrigZone, /*Originating zone (FSC-39)*/
DestZone, /*Destination zone (FSC-39)*/
OrigPoint, /*Originating point (FSC-39)*/
DestPoint; /*Destination point (FSC-39)*/
unsigned long LongData; /*Product dependent information*/
}
FTS1PKTHDR;
/* Packed message, none or more per packet */
typedef struct
{
unsigned short int Version, /*Packet version (2)*/
OrigNode, /*Originating node*/
DestNode, /*Destination node*/
OrigNet, /*Originating net*/
DestNet, /*Destination net*/
Attr, /*FTS1 status*/
Cost; /*Cost of message*/
/*
** The message header follows this but is of variable length ASCIIZ
** strings in the order: AsciiDate, ToUser, FromUser, Subject, and
** MsgText.
*/
}
FTS1PKTMSG;
#ifdef __cplusplus
}
#endif
#endif
/* end of file "fdpkt.h" */