Commit | Line | Data |
---|---|---|
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> | |
42 | .Fd #include <netargo/iso.h> | |
43 | .Fd #include <netargo/clnp.h> | |
44 | .Ft int | |
45 | .Fn socket AF_ISO SOCK_RAW 0 | |
46 | .Sh DESCRIPTION | |
47 | .Tn CLNP | |
48 | is the connectionless-mode network protocol used by the | |
49 | connectionless-mode network service. This protocol is specified in | |
50 | .Tn ISO | |
51 | 8473. | |
52 | It may be accessed | |
53 | through a | |
54 | .Dq raw socket | |
55 | for debugging purposes only. | |
56 | .Tn CLNP | |
57 | sockets are connectionless, | |
58 | and are normally used with the | |
59 | .Xr sendto | |
60 | and | |
61 | .Xr recvfrom | |
62 | calls, though the | |
63 | .Xr connect 2 | |
64 | call may also be used to fix the destination for future | |
65 | packets (in which case the | |
66 | .Xr read 2 | |
67 | or | |
68 | .Xr recv 2 | |
69 | and | |
70 | .Xr write 2 | |
71 | or | |
72 | .Xr send 2 | |
73 | system calls may be used). | |
74 | .Pp | |
75 | Outgoing packets automatically have a | |
76 | .Tn CLNP | |
77 | header prepended to | |
78 | them. Incoming packets received by the user contain the full | |
79 | .Tn CLNP | |
80 | header. | |
81 | The following | |
82 | .Xr setsockopt | |
83 | options apply to | |
84 | .Tn CLNP : | |
85 | .Bl -tag -width CLNPOPT_FLAGS | |
86 | .It Dv CLNPOPT_FLAGS | |
87 | Sets the flags which are passed to clnp when sending a datagram. | |
88 | Valid flags are: | |
89 | .Pp | |
90 | .Bl -tag -width "CLNP_NO_CKSUM" -offset indent -compact | |
91 | .It Dv CLNP_NO_SEG | |
92 | Do not allow segmentation | |
93 | .It Dv CLNP_NO_ER | |
94 | Suppress ER pdus | |
95 | .It Dv CLNP_NO_CKSUM | |
96 | Do not generate the | |
97 | .Tn CLNP | |
98 | checksum | |
99 | .El | |
100 | .Pp | |
101 | .It Dv CLNPOPT_OPTS | |
102 | Sets | |
103 | .Tn CLNP | |
104 | options. The options must be formatted exactly as specified by | |
105 | .Tn ISO | |
106 | 8473, section 7.5 | |
107 | .Dq Options Part. | |
108 | Once an option has been set, it will | |
109 | be sent on all packets until a different option is set. | |
110 | .El | |
111 | .Sh CONGESTION EXPERIENCE BIT | |
112 | Whenever a packet is transmitted, the globally unique quality of | |
113 | service option is added to the packet. The sequencing preferred bit and | |
114 | the low transit delay bit are set in this option. | |
115 | .Pp | |
116 | If a packet is forwarded containing the globally unique quality of | |
117 | service option, and the interface through which the packet will be | |
118 | transmitted has a queue length greater than | |
119 | .Em congest_threshold , | |
120 | then the congestion experienced bit is set in the quality of service option. | |
121 | .Pp | |
122 | The threshold value stored in | |
123 | .Em congest_threshold | |
124 | may be tuned. | |
125 | .Pp | |
126 | When a packet is received with the | |
127 | globally unique quality of service option present, and the | |
128 | congestion experienced bit is set, then the transport congestion | |
129 | control function is called. | |
130 | .Sh DIAGNOSTICS | |
131 | A socket operation may fail with one of the following errors returned: | |
132 | .Bl -tag -width [EADDRNOTAVAIL] | |
133 | .It Bq Er EISCONN | |
134 | When trying to establish a connection on a socket which | |
135 | already has one, or when trying to send a datagram with the destination | |
136 | address specified and the socket is already connected; | |
137 | .It Bq Er ENOTCONN | |
138 | When trying to send a datagram, but | |
139 | no destination address is specified, and the socket hasn't been | |
140 | connected; | |
141 | .It Bq Er ENOBUFS | |
142 | When the system runs out of memory for | |
143 | an internal data structure; | |
144 | .It Bq Er EADDRNOTAVAIL | |
145 | When an attempt is made to create a | |
146 | socket with a network address for which no network interface | |
147 | exists; | |
148 | .It Bq Er EHOSTUNREACH | |
149 | When trying to send a datagram, but no route to the destination | |
150 | address exists. | |
151 | .It Bq Er EINVAL | |
152 | When 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 | |
160 | The | |
161 | .Nm | |
162 | protocol implementation | |
163 | .Ud | |
164 | .Sh BUGS | |
165 | Packets are sent with the type code of 0x1d (technically an invalid | |
166 | packet type) for lack of a better way to identify raw | |
167 | .Tn CLNP | |
168 | packets. | |
169 | .Pp | |
170 | No more than | |
171 | .Dv MLEN | |
172 | bytes of options can be specified. |