1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
[[!meta copyright="Copyright © 2007, 2008, 2009 Free Software Foundation,
Inc."]]
[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
id="license" text="Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no Invariant
Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
is included in the section entitled
[[GNU Free Documentation License|/fdl]]."]]"""]]
A translator is simply a normal program acting as
an object server and participating in the Hurd's
distributed [[virtual_file_system]]. It is so-called
because it typically exports a file system
(although need not: cf. [[auth]], [[proc]]
and [[pfinet]]) and thus translates object invocations
into calls appropriate for the backing store
(e.g., ext2 file system, nfs server, etc.).
A translator is usually registered with a specific file system node by using
the [[`settrans`|settrans]] command.
Translators do not require any special privilege
to run. The privilege they require is simply
that to access the indiviudal resources they use.
This is primarily the [[backing_store]] and the node
they attach to. Typically, a translator can
only be attached to a node by the node's owner.
On [[Unix]] this is not possible because file systems
and the virtual file system are implemented in the
kernel and thus have absolute access to the machine.
As the protocols do not require any special privilege
to implement, this is not an issue on the Hurd.
In Mach parlance, a *translator* is what they name a *server*: a process that
participates in [[RPC]] interactions. In the Hurd, a translator is a server
that is additionally attached to a filesystem node. Thus, it is quite common,
even in the Hurd context, to speak about *server*s if you're stressing the RPC
part, and on the other hand about *translator*s if you're stressing the
filesystem part: a translator implements the [[interface/fs]] and
[[interface/io]] interfaces. For example: *the [[pfinet]] server implements
the socket API calls (which are mapped by [[glibc]] to equivalent RPC calls)*,
compared to *a [[libdiskfs]]-based translator implements a filesystem, based on
a backing store*.
To learn how to write a translator, read the code!
It is well documented, in particular, the header files.
The [[Hurd_Hacking_Guide]] also has a tutorial.
Also there is an [[writing/example]] about how to write a simple translator.
See some [[examples]] about how to use translators.
Marcus Brinkmann has written a document about [[documentation/translators]].
Here are some [[hints_about_debugging_translators|debugging/translator]]
available.
Read about translator [[short-circuiting]].
# Existing Translators
* [[auth]]
* [[exec]]
* [[pfinet]]
* [[pflocal]]
* [[hostmux]]
* [[storeio]]
* [[ext2fs]]
* [[fatfs]]
* [[magic]]
* [[mboxfs]]
* [[unionfs]]
* [[xmlfs]]
* ...
# Translators Being Under Development
* [[random]]
* [[emailfs]] -- email as a filesystem
* [[cvsfs]]
* [[tmpfs]]
* [[procfs]]
* [[nsmux]]
* ...
# Translator Wishlists
* [[wishlist_1]]
* [[wishlist_2]]
|