Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/tirpc/rpc
File: clnt.h
/* $NetBSD: clnt.h,v 1.14 2000/06/02 22:57:55 fvdl Exp $ */
[0] Fix | Delete
[1] Fix | Delete
/*
[2] Fix | Delete
* Copyright (c) 2010, Oracle America, Inc.
[3] Fix | Delete
* All rights reserved.
[4] Fix | Delete
*
[5] Fix | Delete
* Redistribution and use in source and binary forms, with or without
[6] Fix | Delete
* modification, are permitted provided that the following conditions are met:
[7] Fix | Delete
* - Redistributions of source code must retain the above copyright notice,
[8] Fix | Delete
* this list of conditions and the following disclaimer.
[9] Fix | Delete
* - Redistributions in binary form must reproduce the above copyright notice,
[10] Fix | Delete
* this list of conditions and the following disclaimer in the documentation
[11] Fix | Delete
* and/or other materials provided with the distribution.
[12] Fix | Delete
* - Neither the name of the "Oracle America, Inc." nor the names of its
[13] Fix | Delete
* contributors may be used to endorse or promote products derived
[14] Fix | Delete
* from this software without specific prior written permission.
[15] Fix | Delete
*
[16] Fix | Delete
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
[17] Fix | Delete
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
[18] Fix | Delete
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
[19] Fix | Delete
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
[20] Fix | Delete
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
[21] Fix | Delete
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
[22] Fix | Delete
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
[23] Fix | Delete
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
[24] Fix | Delete
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
[25] Fix | Delete
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
[26] Fix | Delete
* POSSIBILITY OF SUCH DAMAGE.
[27] Fix | Delete
*
[28] Fix | Delete
* from: @(#)clnt.h 1.31 94/04/29 SMI
[29] Fix | Delete
* from: @(#)clnt.h 2.1 88/07/29 4.0 RPCSRC
[30] Fix | Delete
* $FreeBSD: src/include/rpc/clnt.h,v 1.21 2003/01/24 01:47:55 fjoe Exp $
[31] Fix | Delete
*/
[32] Fix | Delete
[33] Fix | Delete
/*
[34] Fix | Delete
* clnt.h - Client side remote procedure call interface.
[35] Fix | Delete
*/
[36] Fix | Delete
[37] Fix | Delete
#ifndef _TIRPC_CLNT_H_
[38] Fix | Delete
#define _TIRPC_CLNT_H_
[39] Fix | Delete
[40] Fix | Delete
#include <rpc/clnt_stat.h>
[41] Fix | Delete
#include <rpc/auth.h>
[42] Fix | Delete
[43] Fix | Delete
#include <netconfig.h>
[44] Fix | Delete
#include <sys/un.h>
[45] Fix | Delete
[46] Fix | Delete
/*
[47] Fix | Delete
* Well-known IPV6 RPC broadcast address.
[48] Fix | Delete
*/
[49] Fix | Delete
#define RPCB_MULTICAST_ADDR "ff02::202"
[50] Fix | Delete
[51] Fix | Delete
/*
[52] Fix | Delete
* the following errors are in general unrecoverable. The caller
[53] Fix | Delete
* should give up rather than retry.
[54] Fix | Delete
*/
[55] Fix | Delete
#define IS_UNRECOVERABLE_RPC(s) (((s) == RPC_AUTHERROR) || \
[56] Fix | Delete
((s) == RPC_CANTENCODEARGS) || \
[57] Fix | Delete
((s) == RPC_CANTDECODERES) || \
[58] Fix | Delete
((s) == RPC_VERSMISMATCH) || \
[59] Fix | Delete
((s) == RPC_PROCUNAVAIL) || \
[60] Fix | Delete
((s) == RPC_PROGUNAVAIL) || \
[61] Fix | Delete
((s) == RPC_PROGVERSMISMATCH) || \
[62] Fix | Delete
((s) == RPC_CANTDECODEARGS))
[63] Fix | Delete
[64] Fix | Delete
/*
[65] Fix | Delete
* Error info.
[66] Fix | Delete
*/
[67] Fix | Delete
struct rpc_err {
[68] Fix | Delete
enum clnt_stat re_status;
[69] Fix | Delete
union {
[70] Fix | Delete
int RE_errno; /* related system error */
[71] Fix | Delete
enum auth_stat RE_why; /* why the auth error occurred */
[72] Fix | Delete
struct {
[73] Fix | Delete
rpcvers_t low; /* lowest version supported */
[74] Fix | Delete
rpcvers_t high; /* highest version supported */
[75] Fix | Delete
} RE_vers;
[76] Fix | Delete
struct { /* maybe meaningful if RPC_FAILED */
[77] Fix | Delete
int32_t s1;
[78] Fix | Delete
int32_t s2;
[79] Fix | Delete
} RE_lb; /* life boot & debugging only */
[80] Fix | Delete
} ru;
[81] Fix | Delete
#define re_errno ru.RE_errno
[82] Fix | Delete
#define re_why ru.RE_why
[83] Fix | Delete
#define re_vers ru.RE_vers
[84] Fix | Delete
#define re_lb ru.RE_lb
[85] Fix | Delete
};
[86] Fix | Delete
[87] Fix | Delete
[88] Fix | Delete
/*
[89] Fix | Delete
* Client rpc handle.
[90] Fix | Delete
* Created by individual implementations
[91] Fix | Delete
* Client is responsible for initializing auth, see e.g. auth_none.c.
[92] Fix | Delete
*/
[93] Fix | Delete
typedef struct __rpc_client {
[94] Fix | Delete
AUTH *cl_auth; /* authenticator */
[95] Fix | Delete
struct clnt_ops {
[96] Fix | Delete
/* call remote procedure */
[97] Fix | Delete
enum clnt_stat (*cl_call)(struct __rpc_client *,
[98] Fix | Delete
rpcproc_t, xdrproc_t, void *, xdrproc_t,
[99] Fix | Delete
void *, struct timeval);
[100] Fix | Delete
/* abort a call */
[101] Fix | Delete
void (*cl_abort)(struct __rpc_client *);
[102] Fix | Delete
/* get specific error code */
[103] Fix | Delete
void (*cl_geterr)(struct __rpc_client *,
[104] Fix | Delete
struct rpc_err *);
[105] Fix | Delete
/* frees results */
[106] Fix | Delete
bool_t (*cl_freeres)(struct __rpc_client *,
[107] Fix | Delete
xdrproc_t, void *);
[108] Fix | Delete
/* destroy this structure */
[109] Fix | Delete
void (*cl_destroy)(struct __rpc_client *);
[110] Fix | Delete
/* the ioctl() of rpc */
[111] Fix | Delete
bool_t (*cl_control)(struct __rpc_client *, u_int,
[112] Fix | Delete
void *);
[113] Fix | Delete
} *cl_ops;
[114] Fix | Delete
void *cl_private; /* private stuff */
[115] Fix | Delete
char *cl_netid; /* network token */
[116] Fix | Delete
char *cl_tp; /* device name */
[117] Fix | Delete
} CLIENT;
[118] Fix | Delete
[119] Fix | Delete
[120] Fix | Delete
/*
[121] Fix | Delete
* Timers used for the pseudo-transport protocol when using datagrams
[122] Fix | Delete
*/
[123] Fix | Delete
struct rpc_timers {
[124] Fix | Delete
u_short rt_srtt; /* smoothed round-trip time */
[125] Fix | Delete
u_short rt_deviate; /* estimated deviation */
[126] Fix | Delete
u_long rt_rtxcur; /* current (backed-off) rto */
[127] Fix | Delete
};
[128] Fix | Delete
[129] Fix | Delete
/*
[130] Fix | Delete
* Feedback values used for possible congestion and rate control
[131] Fix | Delete
*/
[132] Fix | Delete
#define FEEDBACK_REXMIT1 1 /* first retransmit */
[133] Fix | Delete
#define FEEDBACK_OK 2 /* no retransmits */
[134] Fix | Delete
[135] Fix | Delete
/* Used to set version of portmapper used in broadcast */
[136] Fix | Delete
[137] Fix | Delete
#define CLCR_SET_LOWVERS 3
[138] Fix | Delete
#define CLCR_GET_LOWVERS 4
[139] Fix | Delete
[140] Fix | Delete
#define RPCSMALLMSGSIZE 400 /* a more reasonable packet size */
[141] Fix | Delete
[142] Fix | Delete
/*
[143] Fix | Delete
* client side rpc interface ops
[144] Fix | Delete
*
[145] Fix | Delete
* Parameter types are:
[146] Fix | Delete
*
[147] Fix | Delete
*/
[148] Fix | Delete
[149] Fix | Delete
/*
[150] Fix | Delete
* enum clnt_stat
[151] Fix | Delete
* CLNT_CALL(rh, proc, xargs, argsp, xres, resp, timeout)
[152] Fix | Delete
* CLIENT *rh;
[153] Fix | Delete
* rpcproc_t proc;
[154] Fix | Delete
* xdrproc_t xargs;
[155] Fix | Delete
* void *argsp;
[156] Fix | Delete
* xdrproc_t xres;
[157] Fix | Delete
* void *resp;
[158] Fix | Delete
* struct timeval timeout;
[159] Fix | Delete
*/
[160] Fix | Delete
#define CLNT_CALL(rh, proc, xargs, argsp, xres, resp, secs) \
[161] Fix | Delete
((*(rh)->cl_ops->cl_call)(rh, proc, xargs, \
[162] Fix | Delete
argsp, xres, resp, secs))
[163] Fix | Delete
#define clnt_call(rh, proc, xargs, argsp, xres, resp, secs) \
[164] Fix | Delete
((*(rh)->cl_ops->cl_call)(rh, proc, xargs, \
[165] Fix | Delete
argsp, xres, resp, secs))
[166] Fix | Delete
[167] Fix | Delete
/*
[168] Fix | Delete
* void
[169] Fix | Delete
* CLNT_ABORT(rh);
[170] Fix | Delete
* CLIENT *rh;
[171] Fix | Delete
*/
[172] Fix | Delete
#define CLNT_ABORT(rh) ((*(rh)->cl_ops->cl_abort)(rh))
[173] Fix | Delete
#define clnt_abort(rh) ((*(rh)->cl_ops->cl_abort)(rh))
[174] Fix | Delete
[175] Fix | Delete
/*
[176] Fix | Delete
* struct rpc_err
[177] Fix | Delete
* CLNT_GETERR(rh);
[178] Fix | Delete
* CLIENT *rh;
[179] Fix | Delete
*/
[180] Fix | Delete
#define CLNT_GETERR(rh,errp) ((*(rh)->cl_ops->cl_geterr)(rh, errp))
[181] Fix | Delete
#define clnt_geterr(rh,errp) ((*(rh)->cl_ops->cl_geterr)(rh, errp))
[182] Fix | Delete
[183] Fix | Delete
[184] Fix | Delete
/*
[185] Fix | Delete
* bool_t
[186] Fix | Delete
* CLNT_FREERES(rh, xres, resp);
[187] Fix | Delete
* CLIENT *rh;
[188] Fix | Delete
* xdrproc_t xres;
[189] Fix | Delete
* void *resp;
[190] Fix | Delete
*/
[191] Fix | Delete
#define CLNT_FREERES(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp))
[192] Fix | Delete
#define clnt_freeres(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp))
[193] Fix | Delete
[194] Fix | Delete
/*
[195] Fix | Delete
* bool_t
[196] Fix | Delete
* CLNT_CONTROL(cl, request, info)
[197] Fix | Delete
* CLIENT *cl;
[198] Fix | Delete
* u_int request;
[199] Fix | Delete
* char *info;
[200] Fix | Delete
*/
[201] Fix | Delete
#define CLNT_CONTROL(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in))
[202] Fix | Delete
#define clnt_control(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in))
[203] Fix | Delete
[204] Fix | Delete
/*
[205] Fix | Delete
* control operations that apply to both udp and tcp transports
[206] Fix | Delete
*/
[207] Fix | Delete
#define CLSET_TIMEOUT 1 /* set timeout (timeval) */
[208] Fix | Delete
#define CLGET_TIMEOUT 2 /* get timeout (timeval) */
[209] Fix | Delete
#define CLGET_SERVER_ADDR 3 /* get server's address (sockaddr) */
[210] Fix | Delete
#define CLGET_FD 6 /* get connections file descriptor */
[211] Fix | Delete
#define CLGET_SVC_ADDR 7 /* get server's address (netbuf) */
[212] Fix | Delete
#define CLSET_FD_CLOSE 8 /* close fd while clnt_destroy */
[213] Fix | Delete
#define CLSET_FD_NCLOSE 9 /* Do not close fd while clnt_destroy */
[214] Fix | Delete
#define CLGET_XID 10 /* Get xid */
[215] Fix | Delete
#define CLSET_XID 11 /* Set xid */
[216] Fix | Delete
#define CLGET_VERS 12 /* Get version number */
[217] Fix | Delete
#define CLSET_VERS 13 /* Set version number */
[218] Fix | Delete
#define CLGET_PROG 14 /* Get program number */
[219] Fix | Delete
#define CLSET_PROG 15 /* Set program number */
[220] Fix | Delete
#define CLSET_SVC_ADDR 16 /* get server's address (netbuf) */
[221] Fix | Delete
#define CLSET_PUSH_TIMOD 17 /* push timod if not already present */
[222] Fix | Delete
#define CLSET_POP_TIMOD 18 /* pop timod */
[223] Fix | Delete
/*
[224] Fix | Delete
* Connectionless only control operations
[225] Fix | Delete
*/
[226] Fix | Delete
#define CLSET_RETRY_TIMEOUT 4 /* set retry timeout (timeval) */
[227] Fix | Delete
#define CLGET_RETRY_TIMEOUT 5 /* get retry timeout (timeval) */
[228] Fix | Delete
#define CLSET_ASYNC 19
[229] Fix | Delete
#define CLSET_CONNECT 20 /* Use connect() for UDP. (int) */
[230] Fix | Delete
[231] Fix | Delete
/*
[232] Fix | Delete
* void
[233] Fix | Delete
* CLNT_DESTROY(rh);
[234] Fix | Delete
* CLIENT *rh;
[235] Fix | Delete
*/
[236] Fix | Delete
#define CLNT_DESTROY(rh) ((*(rh)->cl_ops->cl_destroy)(rh))
[237] Fix | Delete
#define clnt_destroy(rh) ((*(rh)->cl_ops->cl_destroy)(rh))
[238] Fix | Delete
[239] Fix | Delete
[240] Fix | Delete
/*
[241] Fix | Delete
* RPCTEST is a test program which is accessible on every rpc
[242] Fix | Delete
* transport/port. It is used for testing, performance evaluation,
[243] Fix | Delete
* and network administration.
[244] Fix | Delete
*/
[245] Fix | Delete
[246] Fix | Delete
#define RPCTEST_PROGRAM ((rpcprog_t)1)
[247] Fix | Delete
#define RPCTEST_VERSION ((rpcvers_t)1)
[248] Fix | Delete
#define RPCTEST_NULL_PROC ((rpcproc_t)2)
[249] Fix | Delete
#define RPCTEST_NULL_BATCH_PROC ((rpcproc_t)3)
[250] Fix | Delete
[251] Fix | Delete
/*
[252] Fix | Delete
* By convention, procedure 0 takes null arguments and returns them
[253] Fix | Delete
*/
[254] Fix | Delete
[255] Fix | Delete
#define NULLPROC ((rpcproc_t)0)
[256] Fix | Delete
[257] Fix | Delete
/*
[258] Fix | Delete
* Below are the client handle creation routines for the various
[259] Fix | Delete
* implementations of client side rpc. They can return NULL if a
[260] Fix | Delete
* creation failure occurs.
[261] Fix | Delete
*/
[262] Fix | Delete
[263] Fix | Delete
/*
[264] Fix | Delete
* Generic client creation routine. Supported protocols are those that
[265] Fix | Delete
* belong to the nettype namespace (/etc/netconfig).
[266] Fix | Delete
*/
[267] Fix | Delete
#ifdef __cplusplus
[268] Fix | Delete
extern "C" {
[269] Fix | Delete
#endif
[270] Fix | Delete
extern CLIENT *clnt_create(const char *, const rpcprog_t, const rpcvers_t,
[271] Fix | Delete
const char *);
[272] Fix | Delete
/*
[273] Fix | Delete
*
[274] Fix | Delete
* const char *hostname; -- hostname
[275] Fix | Delete
* const rpcprog_t prog; -- program number
[276] Fix | Delete
* const rpcvers_t vers; -- version number
[277] Fix | Delete
* const char *nettype; -- network type
[278] Fix | Delete
*/
[279] Fix | Delete
[280] Fix | Delete
/*
[281] Fix | Delete
* Generic client creation routine. Just like clnt_create(), except
[282] Fix | Delete
* it takes an additional timeout parameter.
[283] Fix | Delete
*/
[284] Fix | Delete
extern CLIENT * clnt_create_timed(const char *, const rpcprog_t,
[285] Fix | Delete
const rpcvers_t, const char *, const struct timeval *);
[286] Fix | Delete
/*
[287] Fix | Delete
*
[288] Fix | Delete
* const char *hostname; -- hostname
[289] Fix | Delete
* const rpcprog_t prog; -- program number
[290] Fix | Delete
* const rpcvers_t vers; -- version number
[291] Fix | Delete
* const char *nettype; -- network type
[292] Fix | Delete
* const struct timeval *tp; -- timeout
[293] Fix | Delete
*/
[294] Fix | Delete
[295] Fix | Delete
/*
[296] Fix | Delete
* Generic client creation routine. Supported protocols are which belong
[297] Fix | Delete
* to the nettype name space.
[298] Fix | Delete
*/
[299] Fix | Delete
extern CLIENT *clnt_create_vers(const char *, const rpcprog_t, rpcvers_t *,
[300] Fix | Delete
const rpcvers_t, const rpcvers_t,
[301] Fix | Delete
const char *);
[302] Fix | Delete
/*
[303] Fix | Delete
* const char *host; -- hostname
[304] Fix | Delete
* const rpcprog_t prog; -- program number
[305] Fix | Delete
* rpcvers_t *vers_out; -- servers highest available version
[306] Fix | Delete
* const rpcvers_t vers_low; -- low version number
[307] Fix | Delete
* const rpcvers_t vers_high; -- high version number
[308] Fix | Delete
* const char *nettype; -- network type
[309] Fix | Delete
*/
[310] Fix | Delete
[311] Fix | Delete
/*
[312] Fix | Delete
* Generic client creation routine. Supported protocols are which belong
[313] Fix | Delete
* to the nettype name space.
[314] Fix | Delete
*/
[315] Fix | Delete
extern CLIENT * clnt_create_vers_timed(const char *, const rpcprog_t,
[316] Fix | Delete
rpcvers_t *, const rpcvers_t, const rpcvers_t, const char *,
[317] Fix | Delete
const struct timeval *);
[318] Fix | Delete
/*
[319] Fix | Delete
* const char *host; -- hostname
[320] Fix | Delete
* const rpcprog_t prog; -- program number
[321] Fix | Delete
* rpcvers_t *vers_out; -- servers highest available version
[322] Fix | Delete
* const rpcvers_t vers_low; -- low version number
[323] Fix | Delete
* const rpcvers_t vers_high; -- high version number
[324] Fix | Delete
* const char *nettype; -- network type
[325] Fix | Delete
* const struct timeval *tp -- timeout
[326] Fix | Delete
*/
[327] Fix | Delete
[328] Fix | Delete
/*
[329] Fix | Delete
* Generic client creation routine. It takes a netconfig structure
[330] Fix | Delete
* instead of nettype
[331] Fix | Delete
*/
[332] Fix | Delete
extern CLIENT *clnt_tp_create(const char *, const rpcprog_t,
[333] Fix | Delete
const rpcvers_t, const struct netconfig *);
[334] Fix | Delete
/*
[335] Fix | Delete
* const char *hostname; -- hostname
[336] Fix | Delete
* const rpcprog_t prog; -- program number
[337] Fix | Delete
* const rpcvers_t vers; -- version number
[338] Fix | Delete
* const struct netconfig *netconf; -- network config structure
[339] Fix | Delete
*/
[340] Fix | Delete
[341] Fix | Delete
/*
[342] Fix | Delete
* Generic client creation routine. Just like clnt_tp_create(), except
[343] Fix | Delete
* it takes an additional timeout parameter.
[344] Fix | Delete
*/
[345] Fix | Delete
extern CLIENT * clnt_tp_create_timed(const char *, const rpcprog_t,
[346] Fix | Delete
const rpcvers_t, const struct netconfig *, const struct timeval *);
[347] Fix | Delete
/*
[348] Fix | Delete
* const char *hostname; -- hostname
[349] Fix | Delete
* const rpcprog_t prog; -- program number
[350] Fix | Delete
* const rpcvers_t vers; -- version number
[351] Fix | Delete
* const struct netconfig *netconf; -- network config structure
[352] Fix | Delete
* const struct timeval *tp -- timeout
[353] Fix | Delete
*/
[354] Fix | Delete
[355] Fix | Delete
/*
[356] Fix | Delete
* Generic TLI create routine. Only provided for compatibility.
[357] Fix | Delete
*/
[358] Fix | Delete
[359] Fix | Delete
extern CLIENT *clnt_tli_create(const int, const struct netconfig *,
[360] Fix | Delete
struct netbuf *, const rpcprog_t,
[361] Fix | Delete
const rpcvers_t, const u_int, const u_int);
[362] Fix | Delete
/*
[363] Fix | Delete
* const register int fd; -- fd
[364] Fix | Delete
* const struct netconfig *nconf; -- netconfig structure
[365] Fix | Delete
* struct netbuf *svcaddr; -- servers address
[366] Fix | Delete
* const u_long prog; -- program number
[367] Fix | Delete
* const u_long vers; -- version number
[368] Fix | Delete
* const u_int sendsz; -- send size
[369] Fix | Delete
* const u_int recvsz; -- recv size
[370] Fix | Delete
*/
[371] Fix | Delete
[372] Fix | Delete
/*
[373] Fix | Delete
* Low level clnt create routine for connectionful transports, e.g. tcp.
[374] Fix | Delete
*/
[375] Fix | Delete
extern CLIENT *clnt_vc_create(const int, const struct netbuf *,
[376] Fix | Delete
const rpcprog_t, const rpcvers_t,
[377] Fix | Delete
u_int, u_int);
[378] Fix | Delete
/*
[379] Fix | Delete
* Added for compatibility to old rpc 4.0. Obsoleted by clnt_vc_create().
[380] Fix | Delete
*/
[381] Fix | Delete
extern CLIENT *clntunix_create(struct sockaddr_un *,
[382] Fix | Delete
u_long, u_long, int *, u_int, u_int);
[383] Fix | Delete
/*
[384] Fix | Delete
* const int fd; -- open file descriptor
[385] Fix | Delete
* const struct netbuf *svcaddr; -- servers address
[386] Fix | Delete
* const rpcprog_t prog; -- program number
[387] Fix | Delete
* const rpcvers_t vers; -- version number
[388] Fix | Delete
* const u_int sendsz; -- buffer recv size
[389] Fix | Delete
* const u_int recvsz; -- buffer send size
[390] Fix | Delete
*/
[391] Fix | Delete
[392] Fix | Delete
/*
[393] Fix | Delete
* Low level clnt create routine for connectionless transports, e.g. udp.
[394] Fix | Delete
*/
[395] Fix | Delete
extern CLIENT *clnt_dg_create(const int, const struct netbuf *,
[396] Fix | Delete
const rpcprog_t, const rpcvers_t,
[397] Fix | Delete
const u_int, const u_int);
[398] Fix | Delete
/*
[399] Fix | Delete
* const int fd; -- open file descriptor
[400] Fix | Delete
* const struct netbuf *svcaddr; -- servers address
[401] Fix | Delete
* const rpcprog_t program; -- program number
[402] Fix | Delete
* const rpcvers_t version; -- version number
[403] Fix | Delete
* const u_int sendsz; -- buffer recv size
[404] Fix | Delete
* const u_int recvsz; -- buffer send size
[405] Fix | Delete
*/
[406] Fix | Delete
[407] Fix | Delete
/*
[408] Fix | Delete
* Memory based rpc (for speed check and testing)
[409] Fix | Delete
* CLIENT *
[410] Fix | Delete
* clnt_raw_create(prog, vers)
[411] Fix | Delete
* u_long prog;
[412] Fix | Delete
* u_long vers;
[413] Fix | Delete
*/
[414] Fix | Delete
extern CLIENT *clnt_raw_create(rpcprog_t, rpcvers_t);
[415] Fix | Delete
[416] Fix | Delete
#ifdef __cplusplus
[417] Fix | Delete
}
[418] Fix | Delete
#endif
[419] Fix | Delete
[420] Fix | Delete
[421] Fix | Delete
/*
[422] Fix | Delete
* Print why creation failed
[423] Fix | Delete
*/
[424] Fix | Delete
#ifdef __cplusplus
[425] Fix | Delete
extern "C" {
[426] Fix | Delete
#endif
[427] Fix | Delete
extern void clnt_pcreateerror(const char *); /* stderr */
[428] Fix | Delete
extern char *clnt_spcreateerror(const char *); /* string */
[429] Fix | Delete
#ifdef __cplusplus
[430] Fix | Delete
}
[431] Fix | Delete
#endif
[432] Fix | Delete
[433] Fix | Delete
/*
[434] Fix | Delete
* Like clnt_perror(), but is more verbose in its output
[435] Fix | Delete
*/
[436] Fix | Delete
#ifdef __cplusplus
[437] Fix | Delete
extern "C" {
[438] Fix | Delete
#endif
[439] Fix | Delete
extern void clnt_perrno(enum clnt_stat); /* stderr */
[440] Fix | Delete
extern char *clnt_sperrno(enum clnt_stat); /* string */
[441] Fix | Delete
#ifdef __cplusplus
[442] Fix | Delete
}
[443] Fix | Delete
#endif
[444] Fix | Delete
[445] Fix | Delete
/*
[446] Fix | Delete
* Print an English error message, given the client error code
[447] Fix | Delete
*/
[448] Fix | Delete
#ifdef __cplusplus
[449] Fix | Delete
extern "C" {
[450] Fix | Delete
#endif
[451] Fix | Delete
extern void clnt_perror(CLIENT *, const char *); /* stderr */
[452] Fix | Delete
extern char *clnt_sperror(CLIENT *, const char *); /* string */
[453] Fix | Delete
#ifdef __cplusplus
[454] Fix | Delete
}
[455] Fix | Delete
#endif
[456] Fix | Delete
[457] Fix | Delete
[458] Fix | Delete
/*
[459] Fix | Delete
* If a creation fails, the following allows the user to figure out why.
[460] Fix | Delete
*/
[461] Fix | Delete
struct rpc_createerr {
[462] Fix | Delete
enum clnt_stat cf_stat;
[463] Fix | Delete
struct rpc_err cf_error; /* useful when cf_stat == RPC_PMAPFAILURE */
[464] Fix | Delete
};
[465] Fix | Delete
[466] Fix | Delete
#ifdef __cplusplus
[467] Fix | Delete
extern "C" {
[468] Fix | Delete
#endif
[469] Fix | Delete
extern struct rpc_createerr *__rpc_createerr(void);
[470] Fix | Delete
#ifdef __cplusplus
[471] Fix | Delete
}
[472] Fix | Delete
#endif
[473] Fix | Delete
#define get_rpc_createerr() (*(__rpc_createerr()))
[474] Fix | Delete
#define rpc_createerr (*(__rpc_createerr()))
[475] Fix | Delete
[476] Fix | Delete
/*
[477] Fix | Delete
* The simplified interface:
[478] Fix | Delete
* enum clnt_stat
[479] Fix | Delete
* rpc_call(host, prognum, versnum, procnum, inproc, in, outproc, out, nettype)
[480] Fix | Delete
* const char *host;
[481] Fix | Delete
* const rpcprog_t prognum;
[482] Fix | Delete
* const rpcvers_t versnum;
[483] Fix | Delete
* const rpcproc_t procnum;
[484] Fix | Delete
* const xdrproc_t inproc, outproc;
[485] Fix | Delete
* const char *in;
[486] Fix | Delete
* char *out;
[487] Fix | Delete
* const char *nettype;
[488] Fix | Delete
*/
[489] Fix | Delete
#ifdef __cplusplus
[490] Fix | Delete
extern "C" {
[491] Fix | Delete
#endif
[492] Fix | Delete
extern enum clnt_stat rpc_call(const char *, const rpcprog_t,
[493] Fix | Delete
const rpcvers_t, const rpcproc_t,
[494] Fix | Delete
const xdrproc_t, const char *,
[495] Fix | Delete
const xdrproc_t, char *, const char *);
[496] Fix | Delete
#ifdef __cplusplus
[497] Fix | Delete
}
[498] Fix | Delete
#endif
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function