1 | This is a Python interface to Sun RPC, designed and implemented mostly
|
---|
2 | by reading the Internet RFCs about the subject.
|
---|
3 |
|
---|
4 | *** NOTE: xdr.py has evolved into the standard module xdrlib.py ***
|
---|
5 |
|
---|
6 | There are two library modules, xdr.py and rpc.py, and several example
|
---|
7 | clients: mountclient.py, nfsclient.py, and rnusersclient.py,
|
---|
8 | implementing the NFS Mount protocol, (part of) the NFS protocol, and
|
---|
9 | the "rnusers" protocol (used by rusers(1)), respectively. The latter
|
---|
10 | demonstrates the use of broadcast via the Port mapper's CALLIT
|
---|
11 | procedure.
|
---|
12 |
|
---|
13 | There is also a way to create servers in Python.
|
---|
14 |
|
---|
15 | To test the nfs client, run it from the shell with something like this:
|
---|
16 |
|
---|
17 | python -c 'import nfsclient; nfsclient.test()' [hostname [filesystemname]]
|
---|
18 |
|
---|
19 | When called without a filesystemname, it lists the filesystems at the
|
---|
20 | host; default host is the local machine.
|
---|
21 |
|
---|
22 | Other clients are tested similarly.
|
---|
23 |
|
---|
24 | For hostname, use e.g. wuarchive.wustl.edu or gatekeeper.dec.com (two
|
---|
25 | hosts that are known to export NFS filesystems with little restrictions).
|
---|
26 |
|
---|
27 | There are now two different RPC compilers:
|
---|
28 |
|
---|
29 | 1) Wim Lewis rpcgen.py found on http://www.omnigroup.com/~wiml/soft/stale-index.html#python.
|
---|
30 |
|
---|
31 | 2) Peter Åstrands rpcgen.py, which is part of "pynfs" (http://www.cendio.se/~peter/pynfs/).
|
---|