BSD 4_3_Net_2 release
[unix-history] / usr / src / share / man / man4 / idp.4
index 14415b5..f71147a 100644 (file)
-.\" Copyright (c) 1985 The Regents of the University of California.
+.\" Copyright (c) 1985, 1991 The Regents of the University of California.
 .\" All rights reserved.
 .\"
 .\" All rights reserved.
 .\"
-.\" Redistribution and use in source and binary forms are permitted provided
-.\" that: (1) source distributions retain this entire copyright notice and
-.\" comment, and (2) distributions including binaries display the following
-.\" acknowledgement:  ``This product includes software developed by the
-.\" University of California, Berkeley and its contributors'' in the
-.\" documentation or other materials provided with the distribution and in
-.\" all advertising materials mentioning features or use of this software.
-.\" Neither the name of the University nor the names of its contributors may
-.\" be used to endorse or promote products derived from this software without
-.\" specific prior written permission.
-.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
-.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"    This product includes software developed by the University of
+.\"    California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
 .\"
 .\"
-.\"    @(#)idp.4       1.3 (Berkeley) 6/23/90
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
 .\"
 .\"
-.TH IDP 4 "July 30, 1985"
-.UC 6
-.SH NAME
-idp \- Xerox Internet Datagram Protocol
-.SH SYNOPSIS
-.B #include <sys/socket.h>
-.br
-.B #include <netns/ns.h>
-.br
-.B #include <netns/idp.h>
-.PP
-.B s = socket(AF_NS, SOCK_DGRAM, 0);
-.SH DESCRIPTION
-IDP is a simple, unreliable datagram protocol which is used
-to support the SOCK_DGRAM abstraction for the Internet
-protocol family.  IDP sockets are connectionless, and are
+.\"     @(#)idp.4      1.4 (Berkeley) 3/28/91
+.\"
+.Dd March 28, 1991
+.Dt IDP 4
+.Os BSD 4.3
+.Sh NAME
+.Nm idp
+.Nd Xerox Internet Datagram Protocol
+.Sh SYNOPSIS
+.Fd #include <sys/socket.h>
+.Fd #include <netns/ns.h>
+.Fd #include <netns/idp.h>
+.Ft int
+.Fn socket AF_NS SOCK_DGRAM 0
+.Sh DESCRIPTION
+.Tn IDP
+is a simple, unreliable datagram protocol which is used
+to support the
+.Dv SOCK_DGRAM
+abstraction for the Internet
+protocol family.
+.Tn IDP
+sockets are connectionless, and are
 normally used with the
 normally used with the
-.I sendto 
+.Xr sendto
 and
 and
-.IR recvfrom 
+.Xr recvfrom
 calls, though the
 calls, though the
-.IR connect (2)
+.Xr connect 2
 call may also be used to fix the destination for future
 packets (in which case the 
 call may also be used to fix the destination for future
 packets (in which case the 
-.IR recv (2)
+.Xr recv 2
 or
 or
-.IR read (2)
+.Xr read 2
 and 
 and 
-.IR send (2)
+.Xr send 2
 or
 or
-.IR write(2)
+.Xr write 2
 system calls may be used).
 system calls may be used).
