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