BSD 4_4_Lite2 development
authorCSRG <csrg@ucbvax.Berkeley.EDU>
Thu, 15 Jan 1987 06:53:48 +0000 (22:53 -0800)
committerCSRG <csrg@ucbvax.Berkeley.EDU>
Thu, 15 Jan 1987 06:53:48 +0000 (22:53 -0800)
Work on file usr/src/contrib/xns/man/authcredcheck.n
Work on file usr/src/contrib/xns/man/authlookup.n
Work on file usr/src/contrib/xns/man/clearinghousesupport.n
Work on file usr/src/contrib/xns/man/except.n
Work on file usr/src/contrib/xns/man/gaptelnet.n
Work on file usr/src/contrib/xns/man/getcourierdbent.n
Work on file usr/src/contrib/xns/man/xnsbfs.n
Work on file usr/src/contrib/xns/man/xnscourier.n

Synthesized-from: CSRG/cd3/4.4BSD-Lite2

usr/src/contrib/xns/man/authcredcheck.n [new file with mode: 0644]
usr/src/contrib/xns/man/authlookup.n [new file with mode: 0644]
usr/src/contrib/xns/man/clearinghousesupport.n [new file with mode: 0644]
usr/src/contrib/xns/man/except.n [new file with mode: 0644]
usr/src/contrib/xns/man/gaptelnet.n [new file with mode: 0644]
usr/src/contrib/xns/man/getcourierdbent.n [new file with mode: 0644]
usr/src/contrib/xns/man/xnsbfs.n [new file with mode: 0644]
usr/src/contrib/xns/man/xnscourier.n [new file with mode: 0644]