-.PP
-Xerox protocols are built vertically on top of IDP.
-Thus, IDP address formats are identical to those used by
-SPP.
-Note that the IDP port
-space is the same as the SPP port space (i.e. a IDP port
-may be \*(lqconnected\*(rq to a SPP port, with certain
+.Pp
+Xerox protocols are built vertically on top of
+.Tn IDP .
+Thus,
+.Tn IDP
+address formats are identical to those used by
+.Tn SPP .
+Note that the
+.Tn IDP
+port
+space is the same as the
+.Tn SPP
+port space (i.e. a
+.Tn IDP
+port
+may be
+.Dq connected
+to a
+.Tn SPP
+port, with certain
 options enabled below).
 In addition broadcast packets may be sent
 (assuming the underlying network supports
 options enabled below).
 In addition broadcast packets may be sent
 (assuming the underlying network supports
-this) by using a reserved \*(lqbroadcast address\*(rq; this address
+this) by using a reserved
+.Dq broadcast address ;
+this address
 is network interface dependent.
 is network interface dependent.
-.SH DIAGNOSTICS
+.Sh DIAGNOSTICS
 A socket operation may fail with one of the following errors returned:
 A socket operation may fail with one of the following errors returned:
-.TP 15
-[EISCONN]
+.Bl -tag -width [EADDRNOTAVAIL]
+.It Bq Er EISCONN
 when trying to establish a connection on a socket which
 already has one, or when trying to send a datagram with the destination
 address specified and the socket is already connected;
 when trying to establish a connection on a socket which
 already has one, or when trying to send a datagram with the destination
 address specified and the socket is already connected;
-.TP 15
-[ENOTCONN]
+.It Bq Er ENOTCONN
 when trying to send a datagram, but
 no destination address is specified, and the socket hasn't been
 connected;
 when trying to send a datagram, but
 no destination address is specified, and the socket hasn't been
 connected;
-.TP 15
-[ENOBUFS]
+.It Bq Er ENOBUFS
 when the system runs out of memory for
 an internal data structure;
 when the system runs out of memory for
 an internal data structure;
-.TP 15
-[EADDRINUSE]
+.It Bq Er EADDRINUSE
 when an attempt
 is made to create a socket with a port which has already been
 allocated;
 when an attempt
 is made to create a socket with a port which has already been
 allocated;
-.TP 15
-[EADDRNOTAVAIL]
+.It Bq Er EADDRNOTAVAIL
 when an attempt is made to create a 
 socket with a network address for which no network interface
 exists.
 when an attempt is made to create a 
 socket with a network address for which no network interface
 exists.
-.SH SOCKET OPTIONS
-.TP 15
-[SO_HEADERS_ON_INPUT]
+.El
+.Sh SOCKET OPTIONS
+.Bl -tag -width [SO_HEADERS_ON_OUTPUT]
+.It Bq Dv SO_ALL_PACKETS
+When set, this option defeats automatic processing of Error packets,
+and Sequence Protocol packets.
+.It Bq Dv SO_DEFAULT_HEADERS
+The user provides the kernel an
+.Tn IDP
+header, from which
+it gleans the Packet Type.
+When requested, the kernel will provide an
+.Tn IDP
+header, showing
+the default packet type, and local and foreign addresses, if
+connected.
+.It Bq Dv SO_HEADERS_ON_INPUT
 When set, the first 30 bytes of any data returned from a read
 When set, the first 30 bytes of any data returned from a read
-or recv from will be the initial 30 bytes of the IDP packet,
+or recv from will be the initial 30 bytes of the
+.Tn IDP
+packet,
 as described by
 as described by
-.nf
+.Bd -literal -offset indent
 struct idp {
        u_short         idp_sum;
        u_short         idp_len;
 struct idp {
        u_short         idp_sum;
        u_short         idp_len;
@@ -102,37 +148,38 @@ struct idp {
        struct ns_addr  idp_dna;
        struct ns_addr  idp_sna;
 };
        struct ns_addr  idp_dna;
        struct ns_addr  idp_sna;
 };
-.fi
+.Ed
+.Pp
 This allows the user to determine the packet type, and whether
 the packet was a multi-cast packet or directed specifically at
 the local host.
 When requested, gives the current state of the option,
 This allows the user to determine the packet type, and whether
 the packet was a multi-cast packet or directed specifically at
 the local host.
 When requested, gives the current state of the option,
-(NSP_RAWIN or 0).
-.TP 15
-[SO_HEADERS_ON_OUTPUT]
+.Pf ( Dv NSP_RAWIN
+or 0).
+.It Bq Dv SO_HEADERS_ON_OUTPUT
 When set, the first 30 bytes of any data sent
 When set, the first 30 bytes of any data sent
-will be the initial 30 bytes of the IDP packet.
+will be the initial 30 bytes of the
+.Tn IDP
+packet.
 This allows the user to determine the packet type, and whether
 the packet should be multi-cast packet or directed specifically at
 the local host.
 You can also misrepresent the sender of the packet.
 When requested, gives the current state of the option.
 This allows the user to determine the packet type, and whether
 the packet should be multi-cast packet or directed specifically at
 the local host.
 You can also misrepresent the sender of the packet.
 When requested, gives the current state of the option.
-(NSP_RAWOUT or 0).
-.TP 15
-[SO_DEFAULT_HEADERS]
-The user provides the kernel an IDP header, from which
-it gleans the Packet Type.
-When requested, the kernel will provide an IDP header, showing
-the default packet type, and local and foreign addresses, if
-connected.
-.TP 15
-[SO_ALL_PACKETS]
-When set, this option defeats automatic processing of Error packets,
-and Sequence Protocol packets.
-.TP 15
-[SO_SEQNO]
+.Pf ( Dv NSP_RAWOUT
+or 0).
+.It Bq Dv SO_SEQNO
 When requested, this returns a sequence number which is not likely
 to be repeated until the machine crashes or a very long time has passed.
 It is useful in constructing Packet Exchange Protocol packets.
 When requested, this returns a sequence number which is not likely
 to be repeated until the machine crashes or a very long time has passed.
 It is useful in constructing Packet Exchange Protocol packets.
-.SH SEE ALSO
-send(2), recv(2), intro(4), ns(4)
+.El
+.Sh SEE ALSO
+.Xr send 2 ,
+.Xr recv 2 ,
+.Xr intro 4 ,
+.Xr ns 4
+.Sh HISTORY
+The
+.Nm
+protocol appeared in
+.Bx 4.3 .