Unified · Split
| @@ -1,7 +1,10 @@ | |||
| 1 | 20100205 | ||
| 2 | update man pages to replace most references to Styx by 9P | ||
| 3 | update man pages to replace references to sys-dial(2) by dial(2) | ||
| 1 | 20100203 | 4 | 20100203 |
| 2 | appl/lib/cfg.b treat \r as white space (issue 69, 70) | 5 | appl/lib/cfg.b treat \r as white space [issue 69, issue 70] |
| 3 | add u64int to lib9.h files that needed it | 6 | add u64int to lib9.h files that needed it |
| 4 | add sha2.c sha256block.c sha512block.c to libsec/port and include/libsec.h | 7 | add sha2.c sha256block.c sha512block.c to libsec/port and include/libsec.h [issue 185, mechiel] |
| 5 | add new sha functions to module/keyring.m and libinterp/keyring.c | 8 | add new sha functions to module/keyring.m and libinterp/keyring.c |
| 6 | 20100115 | 9 | 20100115 |
| 7 | appl/cmd/tarfs.b man/4/tarfs changes to permission handling from mechiel [issue 220] | 10 | appl/cmd/tarfs.b man/4/tarfs changes to permission handling from mechiel [issue 220] |
| @@ -29,7 +29,7 @@ Secstorec: module · 28 unmodified lines | |||
| 29 | Maxfilesize: con 128*1024; | 29 | Maxfilesize: con 128*1024; |
| 30 | 30 | ||
| 31 | stderr: ref Sys->FD; | 31 | stderr: ref Sys->FD; |
| 32 | conn: ref Sys->Connection; | 32 | conn: ref Dial->Connection; |
| 33 | seckey: array of byte; | 33 | seckey: array of byte; |
| 34 | filekey: array of byte; | 34 | filekey: array of byte; |
| 35 | file: array of byte; | 35 | file: array of byte; |
| @@ -100,7 +100,7 @@ init(nil: ref Draw->Context, args: list of string) · 64 unmodified lines | |||
| 100 | if(nf > 1) | 100 | if(nf > 1) |
| 101 | pin = hd tl flds; | 101 | pin = hd tl flds; |
| 102 | } | 102 | } |
| 103 | conn: ref Sys->Connection; | 103 | conn: ref Dial->Connection; |
| 104 | Auth: | 104 | Auth: |
| 105 | for(;;){ | 105 | for(;;){ |
| 106 | if(!iflag) | 106 | if(!iflag) |
| @@ -229,7 +229,7 @@ verb(op: int, n: string) · 122 unmodified lines | |||
| 229 | sys->fprint(stderr, "%c %q\n", op, n); | 229 | sys->fprint(stderr, "%c %q\n", op, n); |
| 230 | } | 230 | } |
| 231 | 231 | ||
| 232 | getfile(conn: ref Sys->Connection, fname: string, key: array of byte): array of byte | 232 | getfile(conn: ref Dial->Connection, fname: string, key: array of byte): array of byte |
| 233 | { | 233 | { |
| 234 | f := secstore->getfile(conn, fname, 0); | 234 | f := secstore->getfile(conn, fname, 0); |
| 235 | if(f == nil) | 235 | if(f == nil) |
| @@ -7,6 +7,9 @@ implement Secstore; · 6 unmodified lines | |||
| 7 | include "sys.m"; | 7 | include "sys.m"; |
| 8 | sys: Sys; | 8 | sys: Sys; |
| 9 | 9 | ||
| 10 | include "dial.m"; | ||
| 11 | dialler: Dial; | ||
| 12 | |||
| 10 | include "keyring.m"; | 13 | include "keyring.m"; |
| 11 | kr: Keyring; | 14 | kr: Keyring; |
| 12 | DigestState, IPint: import kr; | 15 | DigestState, IPint: import kr; |
| @@ -27,6 +30,7 @@ init() · 14 unmodified lines | |||
| 27 | kr = load Keyring Keyring->PATH; | 30 | kr = load Keyring Keyring->PATH; |
| 28 | ssl = load SSL SSL->PATH; | 31 | ssl = load SSL SSL->PATH; |
| 29 | base64 = load Encoding Encoding->BASE64PATH; | 32 | base64 = load Encoding Encoding->BASE64PATH; |
| 33 | dialler = load Dial Dial->PATH; | ||
| 30 | initPAKparams(); | 34 | initPAKparams(); |
| 31 | } | 35 | } |
| 32 | 36 | ||
| @@ -38,7 +42,7 @@ privacy(): int · 5 unmodified lines | |||
| 38 | return 1; | 42 | return 1; |
| 39 | } | 43 | } |
| 40 | 44 | ||
| 41 | connect(addr: string, user: string, pwhash: array of byte): (ref Sys->Connection, string, string) | 45 | connect(addr: string, user: string, pwhash: array of byte): (ref Dial->Connection, string, string) |
| 42 | { | 46 | { |
| 43 | conn := dial(addr); | 47 | conn := dial(addr); |
| 44 | if(conn == nil){ | 48 | if(conn == nil){ |
| @@ -53,12 +57,12 @@ connect(addr: string, user: string, pwhash: array of byte): (ref Sys->Connection · 8 unmodified lines | |||
| 53 | return (conn, sname, diag); | 57 | return (conn, sname, diag); |
| 54 | } | 58 | } |
| 55 | 59 | ||
| 56 | dial(netaddr: string): ref Sys->Connection | 60 | dial(netaddr: string): ref Dial->Connection |
| 57 | { | 61 | { |
| 58 | if(netaddr == nil) | 62 | if(netaddr == nil) |
| 59 | netaddr = "net!$auth!secstore"; | 63 | netaddr = "net!$auth!secstore"; |
| 60 | (ok, conn) := sys->dial(netaddr, nil); | 64 | conn := dialler->dial(netaddr, nil); |
| 61 | if(ok < 0) | 65 | if(conn == nil) |
| 62 | return nil; | 66 | return nil; |
| 63 | (err, sslconn) := ssl->connect(conn.dfd); | 67 | (err, sslconn) := ssl->connect(conn.dfd); |
| 64 | if(err != nil) | 68 | if(err != nil) |
| @@ -66,7 +70,7 @@ dial(netaddr: string): ref Sys->Connection · 1 unmodified line | |||
| 66 | return sslconn; | 70 | return sslconn; |
| 67 | } | 71 | } |
| 68 | 72 | ||
| 69 | auth(conn: ref Sys->Connection, user: string, pwhash: array of byte): (string, string) | 73 | auth(conn: ref Dial->Connection, user: string, pwhash: array of byte): (string, string) |
| 70 | { | 74 | { |
| 71 | sname := PAKclient(conn, user, pwhash); | 75 | sname := PAKclient(conn, user, pwhash); |
| 72 | if(sname == nil) | 76 | if(sname == nil) |
| @@ -96,7 +100,7 @@ cansecstore(netaddr: string, user: string): int · 23 unmodified lines | |||
| 96 | return string buf[0:n] == "!account exists"; | 100 | return string buf[0:n] == "!account exists"; |
| 97 | } | 101 | } |
| 98 | 102 | ||
| 99 | sendpin(conn: ref Sys->Connection, pin: string): int | 103 | sendpin(conn: ref Dial->Connection, pin: string): int |
| 100 | { | 104 | { |
| 101 | if(sys->fprint(conn.dfd, "STA%s", pin) < 0) | 105 | if(sys->fprint(conn.dfd, "STA%s", pin) < 0) |
| 102 | return -1; | 106 | return -1; |
| @@ -109,7 +113,7 @@ sendpin(conn: ref Sys->Connection, pin: string): int · 6 unmodified lines | |||
| 109 | return 0; | 113 | return 0; |
| 110 | } | 114 | } |
| 111 | 115 | ||
| 112 | files(conn: ref Sys->Connection): list of (string, int, string, string, array of byte) | 116 | files(conn: ref Dial->Connection): list of (string, int, string, string, array of byte) |
| 113 | { | 117 | { |
| 114 | file := getfile(conn, ".", 0); | 118 | file := getfile(conn, ".", 0); |
| 115 | if(file == nil) | 119 | if(file == nil) |
| @@ -136,7 +140,7 @@ files(conn: ref Sys->Connection): list of (string, int, string, string, array of · 20 unmodified lines | |||
| 136 | return l; | 140 | return l; |
| 137 | } | 141 | } |
| 138 | 142 | ||
| 139 | getfile(conn: ref Sys->Connection, name: string, maxsize: int): array of byte | 143 | getfile(conn: ref Dial->Connection, name: string, maxsize: int): array of byte |
| 140 | { | 144 | { |
| 141 | fd := conn.dfd; | 145 | fd := conn.dfd; |
| 142 | if(maxsize <= 0) | 146 | if(maxsize <= 0) |
| @@ -171,7 +175,7 @@ getfile(conn: ref Sys->Connection, name: string, maxsize: int): array of byte · 28 unmodified lines | |||
| 171 | return file; | 175 | return file; |
| 172 | } | 176 | } |
| 173 | 177 | ||
| 174 | remove(conn: ref Sys->Connection, name: string): int | 178 | remove(conn: ref Dial->Connection, name: string): int |
| 175 | { | 179 | { |
| 176 | if(sys->fprint(conn.dfd, "RM %s\n", name) < 0) | 180 | if(sys->fprint(conn.dfd, "RM %s\n", name) < 0) |
| 177 | return -1; | 181 | return -1; |
| @@ -179,7 +183,7 @@ remove(conn: ref Sys->Connection, name: string): int · 1 unmodified line | |||
| 179 | return 0; | 183 | return 0; |
| 180 | } | 184 | } |
| 181 | 185 | ||
| 182 | bye(conn: ref Sys->Connection) | 186 | bye(conn: ref Dial->Connection) |
| 183 | { | 187 | { |
| 184 | if(conn != nil){ | 188 | if(conn != nil){ |
| 185 | if(conn.dfd != nil) | 189 | if(conn.dfd != nil) |
| @@ -270,7 +274,7 @@ writerr(fd: ref Sys->FD, s: string) · 84 unmodified lines | |||
| 270 | sys->werrstr(s); | 274 | sys->werrstr(s); |
| 271 | } | 275 | } |
| 272 | 276 | ||
| 273 | setsecret(conn: ref Sys->Connection, sigma: array of byte, direction: int): string | 277 | setsecret(conn: ref Dial->Connection, sigma: array of byte, direction: int): string |
| 274 | { | 278 | { |
| 275 | secretin := array[Keyring->SHA1dlen] of byte; | 279 | secretin := array[Keyring->SHA1dlen] of byte; |
| 276 | secretout := array[Keyring->SHA1dlen] of byte; | 280 | secretout := array[Keyring->SHA1dlen] of byte; |
| @@ -399,14 +403,14 @@ shorthash(mess: string, C: string, S: string, m: string, mu: string, sigma: stri · 122 unmodified lines | |||
| 399 | # On output, session secret has been set in conn | 403 | # On output, session secret has been set in conn |
| 400 | # (unless return code is negative, which means failure). | 404 | # (unless return code is negative, which means failure). |
| 401 | # | 405 | # |
| 402 | PAKclient(conn: ref Sys->Connection, C: string, pwhash: array of byte): string | 406 | PAKclient(conn: ref Dial->Connection, C: string, pwhash: array of byte): string |
| 403 | { | 407 | { |
| 404 | dfd := conn.dfd; | 408 | dfd := conn.dfd; |
| 405 | 409 | ||
| 406 | (hexHi, H, nil) := PAK_Hi(C, pwhash); | 410 | (hexHi, H, nil) := PAK_Hi(C, pwhash); |
| 407 | 411 | ||
| 408 | # random 1<=x<=q-1; send C, m=g**x H | 412 | # random 1<=x<=q-1; send C, m=g**x H |
| 409 | x := mod(IPint.random(240, 240), pak.q); | 413 | x := mod(IPint.random(240), pak.q); |
| 410 | if(x.eq(IPint.inttoip(0))) | 414 | if(x.eq(IPint.inttoip(0))) |
| 411 | x = IPint.inttoip(1); | 415 | x = IPint.inttoip(1); |
| 412 | m := mod(pak.g.expmod(x, pak.p).mul(H), pak.p); | 416 | m := mod(pak.g.expmod(x, pak.p).mul(H), pak.p); |
Binary file not shown.
| @@ -25,7 +25,7 @@ a summary of differences with Unix · 24 unmodified lines | |||
| 25 | .I make , | 25 | .I make , |
| 26 | can be found in | 26 | can be found in |
| 27 | .I "Maintaining Files on Plan 9 with Mk" | 27 | .I "Maintaining Files on Plan 9 with Mk" |
| 28 | by Hume and Flandera, | 28 | by Hume and Flandrena, |
| 29 | reprinted in this volume. | 29 | reprinted in this volume. |
| 30 | The source for | 30 | The source for |
| 31 | .CW mk | 31 | .CW mk |
| @@ -453,7 +453,7 @@ UART, and IrDA mode · 421 unmodified lines | |||
| 453 | .CW etherscc.c | 453 | .CW etherscc.c |
| 454 | and | 454 | and |
| 455 | .CW devuart.c ). | 455 | .CW devuart.c ). |
| 456 | The IrDA has been used for Styx transport between a FADS board | 456 | The IrDA has been used for 9P transport between a FADS board |
| 457 | and an IBM Thinkpad 560. | 457 | and an IBM Thinkpad 560. |
| 458 | The file | 458 | The file |
| 459 | .CW screen.c | 459 | .CW screen.c |
Binary file not shown.
| @@ -1 +1 @@ | |||
| 1 | #define VERSION "Fourth Edition (20100203)" | 1 | #define VERSION "Fourth Edition (20100205)" |
| @@ -89,13 +89,14 @@ it is assumed to be a network address for a machine acting · 88 unmodified lines | |||
| 89 | as a file server. | 89 | as a file server. |
| 90 | This argument should then conform to the conventions | 90 | This argument should then conform to the conventions |
| 91 | described in | 91 | described in |
| 92 | .IR sys-dial (2). | 92 | .IR dial (2). |
| 93 | Otherwise | 93 | Otherwise |
| 94 | .I source | 94 | .I source |
| 95 | should be the name of a file that when opened gives a connection | 95 | should be the name of a file that when opened gives a connection |
| 96 | to a file server, something serving the Styx protocol | 96 | to a file server, something serving the 9P protocol |
| 97 | described in | 97 | described in |
| 98 | .IR intro (5). | 98 | .IR intro (5), |
| 99 | formerly called `Styx'. | ||
| 99 | The optional | 100 | The optional |
| 100 | .I spec | 101 | .I spec |
| 101 | argument to | 102 | argument to |
| @@ -262,7 +263,7 @@ Note the caveats on that page. · 160 unmodified lines | |||
| 262 | For | 263 | For |
| 263 | .I mount | 264 | .I mount |
| 264 | only, | 265 | only, |
| 265 | the file server serves the original version of the Styx protocol, and | 266 | the file server serves the 1995 version of Inferno's Styx protocol, and |
| 266 | .I mount | 267 | .I mount |
| 267 | inserts a process that translates to the current version. | 268 | inserts a process that translates to the current version. |
| 268 | .SH SOURCE | 269 | .SH SOURCE |
| @@ -273,10 +274,10 @@ inserts a process that translates to the current version. · 4 unmodified lines | |||
| 273 | .B /appl/cmd/unmount.b | 274 | .B /appl/cmd/unmount.b |
| 274 | .SH SEE ALSO | 275 | .SH SEE ALSO |
| 275 | .IR sh (1), | 276 | .IR sh (1), |
| 277 | .IR dial (2), | ||
| 276 | .IR keyring-auth (2), | 278 | .IR keyring-auth (2), |
| 277 | .IR security-auth (2), | 279 | .IR security-auth (2), |
| 278 | .IR sys-intro (2), | 280 | .IR sys-intro (2), |
| 279 | .IR sys-bind (2), | 281 | .IR sys-bind (2), |
| 280 | .IR sys-dial (2), | ||
| 281 | .IR intro (3), | 282 | .IR intro (3), |
| 282 | .IR getauthinfo (8) | 283 | .IR getauthinfo (8) |
| @@ -49,7 +49,7 @@ is not used after authentication. · 48 unmodified lines | |||
| 49 | .SH SOURCE | 49 | .SH SOURCE |
| 50 | .B /appl/cmd/cpu.b | 50 | .B /appl/cmd/cpu.b |
| 51 | .SH SEE ALSO | 51 | .SH SEE ALSO |
| 52 | .IR sys-dial (2), | 52 | .IR dial (2), |
| 53 | .IR keyring-auth (2), | 53 | .IR keyring-auth (2), |
| 54 | .IR security-auth (2) | 54 | .IR security-auth (2) |
| 55 | .SH BUGS | 55 | .SH BUGS |
| @@ -11,12 +11,12 @@ grid: register \- registers a resource with a known · 10 unmodified lines | |||
| 11 | 11 | ||
| 12 | .SH DESCRIPTION | 12 | .SH DESCRIPTION |
| 13 | .I Register | 13 | .I Register |
| 14 | takes a program which serves a Styx (see | 14 | takes a program that serves a namespace using the 9P protocol on its standard input |
| 15 | .IR intro (5)) | 15 | and registers it with a known |
| 16 | namespace on | 16 | .IR registery (4). |
| 17 | .I stdin | 17 | (See |
| 18 | and registers it with a known | 18 | .IR intro (5) |
| 19 | .IR registry (4). | 19 | for a description of the protocol.) |
| 20 | It then marshals the service by listening for incoming connections and exporting the namespace across them. | 20 | It then marshals the service by listening for incoming connections and exporting the namespace across them. |
| 21 | .I Register | 21 | .I Register |
| 22 | prints out various status messages to | 22 | prints out various status messages to |
| @@ -17,9 +17,11 @@ Once started, · 16 unmodified lines | |||
| 17 | .IR session | 17 | .IR session |
| 18 | presents a heirarchical view of currently registered resources (such as | 18 | presents a heirarchical view of currently registered resources (such as |
| 19 | .IR grid-ns (1)) | 19 | .IR grid-ns (1)) |
| 20 | which export a Styx (see | 20 | that serve name spaces using 9P. |
| 21 | .IR intro (5)) | 21 | (See |
| 22 | namespace. The top level displays the type of resource e.g. | 22 | .IR intro (5) |
| 23 | for a description of the protocol.) | ||
| 24 | The top level displays the type of resource, for instance | ||
| 23 | .BR 'CPU resource' , | 25 | .BR 'CPU resource' , |
| 24 | whilst the second level shows the name of each individual resource. Descending futher down the tree will reveal the attributes of the selected resource. To mount a resource and see the namespace it exports, click mouse button 3 on the resource name. The view will switch to a split pane view displaying the resource namespace with directories listed on the left and all files in the current directory displayed on the right. | 26 | whilst the second level shows the name of each individual resource. Descending futher down the tree will reveal the attributes of the selected resource. To mount a resource and see the namespace it exports, click mouse button 3 on the resource name. The view will switch to a split pane view displaying the resource namespace with directories listed on the left and all files in the current directory displayed on the right. |
| 25 | .PP | 27 | .PP |
| @@ -59,7 +59,7 @@ waits for an incoming network connection on · 58 unmodified lines | |||
| 59 | (as accepted by | 59 | (as accepted by |
| 60 | .B announce | 60 | .B announce |
| 61 | in | 61 | in |
| 62 | .IR sys-dial (2)) | 62 | .IR dial (2)) |
| 63 | and then invokes | 63 | and then invokes |
| 64 | .IR sh (1) | 64 | .IR sh (1) |
| 65 | to run the associated | 65 | to run the associated |
| @@ -97,7 +97,7 @@ with the shell variable · 31 unmodified lines | |||
| 97 | .B net | 97 | .B net |
| 98 | set to the name of the corresponding network directory | 98 | set to the name of the corresponding network directory |
| 99 | (see | 99 | (see |
| 100 | .IR sys-dial (2)), | 100 | .IR dial (2)), |
| 101 | before listening for incoming calls. | 101 | before listening for incoming calls. |
| 102 | This can be used to change, or find out the characteristics | 102 | This can be used to change, or find out the characteristics |
| 103 | of an announced port (for instance to find out | 103 | of an announced port (for instance to find out |
| @@ -231,7 +231,7 @@ attach message seen by the command that · 127 unmodified lines | |||
| 231 | has been started by | 231 | has been started by |
| 232 | .IR styxlisten . | 232 | .IR styxlisten . |
| 233 | .SH "SEE ALSO" | 233 | .SH "SEE ALSO" |
| 234 | .IR svc (8), | 234 | .IR dial (2), |
| 235 | .IR sys-dial (2), | 235 | .IR ssl (3), |
| 236 | .IR auth (6), | 236 | .IR auth (6), |
| 237 | .IR ssl (3) | 237 | .IR svc (8) |
| @@ -61,7 +61,7 @@ to the file's owner, members of the file's group and anybody else · 60 unmodified lines | |||
| 61 | respectively. | 61 | respectively. |
| 62 | .IP 2. | 62 | .IP 2. |
| 63 | The device type (this is the `#' device letter for local devices | 63 | The device type (this is the `#' device letter for local devices |
| 64 | or `M' for files mounted over a Styx connection). | 64 | or `M' for files mounted over a 9P connection). |
| 65 | .IP 3. | 65 | .IP 3. |
| 66 | The device instance number (this distinguishes between | 66 | The device instance number (this distinguishes between |
| 67 | separately mounted instances of the same device). | 67 | separately mounted instances of the same device). |
| @@ -27,7 +27,7 @@ mount or bind, the original name of the file is shown. · 26 unmodified lines | |||
| 27 | .PP | 27 | .PP |
| 28 | Mounts of file services on a network show the network address as | 28 | Mounts of file services on a network show the network address as |
| 29 | given to | 29 | given to |
| 30 | .IR sys-dial (2) | 30 | .IR dial (2) |
| 31 | instead of the name of the data file for the connection; the | 31 | instead of the name of the data file for the connection; the |
| 32 | .B -r | 32 | .B -r |
| 33 | option causes | 33 | option causes |
| @@ -40,4 +40,3 @@ to show the raw file name instead. · 6 unmodified lines | |||
| 40 | .IR prog (3), | 40 | .IR prog (3), |
| 41 | .IR namespace (4), | 41 | .IR namespace (4), |
| 42 | .IR namespace (6) | 42 | .IR namespace (6) |
| 43 | |||
| @@ -98,7 +98,7 @@ as the extra authentication code if the server demands it. · 97 unmodified lines | |||
| 98 | Connect to the server at the given network | 98 | Connect to the server at the given network |
| 99 | .IR address , | 99 | .IR address , |
| 100 | as defined by | 100 | as defined by |
| 101 | .IR sys-dial (2), | 101 | .IR dial (2), |
| 102 | and translated by | 102 | and translated by |
| 103 | .IR cs (8). | 103 | .IR cs (8). |
| 104 | The default is | 104 | The default is |
| @@ -235,7 +235,9 @@ memory-based file called · 234 unmodified lines | |||
| 235 | .EE | 235 | .EE |
| 236 | It is, however, very limited, as binary data stored in the file | 236 | It is, however, very limited, as binary data stored in the file |
| 237 | will be corrupted, and the size of the file is limited to the amount | 237 | will be corrupted, and the size of the file is limited to the amount |
| 238 | of data that can be transmitted in a single Styx message (8192 bytes). | 238 | of data that can be transmitted in a single write |
| 239 | (see | ||
| 240 | .IR sys-read (2)). | ||
| 239 | .PP | 241 | .PP |
| 240 | The following code implements a single-threaded logfile | 242 | The following code implements a single-threaded logfile |
| 241 | which can support multiple concurrent writers: | 243 | which can support multiple concurrent writers: |
| @@ -9,7 +9,7 @@ telnet \- make a remote telnet connection · 8 unmodified lines | |||
| 9 | uses the Telnet protocol to talk to a remote | 9 | uses the Telnet protocol to talk to a remote |
| 10 | .IR machine , | 10 | .IR machine , |
| 11 | addressed using any form acceptable to | 11 | addressed using any form acceptable to |
| 12 | .IR sys-dial (2): | 12 | .IR dial (2): |
| 13 | .IB net ! host ! port | 13 | .IB net ! host ! port |
| 14 | in general. | 14 | in general. |
| 15 | The default | 15 | The default |
| @@ -203,7 +203,7 @@ and consequently those values must remain valid until the last use of · 202 unmodified lines | |||
| 203 | .BR up->genbuf .) | 203 | .BR up->genbuf .) |
| 204 | If channel | 204 | If channel |
| 205 | .I c | 205 | .I c |
| 206 | corresponds to a file descriptor on which Styx is served, | 206 | corresponds to a file descriptor on which 9P is served, |
| 207 | .I devdir | 207 | .I devdir |
| 208 | sets both the flag bit | 208 | sets both the flag bit |
| 209 | .B QTMOUNT | 209 | .B QTMOUNT |
| @@ -214,9 +214,7 @@ and the flag bit · 4 unmodified lines | |||
| 214 | in | 214 | in |
| 215 | .IB dp ->mode | 215 | .IB dp ->mode |
| 216 | (see | 216 | (see |
| 217 | .I export | 217 | .IR sys-export (2) |
| 218 | in | ||
| 219 | .IR sys-dial (2) | ||
| 220 | and | 218 | and |
| 221 | .I mount | 219 | .I mount |
| 222 | in | 220 | in |
| @@ -470,7 +468,7 @@ returned by · 247 unmodified lines | |||
| 470 | .BR Qid.path ). | 468 | .BR Qid.path ). |
| 471 | If | 469 | If |
| 472 | .I c | 470 | .I c |
| 473 | is a communications channel connecting a Styx server to a current mount point, | 471 | is a communications channel connecting a 9P server to a current mount point, |
| 474 | the | 472 | the |
| 475 | .B DMMOUNT | 473 | .B DMMOUNT |
| 476 | bit is set in the resulting | 474 | bit is set in the resulting |
| @@ -7,11 +7,13 @@ ODBC \- A Windows ODBC file server · 6 unmodified lines | |||
| 7 | .B -d | 7 | .B -d |
| 8 | ] [ | 8 | ] [ |
| 9 | .BI -p " port" | 9 | .BI -p " port" |
| 10 | ] [ | ||
| 11 | .BI -u " user" | ||
| 10 | ] | 12 | ] |
| 11 | .SH DESCRIPTION | 13 | .SH DESCRIPTION |
| 12 | .I Odbc | 14 | .I Odbc |
| 13 | is a file server that runs under Windows and | 15 | is a file server that runs under Windows and |
| 14 | exports a Styx namespace | 16 | exports a 9P namespace |
| 15 | (see | 17 | (see |
| 16 | .IR intro (5)). | 18 | .IR intro (5)). |
| 17 | An Inferno process that mounts the namespace | 19 | An Inferno process that mounts the namespace |
| @@ -26,6 +28,15 @@ to print debugging information. · 8 unmodified lines | |||
| 26 | The | 28 | The |
| 27 | .B -p | 29 | .B -p |
| 28 | option gives the port number to listen on for connections. The default is 6700. | 30 | option gives the port number to listen on for connections. The default is 6700. |
| 31 | .PP | ||
| 32 | By default, the user | ||
| 33 | .B inferno | ||
| 34 | owns the files in the name space. | ||
| 35 | The | ||
| 36 | .B -u | ||
| 37 | option makes | ||
| 38 | .I user | ||
| 39 | own the files instead. | ||
| 29 | .SS Name space | 40 | .SS Name space |
| 30 | .I Odbc | 41 | .I Odbc |
| 31 | presents the following name space: | 42 | presents the following name space: |
| @@ -40,7 +40,8 @@ uint sizeD2M(Dir *d) · 39 unmodified lines | |||
| 40 | These | 40 | These |
| 41 | routines convert messages in the machine-independent format of | 41 | routines convert messages in the machine-independent format of |
| 42 | the Inferno file protocol, | 42 | the Inferno file protocol, |
| 43 | Styx (which is equivalent to the Plan 9 protocol 9P2000), | 43 | described by |
| 44 | .IR intro (5), | ||
| 44 | to and from a more convenient form, | 45 | to and from a more convenient form, |
| 45 | an | 46 | an |
| 46 | .B Fcall | 47 | .B Fcall |
| @@ -129,7 +130,7 @@ void PBIT64(uchar*, vlong) · 82 unmodified lines | |||
| 129 | This structure is defined in | 130 | This structure is defined in |
| 130 | .BR <styx.h> . | 131 | .BR <styx.h> . |
| 131 | See section 5 | 132 | See section 5 |
| 132 | for a full description of Styx messages and their encoding. | 133 | for a full description of 9P messages and their encoding. |
| 133 | For all message types, the | 134 | For all message types, the |
| 134 | .B type | 135 | .B type |
| 135 | field of an | 136 | field of an |
| @@ -149,7 +150,7 @@ The other fields are used selectively by the message types · 13 unmodified lines | |||
| 149 | given in comments. | 150 | given in comments. |
| 150 | .PP | 151 | .PP |
| 151 | .I ConvM2S | 152 | .I ConvM2S |
| 152 | takes a Styx message at | 153 | takes a 9P message at |
| 153 | .I ap | 154 | .I ap |
| 154 | of length | 155 | of length |
| 155 | .IR nap , | 156 | .IR nap , |
| @@ -197,7 +198,7 @@ are copied into the message. · 41 unmodified lines | |||
| 197 | The constant | 198 | The constant |
| 198 | .B IOHDRSZ | 199 | .B IOHDRSZ |
| 199 | is a suitable amount of buffer to reserve for storing | 200 | is a suitable amount of buffer to reserve for storing |
| 200 | the Styx header; | 201 | the 9P header; |
| 201 | the data portion of a | 202 | the data portion of a |
| 202 | .B Twrite | 203 | .B Twrite |
| 203 | or | 204 | or |
| @@ -295,7 +296,7 @@ which is a simple but effective test of validity. · 91 unmodified lines | |||
| 295 | and | 296 | and |
| 296 | .I buf | 297 | .I buf |
| 297 | should include the second two-byte (16-bit) length field that precedes the entry when | 298 | should include the second two-byte (16-bit) length field that precedes the entry when |
| 298 | formatted in a Styx message (see | 299 | formatted in a 9P message (see |
| 299 | .IR stat (5)); | 300 | .IR stat (5)); |
| 300 | in other words, | 301 | in other words, |
| 301 | .I nbuf | 302 | .I nbuf |
| @@ -52,7 +52,7 @@ and the log (base 2) of the number of bits per pixel for windows created on that · 51 unmodified lines | |||
| 52 | The remote viewer must then use | 52 | The remote viewer must then use |
| 53 | .B Sys->export | 53 | .B Sys->export |
| 54 | (see | 54 | (see |
| 55 | .IR sys-dial (2)) | 55 | .IR sys-export (2)) |
| 56 | to export its | 56 | to export its |
| 57 | .BR /dev/draw , | 57 | .BR /dev/draw , |
| 58 | which | 58 | which |
| @@ -108,7 +108,7 @@ It has the following members and operations: · 107 unmodified lines | |||
| 108 | .TP | 108 | .TP |
| 109 | .B addr | 109 | .B addr |
| 110 | A string that represents where the service can be reached: it is often a | 110 | A string that represents where the service can be reached: it is often a |
| 111 | .IR sys-dial (2) | 111 | .IR dial (2) |
| 112 | address string, but might be a name in the name space; the interpretation is internal to | 112 | address string, but might be a name in the name space; the interpretation is internal to |
| 113 | .BR Registries . | 113 | .BR Registries . |
| 114 | .TP | 114 | .TP |
| @@ -148,7 +148,7 @@ It provides the following members: · 33 unmodified lines | |||
| 148 | .TP | 148 | .TP |
| 149 | .B fd | 149 | .B fd |
| 150 | A file descriptor that can be read and written to exchange data with the service. | 150 | A file descriptor that can be read and written to exchange data with the service. |
| 151 | The meaning of the data depends on the service (eg, it might be a Styx connection | 151 | The meaning of the data depends on the service (eg, it might be a 9P connection |
| 152 | or a SOAP implementation). | 152 | or a SOAP implementation). |
| 153 | Typically an attribute of the service description hints at the protocol. | 153 | Typically an attribute of the service description hints at the protocol. |
| 154 | .TP | 154 | .TP |
| @@ -222,7 +222,7 @@ Connect to the registry at the location determined by the service description · 67 unmodified lines | |||
| 222 | if | 222 | if |
| 223 | .I svc | 223 | .I svc |
| 224 | is nil, the default is to try | 224 | is nil, the default is to try |
| 225 | .IR sys-dial (2) | 225 | .IR dial (2) |
| 226 | to | 226 | to |
| 227 | .BR net!$registry!registry , | 227 | .BR net!$registry!registry , |
| 228 | the symbolic name of the default registry for the current host. | 228 | the symbolic name of the default registry for the current host. |
| @@ -3,6 +3,7 @@ · 2 unmodified lines | |||
| 3 | secstore \- fetch data from Plan 9's secure storage service | 3 | secstore \- fetch data from Plan 9's secure storage service |
| 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
| 5 | .EX | 5 | .EX |
| 6 | include "dial.m"; | ||
| 6 | include "secstore.m"; | 7 | include "secstore.m"; |
| 7 | secstore := load Secstore Secstore->PATH; | 8 | secstore := load Secstore Secstore->PATH; |
| 8 | 9 | ||
| @@ -12,19 +13,19 @@ init: fn(); · 3 unmodified lines | |||
| 12 | privacy: fn(): int; | 13 | privacy: fn(): int; |
| 13 | cansecstore: fn(addr: string, user: string): int; | 14 | cansecstore: fn(addr: string, user: string): int; |
| 14 | mkseckey: fn(pass: string): array of byte; | 15 | mkseckey: fn(pass: string): array of byte; |
| 15 | dial: fn(addr: string): ref Sys->Connection; | 16 | dial: fn(addr: string): ref Dial->Connection; |
| 16 | auth: fn(conn: ref Sys->Connection, user: string, seckey: array of byte): | 17 | auth: fn(conn: ref Dial->Connection, user: string, seckey: array of byte): |
| 17 | (string, string); | 18 | (string, string); |
| 18 | connect: fn(addr: string, user: string, seckey: array of byte): | 19 | connect: fn(addr: string, user: string, seckey: array of byte): |
| 19 | (ref Sys->Connection, string, string); | 20 | (ref Dial->Connection, string, string); |
| 20 | sendpin: fn(conn: ref Sys->Connection, pin: string): int; | 21 | sendpin: fn(conn: ref Dial->Connection, pin: string): int; |
| 21 | files: fn(conn: ref Sys->Connection): | 22 | files: fn(conn: ref Dial->Connection): |
| 22 | list of (string, int, string, string, array of byte); | 23 | list of (string, int, string, string, array of byte); |
| 23 | getfile: fn(conn: ref Sys->Connection, name: string, | 24 | getfile: fn(conn: ref Dial->Connection, name: string, |
| 24 | maxsize: int): array of byte; | 25 | maxsize: int): array of byte; |
| 25 | .\"putfile: fn(conn: ref Sys->Connection, name: string, data: array of byte,): int; | 26 | .\"putfile: fn(conn: ref Dial->Connection, name: string, data: array of byte,): int; |
| 26 | remove: fn(conn: ref Sys->Connection, file: string): int; | 27 | remove: fn(conn: ref Dial->Connection, file: string): int; |
| 27 | bye: fn(conn: ref Sys->Connection); | 28 | bye: fn(conn: ref Dial->Connection); |
| 28 | 29 | ||
| 29 | mkfilekey: fn(pass: string): array of byte; | 30 | mkfilekey: fn(pass: string): array of byte; |
| 30 | decrypt: fn(data: array of byte, filekey: array of byte): array of byte; | 31 | decrypt: fn(data: array of byte, filekey: array of byte): array of byte; |
| @@ -43,16 +44,16 @@ that can then be used to fetch and decrypt data files, such as the · 12 unmodified lines | |||
| 43 | file containing the initial keys for an instance of | 44 | file containing the initial keys for an instance of |
| 44 | .IR factotum (4). | 45 | .IR factotum (4). |
| 45 | The module's functions hold the file descriptors for the connection in a | 46 | The module's functions hold the file descriptors for the connection in a |
| 46 | .BR Sys->Connection | 47 | .BR Dial->Connection |
| 47 | value, | 48 | value, |
| 48 | as returned by | 49 | as returned by |
| 49 | .IR sys-dial (2). | 50 | .IR dial (2). |
| 50 | The | 51 | The |
| 51 | .I addr | 52 | .I addr |
| 52 | parameter that gives the network address of the | 53 | parameter that gives the network address of the |
| 53 | .I secstore | 54 | .I secstore |
| 54 | service is also as defined in | 55 | service is also as defined in |
| 55 | .IR sys-dial (2). | 56 | .IR dial (2). |
| 56 | A nil value defaults to | 57 | A nil value defaults to |
| 57 | .BR "net!$auth!secstore" , | 58 | .BR "net!$auth!secstore" , |
| 58 | for translation in the usual way by | 59 | for translation in the usual way by |
| @@ -94,9 +95,9 @@ dials the · 35 unmodified lines | |||
| 94 | at network address | 95 | at network address |
| 95 | .I addr | 96 | .I addr |
| 96 | (as defined by | 97 | (as defined by |
| 97 | .IR sys-dial (2)) | 98 | .IR dial (2)) |
| 98 | and returns a reference to the resulting | 99 | and returns a reference to the resulting |
| 99 | .BR Sys->Connection . | 100 | .BR Dial->Connection . |
| 100 | It returns nil on an error and sets the error string. | 101 | It returns nil on an error and sets the error string. |
| 101 | .PP | 102 | .PP |
| 102 | .B Auth | 103 | .B Auth |
| @@ -106,7 +107,7 @@ of the service. · 3 unmodified lines | |||
| 106 | The parameter | 107 | The parameter |
| 107 | .I conn | 108 | .I conn |
| 108 | refers to the | 109 | refers to the |
| 109 | .B Sys->Connection | 110 | .B Dial->Connection |
| 110 | value representing the connection. | 111 | value representing the connection. |
| 111 | .I User | 112 | .I User |
| 112 | names a user registered with the service. | 113 | names a user registered with the service. |
| @@ -44,7 +44,7 @@ CA. · 43 unmodified lines | |||
| 44 | .PP | 44 | .PP |
| 45 | .B Login | 45 | .B Login |
| 46 | connects, using | 46 | connects, using |
| 47 | .IR sys-dial (2), | 47 | .IR dial (2), |
| 48 | to the signer at network address | 48 | to the signer at network address |
| 49 | .IR addr , | 49 | .IR addr , |
| 50 | which is any form accepted by | 50 | which is any form accepted by |
| @@ -34,7 +34,7 @@ and · 33 unmodified lines | |||
| 34 | .IR dns (6) | 34 | .IR dns (6) |
| 35 | if available. | 35 | if available. |
| 36 | Other Inferno applications normally give network addresses to the functions of | 36 | Other Inferno applications normally give network addresses to the functions of |
| 37 | .IR sys-dial (2), | 37 | .IR dial (2), |
| 38 | and they are then translated automatically, using the services of | 38 | and they are then translated automatically, using the services of |
| 39 | .IR cs (8). | 39 | .IR cs (8). |
| 40 | .PP | 40 | .PP |
| @@ -1,6 +1,6 @@ | |||
| 1 | .TH STYX 2 | 1 | .TH STYX 2 |
| 2 | .SH NAME | 2 | .SH NAME |
| 3 | Styx: Rmsg, Tmsg, dir2text, istmsg, packdir, packdirsize, readmsg, qid2text, unpackdir \- interface to Styx file protocol | 3 | Styx: Rmsg, Tmsg, dir2text, istmsg, packdir, packdirsize, readmsg, qid2text, unpackdir \- interface to 9P (Styx) file protocol |
| 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
| 5 | .EX | 5 | .EX |
| 6 | include "styx.m"; | 6 | include "styx.m"; |
| @@ -118,13 +118,14 @@ MAXRPC: con \fIimplementation-defined\f5; · 111 unmodified lines | |||
| 118 | .EE | 118 | .EE |
| 119 | .SH DESCRIPTION | 119 | .SH DESCRIPTION |
| 120 | .B Styx | 120 | .B Styx |
| 121 | provides a Limbo interface to send and receive messages of the Styx file service protocol, | 121 | provides a Limbo interface to send and receive messages of the 9P file service protocol, |
| 122 | described by Section 5 of this manual (a thorough reading of which | 122 | described by Section 5 of this manual, a thorough reading of which |
| 123 | is advised before using this module). | 123 | is advised before using this module. |
| 124 | (The protocol was previously called `Styx' in Inferno, hence the module's name.) | ||
| 124 | .B Init | 125 | .B Init |
| 125 | must be called before using any other function in the module. | 126 | must be called before using any other function in the module. |
| 126 | .PP | 127 | .PP |
| 127 | A Styx client transmits requests to a server as `T-messages' | 128 | A 9P client transmits requests to a server as `T-messages' |
| 128 | and receives replies in matching `R-messages'. | 129 | and receives replies in matching `R-messages'. |
| 129 | A T-message is here represented by values of the type | 130 | A T-message is here represented by values of the type |
| 130 | .BR Tmsg , | 131 | .BR Tmsg , |
| @@ -232,7 +233,7 @@ Return a printable string showing the contents of · 101 unmodified lines | |||
| 232 | for tracing or debugging. | 233 | for tracing or debugging. |
| 233 | .TP | 234 | .TP |
| 234 | .IB t .mtype() | 235 | .IB t .mtype() |
| 235 | Return the Styx message type of the message. | 236 | Return the 9P message type of the message. |
| 236 | .PP | 237 | .PP |
| 237 | An R-message is represented by | 238 | An R-message is represented by |
| 238 | .BR Rmsg . | 239 | .BR Rmsg . |
| @@ -1,6 +1,6 @@ | |||
| 1 | .TH STYXCONV 2 | 1 | .TH STYXCONV 2 |
| 2 | .SH NAME | 2 | .SH NAME |
| 3 | styxconv \- convert between old and new Styx | 3 | styxconv \- convert between old 1995 Styx and current Styx (9P) |
| 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
| 5 | .EX | 5 | .EX |
| 6 | include "styxconv.m"; | 6 | include "styxconv.m"; |
| @@ -12,9 +12,10 @@ styxconv: fn(client: ref Sys->FD, server: ref Sys->FD); · 5 unmodified lines | |||
| 12 | .EE | 12 | .EE |
| 13 | .SH DESCRIPTION | 13 | .SH DESCRIPTION |
| 14 | .B Styxconv | 14 | .B Styxconv |
| 15 | converts between the previous version of the Styx protocol, | 15 | converts between the obsolete 1995 version of the Styx protocol, |
| 16 | as used for instance in Inferno's Third Edition and earlier, | 16 | as used for instance in Inferno's Third Edition and earlier, |
| 17 | and the current version of the protocol, | 17 | and the current file service protocol, |
| 18 | previously also called `Styx' but | ||
| 18 | based on 9P2000 and defined by | 19 | based on 9P2000 and defined by |
| 19 | .IR intro (5). | 20 | .IR intro (5). |
| 20 | .PP | 21 | .PP |
| @@ -25,10 +26,10 @@ The function · 4 unmodified lines | |||
| 25 | .B styxconv | 26 | .B styxconv |
| 26 | takes two file descriptors: | 27 | takes two file descriptors: |
| 27 | .I client | 28 | .I client |
| 28 | should be a connection to a styx client requiring | 29 | should be a connection to a client requiring |
| 29 | one version of the protocol; | 30 | one version of the protocol; |
| 30 | .I server | 31 | .I server |
| 31 | should be a connection to a styx server serving | 32 | should be a connection to a server serving |
| 32 | the other version of the protocol. | 33 | the other version of the protocol. |
| 33 | There are two conversion modules: | 34 | There are two conversion modules: |
| 34 | .B PATHNEW2OLD | 35 | .B PATHNEW2OLD |
| @@ -74,4 +75,4 @@ cvstyx(fd: ref Sys->FD): ref Sys->FD · 39 unmodified lines | |||
| 74 | .IR sys-pipe (2), | 75 | .IR sys-pipe (2), |
| 75 | .IR intro (5) | 76 | .IR intro (5) |
| 76 | .SH BUGS | 77 | .SH BUGS |
| 77 | There is no provision for 9p2000 authentication. | 78 | There is no provision for 9P2000 authentication. |
| @@ -1,6 +1,6 @@ | |||
| 1 | .TH STYXFLUSH 2 | 1 | .TH STYXFLUSH 2 |
| 2 | .SH NAME | 2 | .SH NAME |
| 3 | styxflush \- handler for styx flush protocol | 3 | styxflush \- handler for 9P (Styx) flush protocol |
| 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
| 5 | .EX | 5 | .EX |
| 6 | include "sys.m"; | 6 | include "sys.m"; |
| @@ -16,17 +16,17 @@ rmsg: fn(m: ref Styx->Rmsg): int; · 9 unmodified lines | |||
| 16 | Einterrupted: con "interrupted"; | 16 | Einterrupted: con "interrupted"; |
| 17 | .EE | 17 | .EE |
| 18 | .SH DESCRIPTION | 18 | .SH DESCRIPTION |
| 19 | Getting the semantics of the Styx | 19 | Getting the semantics of the 9P |
| 20 | .IR flush (5) | 20 | .IR flush (5) |
| 21 | protocol correct when handling requests concurrently | 21 | protocol correct when handling requests concurrently |
| 22 | is surprisingly hard to do. | 22 | is surprisingly hard to do. |
| 23 | .I Styxflush | 23 | .I Styxflush |
| 24 | is designed to help get it right. It deals with Styx | 24 | is designed to help get it right. It deals with 9P |
| 25 | messages for a single styx session \- if a server needs to | 25 | messages for a single 9P session \- if a server needs to |
| 26 | deal with multiple sessions, then multiple instances of | 26 | deal with multiple sessions, then multiple instances of |
| 27 | .I styxflush | 27 | .I styxflush |
| 28 | should be loaded. It assumes there is a loop in a central process | 28 | should be loaded. It assumes there is a loop in a central process |
| 29 | which both reads T-messages and sends their R-message replies. | 29 | that both reads T-messages and sends their R-message replies. |
| 30 | .I Styxflush | 30 | .I Styxflush |
| 31 | handles the flushing of requests that are being run | 31 | handles the flushing of requests that are being run |
| 32 | outside the central process. | 32 | outside the central process. |
| @@ -1,20 +1,20 @@ | |||
| 1 | .TH STYXPERSIST 2 | 1 | .TH STYXPERSIST 2 |
| 2 | .SH NAME | 2 | .SH NAME |
| 3 | styxpersist \- persistent Styx connection | 3 | styxpersist \- persistent 9P (Styx) connection |
| 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
| 5 | .EX | 5 | .EX |
| 6 | include "sys.m"; | 6 | include "sys.m"; |
| 7 | include "styxpersist.m"; | 7 | include "styxpersist.m"; |
| 8 | styxpersist := load Styxpersist Styxpersist->PATH; | 8 | styxpersist := load Styxpersist Styxpersist->PATH; |
| 9 | 9 | ||
| 10 | init: fn(clientfd: ref Sys->FD, usefac: int, keyspec: string) | 10 | init: fn(clientfd: ref Sys->FD, usefac: int, keyspec: string): |
| 11 | : (chan of chan of ref Sys->FD, string); | 11 | (chan of chan of ref Sys->FD, string); |
| 12 | .EE | 12 | .EE |
| 13 | .SH DESCRIPTION | 13 | .SH DESCRIPTION |
| 14 | .I Styxpersist | 14 | .I Styxpersist |
| 15 | tries to maintain a persistent Styx connection for its client. | 15 | tries to maintain a persistent 9P (Styx) connection for its client. |
| 16 | .B Init | 16 | .B Init |
| 17 | starts a process to serve Styx for the client on | 17 | starts a process to serve 9P for the client on |
| 18 | .IR clientfd . | 18 | .IR clientfd . |
| 19 | If | 19 | If |
| 20 | .I usefac | 20 | .I usefac |
| @@ -77,4 +77,4 @@ Plan 9 style. If a client uses an external factotum with different keys, · 56 unmodified lines | |||
| 77 | may be unable to re-authenticate. | 77 | may be unable to re-authenticate. |
| 78 | .SH "SEE ALSO" | 78 | .SH "SEE ALSO" |
| 79 | .IR mount (1), | 79 | .IR mount (1), |
| 80 | .IR sys-dial (2) | 80 | .IR dial (2) |
| @@ -1,7 +1,7 @@ | |||
| 1 | .TH STYXSERVERS 2 | 1 | .TH STYXSERVERS 2 |
| 2 | .SH NAME | 2 | .SH NAME |
| 3 | styxservers \- | 3 | styxservers \- |
| 4 | Styx server implementation assistance | 4 | 9P (Styx) server implementation assistance |
| 5 | .SH SYNOPSIS | 5 | .SH SYNOPSIS |
| 6 | .EX | 6 | .EX |
| 7 | include "sys.m"; | 7 | include "sys.m"; |
| @@ -14,7 +14,7 @@ Styxserver, Fid, Navigator: import styxservers; · 6 unmodified lines | |||
| 14 | Styxserver: adt { | 14 | Styxserver: adt { |
| 15 | fd: ref Sys->FD; # file server end of connection | 15 | fd: ref Sys->FD; # file server end of connection |
| 16 | t: ref Navigator; # name space navigator for this server | 16 | t: ref Navigator; # name space navigator for this server |
| 17 | msize: int; # negotiated Styx message size | 17 | msize: int; # negotiated 9P message size |
| 18 | 18 | ||
| 19 | new: fn(fd: ref Sys->FD, t: ref Navigator, rootpath: big) | 19 | new: fn(fd: ref Sys->FD, t: ref Navigator, rootpath: big) |
| 20 | :(chan of ref Tmsg, ref Styxserver); | 20 | :(chan of ref Tmsg, ref Styxserver); |
| @@ -103,7 +103,7 @@ openok: fn(uname: string, omode, · 82 unmodified lines | |||
| 103 | openmode: fn(o: int): int; | 103 | openmode: fn(o: int): int; |
| 104 | .EE | 104 | .EE |
| 105 | .SH DESCRIPTION | 105 | .SH DESCRIPTION |
| 106 | When writing a Styx file server, there are some | 106 | When writing a file server, there are some |
| 107 | commonly performed tasks that are | 107 | commonly performed tasks that are |
| 108 | fiddly or tedious to implement each time. | 108 | fiddly or tedious to implement each time. |
| 109 | .B Styxservers | 109 | .B Styxservers |
| @@ -119,7 +119,7 @@ left to the file server program itself. · 9 unmodified lines | |||
| 119 | Familiarity with Section 5 of the manual which defines the protocol | 119 | Familiarity with Section 5 of the manual which defines the protocol |
| 120 | (see | 120 | (see |
| 121 | .IR intro (5)), | 121 | .IR intro (5)), |
| 122 | and with the representation of Styx messages in Limbo | 122 | and with the representation of 9P messages in Limbo |
| 123 | (see | 123 | (see |
| 124 | .IR styx (2)), | 124 | .IR styx (2)), |
| 125 | is a prerequisite for use of this module. | 125 | is a prerequisite for use of this module. |
| @@ -322,7 +322,7 @@ reference · 196 unmodified lines | |||
| 322 | which can be used to access that navigator; and | 322 | which can be used to access that navigator; and |
| 323 | the file descriptor | 323 | the file descriptor |
| 324 | .IB srv .fd | 324 | .IB srv .fd |
| 325 | that is the file server's end of the connection to the Styx client. | 325 | that is the file server's end of the connection to the 9P client. |
| 326 | Both values are initially provided by the file serving application, | 326 | Both values are initially provided by the file serving application, |
| 327 | but can be accessed through the | 327 | but can be accessed through the |
| 328 | .B Styxserver | 328 | .B Styxserver |
| @@ -345,7 +345,7 @@ It returns a tuple, say · 16 unmodified lines | |||
| 345 | .RI ( c ", " srv ), | 345 | .RI ( c ", " srv ), |
| 346 | and spawns a new process, which uses | 346 | and spawns a new process, which uses |
| 347 | .IR styx (2) | 347 | .IR styx (2) |
| 348 | to read and parse Styx messages read | 348 | to read and parse 9P messages read |
| 349 | from | 349 | from |
| 350 | .IR fd , | 350 | .IR fd , |
| 351 | and send them down | 351 | and send them down |
| @@ -892,14 +892,14 @@ with OTRUNC and ORCLOSE flags removed. · 540 unmodified lines | |||
| 892 | If | 892 | If |
| 893 | .I on | 893 | .I on |
| 894 | is true (non-zero), | 894 | is true (non-zero), |
| 895 | will trace Styx requests and replies, on standard error. | 895 | will trace 9P requests and replies, on standard error. |
| 896 | This option must be set before creating a | 896 | This option must be set before creating a |
| 897 | .BR Styxserver , | 897 | .BR Styxserver , |
| 898 | to ensure that it preserves its standard error descriptor. | 898 | to ensure that it preserves its standard error descriptor. |
| 899 | .SS Constants | 899 | .SS Constants |
| 900 | .B Styxservers | 900 | .B Styxservers |
| 901 | defines a number of constants applicable to the writing | 901 | defines a number of constants applicable to the writing |
| 902 | of Styx servers, including: | 902 | of 9P servers, including: |
| 903 | .TP | 903 | .TP |
| 904 | .BR Einuse\fP,\fP\ Ebadfid\fP,\fP\ Eopen\fP,\fP\ Enotfound\fP,\fP\ Enotdir\fP,\fP\ Eperm\fP,\fP\ Ebadarg\fP,\fP\ Eexists | 904 | .BR Einuse\fP,\fP\ Ebadfid\fP,\fP\ Eopen\fP,\fP\ Enotfound\fP,\fP\ Enotdir\fP,\fP\ Eperm\fP,\fP\ Ebadarg\fP,\fP\ Eexists |
| 905 | These provide standard strings for commonly used error conditions, | 905 | These provide standard strings for commonly used error conditions, |
| @@ -210,8 +210,8 @@ will be honoured for a file depends entirely on the underlying file server · 209 unmodified lines | |||
| 210 | Record locking in the underlying file system is not supported by Inferno. | 210 | Record locking in the underlying file system is not supported by Inferno. |
| 211 | Processes can coordinate their file operations by other mechanisms. | 211 | Processes can coordinate their file operations by other mechanisms. |
| 212 | .PP | 212 | .PP |
| 213 | Atomicity is guaranteed for byte counts smaller than the | 213 | Atomicity is guaranteed for byte counts no larger than the |
| 214 | .I Styx | 214 | .I 9P |
| 215 | message size; | 215 | message size; |
| 216 | see | 216 | see |
| 217 | .IR read (5). | 217 | .IR read (5). |
| @@ -54,7 +54,7 @@ The · 53 unmodified lines | |||
| 54 | argument to | 54 | argument to |
| 55 | .B mount | 55 | .B mount |
| 56 | is a file descriptor of an open pipe or network connection | 56 | is a file descriptor of an open pipe or network connection |
| 57 | to a file server ready to receive Styx messages. | 57 | to a file server ready to receive 9P messages. |
| 58 | The | 58 | The |
| 59 | .I old | 59 | .I old |
| 60 | file must be a directory. | 60 | file must be a directory. |
| @@ -11,7 +11,7 @@ export: fn(fd: ref FD, dir: string, flag: int): int; · 10 unmodified lines | |||
| 11 | .SH DESCRIPTION | 11 | .SH DESCRIPTION |
| 12 | .B Export | 12 | .B Export |
| 13 | receives and replies | 13 | receives and replies |
| 14 | to Styx requests from a client on a connection represented by | 14 | to 9P requests from a client on a connection represented by |
| 15 | .IR fd , | 15 | .IR fd , |
| 16 | for file operations on the part of the current file name space | 16 | for file operations on the part of the current file name space |
| 17 | rooted at | 17 | rooted at |
| @@ -40,7 +40,7 @@ of a · 22 unmodified lines | |||
| 40 | returned by | 40 | returned by |
| 41 | .B listen | 41 | .B listen |
| 42 | (see | 42 | (see |
| 43 | .IR sys-dial (2)). | 43 | .IR dial (2)). |
| 44 | Before calling | 44 | Before calling |
| 45 | .BR export , | 45 | .BR export , |
| 46 | the connection on | 46 | the connection on |
| @@ -11,7 +11,7 @@ fauth: fn(fd: ref FD, aname: string): ref FD; · 10 unmodified lines | |||
| 11 | .SH DESCRIPTION | 11 | .SH DESCRIPTION |
| 12 | .B Fauth | 12 | .B Fauth |
| 13 | provides a means for the current user to authenticate to access | 13 | provides a means for the current user to authenticate to access |
| 14 | resources available through the Styx connection represented by | 14 | resources available through the 9P connection represented by |
| 15 | .IR fd . | 15 | .IR fd . |
| 16 | The return value is a file descriptor, conventionally called | 16 | The return value is a file descriptor, conventionally called |
| 17 | .IR afd , | 17 | .IR afd , |
| @@ -49,7 +49,7 @@ the contents of the · 48 unmodified lines | |||
| 49 | .B Tread | 49 | .B Tread |
| 50 | and | 50 | and |
| 51 | .B Twrite | 51 | .B Twrite |
| 52 | Styx messages received by the system on the server's behalf; see | 52 | 9P messages received by the system on the server's behalf; see |
| 53 | .IR intro (5). | 53 | .IR intro (5). |
| 54 | .PP | 54 | .PP |
| 55 | When the client invokes the | 55 | When the client invokes the |
| @@ -1,6 +1,6 @@ | |||
| 1 | .TH SYS-FVERSION 2 | 1 | .TH SYS-FVERSION 2 |
| 2 | .SH NAME | 2 | .SH NAME |
| 3 | fversion \- initialize Styx connection and negotiate version | 3 | fversion \- initialize 9P connection and negotiate version |
| 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
| 5 | .EX | 5 | .EX |
| 6 | include "sys.m"; | 6 | include "sys.m"; |
| @@ -10,13 +10,13 @@ fversion: fn(fd: ref FD, bufsize: int, version: string): (int, string); · 3 unmodified lines | |||
| 10 | .EE | 10 | .EE |
| 11 | .SH DESCRIPTION | 11 | .SH DESCRIPTION |
| 12 | .B Fversion | 12 | .B Fversion |
| 13 | initialises the Styx connection represented by | 13 | initialises the 9P connection represented by |
| 14 | .I fd | 14 | .I fd |
| 15 | and negotiates the maximum message size and the version of the protocol to be used. | 15 | and negotiates the maximum message size and the version of the protocol to be used. |
| 16 | .PP | 16 | .PP |
| 17 | The | 17 | The |
| 18 | .I bufsize | 18 | .I bufsize |
| 19 | determines the size of the I/O buffer used to stage Styx requests to the server, | 19 | determines the size of the I/O buffer used to stage 9P requests to the server, |
| 20 | subject to the constraints of the server itself. | 20 | subject to the constraints of the server itself. |
| 21 | The | 21 | The |
| 22 | .I version | 22 | .I version |
| @@ -9,7 +9,7 @@ sys := load Sys Sys->PATH; · 8 unmodified lines | |||
| 9 | iounit: fn(fd: ref FD): int; | 9 | iounit: fn(fd: ref FD): int; |
| 10 | .EE | 10 | .EE |
| 11 | .SH DESCRIPTION | 11 | .SH DESCRIPTION |
| 12 | Reads and writes of files are transmitted using the Styx protocol (see | 12 | Reads and writes of files are transmitted using the 9P protocol (see |
| 13 | .IR intro (5)) | 13 | .IR intro (5)) |
| 14 | and in general, operations involving large amounts of data must be | 14 | and in general, operations involving large amounts of data must be |
| 15 | broken into smaller pieces by the operating system. | 15 | broken into smaller pieces by the operating system. |
| @@ -33,12 +33,12 @@ communication by cooperating processes. · 32 unmodified lines | |||
| 33 | Pipes are still useful, however, | 33 | Pipes are still useful, however, |
| 34 | to connect applications that do not (or cannot) share such channels, | 34 | to connect applications that do not (or cannot) share such channels, |
| 35 | or when a system interface requires a file descriptor. | 35 | or when a system interface requires a file descriptor. |
| 36 | For instance, a process that serves the Styx protocol can | 36 | For instance, a process that serves the 9P protocol can |
| 37 | pass the file descriptor for one end of a pipe to | 37 | pass the file descriptor for one end of a pipe to |
| 38 | .B Sys->mount | 38 | .B Sys->mount |
| 39 | (see | 39 | (see |
| 40 | .IR sys-bind (2)), | 40 | .IR sys-bind (2)), |
| 41 | and read and write Styx messages on the other end of the pipe. | 41 | and read and write 9P messages on the other end of the pipe. |
| 42 | .SH DIAGNOSTICS | 42 | .SH DIAGNOSTICS |
| 43 | Returns 0 on success; -1 on failure. | 43 | Returns 0 on success; -1 on failure. |
| 44 | .SH "SEE ALSO" | 44 | .SH "SEE ALSO" |
| @@ -39,7 +39,7 @@ It accepts and returns the first answer it receives. · 38 unmodified lines | |||
| 39 | .SH SOURCE | 39 | .SH SOURCE |
| 40 | .B /appl/lib/virgil.b | 40 | .B /appl/lib/virgil.b |
| 41 | .SH SEE ALSO | 41 | .SH SEE ALSO |
| 42 | .IR sys-dial (2), | 42 | .IR dial (2), |
| 43 | .IR cs (8), | 43 | .IR cs (8), |
| 44 | .IR register (8), | 44 | .IR register (8), |
| 45 | .IR virgild (8) | 45 | .IR virgild (8) |
| @@ -29,7 +29,7 @@ device. · 28 unmodified lines | |||
| 29 | .PP | 29 | .PP |
| 30 | A kernel device driver is a | 30 | A kernel device driver is a |
| 31 | .I server | 31 | .I server |
| 32 | in the sense of the Inferno File Protocol, Styx (see Section 5), | 32 | in the sense of the Inferno File Protocol, 9P (see Section 5), |
| 33 | but with the messages implemented by local | 33 | but with the messages implemented by local |
| 34 | rather than remote procedure calls. | 34 | rather than remote procedure calls. |
| 35 | Also, several of the messages | 35 | Also, several of the messages |
| @@ -243,7 +243,7 @@ The · 242 unmodified lines | |||
| 243 | and | 243 | and |
| 244 | .BR listen | 244 | .BR listen |
| 245 | functions described in | 245 | functions described in |
| 246 | .IR sys-dial (2) | 246 | .IR dial (2) |
| 247 | perform the necessary I/O to establish and | 247 | perform the necessary I/O to establish and |
| 248 | manipulate network connections. | 248 | manipulate network connections. |
| 249 | .SS TCP protocol | 249 | .SS TCP protocol |
| @@ -747,7 +747,7 @@ and · 497 unmodified lines | |||
| 747 | .IB device !0x806 | 747 | .IB device !0x806 |
| 748 | (ARP). | 748 | (ARP). |
| 749 | See | 749 | See |
| 750 | .IR sys-dial (2) | 750 | .IR dial (2) |
| 751 | for the interpretation of such addresses. | 751 | for the interpretation of such addresses. |
| 752 | The interface runs until a process does an explicit | 752 | The interface runs until a process does an explicit |
| 753 | .BR unbind . | 753 | .BR unbind . |
| @@ -807,7 +807,7 @@ contains · 53 unmodified lines | |||
| 807 | a connection will be opened using | 807 | a connection will be opened using |
| 808 | .B dial | 808 | .B dial |
| 809 | (see | 809 | (see |
| 810 | .IR sys-dial (2)). | 810 | .IR dial (2)). |
| 811 | Otherwise the name will be opened as-is; | 811 | Otherwise the name will be opened as-is; |
| 812 | usually it is the name of a serial device | 812 | usually it is the name of a serial device |
| 813 | (eg, | 813 | (eg, |
| @@ -921,6 +921,6 @@ to be set, or the current user lacks the privileges to set it. · 107 unmodified lines | |||
| 921 | .br | 921 | .br |
| 922 | .B /os/ip/*medium.c | 922 | .B /os/ip/*medium.c |
| 923 | .SH "SEE ALSO" | 923 | .SH "SEE ALSO" |
| 924 | .IR sys-dial (2) | 924 | .IR dial (2) |
| 925 | .\" joinmulti and leavemulti are unimplemented | 925 | .\" joinmulti and leavemulti are unimplemented |
| 926 | .\" many media are only partly implemented | 926 | .\" many media are only partly implemented |
| @@ -44,7 +44,7 @@ devices are supported. · 43 unmodified lines | |||
| 44 | .PP | 44 | .PP |
| 45 | The file system maintains two storage regions on the same medium: | 45 | The file system maintains two storage regions on the same medium: |
| 46 | a log-structured hierarchical file system that implements all the | 46 | a log-structured hierarchical file system that implements all the |
| 47 | functionality communicable by the Styx protocol | 47 | functionality communicable by the 9P protocol |
| 48 | (see | 48 | (see |
| 49 | .IR intro (5)), | 49 | .IR intro (5)), |
| 50 | and a boot | 50 | and a boot |
| @@ -106,7 +106,7 @@ two files appear in the device name space, · 55 unmodified lines | |||
| 106 | .BI /dev/logfs name | 106 | .BI /dev/logfs name |
| 107 | and | 107 | and |
| 108 | .BI /dev/logfs name\f5boot\fI. | 108 | .BI /dev/logfs name\f5boot\fI. |
| 109 | The former serves the Styx protocol giving access to the hierarchical file system; | 109 | The former serves the 9P protocol giving access to the hierarchical file system; |
| 110 | the latter is a fixed size file that represents the boot partition. | 110 | the latter is a fixed size file that represents the boot partition. |
| 111 | .TP | 111 | .TP |
| 112 | .BI [fsys " name\f5] format \fIbootsize" | 112 | .BI [fsys " name\f5] format \fIbootsize" |
| @@ -1,6 +1,6 @@ | |||
| 1 | .TH MNT 3 | 1 | .TH MNT 3 |
| 2 | .SH NAME | 2 | .SH NAME |
| 3 | mnt \- attach to Styx servers | 3 | mnt \- attach to 9P servers |
| 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
| 5 | .nf | 5 | .nf |
| 6 | .B #M | 6 | .B #M |
| @@ -15,12 +15,12 @@ is used by · 8 unmodified lines | |||
| 15 | see | 15 | see |
| 16 | .IR sys-bind (2)) | 16 | .IR sys-bind (2)) |
| 17 | to connect the name space of a process to | 17 | to connect the name space of a process to |
| 18 | the service provided by a Styx server over a communications channel. | 18 | the service provided by a 9P server over a communications channel. |
| 19 | After the | 19 | After the |
| 20 | .BR mount , | 20 | .BR mount , |
| 21 | file operations in that portion of the name space will | 21 | file operations in that portion of the name space will |
| 22 | be converted by the mount driver into the appropriate | 22 | be converted by the mount driver into the appropriate |
| 23 | Styx messages to the server, and its Styx replies returned | 23 | 9P messages to the server, and its 9P replies returned |
| 24 | as the status of the system calls. | 24 | as the status of the system calls. |
| 25 | .PP | 25 | .PP |
| 26 | Any authentication must precede | 26 | Any authentication must precede |
| @@ -40,8 +40,8 @@ Each distinct user of a connection must mount it separately; · 13 unmodified lines | |||
| 40 | the mount driver multiplexes the access of the various users and their | 40 | the mount driver multiplexes the access of the various users and their |
| 41 | processes to the service. | 41 | processes to the service. |
| 42 | .PP | 42 | .PP |
| 43 | File-oriented system calls are converted by the kernel into messages in the Styx protocol. | 43 | File-oriented system calls are converted by the kernel into messages in the 9P protocol. |
| 44 | Within the kernel, Styx is implemented by procedure calls to the | 44 | Within the kernel, 9P is implemented by procedure calls to the |
| 45 | various kernel device drivers, as described in | 45 | various kernel device drivers, as described in |
| 46 | .IR intro (10) | 46 | .IR intro (10) |
| 47 | and | 47 | and |
| @@ -61,7 +61,7 @@ system call on a file served by the mount driver · 13 unmodified lines | |||
| 61 | may be translated | 61 | may be translated |
| 62 | into more than one | 62 | into more than one |
| 63 | message, | 63 | message, |
| 64 | since there is a maximum data size for a Styx message. | 64 | since there is a maximum data size for a 9P message. |
| 65 | The system call | 65 | The system call |
| 66 | will return when the specified number of bytes have been transferred | 66 | will return when the specified number of bytes have been transferred |
| 67 | or a short reply is returned. | 67 | or a short reply is returned. |
| @@ -126,7 +126,7 @@ The device follows the conventions that allow · 125 unmodified lines | |||
| 126 | and | 126 | and |
| 127 | .B listen | 127 | .B listen |
| 128 | of | 128 | of |
| 129 | .IR sys-dial (2) | 129 | .IR dial (2) |
| 130 | to do the work needed to establish and manipulate network connections. | 130 | to do the work needed to establish and manipulate network connections. |
| 131 | .SH SOURCE | 131 | .SH SOURCE |
| 132 | .B /os/pc/devplap.c | 132 | .B /os/pc/devplap.c |
| @@ -267,7 +267,7 @@ and · 266 unmodified lines | |||
| 267 | .BR 'sha1' . | 267 | .BR 'sha1' . |
| 268 | .SH "SEE ALSO" | 268 | .SH "SEE ALSO" |
| 269 | .IR listen (1), | 269 | .IR listen (1), |
| 270 | .IR sys-dial (2), | 270 | .IR dial (2), |
| 271 | .IR ssl (3) | 271 | .IR ssl (3) |
| 272 | \".IR pushtls (2) | 272 | \".IR pushtls (2) |
| 273 | .SH SOURCE | 273 | .SH SOURCE |
| @@ -2,7 +2,7 @@ · 1 unmodified line | |||
| 2 | .SH NAME | 2 | .SH NAME |
| 3 | intro \- introduction to file servers | 3 | intro \- introduction to file servers |
| 4 | .SH DESCRIPTION | 4 | .SH DESCRIPTION |
| 5 | This section describes programs that serve Styx | 5 | This section describes programs that serve 9P |
| 6 | (see | 6 | (see |
| 7 | .IR intro (5)), | 7 | .IR intro (5)), |
| 8 | and can therefore | 8 | and can therefore |
| @@ -27,7 +27,7 @@ makes the contents of a DOS/Windows file system visible in the Inferno name spac · 26 unmodified lines | |||
| 27 | The options are: | 27 | The options are: |
| 28 | .TP | 28 | .TP |
| 29 | .B -v | 29 | .B -v |
| 30 | print a debugging trace, including Styx messages, on standard error | 30 | print a debugging trace, including 9P messages, on standard error |
| 31 | .TP | 31 | .TP |
| 32 | .B -F | 32 | .B -F |
| 33 | display FAT information | 33 | display FAT information |
| @@ -13,12 +13,10 @@ export \- export name space on a connection · 12 unmodified lines | |||
| 13 | .SH DESCRIPTION | 13 | .SH DESCRIPTION |
| 14 | .I Export | 14 | .I Export |
| 15 | calls | 15 | calls |
| 16 | .B Sys->export | 16 | .IR sys-export (2) |
| 17 | (see | 17 | to serve the name space rooted at |
| 18 | .IR sys-dial (2)) | ||
| 19 | to serve a name space rooted at | ||
| 20 | .I dir | 18 | .I dir |
| 21 | over a connection to a Styx client. | 19 | over a connection to a 9P (Styx) client. |
| 22 | .I Export | 20 | .I Export |
| 23 | opens the connection on the given | 21 | opens the connection on the given |
| 24 | .IR file , | 22 | .IR file , |
| @@ -35,7 +33,7 @@ serves the current name space without forking it; changes made to it · 10 unmodified lines | |||
| 35 | will be visible to clients. | 33 | will be visible to clients. |
| 36 | .PP | 34 | .PP |
| 37 | .I Export | 35 | .I Export |
| 38 | starts serving Styx immediately; it assumes that the connection | 36 | starts serving 9P immediately; it assumes that the connection |
| 39 | has been authenticated if required. | 37 | has been authenticated if required. |
| 40 | .I Export | 38 | .I Export |
| 41 | is typically called via | 39 | is typically called via |
| @@ -53,5 +51,6 @@ unless a transport protocol is run on the connection. · 11 unmodified lines | |||
| 53 | .SH SEE ALSO | 51 | .SH SEE ALSO |
| 54 | .IR cpu (1), | 52 | .IR cpu (1), |
| 55 | .IR listen (1), | 53 | .IR listen (1), |
| 56 | .IR sys-dial (2), | 54 | .IR dial (2), |
| 55 | .IR sys-export (2), | ||
| 57 | .IR intro (5) | 56 | .IR intro (5) |
| @@ -23,7 +23,7 @@ visible at · 22 unmodified lines | |||
| 23 | .BR /n/ftp ) | 23 | .BR /n/ftp ) |
| 24 | in the current name space, | 24 | in the current name space, |
| 25 | for access by ordinary Inferno file operations. | 25 | for access by ordinary Inferno file operations. |
| 26 | In other words, it is a protocol translator between FTP and Styx. | 26 | In other words, it is a protocol translator between FTP and 9P. |
| 27 | The connection is shut down by unmounting the mount point; | 27 | The connection is shut down by unmounting the mount point; |
| 28 | see | 28 | see |
| 29 | .IR bind (1). | 29 | .IR bind (1). |
| @@ -53,7 +53,7 @@ For example, to import · 52 unmodified lines | |||
| 53 | .B /dis | 53 | .B /dis |
| 54 | and | 54 | and |
| 55 | .B /dev | 55 | .B /dev |
| 56 | from a resource exporting a Styx (see | 56 | from a resource exporting a 9P (see |
| 57 | .IR intro(5)) | 57 | .IR intro(5)) |
| 58 | namespace at address | 58 | namespace at address |
| 59 | .B tcp!200.1.5.53!7003 | 59 | .B tcp!200.1.5.53!7003 |
| @@ -65,7 +65,7 @@ Display summary of file I/O incurred by · 64 unmodified lines | |||
| 65 | iostats ls | 65 | iostats ls |
| 66 | .EE | 66 | .EE |
| 67 | .PP | 67 | .PP |
| 68 | Start a new shell, displaying all Styx traffic caused by the shell or its children: | 68 | Start a new shell, displaying all 9P traffic caused by the shell or its children: |
| 69 | .IP | 69 | .IP |
| 70 | .EX | 70 | .EX |
| 71 | iostats -df /fd/1 sh | 71 | iostats -df /fd/1 sh |
| @@ -21,7 +21,7 @@ kfs \- disk file system · 20 unmodified lines | |||
| 21 | implements a hierarchical Inferno file system within an existing | 21 | implements a hierarchical Inferno file system within an existing |
| 22 | .IR file , | 22 | .IR file , |
| 23 | which is typically a disk or flash memory partition. | 23 | which is typically a disk or flash memory partition. |
| 24 | It gives access to it through the Styx protocol on its standard input, | 24 | It gives access to it through the 9P protocol on its standard input, |
| 25 | and the contents can be mounted directly on a given | 25 | and the contents can be mounted directly on a given |
| 26 | .I dir | 26 | .I dir |
| 27 | as shown above. | 27 | as shown above. |
| @@ -5,7 +5,7 @@ mntgen \- dynamically generate mount points · 4 unmodified lines | |||
| 5 | .BI "mount {mntgen} " dir | 5 | .BI "mount {mntgen} " dir |
| 6 | .SH DESCRIPTION | 6 | .SH DESCRIPTION |
| 7 | .I Mntgen | 7 | .I Mntgen |
| 8 | serves a Styx connection on its standard input, providing a name space containing a | 8 | serves 9P on its standard input, providing a name space containing a |
| 9 | single directory that is initially empty, but in which a subdirectory name appears when | 9 | single directory that is initially empty, but in which a subdirectory name appears when |
| 10 | is first referenced, and remains only as long as it is needed (referenced). | 10 | is first referenced, and remains only as long as it is needed (referenced). |
| 11 | .I Mntgen | 11 | .I Mntgen |
| @@ -25,7 +25,7 @@ where services come and go. · 24 unmodified lines | |||
| 25 | It was originally intended to register Grid resources | 25 | It was originally intended to register Grid resources |
| 26 | but has much wider use. | 26 | but has much wider use. |
| 27 | .I Registry | 27 | .I Registry |
| 28 | serves Styx on its standard input. | 28 | serves 9P on its standard input. |
| 29 | That can be mounted in the local name space (see below for an example), | 29 | That can be mounted in the local name space (see below for an example), |
| 30 | or served over a connection | 30 | or served over a connection |
| 31 | (eg, via | 31 | (eg, via |
| @@ -135,7 +135,7 @@ image data. · 134 unmodified lines | |||
| 135 | The rest of the file is a string of compression blocks, each encoding | 135 | The rest of the file is a string of compression blocks, each encoding |
| 136 | a number of rows of the image's pixel data. Compression blocks | 136 | a number of rows of the image's pixel data. Compression blocks |
| 137 | are at most 6024 bytes long, so that they fit comfortably in a | 137 | are at most 6024 bytes long, so that they fit comfortably in a |
| 138 | single Styx message. Since a compression block must encode a | 138 | single 9P message. Since a compression block must encode a |
| 139 | whole number of rows, there is a limit (about 5825 bytes) to the width of images | 139 | whole number of rows, there is a limit (about 5825 bytes) to the width of images |
| 140 | that may be encoded. Most wide images are in subfonts, | 140 | that may be encoded. Most wide images are in subfonts, |
| 141 | which, at 1 bit per pixel (the usual case for fonts), can be 46600 pixels wide. | 141 | which, at 1 bit per pixel (the usual case for fonts), can be 46600 pixels wide. |
| @@ -29,7 +29,7 @@ The services are defined by the contents of directory · 28 unmodified lines | |||
| 29 | (default: | 29 | (default: |
| 30 | .BR /services/collab ). | 30 | .BR /services/collab ). |
| 31 | .I Collabsrv | 31 | .I Collabsrv |
| 32 | serves an authenticated Styx connection that exports the contents of | 32 | serves an authenticated 9P connection that exports the contents of |
| 33 | .IB dir /export | 33 | .IB dir /export |
| 34 | (default: | 34 | (default: |
| 35 | .BR /services/collab/export ). | 35 | .BR /services/collab/export ). |
| @@ -57,10 +57,10 @@ all share that name space. · 21 unmodified lines | |||
| 57 | The name space is determined by the service. | 57 | The name space is determined by the service. |
| 58 | .PP | 58 | .PP |
| 59 | A client wishing to make use of the services must first | 59 | A client wishing to make use of the services must first |
| 60 | .IR sys-dial (2) | 60 | .IR dial (2) |
| 61 | to connect to | 61 | to connect to |
| 62 | .IR collabsrv, | 62 | .IR collabsrv, |
| 63 | and authenticate and mount the resulting Styx connection. | 63 | and authenticate and mount the resulting 9P connection. |
| 64 | It can do so using the | 64 | It can do so using the |
| 65 | .I mount | 65 | .I mount |
| 66 | command | 66 | command |
| @@ -141,7 +141,7 @@ but usually refer to files in · 74 unmodified lines | |||
| 141 | Each | 141 | Each |
| 142 | .I collabsrv | 142 | .I collabsrv |
| 143 | service is represented by a name space peculiar to that service. | 143 | service is represented by a name space peculiar to that service. |
| 144 | The interface to the service is therefore implemented by a service-specific Styx server | 144 | The interface to the service is therefore implemented by a service-specific 9P server |
| 145 | .RI ( disfile | 145 | .RI ( disfile |
| 146 | in the configuration file). | 146 | in the configuration file). |
| 147 | Current services are described below. | 147 | Current services are described below. |
| @@ -31,7 +31,7 @@ answering requests by client processes · 30 unmodified lines | |||
| 31 | to translate symbolic network and service names into | 31 | to translate symbolic network and service names into |
| 32 | instructions for connecting to the given service. | 32 | instructions for connecting to the given service. |
| 33 | It is normally accessed indirectly by calls to | 33 | It is normally accessed indirectly by calls to |
| 34 | .IR sys-dial (2). | 34 | .IR dial (2). |
| 35 | .PP | 35 | .PP |
| 36 | The network data is taken from the network database files, | 36 | The network data is taken from the network database files, |
| 37 | described in | 37 | described in |
| @@ -76,7 +76,7 @@ or · 38 unmodified lines | |||
| 76 | .B announce | 76 | .B announce |
| 77 | as required. | 77 | as required. |
| 78 | (All this activity is normally encapsulated in a call to | 78 | (All this activity is normally encapsulated in a call to |
| 79 | .IR sys-dial (2)). | 79 | .IR dial (2).) |
| 80 | .I Cs | 80 | .I Cs |
| 81 | produces a translation for each network and for each network address on which a symbolic | 81 | produces a translation for each network and for each network address on which a symbolic |
| 82 | .I netaddr | 82 | .I netaddr |
| @@ -243,6 +243,6 @@ map from symbolic service names to servers · 160 unmodified lines | |||
| 243 | .br | 243 | .br |
| 244 | .B /appl/cmd/ndb/csquery.b | 244 | .B /appl/cmd/ndb/csquery.b |
| 245 | .SH "SEE ALSO" | 245 | .SH "SEE ALSO" |
| 246 | .IR sys-dial (2), | 246 | .IR dial (2), |
| 247 | .IR ndb (6), | 247 | .IR ndb (6), |
| 248 | .IR dns (8) | 248 | .IR dns (8) |
| @@ -60,7 +60,7 @@ has the following options: · 59 unmodified lines | |||
| 60 | Listen for calls on the given | 60 | Listen for calls on the given |
| 61 | .IR address , | 61 | .IR address , |
| 62 | expressed using the syntax of | 62 | expressed using the syntax of |
| 63 | .IR sys-dial (2). | 63 | .IR dial (2). |
| 64 | .TP | 64 | .TP |
| 65 | .BI -c " cachesize" | 65 | .BI -c " cachesize" |
| 66 | Set the size of the daemon's cache to | 66 | Set the size of the daemon's cache to |
| @@ -17,7 +17,7 @@ ping \- probe the Internet · 16 unmodified lines | |||
| 17 | sends ICMP echo requests to a network | 17 | sends ICMP echo requests to a network |
| 18 | .I destination | 18 | .I destination |
| 19 | (which has the syntax accepted by | 19 | (which has the syntax accepted by |
| 20 | .IR sys-dial (2)). | 20 | .IR dial (2)). |
| 21 | The target host, if up, should send a corresponding reply. | 21 | The target host, if up, should send a corresponding reply. |
| 22 | By default, one line is printed for each reply, | 22 | By default, one line is printed for each reply, |
| 23 | containing the sequence number (starting at 0) of the message it answers, | 23 | containing the sequence number (starting at 0) of the message it answers, |
| @@ -54,7 +54,7 @@ in bytes · 30 unmodified lines | |||
| 54 | .SH SOURCE | 54 | .SH SOURCE |
| 55 | .B /appl/cmd/ip/ping.b | 55 | .B /appl/cmd/ip/ping.b |
| 56 | .SH SEE ALSO | 56 | .SH SEE ALSO |
| 57 | .IR sys-dial (2), | 57 | .IR dial (2), |
| 58 | .IR ip (3) | 58 | .IR ip (3) |
| 59 | .SH DIAGNOSTICS | 59 | .SH DIAGNOSTICS |
| 60 | .I Ping | 60 | .I Ping |
| @@ -15,19 +15,13 @@ rdbgsrv \- remote debug server · 14 unmodified lines | |||
| 15 | .I mountpoint | 15 | .I mountpoint |
| 16 | .SH DESCRIPTION | 16 | .SH DESCRIPTION |
| 17 | .I Rdbgsrv | 17 | .I Rdbgsrv |
| 18 | is intended for use with versions of | ||
| 19 | .IR sboot (10.8) | ||
| 20 | that do not use | ||
| 21 | .IR styxmon (10.8), | ||
| 22 | but serve Styx directly. | ||
| 23 | .I Rdbgsrv | ||
| 24 | interposes itself between | 18 | interposes itself between |
| 25 | .I dev | 19 | .I dev |
| 26 | (default: | 20 | (default: |
| 27 | .BR /dev/eia0 ) | 21 | .BR /dev/eia0 ) |
| 28 | and | 22 | and |
| 29 | .I mountpoint | 23 | .I mountpoint |
| 30 | to convey Styx messages via the serial port to and from a Styx server program | 24 | to convey 9P messages via the serial port to and from a 9P server program |
| 31 | running on a board running native Inferno. | 25 | running on a board running native Inferno. |
| 32 | The | 26 | The |
| 33 | .B \-f | 27 | .B \-f |
| @@ -39,8 +33,8 @@ option sets the line speed; the default is 38400 baud. · 5 unmodified lines | |||
| 39 | The | 33 | The |
| 40 | .B \-d | 34 | .B \-d |
| 41 | option selects debugging options by a bit mask: | 35 | option selects debugging options by a bit mask: |
| 42 | 1, print trace of Styx message types; | 36 | 1, print trace of 9P message types; |
| 43 | 2, print actual Styx message contents. | 37 | 2, print actual 9P message contents. |
| 44 | .PP | 38 | .PP |
| 45 | The monitor program on the board must be started first. | 39 | The monitor program on the board must be started first. |
| 46 | .I Rdbgsrv | 40 | .I Rdbgsrv |
| @@ -49,63 +43,16 @@ writes the two byte message · 2 unmodified lines | |||
| 49 | and keeps reading the device until it sees the reply | 43 | and keeps reading the device until it sees the reply |
| 50 | .BR ok . | 44 | .BR ok . |
| 51 | It then attempts to mount the exported name space, and | 45 | It then attempts to mount the exported name space, and |
| 52 | copies Styx messages to and from the device. | 46 | copies 9P messages to and from the device. |
| 53 | .PP | 47 | .PP |
| 54 | Once | 48 | Once |
| 55 | .I rdbgsrv | 49 | .I rdbgsrv |
| 56 | is running, several device files provided by the program | 50 | is running, any device files provided by the program |
| 57 | will be visible at | 51 | will be visible at |
| 58 | .IR mountpoint . | 52 | .IR mountpoint . |
| 59 | The files include flash partitions, a console file, and a file representing | ||
| 60 | temporary storage in the device's memory: | ||
| 61 | .TF sbootconsole | ||
| 62 | .PD | ||
| 63 | .TP | ||
| 64 | .B sbootconsole | ||
| 65 | Accepts | ||
| 66 | .IR sboot (10.8) | ||
| 67 | commands. | ||
| 68 | When read, it returns output from recent commands. | ||
| 69 | .TP | ||
| 70 | .B tmp | ||
| 71 | Temporary memory buffer that accepts data to be copied to the flash. | ||
| 72 | .TP | ||
| 73 | .BI F! partition | ||
| 74 | Represents the flash partition with the name | ||
| 75 | .IR partition . | ||
| 76 | .PP | ||
| 77 | The following example | ||
| 78 | Inferno | ||
| 79 | session on the host mounts the serial device on | ||
| 80 | .BR /n/rdbg , | ||
| 81 | and sends commands by writing to | ||
| 82 | .BR /n/rdbg/sbootconsole . | ||
| 83 | .IP | ||
| 84 | .EX | ||
| 85 | % bind -b '#t' /dev # ensure /dev/eia0 is visible | ||
| 86 | % auxi/rdbgsrv /n/rdbg | ||
| 87 | % ls /n/rdbg | ||
| 88 | /n/rdbg/F!kern | ||
| 89 | /n/rdbg/F!fs | ||
| 90 | /n/rdbg/sbootconsole | ||
| 91 | /n/rdbg/tmp | ||
| 92 | % cp /os/sa1100/isword.p9.gz /n/rdbg/F!kern # copy kernel | ||
| 93 | % cp /tmp/fs.tgz /n/rdbg/tmp # copy compressed file system | ||
| 94 | % echo c/u T! F!fs >/n/rdbg/sbootconsole | ||
| 95 | % cat /n/rdbg/sbootconsole | ||
| 96 | % echo P >/n/rdbg/sbootconsole | ||
| 97 | % echo b F!kern >/n/rdbg/sbootconsole # boot from F!kern | ||
| 98 | .EE | ||
| 99 | .PP | ||
| 100 | Copying a file containing | ||
| 101 | .I sboot | ||
| 102 | commands to | ||
| 103 | .B /n/rdbg/sbootconsole | ||
| 104 | has the same effect as writing the individual commands to the console. | ||
| 105 | .SH SOURCE | 53 | .SH SOURCE |
| 106 | .B /appl/auxi/rdbgsrv.b | 54 | .B /appl/auxi/rdbgsrv.b |
| 107 | .SH SEE ALSO | 55 | .SH SEE ALSO |
| 108 | .IR sboot (10.8), | 56 | .IR styxchat (8) |
| 109 | .IR styxmon (10.8) | ||
| 110 | .SH BUGS | 57 | .SH BUGS |
| 111 | No error recovery is applied, let alone error correction. | 58 | No error recovery is applied, let alone error correction. |
| @@ -1,6 +1,6 @@ | |||
| 1 | .TH STYXCHAT 8 | 1 | .TH STYXCHAT 8 |
| 2 | .SH NAME | 2 | .SH NAME |
| 3 | styxchat \- exchange Styx messages with a server or client | 3 | styxchat \- exchange 9P (Styx) messages with a server or client |
| 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
| 5 | .B styxchat | 5 | .B styxchat |
| 6 | [ | 6 | [ |
| @@ -16,7 +16,8 @@ styxchat \- exchange Styx messages with a server or client · 9 unmodified lines | |||
| 16 | ] | 16 | ] |
| 17 | .SH DESCRIPTION | 17 | .SH DESCRIPTION |
| 18 | .I Styxchat | 18 | .I Styxchat |
| 19 | exchanges messages with a Styx service. | 19 | exchanges messages with a 9P service. |
| 20 | (9P was previously called `Styx' when used by Inferno, hence the command's name.) | ||
| 20 | See | 21 | See |
| 21 | .IR intro (5) | 22 | .IR intro (5) |
| 22 | for the protocol definition. | 23 | for the protocol definition. |
| @@ -27,9 +28,9 @@ It makes a connection to a given · 4 unmodified lines | |||
| 27 | if the | 28 | if the |
| 28 | .B -s | 29 | .B -s |
| 29 | option is specified), | 30 | option is specified), |
| 30 | then reads a textual representation of Styx T-messages from the standard | 31 | then reads a textual representation of 9P T-messages from the standard |
| 31 | input and writes them on the connection, with a copy on standard output, | 32 | input and writes them on the connection, with a copy on standard output, |
| 32 | simultaneously reading Styx R-messages from the connection and printing a representation of them | 33 | simultaneously reading 9P R-messages from the connection and printing a representation of them |
| 33 | on standard output. | 34 | on standard output. |
| 34 | Each message is represented by one line | 35 | Each message is represented by one line |
| 35 | on the standard output in the form of a literal of either | 36 | on the standard output in the form of a literal of either |
| @@ -58,7 +59,7 @@ The · 22 unmodified lines | |||
| 58 | option causes | 59 | option causes |
| 59 | .I destination | 60 | .I destination |
| 60 | to be interpreted as a network address, as accepted by | 61 | to be interpreted as a network address, as accepted by |
| 61 | .IR sys-dial (2) | 62 | .IR dial (2) |
| 62 | (or | 63 | (or |
| 63 | .I listen | 64 | .I listen |
| 64 | with | 65 | with |
| @@ -67,7 +68,7 @@ If · 2 unmodified lines | |||
| 67 | .I destination | 68 | .I destination |
| 68 | is not provided, | 69 | is not provided, |
| 69 | .B styxchat | 70 | .B styxchat |
| 70 | reads and writes Styx messages on its standard input, | 71 | reads and writes 9P messages on its standard input, |
| 71 | using | 72 | using |
| 72 | .B /dev/cons | 73 | .B /dev/cons |
| 73 | where it would usually use its standard input and output. | 74 | where it would usually use its standard input and output. |
| @@ -192,10 +193,10 @@ option, allowing data display to be enabled later. · 118 unmodified lines | |||
| 192 | .PP | 193 | .PP |
| 193 | By default, | 194 | By default, |
| 194 | .I styxchat | 195 | .I styxchat |
| 195 | sends a Styx client's T-messages and prints a server's R-messages. | 196 | sends a 9P client's T-messages and prints a server's R-messages. |
| 196 | The | 197 | The |
| 197 | .B -s | 198 | .B -s |
| 198 | option causes it to present a server's view: it prints the T-messages from Styx clients, and sends R-messages | 199 | option causes it to present a server's view: it prints the T-messages from 9P clients, and sends R-messages |
| 199 | as it reads a textual representation of them from standard input: | 200 | as it reads a textual representation of them from standard input: |
| 200 | .IP | 201 | .IP |
| 201 | .br | 202 | .br |
| @@ -1,6 +1,6 @@ | |||
| 1 | .TH STYXMON 8 | 1 | .TH STYXMON 8 |
| 2 | .SH NAME | 2 | .SH NAME |
| 3 | styxmon \- monitor a Styx conversation | 3 | styxmon \- monitor a 9P (Styx) conversation |
| 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
| 5 | .B styxmon | 5 | .B styxmon |
| 6 | [ | 6 | [ |
| @@ -14,13 +14,13 @@ styxmon \- monitor a Styx conversation · 7 unmodified lines | |||
| 14 | ] | 14 | ] |
| 15 | .SH DESCRIPTION | 15 | .SH DESCRIPTION |
| 16 | .I Styxmon | 16 | .I Styxmon |
| 17 | allows the monitoring of styx messages sent and received | 17 | allows the monitoring of 9P messages sent and received |
| 18 | by | 18 | by |
| 19 | .IR cmd , | 19 | .IR cmd , |
| 20 | which should serve Styx through its standard input. | 20 | which should serve 9P through its standard input. |
| 21 | .I Styxmon | 21 | .I Styxmon |
| 22 | in its turn serves Styx through its standard input, | 22 | in its turn serves 9P through its standard input, |
| 23 | and writes information on the Styx messages that | 23 | and writes information on the 9P messages that |
| 24 | it sees to the standard error. | 24 | it sees to the standard error. |
| 25 | The | 25 | The |
| 26 | .B -r | 26 | .B -r |
| @@ -5,6 +5,9 @@ svc: auth, net, registry, rstyx, styx \- start Inferno network services · 4 unmodified lines | |||
| 5 | .B svc/net | 5 | .B svc/net |
| 6 | .br | 6 | .br |
| 7 | .B svc/auth | 7 | .B svc/auth |
| 8 | [ | ||
| 9 | .B -n | ||
| 10 | ] | ||
| 8 | .br | 11 | .br |
| 9 | .B svc/registry | 12 | .B svc/registry |
| 10 | .br | 13 | .br |
| @@ -38,6 +41,11 @@ file service or remote execution. · 27 unmodified lines | |||
| 38 | .I Auth | 41 | .I Auth |
| 39 | must be run (only) on a host that is to act as an authentication server, | 42 | must be run (only) on a host that is to act as an authentication server, |
| 40 | providing signing and other authentication services to itself and the network. | 43 | providing signing and other authentication services to itself and the network. |
| 44 | The | ||
| 45 | .B -n | ||
| 46 | flag tells it not to start | ||
| 47 | .IR keyfs (4), | ||
| 48 | perhaps because it has been started already. | ||
| 41 | The files | 49 | The files |
| 42 | .BR /keydb/signerkey , | 50 | .BR /keydb/signerkey , |
| 43 | created by | 51 | created by |
| @@ -85,7 +93,7 @@ putting it at the conventional location for the local registry, · 41 unmodified lines | |||
| 85 | Initial (static) service descriptions are taken from | 93 | Initial (static) service descriptions are taken from |
| 86 | .B /lib/ndb/registry | 94 | .B /lib/ndb/registry |
| 87 | if it exists. | 95 | if it exists. |
| 88 | It then starts a listener to give other hosts access to the registry as a Styx | 96 | It then starts a listener to give other hosts access to the registry as a 9P |
| 89 | service at | 97 | service at |
| 90 | .BR tcp!*!registry , | 98 | .BR tcp!*!registry , |
| 91 | normally port 6675. | 99 | normally port 6675. |
| @@ -9,15 +9,15 @@ Secstore: module · 8 unmodified lines | |||
| 9 | privacy: fn(): int; | 9 | privacy: fn(): int; |
| 10 | cansecstore: fn(addr: string, user: string): int; | 10 | cansecstore: fn(addr: string, user: string): int; |
| 11 | mkseckey: fn(pass: string): array of byte; | 11 | mkseckey: fn(pass: string): array of byte; |
| 12 | connect: fn(addr: string, user: string, pwhash: array of byte): (ref Sys->Connection, string, string); | 12 | connect: fn(addr: string, user: string, pwhash: array of byte): (ref Dial->Connection, string, string); |
| 13 | dial: fn(addr: string): ref Sys->Connection; | 13 | dial: fn(addr: string): ref Dial->Connection; |
| 14 | auth: fn(conn: ref Sys->Connection, user: string, pwhash: array of byte): (string, string); | 14 | auth: fn(conn: ref Dial->Connection, user: string, pwhash: array of byte): (string, string); |
| 15 | sendpin: fn(conn: ref Sys->Connection, pin: string): int; | 15 | sendpin: fn(conn: ref Dial->Connection, pin: string): int; |
| 16 | files: fn(conn: ref Sys->Connection): list of (string, int, string, string, array of byte); | 16 | files: fn(conn: ref Dial->Connection): list of (string, int, string, string, array of byte); |
| 17 | getfile: fn(conn: ref Sys->Connection, filename: string, maxsize: int): array of byte; | 17 | getfile: fn(conn: ref Dial->Connection, filename: string, maxsize: int): array of byte; |
| 18 | remove: fn(conn: ref Sys->Connection, filename: string): int; | 18 | remove: fn(conn: ref Dial->Connection, filename: string): int; |
| 19 | # putfile: fn(conn: ref Sys->Connection, filename: string, data: array of byte,): int; | 19 | # putfile: fn(conn: ref Dial->Connection, filename: string, data: array of byte,): int; |
| 20 | bye: fn(conn: ref Sys->Connection); | 20 | bye: fn(conn: ref Dial->Connection); |
| 21 | 21 | ||
| 22 | mkfilekey: fn(pass: string): array of byte; | 22 | mkfilekey: fn(pass: string): array of byte; |
| 23 | decrypt: fn(a: array of byte, key: array of byte): array of byte; | 23 | decrypt: fn(a: array of byte, key: array of byte): array of byte; |