|
Class: MountClient (in SunRPC)
Object
|
+--SunRPC::RPCEndPoint
|
+--SunRPC::RPCClient
|
+--SunRPC::MountClient
- Package:
- stx:goodies/communication
- Category:
- Net-Communication-SunRPC-NFS
- Version:
- rev:
1.21
date: 2017/11/18 09:52:17
- user: cg
- file: SunRPC_MountClient.st directory: goodies/communication
- module: stx stc-classLibrary: communication
- Author:
- Claus Gittinger
interface to the mount daemon (mountd); see RFC1057 and examples.
RFC1057
spec
-
xdr
-
operations
-
dump
-
return the mountd information (i.e. who has mounted what).
usage example(s):
(self toHost:'localhost') dumpToTranscript; close
(self toHost:'exept') dumpToTranscript; close
(self toHost:'funkfix') dumpToTranscript; close
(self toHost:'joshua' protocol:#udp port:33333) dumpToTranscript; close
|
-
export
-
return the exported directory mountd information.
usage example(s):
(self toHost:'localhost') export; close
(self toHost:'exept') export; close
(self toHost:'funkfix') export; close
(self toHost:'joshua' protocol:#udp port:33333) exportToTranscript; close
|
-
mount: dirPath
-
mount a directory - not yet operational from here
(need to access the mounted files via my own NFSClient, which is not yet ready)
usage example(s):
(self new programNumber:100005; host:'localhost') mount:'/foo'; close
(self new programNumber:100005; host:'localhost') mount:'/'; close
(self new programNumber:100005; host:'exept') mount:'/foo'; close
(self new programNumber:100005; host:'exept') mount:'/home'; close
(self new programNumber:100005; host:'exept') mount:'/'; close
(self new programNumber:100005; protocol:#tcp; host:'alan') mount:'/'; close
(self new programNumber:100005; protocol:#tcp; host:'exept') export; close
(self new programNumber:200005; protocol:#tcp; host:'alan') mount:'/'; close
(self new programNumber:200005; protocol:#tcp; host:'exept') export; close
(self toHost:'joshua' protocol:#udp port:33333) mount:'C:'; close
|
utilities
-
dumpToTranscript
-
dump the mountd information (i.e. who has mounted what).
roughly equivalent to showmount unix command
usage example(s):
(self toHost:'localhost') dumpToTranscript; close
(self toHost:'exept') dumpToTranscript; close
(self toHost:'funkfix') dumpToTranscript; close
(self toHost:'joshua' protocol:#udp port:33333) dumpToTranscript; close
|
-
exportToTranscript
-
dump the exported directory mountd information.
roughly equivalent to exports unix command
usage example(s):
(self toHost:'localhost') export; close
(self toHost:'exept') export; close
(self toHost:'funkfix') export; close
(self toHost:'joshua' protocol:#udp port:33333) exportToTranscript; close
|
connect test:
|mountClient|
mountClient := SunRPC::MountClient toHost:'localhost'.
mountClient null.
|
connect test (use standard MOUNT program number; explicit protocol & port):
|mountClient|
mountClient := SunRPC::MountClient new.
mountClient programNumber:100005; host:'exeptn' protocol:#udp port:20048.
mountClient null; export.
|
connect test (acquires port via portMapper):
|mountClient|
mountClient := SunRPC::MountClient toHost:'exeptn' protocol:#udp port:nil.
mountClient null.
|
dump local mounts:
|mountClient|
mountClient := SunRPC::MountClient toHost:'localhost'.
mountClient dumpToTranscript.
| dump mounts on some machine:
|mountClient|
mountClient := SunRPC::MountClient toHost:'alan' protocol:#udp port:33333.
mountClient dumpToTranscript.
|
dump export list:
|mountClient|
mountClient := SunRPC::MountClient toHost:'localhost'.
mountClient export.
|
use another (non default) port number:
|mountClient|
mountClient := SunRPC::MountClient toHost:'localhost' port:33333.
mountClient dumpToTranscript.
|
|