diff --git a/usr/src/contrib/xns/man/authcredcheck.n b/usr/src/contrib/xns/man/authcredcheck.n
new file mode 100644 (file)
index 0000000..41ab13a
--- /dev/null
@@ -0,0 +1,54 @@
+.TH "AUTH_CREDCHECK" 3 "29-Dec-86" "Xerox (WRC)"
+.\" $Header: authcredcheck.n,v 1.1 87/01/15 16:48:03 ed Exp $
+.SH NAME
+Auth_CredCheck
+\- Check user supplied credentials and verifier with a network Authentication 
+service
+.SH SYNOPSIS
+.PP
+.nf
+.B "#include <sys/types.h>"
+.B "#include <netns/ns.h>"
+.B "#include <xnscourier/Authentication2.h>"
+.B "#include <xnscourier/courier.h>"
+.PP
+.B "Boolean Auth_CredCheck(creds, verifier)"
+.B "   Authentication2_Credentials creds;"
+.B "   Authentication2_Verifier verifier;"
+.f
+.PP
+Link with
+.IR "-lcourier" .
+.SH DESCRIPTION
+The routine
+.I Auth_CredCheck
+returns TRUE or FALSE depending upon whether the supplied credentials and
+verifier are valid as determined by a network Authentication service. The
+credentials and verifier supplied in the arguments
+.I credentials
+and 
+.I verifier
+must be of type simple. If another type is supplied, FALSE will be returned.
+If
+.I credentials
+specifies 
+.I nullCredentials
+TRUE will be returned.
+.PP
+.I AuthGetFirstAuth
+is used to locate a network Authentication service where the credentials and
+verifier may be validated. If no service can be located or a connection 
+established, the return value will also be FALSE.
+.SH NOTES
+Currently only the simple flavor of credentials and verifiers are supported.
+.SH FILES
+/usr/local/lib/libcourier.a            -lcourier library.
+.SH SEE ALSO
+Auth_GetFirstAuth(3N), xnsbfs(1N)
+.br
+``XNS Courier Under Unix''
+.br
+Authentication Protocol, \s8XSIS\s0 098404 (April 1984).
+.SH AUTHOR
+Ed Flint
+
diff --git a/usr/src/contrib/xns/man/authlookup.n b/usr/src/contrib/xns/man/authlookup.n
new file mode 100644 (file)
index 0000000..d54bef0
--- /dev/null
@@ -0,0 +1,43 @@
+.TH "AUTH_GETFIRSTAUTH" 3 "29-Dec-86" "Xerox (WRC)"
+.\" $Header: authlookup.n,v 1.1 87/01/15 16:48:08 ed Exp $
+.SH NAME
+Auth_GetFirstAuth
+\- Locate an Authentication service.
+.SH SYNOPSIS
+.PP
+.nf
+.B "#include <sys/types.h>             /* used by ns.h */"
+.B "#include <netns/ns.h>              /* for sockaddr_ns */"
+.B "#include <xnscourier/courier.h>"
+.B "#include <xnscourier/courierconnection.h>"
+.PP
+.B "CourierConnection *Auth_GetFirstAuth()"
+.f
+.PP
+Link with
+.IR "-lcourier" .
+.SH DESCRIPTION
+The routine
+.I Auth_GetFirstAuth
+returns an XNS Courier connection to a nearby Authentication service, useful
+for Authentication remote procedure calls.
+.I Xnsbfs 
+is used to perform a broadcast for Authentication servers, the results of
+which are then used to open a Courier connection. If no Authentication servers
+respond to the broadcast or a connection cannot be established to a service,
+NULL is returned.
+.SH NOTES
+A CourierConnection is an anonymous data structure used by the
+runtimes.  Users should not dereference pointers to CourierConnection
+themselves.
+.SH FILES
+/usr/local/lib/libcourier.a            -lcourier library.
+.SH SEE ALSO
+xnsbfs(1N)
+.br
+``XNS Courier Under Unix''
+.br
+Authentication Protocol, \s8XSIS\s0 098404 (April 1984).
+.SH AUTHOR
+Ed Flint
+
diff --git a/usr/src/contrib/xns/man/clearinghousesupport.n b/usr/src/contrib/xns/man/clearinghousesupport.n
new file mode 100644 (file)
index 0000000..52abae9
--- /dev/null
@@ -0,0 +1,201 @@
+.TH CLEARINGHOUSESUPPORT 3 Cornell
+.\" $Header: clearinghousesupport.n,v 1.2 86/12/15 11:26:07 jqj Exp $
+.SH NAME
+CH_StringToName,
+CH_NameDefault,
+CH_LookupAddr,
+CH_LookupAddrDN,
+CH_GetFirstCH,
+CH_GetOtherCH,
+CH_Enumerate,
+CH_EnumerateAliases
+\- Clearinghouse support routines.
+.SH SYNOPSIS
+.PP
+.nf
+.B "#include <sys/types.h>             /* used by ns.h */"
+.B "#include <netns/ns.h>              /* for ns_addr */"
+.B "#include <xnscourier/Clearinghouse2.h>"
+.B "#include <xnscourier/CH.h>"
+.PP
+.B "Clearinghouse2_ObjectName CH_StringToName(string, defaults)"
+.B "   char *string;"
+.B "   Clearinghouse2_ObjectName *defaults;"
+.PP
+.B "CH_NameDefault(defaults)"
+.B "   Clearinghouse2_ObjectName *defaults;"
+.PP
+.B "struct ns_addr * CH_LookupAddr(pattern, property)"
+.B "   Clearinghouse2_ObjectName pattern;"
+.B "   Clearinghouse2_Property property;"
+.PP
+.B "struct ns_addr * CH_LookupAddrDN(pattern, property, name, namelen)"
+.B "   Clearinghouse2_ObjectName pattern;"
+.B "   Clearinghouse2_Property property;"
+.B "   char name[namelen];"
+.B "   int namelen;"
+.PP
+.B "CourierConnection * CH_GetFirstCH()"
+.PP
+.B "CourierConnection * CH_GetOtherCH(conn, hint)"
+.B "   CourierConnection *conn;"
+.B "   Clearinghouse2_ObjectName hint;"
+.PP
+.B "int CH_Enumerate(pattern, property, eachName)"
+.B "   Clearinghouse2_ObjectName pattern;"
+.B "   Clearinghouse2_Property property;"
+.B "   int (*eachName)();"
+.PP
+.B "CH_EnumerateAliases(pattern,eachName)"
+.B "   Clearinghouse2_ObjectNamePattern pattern;"
+.B "   int (*eachName)();"
+.B "int eachName(name)"
+.B "   Clearinghouse2_ObjectName name;"
+.fi
+.PP
+Link with
+.IR "-lcourier" .
+.SH DESCRIPTION
+.PP
+Given a string in standard format (e.g. 
+``jqj:Computer\ Science:cornell-univ''),
+.I CH_StringToName
+returns an ObjectName containing broken out fields for object, domain, and
+organization.  If the string is incomplete, e.g. ``jqj'' or 
+``::cornell-univ'', the unspecified values are filled in from
+.IR defaults .
+.I Defaults
+may be NULL, in which case 0-length strings are used as defaults.
+.PP
+.I CH_NameDefault
+sets its argument to default domain and organization based on data from
+the file
+.IR /usr/new/lib/xnscourier/CH.default .
+The strings pointed to by the argument are statically allocated.
+.PP
+Given a Clearinghouse three part name (possibly containing wild cards
+in the local object part)
+and the property number on which a NetworkAddressList is expected to occur,
+.I CH_LookupAddr
+returns a pointer to an ns_addr structure associated with that name.
+Note that the ns_addr structure is statically allocated!
+If
+.I property
+is given as 0, then the addressList property (actually 4) is used;
+this is the property typically used for storing Clearinghouse addresses of
+objects.  Returns 0 if any error occurs, if the name given is not
+registered, or if the name does not have the specified property.
+If a name has several network addresses (e.g. a gateway machine), only
+the first or primary address is returned; to obtain all addresses use
+the remote procedure
+.IR Clearinghouse2_RetrieveAddresses .
+.PP
+The routine 
+.I CH_LookupAddrDN
+is identical with 
+.IR CH_LookupAddr ,
+except that it accepts additional parameters of
+.IR namestring ,
+a caller-allocated buffer of length
+.IR namelen ,
+which on return is set to the distinguished name of the object found.
+Users who require greater control than is provided by
+.I CH_LookupAddress
+should call
+.I Clearinghouse2_RetrieveItem
+directly.
+.PP
+The routine
+.I CH_GetFirstCH
+returns an XNS Courier connection to a nearby clearinghouse, useful
+for Clearinghouse remote procedure calls.  Since the Clearinghouse is
+distributed, that instance of the CH may not contain the data desired;
+in such cases, a remote CH procedure call will return the error
+``WrongServer'' with a hint as to the correct server, and the user
+may retry the operation after connecting (using 
+.IR CH_GetOtherCH )
+to the clearinghouse specified by the hint.  For example:
+.PP
+.nf
+CH_NameDefault(&default);
+name = CH_StringToName(argv[1], &default);
+conn = CH_GetFirstCH();
+for (tries = 5; tries > 0; tries--) {
+    DURING {
+       objectname = Clearinghouse2_LookupObject(conn, NULL, name, agent);
+       tries = -1;     /* done.  Note break is illegal inside DURING */
+    }
+    HANDLER {
+        if (Exception.Code == Clearinghouse2_WrongServer) {
+            hint = CourierErrArgs(Clearinghouse2_WrongServerArgs, hint);
+            ch2conn = CH_GetOtherCH(conn, hint);
+            CourierClose(conn);
+            conn = ch2conn;
+        } else exit(1);
+    } END_HANDLER
+}
+.fi
+.PP
+.I CH_Enumerate
+and
+.I CH_EnumerateAliases
+each accept a pointer to a user-supplied function 
+.IR eachProc .
+This function is called once for each name in the local Clearinghouse
+satisfying the 
+.I pattern
+(which may contain wildcards in its local object part only) supplied;
+.I eachProc
+is called with a single argument, the name of the current object.
+.I CH_Enumerate
+enumerates over all distinguished objects (i.e. no aliases) matching
+the specified pattern and having the specified
+.IR property .
+If no specific property is desired, 0 should be used to obtain all
+names.
+.I CH_EnumerateAliases
+is similar, except that
+.I eachProc
+is called once for each alias matching the specified pattern.
+.SH NOTES
+.PP
+A CourierConnection is an anonymous data structure used by the
+runtimes.  Users should not dereference pointers to CourierConnection
+themselves.
+.PP
+Some useful definitions equivalent to those in the include file
+.I "<courier/Clearinghouse2.h>"
+include:
+.PP
+.nf
+typedef struct {
+       char *organization;
+       char *domain;
+       char *object;
+} Clearinghouse2_ObjectName;
+
+typedef unsigned long Clearinghouse2_Property;
+.fi
+.SH FILES
+.nf
+/usr/local/lib/libcourier.a            -lcourier library.
+/usr/new/lib/xnscourier/CH.addrs       local clearinghouse address.
+/usr/new/lib/xnscourier/CH.default     defaults for clearinghouse names.
+.fi
+.SH SEE ALSO
+xnscourier(3)
+.br
+``XNS Courier Under Unix.''
+.br
+``Clearinghouse Protocol,'' XSIS 078404 (April 1984).
+.SH DIAGNOSTICS
+.SH BUGS
+Probably lots of them.
+.PP
+In particular, since Packet Exchange is not yet working in the kernel,
+.I CH_GetFirstCH
+looks up the local clearinghouse address in a file rather than doing
+an expanding ring broadcast.  This will be fixed soon.
+.SH AUTHOR
+J.Q. Johnson
+
diff --git a/usr/src/contrib/xns/man/except.n b/usr/src/contrib/xns/man/except.n
new file mode 100644 (file)
index 0000000..b8f2ee9
--- /dev/null
@@ -0,0 +1,198 @@
+.TH EXCEPT 3 Stanford
+.SH NAME
+(except) raise, raise_sys() \- C exception handling
+.SH SYNOPSIS
+.B #include <xnscourier/except.h>
+.sp
+.B raise(code, msg)
+.br
+.B int code;
+.br
+.B char *msg;
+.sp
+.B raise_sys()
+.sp
+cc ... \-lexcept
+.SH "EXTENDED C SYNTAX"
+.B DURING
+statement1
+.B HANDLER
+statement2
+.B END_HANDLER
+.sp
+.B E_RETURN(
+expression
+.B )
+.sp
+.B E_RETURN_VOID
+.SH DESCRIPTION
+The macros and functions in this package provide a limited amount
+of exception handling for programming in C.  They provide the
+ability to associate an exception handler to be invoked if an
+exception is raised during the execution of a statement.
+.PP
+C syntax is extended by several macros that allow the programmer
+to associate an exception handler with a statement.  The ``syntax''
+for this is:
+.sp
+.nf
+DURING statement1 HANDLER statement2 END_HANDLER
+.fi
+.sp
+Either or both statement may be a compound statement.
+If an exception is raised using the
+.IR raise ()
+function during
+.I statement1
+(or during any functions called by
+.IR statement1 ),
+the stack will be unwound and
+.I statement2
+will be invoked in the current context.  However, if the exception
+handler is redeclared in a
+.I dynamically
+enclosed statement, the current exception handler will be inactive during
+the execution of the enclosed statement.
+.PP
+During the execution of
+.IR statement2 ,
+two predefined values may be used:
+.IR Exception.Code ,
+an integer, is the value of
+.I code
+passed to the 
+.IR raise ()
+call which invoked the handler, and
+.IR Exception.Message
+is the value of
+.IR msg .
+It is up to the user to define the values used for the exception
+codes; by convention, small positive integers are interpreted
+as Unix error codes.
+.PP
+As an example of the use of this package, the following ``toy'' code
+computes the quotient of variables f1 and f2, unless f2 is 0.0:
+.sp
+.nf
+       DURING {
+           if (f2 == 0.0)
+               raise(DIVIDE_BY_ZERO, "Division by zero attempted");
+           quotient = f1/ f2;
+       } HANDLER
+           switch (Exception.Code) {
+           case DIVIDE_BY_ZERO:
+               return(HUGE);
+               break;
+           default:
+               printf("Unexpected error %s\\n", Exception.Message);
+           }
+       END_HANDLER
+.fi
+.PP
+If a handler does not want to take responsibility for an exception,
+it can ``pass the buck'' to the dynamically enclosing exception
+handler by use of the
+.I RERAISE
+macro, which simply raises the exception that invoked the handler.
+Of course, it is possible that there is no higher-level handler.
+The programmer can control the action in this case by setting the
+external int
+.I ExceptMode
+to some (bit-wise OR'd) combination of the following constants:
+.IP "EX_MODE_REPORT" 1.5i
+Print a message on stderr if an exception is not caught.  If this
+is not set, no message is printed.
+.IP "EX_MODE_ABORT" 1.5i
+Calls the
+.IR abort (3)
+routine if an exception is not caught.  If this is not set,
+.IR exit (3)
+is called, with the exception code as an argument.
+.PP
+The default value for
+.I ExceptMode
+is zero.
+.SH RESTRICTIONS
+.B THESE RESTRICTIONS ARE IMPORTANT;
+YOU WILL SUFFER IF YOU DISOBEY THEM.
+.PP
+During the execution of
+.IR statement1,
+no transfers out of the statement are allowed, except as noted here.
+Execution of a compound
+.I statement1 
+must ``run off the end'' of the block.  This means that
+.I statement1
+may not include a
+.B return
+or
+.BR goto ,
+or a
+.B break
+or
+.B continue
+that would affect a loop enclosing the
+.I DURING ... END_HANDLER
+block.  The
+.I statement1
+may include a call to
+.IR raise ()
+(but not
+.IR RERAISE ),
+.IR exit (3),
+and any statement at all may be used in a function called.
+.PP
+If you wish to use a
+.B return
+within
+.IR statement1 ,
+you must instead use
+.I E_RETURN()
+to return a value,
+or
+.I E_RETURN_VOID
+if the enclosing function is declared
+.BR void .
+These two macros may be used
+.I only
+in the (lexically) outermost
+.I statement1
+of a function, and nowhere else.
+.PP
+There are no restrictions on what may be done inside the
+.I statement2
+part of a handler block, except that it is subject to the
+above constraints if it is lexically enclosed in the
+.I statement1
+part of another handler.
+.PP
+As an aid to Unix programmers, the
+.IR raise_sys ()
+function is provided.  It is used exactly as
+.IR raise ()
+is, except that it uses the global
+.IR errno (3)
+to produce the exception code and message.
+.SH SEE ALSO
+errno(3), setjmp(3)
+.SH AUTHOR
+Jeffrey Mogul (Stanford)
+.SH BUGS
+Due to a limitation of the
+.IR setjmp (3)
+implementation,
+.B register
+variables which are actually stored in registers (and this is not
+always easy to determine, and especially is not portable) are restored
+to the values they had upon entering
+.I statement1
+when the handler
+.RI ( statement2 )
+is invoked.  All other data keeps whatever values they were assigned
+during the (interrupted) execution of
+.IR statement1 .
+A good rule to follow is that you should not rely on the values of
+variables declared
+.B register
+(in the current block) after an exception has been caught.
+
diff --git a/usr/src/contrib/xns/man/gaptelnet.n b/usr/src/contrib/xns/man/gaptelnet.n
new file mode 100644 (file)
index 0000000..db9c430
--- /dev/null
@@ -0,0 +1,98 @@
+.TH GAPTELNET 1 Cornell
+.\" $Header: gaptelnet.n,v 1.2 86/12/15 11:26:16 jqj Exp $
+.UC 4
+.SH NAME
+gaptelnet \- User Interface to the XNS GAP Protocol
+.SH SYNOPSIS
+.B gaptelnet [host [connection-type]]
+.SH DESCRIPTION
+.I Gaptelnet
+is used to create a virtual terminal session
+with another host using the XNS Gateway Access Protocol,
+version 3.
+Thus, it can be used to communicate with a Xerox server running Services
+8.0, with an XDE workstation running RemoteExec.bcd, with a Xerox ITS, 
+with a Berkeley UNIX system running GAP3d,
+etc.
+.PP
+If
+.I gaptelnet
+is invoked without arguments, it enters command mode,
+indicated by its prompt (\fBgaptelnet>\fR).
+In this mode, it accepts and executes the commands listed below.
+If it is invoked with arguments, it performs an
+.I open
+command (see below) with those arguments.
+.PP
+Once a connection has been opened,
+.I gaptelnet
+enters input mode.
+In this mode, text typed is sent to the remote host.  
+.CO
+To issue
+.I gaptelnet
+commands when in input mode, precede them with the
+.I gaptelnet
+escape character (initially ^]).
+When in command mode, the normal 
+terminal editing conventions are available.
+Only enough of each command to uniquely identify it is
+needed.
+.TP 
+.BI open " host [connection-type]"
+opens a connection to the named host.  If a connection type
+is not specified, 
+.I gaptelnet
+attempts to contact a GAP server as a system administration service.
+Alternatives for connection-type include ``sa'', ``exec'' (for remote
+executive'', and ``its'' (for interactive terminal service).
+The host specification may be either a host name (e.g.
+``CornellS1'' or ``gvax:computer science:cornell-univ'')
+or an XNS address.  If domain and organization are unspecified,
+they default using
+.IR CH.addrs .
+.TP
+.B close
+closes a TELNET session and returns to command mode.
+.TP
+.B quit
+closes any open TELNET session and exits 
+.IR gaptelnet .
+.TP
+.B z
+suspends
+.IR gaptelnet .
+This command only works when the user is using the 
+.IR csh (1).
+.TP
+.BI escape " [escape-char]"
+sets the 
+.I gaptelnet
+escape character.  Control characters may
+be specified as 
+.B \e^ 
+followed by a single
+letter (e.g., <control-x> is ^X).
+.TP
+.B status
+prints the current status of 
+.IR gaptelnet .
+This includes who one is connected to, 
+the state of debugging, escape character, etc.
+.TP
+.B debug
+toggles socket level debugging.
+.TP
+.BI ? [command]
+gets help.  Without arguments,
+.I gaptelnet
+prints a help summary.
+If a command is specified, 
+.I gaptelnet
+prints the help information available about the command only.
+.PP
+This implementation
+is very simple because
+.IR rlogin (1C)
+is the standard mechanism used to communicate locally 
+with hosts.
diff --git a/usr/src/contrib/xns/man/getcourierdbent.n b/usr/src/contrib/xns/man/getcourierdbent.n
new file mode 100644 (file)
index 0000000..3e1458e
--- /dev/null
@@ -0,0 +1,77 @@
+.TH GETCOURIERDBENT 3  Cornell
+.\" $Header: getcourierdbent.n,v 1.1 86/11/19 07:32:41 jqj Exp $
+.SH NAME
+getcourierdbent, getcourierservice, setcourierdbent, endcourierdbent \-
+get courier service entry
+.SH SYNOPSIS
+.nf
+.B #include <xnscourier/courierdb.h>
+.PP
+.B struct courierdbent *getcourierdbent()
+.PP
+.B struct courierdbent *getcourierservice(program,version)
+.B unsigned long program;
+.B unsigned short version;
+.PP
+.B setcourierdbent()
+.PP
+.B endcourierdbent()
+.fi
+.SH DESCRIPTION
+.I Getcourierdbent
+and
+.I getcourierservice
+each return a pointer to an object with the
+following structure
+containing the broken-out
+fields of a line in the Courier services file, describing one service
+defined on this machine.
+.RS
+.PP
+.nf
+.so /usr/include/xnscourier/courierdb.h
+.ft R
+.ad
+.fi
+.RE
+.PP
+Each entry describes one program contained in the database of Courier
+programs known on this system.  The
+.I cr_description
+field contains a pointer to a string containing the full path name of
+the Courier description (used in DEPENDS UPON constructs from other
+Courier descriptions.
+The
+.I cr_serverbin
+contains either NULL to indicate that no server for this program exists,
+or the full path name of the executable file which implements the
+server.
+.PP
+.I Getcourierdbent
+reads the next
+line (opening the file if necessary);
+.I setcourierdbent
+rewinds the file;
+.I endcourierdbent
+closes it.
+.PP
+.I Getcourierservice
+searches from the beginning until a matching
+.I program
+and
+.I version
+is found
+(or until EOF is encountered).
+.SH FILES
+/etc/Courierservices
+.SH "SEE ALSO"
+Xerox courier specification.
+.SH DIAGNOSTICS
+Null pointer
+(0) returned on EOF or error.
+.SH BUGS
+All information
+is contained in a static area
+so it must be copied if it is
+to be saved.
+.br
diff --git a/usr/src/contrib/xns/man/xnsbfs.n b/usr/src/contrib/xns/man/xnsbfs.n
new file mode 100644 (file)
index 0000000..cf16b85
--- /dev/null
@@ -0,0 +1,43 @@
+.TH "XNSBFS" 1 "30-Dec-86" "Xerox (WRC)"
+.\" $Header: xnsbfs.n,v 1.1 87/01/15 16:47:37 ed Exp $
+.SH NAME
+xnsbfs - Perform a broadcast for either Clearinghouse or Authentication 
+servers
+.SH SYNOPSIS
+xnsbfs [options] xnshostaddress
+.SH DESCRIPTION
+.I Xnsbfs
+performs a broadcast for servers request looking for either a Clearinghouse
+or Authentication server as determined by the 
+.I -a
+option. The broadcast is done via the Packet Exchange Protocol as specified 
+in either the
+.B "Clearinghouse Protocol"
+or
+.BR "Authentication Protocol" .
+The network addresses of all servers responding to the broadcast are written
+to
+.I stdout
+as they are received.
+.PP
+If no network address is specified, then the query is broadcast to all
+directly connected XNS networks. If an address is specified in
+.IR xnshostaddress ,
+the broadcast will be directed to that address.
+.PP
+The possible options are:
+.TP
+.BI -a
+Causes the broadcast to request Authentication servers rather than
+Clearinghouse servers.
+.SH NOTES
+Currently, only those servers responding within 3 seconds of the broadcast
+are considered to be available.
+.SH "SEE ALSO"
+CH_GetFirstCH(3N), Auth_GetFistAuth(3N)
+.br
+Clearinghouse Protocol, \s8XSIS\s0 048404 (April 1984)
+.br
+Authentication Protocol, \s8XSIS\s0 098404 (April 1984)
+.SH AUTHORS
+JQ Johnson
diff --git a/usr/src/contrib/xns/man/xnscourier.n b/usr/src/contrib/xns/man/xnscourier.n
new file mode 100644 (file)
index 0000000..9f392bc
--- /dev/null
@@ -0,0 +1,82 @@
+.TH XNSCourier 3 Cornell
+.\" $Header: xnscourier.n,v 1.2 86/12/15 11:26:22 jqj Exp $
+.SH NAME
+CourierOpen, CourierClose, BDTread, BDTwrite, BDTabort, BDTclosewrite \-
+public runtimes for Unix Courier
+.SH SYNOPSIS
+.nf
+.B #include <sys/types.h>
+.B #include <netns/ns.h>
+.B #include <xnscourier/courier.h>
+.B #include <xnscourier/courierconnection.h>
+.PP
+.B CourierConnection *CourierOpen(destaddr)
+.B struct ns_addr *destaddr;
+.PP
+.B CourierClose(conn)
+.B CourierConnection *conn;
+.PP
+.B int BDTread(conn, buffer, nbytes)
+.B CourierConnection *conn;
+.B char *buffer;
+.B int nbytes;
+.PP
+.B int BDTwrite(conn, buffer, nbytes)
+.B CourierConnection *conn;
+.B char *buffer;
+.B int nbytes;
+.PP
+.B BDTclosewrite(conn)
+.B CourierConnection *conn;
+.PP
+.B BDTabort(conn)
+.B CourierConnection *conn;
+.PP
+cc ... -lcourier
+.fi
+.SH DESCRIPTION
+.PP
+These functions are part of the runtime library for XNS Courier remote
+procedure calls.  They all require 4.3 BSD with XNS network support enabled.
+.PP
+.I CourierOpen
+attempts to open an SPP connection to the address specified.  It returns
+0 on failure.
+If the port portion of the address is 0, then the standard port for
+Courier RPC connections, IDPPORT_COURIER, is used.
+.PP
+.I CourierClose
+closes the SPP connection obtained by CourierOpen by means of the usual
+XNS 3-way END/END-REPLY handshake.
+.PP
+.I BDTread
+and
+.I BDTwrite
+are similar to 
+.I read(2)
+and
+.I write(2)
+except that they accept a Courier connection instead of a file descriptor,
+and transmit or receive at most one SPP packet (maximum size is thus 534
+bytes, which is also the recommended value of 
+.IR nbytes ).
+These routines should be used only in a Courier server to perform a BDT
+data transfer, or in a Courier client from within a BDT callback routine.
+.PP
+.I BDTclosewrite
+and
+.I BDTabort
+provide a way for a BDT source (i.e. write)
+procedure to end a data transfer, either successfully
+or unsuccessfully respectively.  In addition, 
+.I BDTabort
+may be used to terminate a BDT sink (i.e. read) transfer.
+.SH FILES
+.nf
+.fi
+.SH SEE ALSO
+all the Courier documentation
+.SH DIAGNOSTICS
+None.
+.SH BUGS
+Probably lots of them.  Expanding ring broadcast is not yet implemented.