Skip to content

Commit

Permalink
SUNRPC: introduce rpcbind: replacement for in-kernel portmapper
Browse files Browse the repository at this point in the history
Introduce a replacement for the in-kernel portmapper client that supports
all 3 versions of the rpcbind protocol.  This code is not used yet.

Original code by Groupe Bull updated for the latest kernel, with multiple
bug fixes.

Note that rpcb_clnt.c does not yet support registering via versions 3 and
4 of the rpcbind protocol.  That is planned for a later patch.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed May 1, 2007
1 parent c5a4dd8 commit a509050
Show file tree
Hide file tree
Showing 6 changed files with 632 additions and 1 deletion.
3 changes: 3 additions & 0 deletions include/linux/sunrpc/clnt.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ int rpc_destroy_client(struct rpc_clnt *);
void rpc_release_client(struct rpc_clnt *);
void rpc_getport(struct rpc_task *);
int rpc_register(u32, u32, int, unsigned short, int *);
int rpcb_register(u32, u32, int, unsigned short, int *);
void rpcb_getport(struct rpc_task *);

void rpc_call_setup(struct rpc_task *, struct rpc_message *, int);

Expand All @@ -146,6 +148,7 @@ char * rpc_peeraddr2str(struct rpc_clnt *, enum rpc_display_format_t);
* Helper function for NFSroot support
*/
int rpc_getport_external(struct sockaddr_in *, __u32, __u32, int);
int rpcb_getport_external(struct sockaddr_in *, __u32, __u32, int);

#endif /* __KERNEL__ */
#endif /* _LINUX_SUNRPC_CLNT_H */
1 change: 1 addition & 0 deletions include/linux/sunrpc/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#define RPCDBG_NFS 0x0008
#define RPCDBG_AUTH 0x0010
#define RPCDBG_PMAP 0x0020
#define RPCDBG_BIND 0x0020
#define RPCDBG_SCHED 0x0040
#define RPCDBG_TRANS 0x0080
#define RPCDBG_SVCSOCK 0x0100
Expand Down
1 change: 1 addition & 0 deletions include/linux/sunrpc/xprt.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ struct rpc_xprt {
unsigned long state; /* transport state */
unsigned char shutdown : 1, /* being shut down */
resvport : 1; /* use a reserved port */
unsigned int bind_index; /* bind function index */

/*
* Connection of transports
Expand Down
2 changes: 1 addition & 1 deletion net/sunrpc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ obj-$(CONFIG_SUNRPC_GSS) += auth_gss/
sunrpc-y := clnt.o xprt.o socklib.o xprtsock.o sched.o \
auth.o auth_null.o auth_unix.o \
svc.o svcsock.o svcauth.o svcauth_unix.o \
pmap_clnt.o timer.o xdr.o \
pmap_clnt.o rpcb_clnt.o timer.o xdr.o \
sunrpc_syms.o cache.o rpc_pipe.o
sunrpc-$(CONFIG_PROC_FS) += stats.o
sunrpc-$(CONFIG_SYSCTL) += sysctl.o
Loading

0 comments on commit a509050

Please sign in to comment.