CLNP(4P)

NAME
clnp - Connectionless-Mode Network Protocol

SYNOPSIS
#include <sys/socket.h>
#include <netargo/iso.h>
#include <netargo/clnp.h>

s = socket(AF_ISO, SOCK_RAW, 0);

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 “raw socket” for debugging purposes only. CLNP sockets are connectionless, and are normally used with the sendto and recvfrom calls, though the connect(2) call may also be used to fix the destination for future packets (in which case the read(2) or recv(2) and write(2) or send(2) system calls may be used).

Outgoing packets automatically have a CLNP header prepended to them. Incoming packets received by the user contain the full CLNP header. The following setsockopt options apply to CLNP:

CLNPOPT_FLAGS
    Sets the flags which are passed to clnp when sending a datagram. Valid flags are:
    CLNP_NO_SEG-Do not allow segmentation
    CLNP_NO_ER-Suppress ER pdus
    CLNP_NO_CKSUM-Do not generate the CLNP checksum

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.

DIAGNOSTICS
A socket operation may fail with one of the following errors returned:

[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;

[ENOTCONN]
    when trying to send a datagram, but no destination address is specified, and the socket hasn't been connected;

[ENOBUFS]
    when the system runs out of memory for an internal data structure;

[EADDRNOTAVAIL]
    when an attempt is made to create a socket with a network address for which no network interface exists;

[EHOSTUNREACH]
    when trying to send a datagram, but no route to the destination address exists.

[EINVAL]
    when specifying unsupported options.

SEE ALSO
send(2), recv(2), intro(4N), iso(4F)

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.

No more than MLEN bytes of options can be specified.