home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Support Encyclopedia 96-1
/
novell-nsepro-1996-1-cd2.iso
/
download
/
netware
/
dax1.exe
/
CP
/
CPS
/
CPS.H
< prev
next >
Wrap
Text File
|
1992-07-15
|
4KB
|
78 lines
// ╔════════════════════════════════════════════════════════════════════╗
// ║ ║
// ║ module: cps.h ║
// ║ ║
// ║ This software is provided as is and carries no warranty ║
// ║ whatsoever. Novell disclaims and excludes any and all implied ║
// ║ warranties of merchantability, title and fitness for a particular ║
// ║ purpose. Novell does not warrant that the software will satisfy ║
// ║ your requirements or that the software is without defect or error ║
// ║ or that operation of the software will be uninterrupted. You are ║
// ║ using the software at your risk. The software is not a product ║
// ║ of Novell, Inc. or any of subsidiaries. ║
// ║ ║
// ╟────────────────────────────────────────────────────────────────────╢
// ║ maintenance history: ║
// ║ level date pi description ║
// ╟────────────────────────────────────────────────────────────────────╢
// ║ 001 01/28/92 kl initial release. ║
// ╚════════════════════════════════════════════════════════════════════╝
#if !defined(CPSHDR)
#define CPSHDR
#include <nwtypes.h>
#include <nwipxspx.h>
#define CPSNUMSENDELEM 3
#define CPSNUMRECVELEM 20 //!! how high should this go?
#define CPSDEFNUMCLNTS 50 //!! make this dynamic...
#define CPSCTHRESHHOLD 10
#define ECB_IN_USE(ecb) ((ecb).status > 0 && (ecb).status < 0xF000)
#define ECBp_IN_USE(ecbp) ((ecbp)->status > 0 && (ecbp)->status < 0xF000)
//------------------------------------------------------------------------
//
// Create a structure that holds everything we need to send/recv data
// on a session between the client and server. We'll have an array of
// these on the server side.
//
typedef struct{
IPX_ECB ecb;
IPX_HEADER ipx;
CPMESSAGE cpmsg;
}CPCOMMDATA;
//------------------------------------------------------------------------
//
// Create a structure that has what we need to keep track of a session.
// A pointer to this structure is given to the DAP Layer, and it uses
// this on all calls to the CP Layer.
//
typedef struct{
UINT32 sip; // session in progress flag
InternetAddress ipxaddr; // network address of client
CPHEADER cphdr; // header for cp layer between client/server
}CPDATA;
extern int RenameThread(int,char *);
extern CPDATA *CPGetClientInfo(LONG index);
extern UINT32 CPGetSessionID(IPX_HEADER *IPXhdr, CPMESSAGE *CPmsg);
extern T_RC CPInitializeConnLogic(void);
extern T_RC CPDeInitializeConnLogic(void);
extern WORD CPGetAdvertisingSocket(void);
extern int (*_CPioRoutine)(char *,...);
extern int __CPIgnoreIO(char *fmt, ...);
extern T_RC CPInitializeRecvLogic(void (*EnqueueRequestAPI)(UINT32, void *));
extern void CPDeInitializeRecvLogic(void);
extern T_RC CPInitializeSendLogic(void);
extern T_RC CPSendMessage(UINT32 sessionID, void *data, unsigned length);
extern T_RC CPDeInitializeSendLogic(void);
extern void CPInitSendPacket(WORD socket,IPX_ECB *ecb,IPX_HEADER *hdr,void *request,WORD sizeRequest);
extern void CPInitRecvPacket(WORD socket,long semHandle,IPX_ECB **queueHead,IPX_ECB *ecb,IPX_HEADER *hdr,void *reply,WORD sizeReply);
#endif