From 1bea92e3838ac9a413544f6f22683185cde08d74 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Mon, 12 Nov 2007 19:05:14 +0100 Subject: Reintegrate [[Hurd/HostmuxTranslator]] as [[hurd/translator/hostmux.mdwn]]. --- hurd/translator.mdwn | 1 + hurd/translator/hostmux.mdwn | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 hurd/translator/hostmux.mdwn (limited to 'hurd') diff --git a/hurd/translator.mdwn b/hurd/translator.mdwn index 9e72d108..f09b5398 100644 --- a/hurd/translator.mdwn +++ b/hurd/translator.mdwn @@ -35,6 +35,7 @@ The [[Hurd_Hacking_Guide]] also has a tutorial. # Existing Translators * [[pfinet]] +* [[hostmux]] * [[storeio]] * [[ext2fs]] * [[fatfs]] diff --git a/hurd/translator/hostmux.mdwn b/hurd/translator/hostmux.mdwn new file mode 100644 index 00000000..5fab2dc5 --- /dev/null +++ b/hurd/translator/hostmux.mdwn @@ -0,0 +1,31 @@ +Multiplexes arbitrary host names, making access to many differnt host fast and easy. + +For each host accessed via a directory an new translator is started with the hostname as option. Say, /hostmuxdemo should let you access your favourite host with your translator mytranslatorfs. + +**ls /hostmuxdemo/mybox/** would give the result of mytranslatorfs applied to host mybox. + +## Usage + +Hostmux takes translator options as argument and (in the easiest case ) starts the translator with the given arguments and the hostname as the last argument. + +### ftpfs + +ftpfs is a good example, that is even very usefull. With hostmux and ftpfs you can access anonymous ftp via the filesystem, sparing out complicate use of a ftp client. + +We assume you want to access the ftp root at all servers. The example host is ftp.yourbox.com. + +Usermux is called via **settrans -fgap /ftp /hurd/hostmux /hurd/ftpfs /** . + +* **-fg** makes settrans try hard to remove an existing old translator from **/ftp** +* **ap** sets an active translator (starts the translator) and a passive translator (stores translator information in the filesystem with which an active translator can be started on access of this node) +* **/ftp** is where we want to set the translator +* **/hurd/hostmux** is obviously our hostmux translator that will be started at **/ftp** and handle filesystem operations on **/ftp** and everything below (like **/ftp/ftp.yourbox.com/pub/**) +* **/hurd/ftpfs /** is the argument to hostmux. + +When **/ftp** is accessed, the first directory is interpreted as hostname and a new translator is set up with the **hostmux** arguments: + +**ls /ftp/ftp.yourhost.com/pub/** lets hostmux start a new traslator **/hurd/ftpfs / ftp.yourhost.com** and serve it via **/ftp/ftp.yourhos t.com/** as directory. Subsequent the directory **pub/** on **/ftp.yourhost.com/** can be accessed via the new created translator. + +You can see the new created translator in the process list: **ps ax | grep ftpsfs** . You shoud see **/hurd/ftpfs / ftp.yourhost.com** . + +-- [[Main/PatrickStrasser]] - 13 Jul 2004 -- cgit v1.2.3