Rename RPC's 'struct pmap' to 'struct portmap' to avoid confusing it with
the other 'struct pmap'. Pointed out by: kmacy MFC after: 2 weeks
This commit is contained in:
parent
d9ab5c4abf
commit
710668615a
@ -294,7 +294,7 @@ nlm_get_rpc(struct sockaddr *sa, rpcprog_t prog, rpcvers_t vers)
|
||||
enum clnt_stat stat = RPC_SUCCESS;
|
||||
int rpcvers = RPCBVERS4;
|
||||
bool_t do_tcp = FALSE;
|
||||
struct pmap mapping;
|
||||
struct portmap mapping;
|
||||
u_short port = 0;
|
||||
|
||||
/*
|
||||
@ -392,7 +392,7 @@ nlm_get_rpc(struct sockaddr *sa, rpcprog_t prog, rpcvers_t vers)
|
||||
mapping.pm_port = 0;
|
||||
|
||||
stat = CLNT_CALL(rpcb, (rpcprog_t) PMAPPROC_GETPORT,
|
||||
(xdrproc_t) xdr_pmap, &mapping,
|
||||
(xdrproc_t) xdr_portmap, &mapping,
|
||||
(xdrproc_t) xdr_u_short, &port, timo);
|
||||
|
||||
if (stat == RPC_SUCCESS) {
|
||||
|
@ -44,15 +44,15 @@
|
||||
* PMAPPROC_NULL() returns ()
|
||||
* takes nothing, returns nothing
|
||||
*
|
||||
* PMAPPROC_SET(struct pmap) returns (bool_t)
|
||||
* PMAPPROC_SET(struct portmap) returns (bool_t)
|
||||
* TRUE is success, FALSE is failure. Registers the tuple
|
||||
* [prog, vers, prot, port].
|
||||
*
|
||||
* PMAPPROC_UNSET(struct pmap) returns (bool_t)
|
||||
* PMAPPROC_UNSET(struct portmap) returns (bool_t)
|
||||
* TRUE is success, FALSE is failure. Un-registers pair
|
||||
* [prog, vers]. prot and port are ignored.
|
||||
*
|
||||
* PMAPPROC_GETPORT(struct pmap) returns (long unsigned).
|
||||
* PMAPPROC_GETPORT(struct portmap) returns (long unsigned).
|
||||
* 0 is failure. Otherwise returns the port number where the pair
|
||||
* [prog, vers] is registered. It may lie!
|
||||
*
|
||||
@ -86,7 +86,7 @@
|
||||
#define PMAPPROC_DUMP ((u_long)4)
|
||||
#define PMAPPROC_CALLIT ((u_long)5)
|
||||
|
||||
struct pmap {
|
||||
struct portmap {
|
||||
long unsigned pm_prog;
|
||||
long unsigned pm_vers;
|
||||
long unsigned pm_prot;
|
||||
@ -94,12 +94,12 @@ struct pmap {
|
||||
};
|
||||
|
||||
struct pmaplist {
|
||||
struct pmap pml_map;
|
||||
struct portmap pml_map;
|
||||
struct pmaplist *pml_next;
|
||||
};
|
||||
|
||||
__BEGIN_DECLS
|
||||
extern bool_t xdr_pmap(XDR *, struct pmap *);
|
||||
extern bool_t xdr_portmap(XDR *, struct portmap *);
|
||||
extern bool_t xdr_pmaplist(XDR *, struct pmaplist **);
|
||||
extern bool_t xdr_pmaplist_ptr(XDR *, struct pmaplist *);
|
||||
__END_DECLS
|
||||
|
@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <rpc/rpcb_prot.h>
|
||||
|
||||
bool_t
|
||||
xdr_pmap(XDR *xdrs, struct pmap *regs)
|
||||
xdr_portmap(XDR *xdrs, struct portmap *regs)
|
||||
{
|
||||
|
||||
if (xdr_u_long(xdrs, ®s->pm_prog) &&
|
||||
|
Loading…
Reference in New Issue
Block a user