2 * nfsrpc.h -- RPC client APIs provided by support/nfs
4 * Copyright (C) 2008 Oracle Corporation. All rights reserved.
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public
17 * License along with this program; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 021110-1307, USA.
23 #ifndef __NFS_UTILS_NFSRPC_H
24 #define __NFS_UTILS_NFSRPC_H
26 #include <rpc/types.h>
29 * Conventional RPC program numbers
32 #define RPCBPROG ((rpcprog_t)100000)
35 #define PMAPPROG ((rpcprog_t)100000)
39 #define NFSPROG ((rpcprog_t)100003)
42 #define MOUNTPROG ((rpcprog_t)100005)
45 #define NLMPROG ((rpcprog_t)100021)
48 #define NSMPROG ((rpcprog_t)100024)
52 * Look up an RPC program name in /etc/rpc
54 extern rpcprog_t nfs_getrpcbyname(const rpcprog_t, const char *table[]);
57 * Look up a port number in /etc/services for an RPC program
59 extern unsigned short nfs_getportbynumber(const rpcprog_t program,
60 const unsigned short transport);
63 * Acquire an RPC CLIENT *
65 extern CLIENT *nfs_get_rpcclient(const struct sockaddr *,
66 const socklen_t, const unsigned short,
67 const rpcprog_t, const rpcvers_t,
70 #endif /* __NFS_UTILS_NFSRPC_H */