163004Sbostic.\" Copyright (c) 1990, 1991, 1993 263004Sbostic.\" The Regents of the University of California. All rights reserved. 342484Ssklower.\" 442484Ssklower.\" %sccs.include.redist.man% 542484Ssklower.\" 6*66630Sbostic.\" @(#)clnp.4 8.2 (Berkeley) 04/02/94 742484Ssklower.\" 847675Scael.Dd 947675Scael.Dt CLNP 4 1047675Scael.Os 1147675Scael.Sh NAME 1247675Scael.Nm clnp 1347675Scael.Nd Connectionless-Mode Network Protocol 1447675Scael.Sh SYNOPSIS 1547675Scael.Fd #include <sys/socket.h> 16*66630Sbostic.Fd #include <netiso/iso.h> 17*66630Sbostic.Fd #include <netiso/clnp.h> 1847675Scael.Ft int 1947675Scael.Fn socket AF_ISO SOCK_RAW 0 2047675Scael.Sh DESCRIPTION 2147675Scael.Tn CLNP 2247675Scaelis the connectionless-mode network protocol used by the 2342484Ssklowerconnectionless-mode network service. This protocol is specified in 2447675Scael.Tn ISO 2547675Scael8473. 2642484SsklowerIt may be accessed 2747675Scaelthrough a 2847675Scael.Dq raw socket 2947675Scaelfor debugging purposes only. 3047675Scael.Tn CLNP 3147675Scaelsockets are connectionless, 3242484Ssklowerand are normally used with the 3347675Scael.Xr sendto 3442484Ssklowerand 3547675Scael.Xr recvfrom 3642484Ssklowercalls, though the 3747675Scael.Xr connect 2 3842484Ssklowercall may also be used to fix the destination for future 3942484Ssklowerpackets (in which case the 4047675Scael.Xr read 2 4142484Sskloweror 4247675Scael.Xr recv 2 4342484Ssklowerand 4447675Scael.Xr write 2 4542484Sskloweror 4647675Scael.Xr send 2 4742484Ssklowersystem calls may be used). 4847675Scael.Pp 4947675ScaelOutgoing packets automatically have a 5047675Scael.Tn CLNP 5147675Scaelheader prepended to 5247675Scaelthem. Incoming packets received by the user contain the full 5347675Scael.Tn CLNP 5447675Scaelheader. 5547675ScaelThe following 5647675Scael.Xr setsockopt 5747675Scaeloptions apply to 5847675Scael.Tn CLNP : 5947675Scael.Bl -tag -width CLNPOPT_FLAGS 6047675Scael.It Dv CLNPOPT_FLAGS 6142484SsklowerSets the flags which are passed to clnp when sending a datagram. 6242484SsklowerValid flags are: 6347675Scael.Pp 6450729Scael.Bl -tag -width "CLNP_NO_CKSUM" -offset indent -compact 6547675Scael.It Dv CLNP_NO_SEG 6647675ScaelDo not allow segmentation 6747675Scael.It Dv CLNP_NO_ER 6847675ScaelSuppress ER pdus 6947675Scael.It Dv CLNP_NO_CKSUM 7047675ScaelDo not generate the 7147675Scael.Tn CLNP 7247675Scaelchecksum 7347675Scael.El 7447675Scael.Pp 7547675Scael.It Dv CLNPOPT_OPTS 7647675ScaelSets 7747675Scael.Tn CLNP 7847675Scaeloptions. The options must be formatted exactly as specified by 7947675Scael.Tn ISO 8047675Scael8473, section 7.5 8147675Scael.Dq Options Part. 8247675ScaelOnce an option has been set, it will 8342484Ssklowerbe sent on all packets until a different option is set. 8447675Scael.El 8547675Scael.Sh CONGESTION EXPERIENCE BIT 8642484SsklowerWhenever a packet is transmitted, the globally unique quality of 8742484Ssklowerservice option is added to the packet. The sequencing preferred bit and 8842484Ssklowerthe low transit delay bit are set in this option. 8947675Scael.Pp 9042484SsklowerIf a packet is forwarded containing the globally unique quality of 9142484Ssklowerservice option, and the interface through which the packet will be 9247675Scaeltransmitted has a queue length greater than 9347675Scael.Em congest_threshold , 9442484Ssklowerthen the congestion experienced bit is set in the quality of service option. 9547675Scael.Pp 9647675ScaelThe threshold value stored in 9747675Scael.Em congest_threshold 9847675Scaelmay be tuned. 9947675Scael.Pp 10042484SsklowerWhen a packet is received with the 10142484Ssklowerglobally unique quality of service option present, and the 10242484Ssklowercongestion experienced bit is set, then the transport congestion 10342484Ssklowercontrol function is called. 10447675Scael.Sh DIAGNOSTICS 10542484SsklowerA socket operation may fail with one of the following errors returned: 10647675Scael.Bl -tag -width [EADDRNOTAVAIL] 10747675Scael.It Bq Er EISCONN 10847675ScaelWhen trying to establish a connection on a socket which 10942484Sskloweralready has one, or when trying to send a datagram with the destination 11042484Sskloweraddress specified and the socket is already connected; 11147675Scael.It Bq Er ENOTCONN 11247675ScaelWhen trying to send a datagram, but 11342484Ssklowerno destination address is specified, and the socket hasn't been 11442484Ssklowerconnected; 11547675Scael.It Bq Er ENOBUFS 11647675ScaelWhen the system runs out of memory for 11742484Sskloweran internal data structure; 11847675Scael.It Bq Er EADDRNOTAVAIL 11947675ScaelWhen an attempt is made to create a 12042484Ssklowersocket with a network address for which no network interface 12142484Ssklowerexists; 12247675Scael.It Bq Er EHOSTUNREACH 12347675ScaelWhen trying to send a datagram, but no route to the destination 12442484Sskloweraddress exists. 12547675Scael.It Bq Er EINVAL 12647675ScaelWhen specifying unsupported options. 12747675Scael.El 12847675Scael.Sh SEE ALSO 12947675Scael.Xr send 2 , 13047675Scael.Xr recv 2 , 13147675Scael.Xr intro 4 , 13247675Scael.Xr iso 4 13347675Scael.Sh BUGS 13442484SsklowerPackets are sent with the type code of 0x1d (technically an invalid 13547675Scaelpacket type) for lack of a better way to identify raw 13647675Scael.Tn CLNP 13747675Scaelpackets. 13847675Scael.Pp 13947675ScaelNo more than 14047675Scael.Dv MLEN 14147675Scaelbytes of options can be specified. 142