HP-UX Reference (11i v2 03/08) - 3 Library Functions N-Z (vol 7)

r
rpc(3N) rpc(3N)
Data Structures
Some of the data structures used by the RPC package are shown below.
The AUTH Structure
union des_block {
struct {
u_int32 high;
u_int32 low;
} key;
char c[8];
};
typedef union des_block des_block;
extern bool_t xdr_des_block( );
/*
* Authentication info. Opaque to client.
*/
struct opaque_auth {
enum_t oa_flavor; /* flavor of auth */
caddr_t oa_base; /* address of more auth stuff */
u_int oa_length; /* not to exceed MAX_AUTH_BYTES */
};
/*
* Auth handle, interface to client side .B authenticators.
*/
typedef struct {
struct opaque_auth ah_cred;
struct opaque_auth ah_verf;
union des_block ah_key;
struct auth_ops {
void (*ah_nextverf)( );
int (*ah_marshal)( ); /* nextverf & serialize */
int (*ah_validate)( ); /* validate verifier */
int (*ah_refresh)( ); /* refresh credentials */
void (*ah_destroy)( ); /* destroy this structure */
} *ah_ops;
caddr_t ah_private;
} AUTH;
The CLIENT Structure
/*
* Client rpc handle.
* Created by individual implementations.
* Client is responsible for initializing auth.
*/
typedef struct {
AUTH%*cl_auth; /* authenticator */
struct clnt_ops {
enum clnt_stat (*cl_call)( ); /* call remote procedure */
void (*cl_abort)( ); /* abort a call */
void (*cl_geterr)( ); /* get specific error code */
bool_t (*cl_freeres)( ); /* frees results */
void (*cl_destroy)( ); /* destroy this structure */
bool_t (*cl_control)( ); /* the ioctl( ) of rpc */
} *cl_ops;
caddr_t cl_private; /* private stuff */
char *cl_netid; /* network identifier */
char *cl_tp; /* device name */
} CLIENT;
HP-UX 11i Version 2: August 2003 2 Hewlett-Packard Company Section 3877