styxconv man page on Inferno

Man page or keyword search:  
man Server   579 pages
apropos Keyword Search (all sections)
Output format
Inferno logo
[printable version]

STYXCONV(2)							   STYXCONV(2)

NAME
       styxconv - convert between old 1995 Styx and current Styx (9P)

SYNOPSIS
       include "styxconv.m";
       styxconv := load Styxconv Styxconv->PATHNEW2OLD;
       styxconv := load Styxconv Styxconv->PATHOLD2NEW;

       init:	 fn();
       styxconv: fn(client: ref Sys->FD, server: ref Sys->FD);

DESCRIPTION
       Styxconv	 converts between the obsolete 1995 version of the Styx proto‐
       col, as used for instance in Inferno's Third Edition and	 earlier,  and
       the  current  file  service protocol, previously also called `Styx' but
       based on 9P2000 and defined by intro(5).

       Init must be called before any other function in the module.

       The function styxconv takes two file descriptors: client	 should	 be  a
       connection  to  a  client requiring one version of the protocol; server
       should be a connection to a server serving the  other  version  of  the
       protocol.   There are two conversion modules: PATHNEW2OLD converts from
       a new client to an old server; PATHOLD2NEW converts from an old	client
       to a new server.

       Styxconv	 should	 be spawned by the caller, and copies messages between
       client and server, converting as required.  See the example below.

EXAMPLE
       Apply styxconv to file descriptor fd, connected to an old Styx  server,
       and return a file descriptor suitable for mounting with mount(2).

	      cvstyx(fd: ref Sys->FD): ref Sys->FD
	      {
		   styxconv := load Styxconv Styxconv->NEW2OLDPATH;
		   if(styxconv == nil)
			return nil;
		   p := array[2] of ref Sys->FD;
		   if(sys->pipe(p) < 0)
			return nil;
		   styxconv->init();
		   spawn styxconv->styxconv(p[1], fd);
		   return p[0];
	      }

SOURCE
       /appl/lib/styxconv

SEE ALSO
       bind(1), sys-bind(2), sys-pipe(2), intro(5)

BUGS
       There is no provision for 9P2000 authentication.

								   STYXCONV(2)
[top]

List of man pages available for Inferno

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net