home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_08_09
/
8n09071a
< prev
next >
Wrap
Text File
|
1990-06-01
|
2KB
|
56 lines
Listing 4 - RPC Protocol Declarations
/**************************************************************
* remote procedure call protocol definitions *
**************************************************************/
#define RPC_FOPEN_CMD 0x0001 /* fopen session/file command */
#define RPC_FOPEN_RSP 0x8001 /* fopen session/file response */
#define RPC_FCLOSE_CMD 0x0002 /* fclose session/file command */
#define RPC_FCLOSE_RSP 0x8002 /* fclose session/file response */
#define RPC_FREAD_CMD 0x0003 /* fread session/file command */
#define RPC_FREAD_RSP 0x8003 /* fread session/file response */
#define RPC_FWRITE_CMD 0x0004 /* fwrite session/file command */
#define RPC_FWRITE_RSP 0x8004 /* fwrite session/file response */
#define RPC_FEOF_CMD 0x0005 /* feof session/file command */
#define RPC_FEOF_RSP 0x8005 /* feof session/file response */
/**************************************************************
* remote procedure call message definitions *
**************************************************************/
typedef struct { /* RPC header format */
int code; /* command/response opcode */
int csid; /* client session identifier */
int ssid; /* server session identifier */
int dlen; /* data field length value */
} RPC_HDR;
typedef struct { /* RPC command message format (default) */
RPC_HDR hdr; /* standard header */
int res1; /* reserved 1 (unused) */
int res2; /* reserved 2 (unused) */
} RPC_CMD_MSG;
typedef struct { /* RPC response message format (default) */
RPC_HDR hdr; /* standard header */
int status; /* response status */
int errno; /* response errno */
} RPC_RSP_MSG;
typedef struct { /* RPC fopen cmd format */
RPC_HDR hdr; /* standard header */
int fil1; /* filler 1 */
int fil2; /* filler 2 */
char sname[16]; /* server name */
char fname[64]; /* file name */
char ftype[8]; /* file type */
} RPC_FOPEN_CMD_MSG;