1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00
freebsd/share/doc/iso/wiscman/clnp.4p
1994-05-30 19:09:18 +00:00

92 lines
2.4 KiB
Plaintext

.TH CLNP 4P "9 December 1988"
.ds ]W Wisconsin ARGO 1.0
.UC 4
.SH NAME
clnp \- Connectionless-Mode Network Protocol
.SH SYNOPSIS
.B #include <sys/socket.h>
.br
.B #include <netargo/iso.h>
.br
.B #include <netargo/clnp.h>
.PP
.B s = socket(AF_ISO, SOCK_RAW, 0);
.SH DESCRIPTION
CLNP is the connectionless-mode network protocol used by the
connectionless-mode network service. This protocol is specified in
ISO 8473.
It may be accessed
through a \*(lqraw socket\*(rq for debugging purposes only.
CLNP sockets are connectionless,
and are normally used with the
.I sendto
and
.I recvfrom
calls, though the
.IR connect (2)
call may also be used to fix the destination for future
packets (in which case the
.IR read (2)
or
.IR recv (2)
and
.IR write (2)
or
.IR send (2)
system calls may be used).
.PP
Outgoing packets automatically have a CLNP header prepended to
them. Incoming packets received by the user contain the full CLNP header.
The following \fIsetsockopt\fR options apply to CLNP:
.TP
CLNPOPT_FLAGS
Sets the flags which are passed to clnp when sending a datagram.
Valid flags are:
.nf
.br
CLNP_NO_SEG-Do not allow segmentation
CLNP_NO_ER-Suppress ER pdus
CLNP_NO_CKSUM-Do not generate the CLNP checksum
.br
.fi
.TP
CLNPOPT_OPTS
Sets CLNP options. The options must be formatted exactly as specified by
ISO 8473, section 7.5 "Options Part." Once an option has been set, it will
be sent on all packets until a different option is set.
.SH DIAGNOSTICS
A socket operation may fail with one of the following errors returned:
.TP 15
[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;
.TP 15
[ENOTCONN]
when trying to send a datagram, but
no destination address is specified, and the socket hasn't been
connected;
.TP 15
[ENOBUFS]
when the system runs out of memory for
an internal data structure;
.TP 15
[EADDRNOTAVAIL]
when an attempt is made to create a
socket with a network address for which no network interface
exists;
.TP 15
[EHOSTUNREACH]
when trying to send a datagram, but no route to the destination
address exists.
.TP 15
[EINVAL]
when specifying unsupported options.
.SH SEE ALSO
send(2), recv(2), intro(4N), iso(4F)
.SH BUGS
Packets are sent with the type code of 0x1d (technically an invalid
packet type) for lack of a better way to identify raw CLNP packets.
.PP
No more than MLEN bytes of options can be specified.