*
the following include files are needed when compiling on CTOS using the BTOSC compiler. While compiling, use the include option as shown:

I<BTOSC>
I<TCPIP.SOCK>

*


include <ctos.h>
include <systypes.h>
include <netinetin.h>
include <syssocket.h>
include <netdb.h>
include <stdio.h>
include <stdlib.h>
include <string.h>

*transaction status codes*
define QUEUED 0
define ACTIVE 1
define SERVER 2
define DONE  3
define ABORTED 4

*transaction function codes*

define FLIST 2
define DLIST 3
define COPY  4
define APPEND 5
define DELETE 6
define RENAME 7
define ISAM_SEND 8
define ISAM_RCV 9
define ISAM_DEL 10
define ISAM_REN 11

*length of qEntry structure*

define CB_QENTRY 458 


*type definitions*

typedef struct {
char   bFunctionCode;
char   cbSrcFile;
char   cbSrcUser;
char   cbSrcPassword;
char   cbSrcAccount;
char   cbDestFile;
char   cbDestUser;
char   cbDestPassword;
char   cbDestAccount;
char   cbOriginUser;
char   rgbSrcFile[78];
long   rgbSrcHost;
char   rgbSrcUser [30];
char   rgbSrcPassword[32];
char   rgbSrcAccount[10];
char   rgbDestFile[78];
long   rgbDestHost;
char   rgbDestUser[30];
char   rgbDestPassword[32];
char   rgbDestAccount[10];
char   bType; 				* 'A', E,I	*
char   bStructure;			* 'F', R  	*
char   bMode;				* 'N'     	*
char   bFormat;
char   rgbOriginUser[30];
char   cbStatus;
char   bStatus;
char   erc;
char   cbTranNum;
int    wTranNum;
long   startTime;
long   stopTime ;
long   FileSize;
char   cbDataFile;
char   rgbDataFile[38];
char   cbIndexFile;
char   rgbIndexFile[38];
char   fRemoveQEntry;
char   bTimeoutValue;
char   bPriority;
char   Reserved[7];
}qentry;

typedef struct {
char *h_name;
char **h_aliases;
int h_addrtype;
int h_length;
char *h_addr;} h_addr_type;

extern int FTP_ERC;



