venti-server man page on Plan9

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


       vtsrvhello, vtlisten, vtgetreq, vtrespond - Venti server

       #include <u.h>
       #include <libc.h>
       #include <venti.h>

       typedef struct VtReq
	      VtFcall tx;
	      VtFcall rx;
       } VtReq;

       int    vtsrvhello(VtConn *z)

       VtSrv* vtlisten(char *addr)

       VtReq* vtgetreq(VtSrv *srv)

       void   vtrespond(VtReq *req)

       These routines execute the server side of the venti(6) protocol.

       Vtsrvhello  executes  the server side of the initial hello transaction.
       It sets z->uid with the user name claimed by the other side.  Each  new
       connection   must   be	initialized  by	 running  vtversion  and  then
       vtsrvhello.  The framework below takes care of  this  detail  automati‐
       cally;  vtsrvhello  is  provided for programs that do not use the func‐
       tions below.

       Vtlisten, vtgetreq, and vtrespond provide a simple framework for	 writ‐
       ing Venti servers.

       Vtlisten announces at the network address addr, returning a fresh VtSrv
       structure representing the service.

       Vtgetreq waits for and returns the next	read,  write,  sync,  or  ping
       request	from any client connected to the service srv.  Hello and good‐
       bye messages are handled internally and not  returned  to  the  client.
       The  interface  does not distinguish between the different clients that
       may be connected at any given time.  The request can be found in the tx
       field of the returned VtReq.

       Once  a	request	 has  been  served and a response stored in r->rx, the
       server should call vtrespond to send the response to the client.	 Vtre‐
       spond  frees  the  structure  r	as  well as the packets r-> and

       /sys/src/cmd/venti contains two simple Venti servers ro.c and devnull.c
       written	using  these  routines.	  Ro  is  a  read-only Venti proxy (it
       rejects write requests).	  Devnull  is  a  dangerous  write-only	 Venti
       server:	it  discards all blocks written to it and returns error on all


       venti(2), venti-conn(2), venti-packet(2), venti(6), venti(8)

                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Plan9

List of man pages available for Plan9

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