import VXI RPC Language description
along with the corresponding rpcgen generated source code files
This commit is contained in:
parent
1c183900d2
commit
c84b6ab81c
|
@ -0,0 +1,342 @@
|
|||
/*
|
||||
* Please do not edit this file.
|
||||
* It was generated using rpcgen.
|
||||
*/
|
||||
|
||||
#ifndef _VXI_H_RPCGEN
|
||||
#define _VXI_H_RPCGEN
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
typedef long Device_Link;
|
||||
|
||||
enum Device_AddrFamily {
|
||||
DEVICE_TCP = 0,
|
||||
DEVICE_UDP = 1,
|
||||
};
|
||||
typedef enum Device_AddrFamily Device_AddrFamily;
|
||||
|
||||
typedef long Device_Flags;
|
||||
|
||||
typedef long Device_ErrorCode;
|
||||
|
||||
struct Device_Error {
|
||||
Device_ErrorCode error;
|
||||
};
|
||||
typedef struct Device_Error Device_Error;
|
||||
|
||||
struct Create_LinkParms {
|
||||
long clientId;
|
||||
bool_t lockDevice;
|
||||
u_long lock_timeout;
|
||||
char *device;
|
||||
};
|
||||
typedef struct Create_LinkParms Create_LinkParms;
|
||||
|
||||
struct Create_LinkResp {
|
||||
Device_ErrorCode error;
|
||||
Device_Link lid;
|
||||
u_short abortPort;
|
||||
u_long maxRecvSize;
|
||||
};
|
||||
typedef struct Create_LinkResp Create_LinkResp;
|
||||
|
||||
struct Device_WriteParms {
|
||||
Device_Link lid;
|
||||
u_long io_timeout;
|
||||
u_long lock_timeout;
|
||||
Device_Flags flags;
|
||||
struct {
|
||||
u_int data_len;
|
||||
char *data_val;
|
||||
} data;
|
||||
};
|
||||
typedef struct Device_WriteParms Device_WriteParms;
|
||||
|
||||
struct Device_WriteResp {
|
||||
Device_ErrorCode error;
|
||||
u_long size;
|
||||
};
|
||||
typedef struct Device_WriteResp Device_WriteResp;
|
||||
|
||||
struct Device_ReadParms {
|
||||
Device_Link lid;
|
||||
u_long requestSize;
|
||||
u_long io_timeout;
|
||||
u_long lock_timeout;
|
||||
Device_Flags flags;
|
||||
char termChar;
|
||||
};
|
||||
typedef struct Device_ReadParms Device_ReadParms;
|
||||
|
||||
struct Device_ReadResp {
|
||||
Device_ErrorCode error;
|
||||
long reason;
|
||||
struct {
|
||||
u_int data_len;
|
||||
char *data_val;
|
||||
} data;
|
||||
};
|
||||
typedef struct Device_ReadResp Device_ReadResp;
|
||||
|
||||
struct Device_ReadStbResp {
|
||||
Device_ErrorCode error;
|
||||
u_char stb;
|
||||
};
|
||||
typedef struct Device_ReadStbResp Device_ReadStbResp;
|
||||
|
||||
struct Device_GenericParms {
|
||||
Device_Link lid;
|
||||
Device_Flags flags;
|
||||
u_long lock_timeout;
|
||||
u_long io_timeout;
|
||||
};
|
||||
typedef struct Device_GenericParms Device_GenericParms;
|
||||
|
||||
struct Device_RemoteFunc {
|
||||
u_long hostAddr;
|
||||
u_short hostPort;
|
||||
u_long progNum;
|
||||
u_long progVers;
|
||||
Device_AddrFamily progFamily;
|
||||
};
|
||||
typedef struct Device_RemoteFunc Device_RemoteFunc;
|
||||
|
||||
struct Device_EnableSrqParms {
|
||||
Device_Link lid;
|
||||
bool_t enable;
|
||||
struct {
|
||||
u_int handle_len;
|
||||
char *handle_val;
|
||||
} handle;
|
||||
};
|
||||
typedef struct Device_EnableSrqParms Device_EnableSrqParms;
|
||||
|
||||
struct Device_LockParms {
|
||||
Device_Link lid;
|
||||
Device_Flags flags;
|
||||
u_long lock_timeout;
|
||||
};
|
||||
typedef struct Device_LockParms Device_LockParms;
|
||||
|
||||
struct Device_DocmdParms {
|
||||
Device_Link lid;
|
||||
Device_Flags flags;
|
||||
u_long io_timeout;
|
||||
u_long lock_timeout;
|
||||
long cmd;
|
||||
bool_t network_order;
|
||||
long datasize;
|
||||
struct {
|
||||
u_int data_in_len;
|
||||
char *data_in_val;
|
||||
} data_in;
|
||||
};
|
||||
typedef struct Device_DocmdParms Device_DocmdParms;
|
||||
|
||||
struct Device_DocmdResp {
|
||||
Device_ErrorCode error;
|
||||
struct {
|
||||
u_int data_out_len;
|
||||
char *data_out_val;
|
||||
} data_out;
|
||||
};
|
||||
typedef struct Device_DocmdResp Device_DocmdResp;
|
||||
|
||||
struct Device_SrqParms {
|
||||
struct {
|
||||
u_int handle_len;
|
||||
char *handle_val;
|
||||
} handle;
|
||||
};
|
||||
typedef struct Device_SrqParms Device_SrqParms;
|
||||
|
||||
#define DEVICE_ASYNC 0x0607B0
|
||||
#define DEVICE_ASYNC_VERSION 1
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#define device_abort 1
|
||||
extern Device_Error * device_abort_1(Device_Link *, CLIENT *);
|
||||
extern Device_Error * device_abort_1_svc(Device_Link *, struct svc_req *);
|
||||
extern int device_async_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
|
||||
|
||||
#else /* K&R C */
|
||||
#define device_abort 1
|
||||
extern Device_Error * device_abort_1();
|
||||
extern Device_Error * device_abort_1_svc();
|
||||
extern int device_async_1_freeresult ();
|
||||
#endif /* K&R C */
|
||||
|
||||
#define DEVICE_CORE 0x0607AF
|
||||
#define DEVICE_CORE_VERSION 1
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#define create_link 10
|
||||
extern Create_LinkResp * create_link_1(Create_LinkParms *, CLIENT *);
|
||||
extern Create_LinkResp * create_link_1_svc(Create_LinkParms *, struct svc_req *);
|
||||
#define device_write 11
|
||||
extern Device_WriteResp * device_write_1(Device_WriteParms *, CLIENT *);
|
||||
extern Device_WriteResp * device_write_1_svc(Device_WriteParms *, struct svc_req *);
|
||||
#define device_read 12
|
||||
extern Device_ReadResp * device_read_1(Device_ReadParms *, CLIENT *);
|
||||
extern Device_ReadResp * device_read_1_svc(Device_ReadParms *, struct svc_req *);
|
||||
#define device_readstb 13
|
||||
extern Device_ReadStbResp * device_readstb_1(Device_GenericParms *, CLIENT *);
|
||||
extern Device_ReadStbResp * device_readstb_1_svc(Device_GenericParms *, struct svc_req *);
|
||||
#define device_trigger 14
|
||||
extern Device_Error * device_trigger_1(Device_GenericParms *, CLIENT *);
|
||||
extern Device_Error * device_trigger_1_svc(Device_GenericParms *, struct svc_req *);
|
||||
#define device_clear 15
|
||||
extern Device_Error * device_clear_1(Device_GenericParms *, CLIENT *);
|
||||
extern Device_Error * device_clear_1_svc(Device_GenericParms *, struct svc_req *);
|
||||
#define device_remote 16
|
||||
extern Device_Error * device_remote_1(Device_GenericParms *, CLIENT *);
|
||||
extern Device_Error * device_remote_1_svc(Device_GenericParms *, struct svc_req *);
|
||||
#define device_local 17
|
||||
extern Device_Error * device_local_1(Device_GenericParms *, CLIENT *);
|
||||
extern Device_Error * device_local_1_svc(Device_GenericParms *, struct svc_req *);
|
||||
#define device_lock 18
|
||||
extern Device_Error * device_lock_1(Device_LockParms *, CLIENT *);
|
||||
extern Device_Error * device_lock_1_svc(Device_LockParms *, struct svc_req *);
|
||||
#define device_unlock 19
|
||||
extern Device_Error * device_unlock_1(Device_Link *, CLIENT *);
|
||||
extern Device_Error * device_unlock_1_svc(Device_Link *, struct svc_req *);
|
||||
#define device_enable_srq 20
|
||||
extern Device_Error * device_enable_srq_1(Device_EnableSrqParms *, CLIENT *);
|
||||
extern Device_Error * device_enable_srq_1_svc(Device_EnableSrqParms *, struct svc_req *);
|
||||
#define device_docmd 22
|
||||
extern Device_DocmdResp * device_docmd_1(Device_DocmdParms *, CLIENT *);
|
||||
extern Device_DocmdResp * device_docmd_1_svc(Device_DocmdParms *, struct svc_req *);
|
||||
#define destroy_link 23
|
||||
extern Device_Error * destroy_link_1(Device_Link *, CLIENT *);
|
||||
extern Device_Error * destroy_link_1_svc(Device_Link *, struct svc_req *);
|
||||
#define create_intr_chan 25
|
||||
extern Device_Error * create_intr_chan_1(Device_RemoteFunc *, CLIENT *);
|
||||
extern Device_Error * create_intr_chan_1_svc(Device_RemoteFunc *, struct svc_req *);
|
||||
#define destroy_intr_chan 26
|
||||
extern Device_Error * destroy_intr_chan_1(void *, CLIENT *);
|
||||
extern Device_Error * destroy_intr_chan_1_svc(void *, struct svc_req *);
|
||||
extern int device_core_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
|
||||
|
||||
#else /* K&R C */
|
||||
#define create_link 10
|
||||
extern Create_LinkResp * create_link_1();
|
||||
extern Create_LinkResp * create_link_1_svc();
|
||||
#define device_write 11
|
||||
extern Device_WriteResp * device_write_1();
|
||||
extern Device_WriteResp * device_write_1_svc();
|
||||
#define device_read 12
|
||||
extern Device_ReadResp * device_read_1();
|
||||
extern Device_ReadResp * device_read_1_svc();
|
||||
#define device_readstb 13
|
||||
extern Device_ReadStbResp * device_readstb_1();
|
||||
extern Device_ReadStbResp * device_readstb_1_svc();
|
||||
#define device_trigger 14
|
||||
extern Device_Error * device_trigger_1();
|
||||
extern Device_Error * device_trigger_1_svc();
|
||||
#define device_clear 15
|
||||
extern Device_Error * device_clear_1();
|
||||
extern Device_Error * device_clear_1_svc();
|
||||
#define device_remote 16
|
||||
extern Device_Error * device_remote_1();
|
||||
extern Device_Error * device_remote_1_svc();
|
||||
#define device_local 17
|
||||
extern Device_Error * device_local_1();
|
||||
extern Device_Error * device_local_1_svc();
|
||||
#define device_lock 18
|
||||
extern Device_Error * device_lock_1();
|
||||
extern Device_Error * device_lock_1_svc();
|
||||
#define device_unlock 19
|
||||
extern Device_Error * device_unlock_1();
|
||||
extern Device_Error * device_unlock_1_svc();
|
||||
#define device_enable_srq 20
|
||||
extern Device_Error * device_enable_srq_1();
|
||||
extern Device_Error * device_enable_srq_1_svc();
|
||||
#define device_docmd 22
|
||||
extern Device_DocmdResp * device_docmd_1();
|
||||
extern Device_DocmdResp * device_docmd_1_svc();
|
||||
#define destroy_link 23
|
||||
extern Device_Error * destroy_link_1();
|
||||
extern Device_Error * destroy_link_1_svc();
|
||||
#define create_intr_chan 25
|
||||
extern Device_Error * create_intr_chan_1();
|
||||
extern Device_Error * create_intr_chan_1_svc();
|
||||
#define destroy_intr_chan 26
|
||||
extern Device_Error * destroy_intr_chan_1();
|
||||
extern Device_Error * destroy_intr_chan_1_svc();
|
||||
extern int device_core_1_freeresult ();
|
||||
#endif /* K&R C */
|
||||
|
||||
#define DEVICE_INTR 0x0607B1
|
||||
#define DEVICE_INTR_VERSION 1
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#define device_intr_srq 30
|
||||
extern void * device_intr_srq_1(Device_SrqParms *, CLIENT *);
|
||||
extern void * device_intr_srq_1_svc(Device_SrqParms *, struct svc_req *);
|
||||
extern int device_intr_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
|
||||
|
||||
#else /* K&R C */
|
||||
#define device_intr_srq 30
|
||||
extern void * device_intr_srq_1();
|
||||
extern void * device_intr_srq_1_svc();
|
||||
extern int device_intr_1_freeresult ();
|
||||
#endif /* K&R C */
|
||||
|
||||
/* the xdr functions */
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern bool_t xdr_Device_Link (XDR *, Device_Link*);
|
||||
extern bool_t xdr_Device_AddrFamily (XDR *, Device_AddrFamily*);
|
||||
extern bool_t xdr_Device_Flags (XDR *, Device_Flags*);
|
||||
extern bool_t xdr_Device_ErrorCode (XDR *, Device_ErrorCode*);
|
||||
extern bool_t xdr_Device_Error (XDR *, Device_Error*);
|
||||
extern bool_t xdr_Create_LinkParms (XDR *, Create_LinkParms*);
|
||||
extern bool_t xdr_Create_LinkResp (XDR *, Create_LinkResp*);
|
||||
extern bool_t xdr_Device_WriteParms (XDR *, Device_WriteParms*);
|
||||
extern bool_t xdr_Device_WriteResp (XDR *, Device_WriteResp*);
|
||||
extern bool_t xdr_Device_ReadParms (XDR *, Device_ReadParms*);
|
||||
extern bool_t xdr_Device_ReadResp (XDR *, Device_ReadResp*);
|
||||
extern bool_t xdr_Device_ReadStbResp (XDR *, Device_ReadStbResp*);
|
||||
extern bool_t xdr_Device_GenericParms (XDR *, Device_GenericParms*);
|
||||
extern bool_t xdr_Device_RemoteFunc (XDR *, Device_RemoteFunc*);
|
||||
extern bool_t xdr_Device_EnableSrqParms (XDR *, Device_EnableSrqParms*);
|
||||
extern bool_t xdr_Device_LockParms (XDR *, Device_LockParms*);
|
||||
extern bool_t xdr_Device_DocmdParms (XDR *, Device_DocmdParms*);
|
||||
extern bool_t xdr_Device_DocmdResp (XDR *, Device_DocmdResp*);
|
||||
extern bool_t xdr_Device_SrqParms (XDR *, Device_SrqParms*);
|
||||
|
||||
#else /* K&R C */
|
||||
extern bool_t xdr_Device_Link ();
|
||||
extern bool_t xdr_Device_AddrFamily ();
|
||||
extern bool_t xdr_Device_Flags ();
|
||||
extern bool_t xdr_Device_ErrorCode ();
|
||||
extern bool_t xdr_Device_Error ();
|
||||
extern bool_t xdr_Create_LinkParms ();
|
||||
extern bool_t xdr_Create_LinkResp ();
|
||||
extern bool_t xdr_Device_WriteParms ();
|
||||
extern bool_t xdr_Device_WriteResp ();
|
||||
extern bool_t xdr_Device_ReadParms ();
|
||||
extern bool_t xdr_Device_ReadResp ();
|
||||
extern bool_t xdr_Device_ReadStbResp ();
|
||||
extern bool_t xdr_Device_GenericParms ();
|
||||
extern bool_t xdr_Device_RemoteFunc ();
|
||||
extern bool_t xdr_Device_EnableSrqParms ();
|
||||
extern bool_t xdr_Device_LockParms ();
|
||||
extern bool_t xdr_Device_DocmdParms ();
|
||||
extern bool_t xdr_Device_DocmdResp ();
|
||||
extern bool_t xdr_Device_SrqParms ();
|
||||
|
||||
#endif /* K&R C */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_VXI_H_RPCGEN */
|
|
@ -0,0 +1,143 @@
|
|||
/* This is taken straight from Appendix C of the specification */
|
||||
|
||||
typedef long Device_Link;
|
||||
|
||||
enum Device_AddrFamily {
|
||||
DEVICE_TCP,
|
||||
DEVICE_UDP
|
||||
};
|
||||
|
||||
typedef long Device_Flags;
|
||||
|
||||
typedef long Device_ErrorCode;
|
||||
|
||||
struct Device_Error {
|
||||
Device_ErrorCode error;
|
||||
};
|
||||
|
||||
struct Create_LinkParms {
|
||||
long clientId; /* implementation specific value */
|
||||
bool lockDevice; /* attempt to lock the device */
|
||||
unsigned long lock_timeout; /* time to wait on a lock */
|
||||
string device<>; /* name of device */
|
||||
};
|
||||
|
||||
struct Create_LinkResp {
|
||||
Device_ErrorCode error;
|
||||
Device_Link lid;
|
||||
unsigned short abortPort; /* for the abort RPC */
|
||||
unsigned long maxRecvSize; /* specifies max data size in bytes
|
||||
device will accept on a write */
|
||||
};
|
||||
|
||||
struct Device_WriteParms {
|
||||
Device_Link lid; /* link id from create_link */
|
||||
unsigned long io_timeout; /* time to wait for I/O */
|
||||
unsigned long lock_timeout; /* time to wait for lock */
|
||||
Device_Flags flags;
|
||||
opaque data<>; /* data length and the data itself */
|
||||
};
|
||||
|
||||
struct Device_WriteResp {
|
||||
Device_ErrorCode error;
|
||||
unsigned long size; /* number of bytes written */
|
||||
};
|
||||
|
||||
struct Device_ReadParms {
|
||||
Device_Link lid; /* link id from create_link */
|
||||
unsigned long requestSize; /* bytes requested */
|
||||
unsigned long io_timeout; /* time to wait for I/O */
|
||||
unsigned long lock_timeout; /* time to wait for lock */
|
||||
Device_Flags flags;
|
||||
char termChar; /* valid if flags & termchrset */
|
||||
};
|
||||
|
||||
struct Device_ReadResp {
|
||||
Device_ErrorCode error;
|
||||
long reason; /* reason(s) read completed */
|
||||
opaque data<>; /* data.len and data.val */
|
||||
};
|
||||
|
||||
struct Device_ReadStbResp {
|
||||
Device_ErrorCode error; /* error code */
|
||||
unsigned char stb; /* the returned status byte */
|
||||
};
|
||||
|
||||
struct Device_GenericParms {
|
||||
Device_Link lid; /* Device_Link id from connect call */
|
||||
Device_Flags flags; /* flags with options */
|
||||
unsigned long lock_timeout; /* time to wait for lock */
|
||||
unsigned long io_timeout; /* time to wait for I/O */
|
||||
};
|
||||
|
||||
struct Device_RemoteFunc {
|
||||
unsigned long hostAddr; /* host servicing interrupt */
|
||||
unsigned short hostPort; /* valid port # on client */
|
||||
unsigned long progNum; /* DEVICE_INTR */
|
||||
unsigned long progVers; /* DEVICE_INTR_VERSION */
|
||||
Device_AddrFamily progFamily; /* DEVICE_UDP | DEVICE_TCP */
|
||||
};
|
||||
|
||||
struct Device_EnableSrqParms {
|
||||
Device_Link lid;
|
||||
bool enable; /* enable or disable interrupts */
|
||||
opaque handle<40>; /* host specific data */
|
||||
};
|
||||
|
||||
struct Device_LockParms {
|
||||
Device_Link lid; /* link id from create_link */
|
||||
Device_Flags flags; /* contains the waitlock flag */
|
||||
unsigned long lock_timeout; /* time to wait to acquire lock */
|
||||
};
|
||||
|
||||
struct Device_DocmdParms {
|
||||
Device_Link lid; /* link id from create_link */
|
||||
Device_Flags flags; /* flags specifying various options */
|
||||
unsigned long io_timeout; /* time to wait for I/O to complete */
|
||||
unsigned long lock_timeout; /* time to wait on a lock */
|
||||
long cmd; /* which command to execute */
|
||||
bool network_order; /* client's byte order */
|
||||
long datasize; /* size of individual data elements */
|
||||
opaque data_in<>; /* docmd data parameters */
|
||||
};
|
||||
|
||||
struct Device_DocmdResp {
|
||||
Device_ErrorCode error; /* returned status */
|
||||
opaque data_out<>; /* returned data parameter */
|
||||
};
|
||||
|
||||
struct Device_SrqParms {
|
||||
opaque handle<>;
|
||||
};
|
||||
|
||||
program DEVICE_ASYNC{
|
||||
version DEVICE_ASYNC_VERSION {
|
||||
Device_Error device_abort(Device_Link) = 1;
|
||||
} = 1;
|
||||
} = 0x0607B0;
|
||||
|
||||
program DEVICE_CORE {
|
||||
version DEVICE_CORE_VERSION {
|
||||
Create_LinkResp create_link(Create_LinkParms) = 10;
|
||||
Device_WriteResp device_write(Device_WriteParms) = 11;
|
||||
Device_ReadResp device_read(Device_ReadParms) = 12;
|
||||
Device_ReadStbResp device_readstb(Device_GenericParms) = 13;
|
||||
Device_Error device_trigger(Device_GenericParms) = 14;
|
||||
Device_Error device_clear(Device_GenericParms) = 15;
|
||||
Device_Error device_remote(Device_GenericParms) = 16;
|
||||
Device_Error device_local(Device_GenericParms) = 17;
|
||||
Device_Error device_lock(Device_LockParms) = 18;
|
||||
Device_Error device_unlock(Device_Link) = 19;
|
||||
Device_Error device_enable_srq(Device_EnableSrqParms)= 20;
|
||||
Device_DocmdResp device_docmd(Device_DocmdParms) = 22;
|
||||
Device_Error destroy_link(Device_Link) = 23;
|
||||
Device_Error create_intr_chan(Device_RemoteFunc) = 25;
|
||||
Device_Error destroy_intr_chan(void) = 26;
|
||||
} = 1;
|
||||
} = 0x0607AF;
|
||||
|
||||
program DEVICE_INTR {
|
||||
version DEVICE_INTR_VERSION {
|
||||
void device_intr_srq(Device_SrqParms) = 30;
|
||||
} = 1;
|
||||
} = 0x0607B1;
|
|
@ -0,0 +1,265 @@
|
|||
/*
|
||||
* Please do not edit this file.
|
||||
* It was generated using rpcgen.
|
||||
*/
|
||||
|
||||
#include <memory.h> /* for memset */
|
||||
#include "vxi.h"
|
||||
|
||||
/* Default timeout can be changed using clnt_control() */
|
||||
static struct timeval TIMEOUT = { 25, 0 };
|
||||
|
||||
Device_Error *
|
||||
device_abort_1(Device_Link *argp, CLIENT *clnt)
|
||||
{
|
||||
static Device_Error clnt_res;
|
||||
|
||||
memset((char *)&clnt_res, 0, sizeof(clnt_res));
|
||||
if (clnt_call (clnt, device_abort,
|
||||
(xdrproc_t) xdr_Device_Link, (caddr_t) argp,
|
||||
(xdrproc_t) xdr_Device_Error, (caddr_t) &clnt_res,
|
||||
TIMEOUT) != RPC_SUCCESS) {
|
||||
return (NULL);
|
||||
}
|
||||
return (&clnt_res);
|
||||
}
|
||||
|
||||
Create_LinkResp *
|
||||
create_link_1(Create_LinkParms *argp, CLIENT *clnt)
|
||||
{
|
||||
static Create_LinkResp clnt_res;
|
||||
|
||||
memset((char *)&clnt_res, 0, sizeof(clnt_res));
|
||||
if (clnt_call (clnt, create_link,
|
||||
(xdrproc_t) xdr_Create_LinkParms, (caddr_t) argp,
|
||||
(xdrproc_t) xdr_Create_LinkResp, (caddr_t) &clnt_res,
|
||||
TIMEOUT) != RPC_SUCCESS) {
|
||||
return (NULL);
|
||||
}
|
||||
return (&clnt_res);
|
||||
}
|
||||
|
||||
Device_WriteResp *
|
||||
device_write_1(Device_WriteParms *argp, CLIENT *clnt)
|
||||
{
|
||||
static Device_WriteResp clnt_res;
|
||||
|
||||
memset((char *)&clnt_res, 0, sizeof(clnt_res));
|
||||
if (clnt_call (clnt, device_write,
|
||||
(xdrproc_t) xdr_Device_WriteParms, (caddr_t) argp,
|
||||
(xdrproc_t) xdr_Device_WriteResp, (caddr_t) &clnt_res,
|
||||
TIMEOUT) != RPC_SUCCESS) {
|
||||
return (NULL);
|
||||
}
|
||||
return (&clnt_res);
|
||||
}
|
||||
|
||||
Device_ReadResp *
|
||||
device_read_1(Device_ReadParms *argp, CLIENT *clnt)
|
||||
{
|
||||
static Device_ReadResp clnt_res;
|
||||
|
||||
memset((char *)&clnt_res, 0, sizeof(clnt_res));
|
||||
if (clnt_call (clnt, device_read,
|
||||
(xdrproc_t) xdr_Device_ReadParms, (caddr_t) argp,
|
||||
(xdrproc_t) xdr_Device_ReadResp, (caddr_t) &clnt_res,
|
||||
TIMEOUT) != RPC_SUCCESS) {
|
||||
return (NULL);
|
||||
}
|
||||
return (&clnt_res);
|
||||
}
|
||||
|
||||
Device_ReadStbResp *
|
||||
device_readstb_1(Device_GenericParms *argp, CLIENT *clnt)
|
||||
{
|
||||
static Device_ReadStbResp clnt_res;
|
||||
|
||||
memset((char *)&clnt_res, 0, sizeof(clnt_res));
|
||||
if (clnt_call (clnt, device_readstb,
|
||||
(xdrproc_t) xdr_Device_GenericParms, (caddr_t) argp,
|
||||
(xdrproc_t) xdr_Device_ReadStbResp, (caddr_t) &clnt_res,
|
||||
TIMEOUT) != RPC_SUCCESS) {
|
||||
return (NULL);
|
||||
}
|
||||
return (&clnt_res);
|
||||
}
|
||||
|
||||
Device_Error *
|
||||
device_trigger_1(Device_GenericParms *argp, CLIENT *clnt)
|
||||
{
|
||||
static Device_Error clnt_res;
|
||||
|
||||
memset((char *)&clnt_res, 0, sizeof(clnt_res));
|
||||
if (clnt_call (clnt, device_trigger,
|
||||
(xdrproc_t) xdr_Device_GenericParms, (caddr_t) argp,
|
||||
(xdrproc_t) xdr_Device_Error, (caddr_t) &clnt_res,
|
||||
TIMEOUT) != RPC_SUCCESS) {
|
||||
return (NULL);
|
||||
}
|
||||
return (&clnt_res);
|
||||
}
|
||||
|
||||
Device_Error *
|
||||
device_clear_1(Device_GenericParms *argp, CLIENT *clnt)
|
||||
{
|
||||
static Device_Error clnt_res;
|
||||
|
||||
memset((char *)&clnt_res, 0, sizeof(clnt_res));
|
||||
if (clnt_call (clnt, device_clear,
|
||||
(xdrproc_t) xdr_Device_GenericParms, (caddr_t) argp,
|
||||
(xdrproc_t) xdr_Device_Error, (caddr_t) &clnt_res,
|
||||
TIMEOUT) != RPC_SUCCESS) {
|
||||
return (NULL);
|
||||
}
|
||||
return (&clnt_res);
|
||||
}
|
||||
|
||||
Device_Error *
|
||||
device_remote_1(Device_GenericParms *argp, CLIENT *clnt)
|
||||
{
|
||||
static Device_Error clnt_res;
|
||||
|
||||
memset((char *)&clnt_res, 0, sizeof(clnt_res));
|
||||
if (clnt_call (clnt, device_remote,
|
||||
(xdrproc_t) xdr_Device_GenericParms, (caddr_t) argp,
|
||||
(xdrproc_t) xdr_Device_Error, (caddr_t) &clnt_res,
|
||||
TIMEOUT) != RPC_SUCCESS) {
|
||||
return (NULL);
|
||||
}
|
||||
return (&clnt_res);
|
||||
}
|
||||
|
||||
Device_Error *
|
||||
device_local_1(Device_GenericParms *argp, CLIENT *clnt)
|
||||
{
|
||||
static Device_Error clnt_res;
|
||||
|
||||
memset((char *)&clnt_res, 0, sizeof(clnt_res));
|
||||
if (clnt_call (clnt, device_local,
|
||||
(xdrproc_t) xdr_Device_GenericParms, (caddr_t) argp,
|
||||
(xdrproc_t) xdr_Device_Error, (caddr_t) &clnt_res,
|
||||
TIMEOUT) != RPC_SUCCESS) {
|
||||
return (NULL);
|
||||
}
|
||||
return (&clnt_res);
|
||||
}
|
||||
|
||||
Device_Error *
|
||||
device_lock_1(Device_LockParms *argp, CLIENT *clnt)
|
||||
{
|
||||
static Device_Error clnt_res;
|
||||
|
||||
memset((char *)&clnt_res, 0, sizeof(clnt_res));
|
||||
if (clnt_call (clnt, device_lock,
|
||||
(xdrproc_t) xdr_Device_LockParms, (caddr_t) argp,
|
||||
(xdrproc_t) xdr_Device_Error, (caddr_t) &clnt_res,
|
||||
TIMEOUT) != RPC_SUCCESS) {
|
||||
return (NULL);
|
||||
}
|
||||
return (&clnt_res);
|
||||
}
|
||||
|
||||
Device_Error *
|
||||
device_unlock_1(Device_Link *argp, CLIENT *clnt)
|
||||
{
|
||||
static Device_Error clnt_res;
|
||||
|
||||
memset((char *)&clnt_res, 0, sizeof(clnt_res));
|
||||
if (clnt_call (clnt, device_unlock,
|
||||
(xdrproc_t) xdr_Device_Link, (caddr_t) argp,
|
||||
(xdrproc_t) xdr_Device_Error, (caddr_t) &clnt_res,
|
||||
TIMEOUT) != RPC_SUCCESS) {
|
||||
return (NULL);
|
||||
}
|
||||
return (&clnt_res);
|
||||
}
|
||||
|
||||
Device_Error *
|
||||
device_enable_srq_1(Device_EnableSrqParms *argp, CLIENT *clnt)
|
||||
{
|
||||
static Device_Error clnt_res;
|
||||
|
||||
memset((char *)&clnt_res, 0, sizeof(clnt_res));
|
||||
if (clnt_call (clnt, device_enable_srq,
|
||||
(xdrproc_t) xdr_Device_EnableSrqParms, (caddr_t) argp,
|
||||
(xdrproc_t) xdr_Device_Error, (caddr_t) &clnt_res,
|
||||
TIMEOUT) != RPC_SUCCESS) {
|
||||
return (NULL);
|
||||
}
|
||||
return (&clnt_res);
|
||||
}
|
||||
|
||||
Device_DocmdResp *
|
||||
device_docmd_1(Device_DocmdParms *argp, CLIENT *clnt)
|
||||
{
|
||||
static Device_DocmdResp clnt_res;
|
||||
|
||||
memset((char *)&clnt_res, 0, sizeof(clnt_res));
|
||||
if (clnt_call (clnt, device_docmd,
|
||||
(xdrproc_t) xdr_Device_DocmdParms, (caddr_t) argp,
|
||||
(xdrproc_t) xdr_Device_DocmdResp, (caddr_t) &clnt_res,
|
||||
TIMEOUT) != RPC_SUCCESS) {
|
||||
return (NULL);
|
||||
}
|
||||
return (&clnt_res);
|
||||
}
|
||||
|
||||
Device_Error *
|
||||
destroy_link_1(Device_Link *argp, CLIENT *clnt)
|
||||
{
|
||||
static Device_Error clnt_res;
|
||||
|
||||
memset((char *)&clnt_res, 0, sizeof(clnt_res));
|
||||
if (clnt_call (clnt, destroy_link,
|
||||
(xdrproc_t) xdr_Device_Link, (caddr_t) argp,
|
||||
(xdrproc_t) xdr_Device_Error, (caddr_t) &clnt_res,
|
||||
TIMEOUT) != RPC_SUCCESS) {
|
||||
return (NULL);
|
||||
}
|
||||
return (&clnt_res);
|
||||
}
|
||||
|
||||
Device_Error *
|
||||
create_intr_chan_1(Device_RemoteFunc *argp, CLIENT *clnt)
|
||||
{
|
||||
static Device_Error clnt_res;
|
||||
|
||||
memset((char *)&clnt_res, 0, sizeof(clnt_res));
|
||||
if (clnt_call (clnt, create_intr_chan,
|
||||
(xdrproc_t) xdr_Device_RemoteFunc, (caddr_t) argp,
|
||||
(xdrproc_t) xdr_Device_Error, (caddr_t) &clnt_res,
|
||||
TIMEOUT) != RPC_SUCCESS) {
|
||||
return (NULL);
|
||||
}
|
||||
return (&clnt_res);
|
||||
}
|
||||
|
||||
Device_Error *
|
||||
destroy_intr_chan_1(void *argp, CLIENT *clnt)
|
||||
{
|
||||
static Device_Error clnt_res;
|
||||
|
||||
memset((char *)&clnt_res, 0, sizeof(clnt_res));
|
||||
if (clnt_call (clnt, destroy_intr_chan,
|
||||
(xdrproc_t) xdr_void, (caddr_t) argp,
|
||||
(xdrproc_t) xdr_Device_Error, (caddr_t) &clnt_res,
|
||||
TIMEOUT) != RPC_SUCCESS) {
|
||||
return (NULL);
|
||||
}
|
||||
return (&clnt_res);
|
||||
}
|
||||
|
||||
void *
|
||||
device_intr_srq_1(Device_SrqParms *argp, CLIENT *clnt)
|
||||
{
|
||||
static char clnt_res;
|
||||
|
||||
memset((char *)&clnt_res, 0, sizeof(clnt_res));
|
||||
if (clnt_call (clnt, device_intr_srq,
|
||||
(xdrproc_t) xdr_Device_SrqParms, (caddr_t) argp,
|
||||
(xdrproc_t) xdr_void, (caddr_t) &clnt_res,
|
||||
TIMEOUT) != RPC_SUCCESS) {
|
||||
return (NULL);
|
||||
}
|
||||
return ((void *)&clnt_res);
|
||||
}
|
|
@ -0,0 +1,428 @@
|
|||
/*
|
||||
* Please do not edit this file.
|
||||
* It was generated using rpcgen.
|
||||
*/
|
||||
|
||||
#include "vxi.h"
|
||||
|
||||
bool_t
|
||||
xdr_Device_Link (XDR *xdrs, Device_Link *objp)
|
||||
{
|
||||
if (!xdr_long (xdrs, objp))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_Device_AddrFamily (XDR *xdrs, Device_AddrFamily *objp)
|
||||
{
|
||||
if (!xdr_enum (xdrs, (enum_t *) objp))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_Device_Flags (XDR *xdrs, Device_Flags *objp)
|
||||
{
|
||||
if (!xdr_long (xdrs, objp))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_Device_ErrorCode (XDR *xdrs, Device_ErrorCode *objp)
|
||||
{
|
||||
if (!xdr_long (xdrs, objp))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_Device_Error (XDR *xdrs, Device_Error *objp)
|
||||
{
|
||||
if (!xdr_Device_ErrorCode (xdrs, &objp->error))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_Create_LinkParms (XDR *xdrs, Create_LinkParms *objp)
|
||||
{
|
||||
register int32_t *buf;
|
||||
|
||||
if (xdrs->x_op == XDR_ENCODE) {
|
||||
buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
|
||||
if (buf == NULL) {
|
||||
if (!xdr_long (xdrs, &objp->clientId))
|
||||
return FALSE;
|
||||
if (!xdr_bool (xdrs, &objp->lockDevice))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->lock_timeout))
|
||||
return FALSE;
|
||||
|
||||
} else {
|
||||
IXDR_PUT_LONG(buf, objp->clientId);
|
||||
IXDR_PUT_BOOL(buf, objp->lockDevice);
|
||||
IXDR_PUT_U_LONG(buf, objp->lock_timeout);
|
||||
}
|
||||
if (!xdr_string (xdrs, &objp->device, ~0))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
} else if (xdrs->x_op == XDR_DECODE) {
|
||||
buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
|
||||
if (buf == NULL) {
|
||||
if (!xdr_long (xdrs, &objp->clientId))
|
||||
return FALSE;
|
||||
if (!xdr_bool (xdrs, &objp->lockDevice))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->lock_timeout))
|
||||
return FALSE;
|
||||
|
||||
} else {
|
||||
objp->clientId = IXDR_GET_LONG(buf);
|
||||
objp->lockDevice = IXDR_GET_BOOL(buf);
|
||||
objp->lock_timeout = IXDR_GET_U_LONG(buf);
|
||||
}
|
||||
if (!xdr_string (xdrs, &objp->device, ~0))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (!xdr_long (xdrs, &objp->clientId))
|
||||
return FALSE;
|
||||
if (!xdr_bool (xdrs, &objp->lockDevice))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->lock_timeout))
|
||||
return FALSE;
|
||||
if (!xdr_string (xdrs, &objp->device, ~0))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_Create_LinkResp (XDR *xdrs, Create_LinkResp *objp)
|
||||
{
|
||||
if (!xdr_Device_ErrorCode (xdrs, &objp->error))
|
||||
return FALSE;
|
||||
if (!xdr_Device_Link (xdrs, &objp->lid))
|
||||
return FALSE;
|
||||
if (!xdr_u_short (xdrs, &objp->abortPort))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->maxRecvSize))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_Device_WriteParms (XDR *xdrs, Device_WriteParms *objp)
|
||||
{
|
||||
if (!xdr_Device_Link (xdrs, &objp->lid))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->io_timeout))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->lock_timeout))
|
||||
return FALSE;
|
||||
if (!xdr_Device_Flags (xdrs, &objp->flags))
|
||||
return FALSE;
|
||||
if (!xdr_bytes (xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, ~0))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_Device_WriteResp (XDR *xdrs, Device_WriteResp *objp)
|
||||
{
|
||||
if (!xdr_Device_ErrorCode (xdrs, &objp->error))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->size))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_Device_ReadParms (XDR *xdrs, Device_ReadParms *objp)
|
||||
{
|
||||
register int32_t *buf;
|
||||
|
||||
if (xdrs->x_op == XDR_ENCODE) {
|
||||
if (!xdr_Device_Link (xdrs, &objp->lid))
|
||||
return FALSE;
|
||||
buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
|
||||
if (buf == NULL) {
|
||||
if (!xdr_u_long (xdrs, &objp->requestSize))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->io_timeout))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->lock_timeout))
|
||||
return FALSE;
|
||||
|
||||
} else {
|
||||
IXDR_PUT_U_LONG(buf, objp->requestSize);
|
||||
IXDR_PUT_U_LONG(buf, objp->io_timeout);
|
||||
IXDR_PUT_U_LONG(buf, objp->lock_timeout);
|
||||
}
|
||||
if (!xdr_Device_Flags (xdrs, &objp->flags))
|
||||
return FALSE;
|
||||
if (!xdr_char (xdrs, &objp->termChar))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
} else if (xdrs->x_op == XDR_DECODE) {
|
||||
if (!xdr_Device_Link (xdrs, &objp->lid))
|
||||
return FALSE;
|
||||
buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
|
||||
if (buf == NULL) {
|
||||
if (!xdr_u_long (xdrs, &objp->requestSize))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->io_timeout))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->lock_timeout))
|
||||
return FALSE;
|
||||
|
||||
} else {
|
||||
objp->requestSize = IXDR_GET_U_LONG(buf);
|
||||
objp->io_timeout = IXDR_GET_U_LONG(buf);
|
||||
objp->lock_timeout = IXDR_GET_U_LONG(buf);
|
||||
}
|
||||
if (!xdr_Device_Flags (xdrs, &objp->flags))
|
||||
return FALSE;
|
||||
if (!xdr_char (xdrs, &objp->termChar))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (!xdr_Device_Link (xdrs, &objp->lid))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->requestSize))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->io_timeout))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->lock_timeout))
|
||||
return FALSE;
|
||||
if (!xdr_Device_Flags (xdrs, &objp->flags))
|
||||
return FALSE;
|
||||
if (!xdr_char (xdrs, &objp->termChar))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_Device_ReadResp (XDR *xdrs, Device_ReadResp *objp)
|
||||
{
|
||||
if (!xdr_Device_ErrorCode (xdrs, &objp->error))
|
||||
return FALSE;
|
||||
if (!xdr_long (xdrs, &objp->reason))
|
||||
return FALSE;
|
||||
if (!xdr_bytes (xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, ~0))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_Device_ReadStbResp (XDR *xdrs, Device_ReadStbResp *objp)
|
||||
{
|
||||
if (!xdr_Device_ErrorCode (xdrs, &objp->error))
|
||||
return FALSE;
|
||||
if (!xdr_u_char (xdrs, &objp->stb))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_Device_GenericParms (XDR *xdrs, Device_GenericParms *objp)
|
||||
{
|
||||
if (!xdr_Device_Link (xdrs, &objp->lid))
|
||||
return FALSE;
|
||||
if (!xdr_Device_Flags (xdrs, &objp->flags))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->lock_timeout))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->io_timeout))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_Device_RemoteFunc (XDR *xdrs, Device_RemoteFunc *objp)
|
||||
{
|
||||
register int32_t *buf;
|
||||
|
||||
if (xdrs->x_op == XDR_ENCODE) {
|
||||
buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT);
|
||||
if (buf == NULL) {
|
||||
if (!xdr_u_long (xdrs, &objp->hostAddr))
|
||||
return FALSE;
|
||||
if (!xdr_u_short (xdrs, &objp->hostPort))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->progNum))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->progVers))
|
||||
return FALSE;
|
||||
|
||||
} else {
|
||||
IXDR_PUT_U_LONG(buf, objp->hostAddr);
|
||||
IXDR_PUT_U_SHORT(buf, objp->hostPort);
|
||||
IXDR_PUT_U_LONG(buf, objp->progNum);
|
||||
IXDR_PUT_U_LONG(buf, objp->progVers);
|
||||
}
|
||||
if (!xdr_Device_AddrFamily (xdrs, &objp->progFamily))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
} else if (xdrs->x_op == XDR_DECODE) {
|
||||
buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT);
|
||||
if (buf == NULL) {
|
||||
if (!xdr_u_long (xdrs, &objp->hostAddr))
|
||||
return FALSE;
|
||||
if (!xdr_u_short (xdrs, &objp->hostPort))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->progNum))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->progVers))
|
||||
return FALSE;
|
||||
|
||||
} else {
|
||||
objp->hostAddr = IXDR_GET_U_LONG(buf);
|
||||
objp->hostPort = IXDR_GET_U_SHORT(buf);
|
||||
objp->progNum = IXDR_GET_U_LONG(buf);
|
||||
objp->progVers = IXDR_GET_U_LONG(buf);
|
||||
}
|
||||
if (!xdr_Device_AddrFamily (xdrs, &objp->progFamily))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (!xdr_u_long (xdrs, &objp->hostAddr))
|
||||
return FALSE;
|
||||
if (!xdr_u_short (xdrs, &objp->hostPort))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->progNum))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->progVers))
|
||||
return FALSE;
|
||||
if (!xdr_Device_AddrFamily (xdrs, &objp->progFamily))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_Device_EnableSrqParms (XDR *xdrs, Device_EnableSrqParms *objp)
|
||||
{
|
||||
if (!xdr_Device_Link (xdrs, &objp->lid))
|
||||
return FALSE;
|
||||
if (!xdr_bool (xdrs, &objp->enable))
|
||||
return FALSE;
|
||||
if (!xdr_bytes (xdrs, (char **)&objp->handle.handle_val, (u_int *) &objp->handle.handle_len, 40))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_Device_LockParms (XDR *xdrs, Device_LockParms *objp)
|
||||
{
|
||||
if (!xdr_Device_Link (xdrs, &objp->lid))
|
||||
return FALSE;
|
||||
if (!xdr_Device_Flags (xdrs, &objp->flags))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->lock_timeout))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_Device_DocmdParms (XDR *xdrs, Device_DocmdParms *objp)
|
||||
{
|
||||
register int32_t *buf;
|
||||
|
||||
if (xdrs->x_op == XDR_ENCODE) {
|
||||
if (!xdr_Device_Link (xdrs, &objp->lid))
|
||||
return FALSE;
|
||||
if (!xdr_Device_Flags (xdrs, &objp->flags))
|
||||
return FALSE;
|
||||
buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT);
|
||||
if (buf == NULL) {
|
||||
if (!xdr_u_long (xdrs, &objp->io_timeout))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->lock_timeout))
|
||||
return FALSE;
|
||||
if (!xdr_long (xdrs, &objp->cmd))
|
||||
return FALSE;
|
||||
if (!xdr_bool (xdrs, &objp->network_order))
|
||||
return FALSE;
|
||||
if (!xdr_long (xdrs, &objp->datasize))
|
||||
return FALSE;
|
||||
|
||||
} else {
|
||||
IXDR_PUT_U_LONG(buf, objp->io_timeout);
|
||||
IXDR_PUT_U_LONG(buf, objp->lock_timeout);
|
||||
IXDR_PUT_LONG(buf, objp->cmd);
|
||||
IXDR_PUT_BOOL(buf, objp->network_order);
|
||||
IXDR_PUT_LONG(buf, objp->datasize);
|
||||
}
|
||||
if (!xdr_bytes (xdrs, (char **)&objp->data_in.data_in_val, (u_int *) &objp->data_in.data_in_len, ~0))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
} else if (xdrs->x_op == XDR_DECODE) {
|
||||
if (!xdr_Device_Link (xdrs, &objp->lid))
|
||||
return FALSE;
|
||||
if (!xdr_Device_Flags (xdrs, &objp->flags))
|
||||
return FALSE;
|
||||
buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT);
|
||||
if (buf == NULL) {
|
||||
if (!xdr_u_long (xdrs, &objp->io_timeout))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->lock_timeout))
|
||||
return FALSE;
|
||||
if (!xdr_long (xdrs, &objp->cmd))
|
||||
return FALSE;
|
||||
if (!xdr_bool (xdrs, &objp->network_order))
|
||||
return FALSE;
|
||||
if (!xdr_long (xdrs, &objp->datasize))
|
||||
return FALSE;
|
||||
|
||||
} else {
|
||||
objp->io_timeout = IXDR_GET_U_LONG(buf);
|
||||
objp->lock_timeout = IXDR_GET_U_LONG(buf);
|
||||
objp->cmd = IXDR_GET_LONG(buf);
|
||||
objp->network_order = IXDR_GET_BOOL(buf);
|
||||
objp->datasize = IXDR_GET_LONG(buf);
|
||||
}
|
||||
if (!xdr_bytes (xdrs, (char **)&objp->data_in.data_in_val, (u_int *) &objp->data_in.data_in_len, ~0))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (!xdr_Device_Link (xdrs, &objp->lid))
|
||||
return FALSE;
|
||||
if (!xdr_Device_Flags (xdrs, &objp->flags))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->io_timeout))
|
||||
return FALSE;
|
||||
if (!xdr_u_long (xdrs, &objp->lock_timeout))
|
||||
return FALSE;
|
||||
if (!xdr_long (xdrs, &objp->cmd))
|
||||
return FALSE;
|
||||
if (!xdr_bool (xdrs, &objp->network_order))
|
||||
return FALSE;
|
||||
if (!xdr_long (xdrs, &objp->datasize))
|
||||
return FALSE;
|
||||
if (!xdr_bytes (xdrs, (char **)&objp->data_in.data_in_val, (u_int *) &objp->data_in.data_in_len, ~0))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_Device_DocmdResp (XDR *xdrs, Device_DocmdResp *objp)
|
||||
{
|
||||
if (!xdr_Device_ErrorCode (xdrs, &objp->error))
|
||||
return FALSE;
|
||||
if (!xdr_bytes (xdrs, (char **)&objp->data_out.data_out_val, (u_int *) &objp->data_out.data_out_len, ~0))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_Device_SrqParms (XDR *xdrs, Device_SrqParms *objp)
|
||||
{
|
||||
if (!xdr_bytes (xdrs, (char **)&objp->handle.handle_val, (u_int *) &objp->handle.handle_len, ~0))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
Loading…
Reference in New Issue