This commit was generated by cvs2svn to track changes on a CVS vendor
[unix-history] / share / man / man4 / clnp.4
CommitLineData
15637ed4
RG
1.\" Copyright (c) 1990, 1991 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\" notice, this list of conditions and the following disclaimer in the
11.\" documentation and/or other materials provided with the distribution.
12.\" 3. All advertising materials mentioning features or use of this software
13.\" must display the following acknowledgement:
14.\" This product includes software developed by the University of
15.\" California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\" may be used to endorse or promote products derived from this software
18.\" without specific prior written permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)clnp.4 6.3 (Berkeley) 7/31/91
33.\"
34.Dd July 31, 1991
35.Dt CLNP 4
36.Os
37.Sh NAME
38.Nm clnp
39.Nd Connectionless-Mode Network Protocol
40.Sh SYNOPSIS
41.Fd #include <sys/socket.h>
e1bb01a0
JH
42.Fd #include <netiso/iso.h>
43.Fd #include <netiso/clnp.h>
15637ed4
RG
44.Ft int
45.Fn socket AF_ISO SOCK_RAW 0
46.Sh DESCRIPTION
47.Tn CLNP
48is the connectionless-mode network protocol used by the
49connectionless-mode network service. This protocol is specified in
50.Tn ISO
518473.
52It may be accessed
53through a
54.Dq raw socket
55for debugging purposes only.
56.Tn CLNP
57sockets are connectionless,
58and are normally used with the
59.Xr sendto
60and
61.Xr recvfrom
62calls, though the
63.Xr connect 2
64call may also be used to fix the destination for future
65packets (in which case the
66.Xr read 2
67or
68.Xr recv 2
69and
70.Xr write 2
71or
72.Xr send 2
73system calls may be used).
74.Pp
75Outgoing packets automatically have a
76.Tn CLNP
77header prepended to
78them. Incoming packets received by the user contain the full
79.Tn CLNP
80header.
81The following
82.Xr setsockopt
83options apply to
84.Tn CLNP :
85.Bl -tag -width CLNPOPT_FLAGS
86.It Dv CLNPOPT_FLAGS
87Sets the flags which are passed to clnp when sending a datagram.
88Valid flags are:
89.Pp
90.Bl -tag -width "CLNP_NO_CKSUM" -offset indent -compact
91.It Dv CLNP_NO_SEG
92Do not allow segmentation
93.It Dv CLNP_NO_ER
94Suppress ER pdus
95.It Dv CLNP_NO_CKSUM
96Do not generate the
97.Tn CLNP
98checksum
99.El
100.Pp
101.It Dv CLNPOPT_OPTS
102Sets
103.Tn CLNP
104options. The options must be formatted exactly as specified by
105.Tn ISO
1068473, section 7.5
107.Dq Options Part.
108Once an option has been set, it will
109be sent on all packets until a different option is set.
110.El
111.Sh CONGESTION EXPERIENCE BIT
112Whenever a packet is transmitted, the globally unique quality of
113service option is added to the packet. The sequencing preferred bit and
114the low transit delay bit are set in this option.
115.Pp
116If a packet is forwarded containing the globally unique quality of
117service option, and the interface through which the packet will be
118transmitted has a queue length greater than
119.Em congest_threshold ,
120then the congestion experienced bit is set in the quality of service option.
121.Pp
122The threshold value stored in
123.Em congest_threshold
124may be tuned.
125.Pp
126When a packet is received with the
127globally unique quality of service option present, and the
128congestion experienced bit is set, then the transport congestion
129control function is called.
130.Sh DIAGNOSTICS
131A socket operation may fail with one of the following errors returned:
132.Bl -tag -width [EADDRNOTAVAIL]
133.It Bq Er EISCONN
134When trying to establish a connection on a socket which
135already has one, or when trying to send a datagram with the destination
136address specified and the socket is already connected;
137.It Bq Er ENOTCONN
138When trying to send a datagram, but
139no destination address is specified, and the socket hasn't been
140connected;
141.It Bq Er ENOBUFS
142When the system runs out of memory for
143an internal data structure;
144.It Bq Er EADDRNOTAVAIL
145When an attempt is made to create a
146socket with a network address for which no network interface
147exists;
148.It Bq Er EHOSTUNREACH
149When trying to send a datagram, but no route to the destination
150address exists.
151.It Bq Er EINVAL
152When specifying unsupported options.
153.El
154.Sh SEE ALSO
155.Xr send 2 ,
156.Xr recv 2 ,
157.Xr intro 4 ,
158.Xr iso 4
159.Sh HISTORY
160The
161.Nm
162protocol implementation
163.Ud
164.Sh BUGS
165Packets are sent with the type code of 0x1d (technically an invalid
166packet type) for lack of a better way to identify raw
167.Tn CLNP
168packets.
169.Pp
170No more than
171.Dv MLEN
172bytes of options can be specified.