eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'SunRPC::MountClient':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: MountClient (in SunRPC)


Inheritance:

   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

Description:


interface to the mount daemon (mountd); see RFC1057 and examples.


Related information:

    RFC1057

Class protocol:

spec
o  xdr


Instance protocol:

operations
o  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

o  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

o  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
o  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

o  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


Examples:


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.


ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Mon, 04 Aug 2025 16:54:31 GMT