.\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\" @(#)idp.4 1.1 (Berkeley) %G%
.TH IDP 4P "July 30, 1985"
idp \- Xerox Internet Datagram Protocol
.B #include <sys/socket.h>
.B #include <netns/idp.h>
.B s = socket(AF_NS, SOCK_DGRAM, 0);
IDP is a simple, unreliable datagram protocol which is used
to support the SOCK_DGRAM abstraction for the Internet
protocol family. IDP sockets are connectionless, and are
call may also be used to fix the destination for future
packets (in which case the
system calls may be used).
Xerox protocols are built vertically on top of IDP.
Thus, IDP address formats are identical to those used by
space is the same as the SPP port space (i.e. a IDP port
may be \*(lqconnected\*(rq to a SPP port, with certain
In addition broadcast packets may be sent
(assuming the underlying network supports
this) by using a reserved \*(lqbroadcast address\*(rq; this address
is network interface dependent.
A socket operation may fail with one of the following errors returned:
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;
when trying to send a datagram, but
no destination address is specified, and the socket hasn't been
when the system runs out of memory for
an internal data structure;
is made to create a socket with a port which has already been
when an attempt is made to create a
socket with a network address for which no network interface
When set, the first 30 bytes of any data returned from a read
or recv from will be the initial 30 bytes of the IDP packet,
This allows the user to determine the packet type, and whether
the packet was a multi-cast packet or directed specifically at
When requested, gives the current state of the option,
When set, the first 30 bytes of any data sent
will be the initial 30 bytes of the IDP packet.
This allows the user to determine the packet type, and whether
the packet should be multi-cast packet or directed specifically at
You can also misrepresent the sender of the packet.
When requested, gives the current state of the option.
The user provides the kernel an IDP header, from which
it gleans the Packet Type.
When requested, the kernel will provide an IDP header, showing
the default packet type, and local and foreign addresses, if
When set, this option defeats automatic processing of Error packets,
and Sequence Protocol packets.
When requested, this returns a sequence number which is not likely
to be repeated until the machine crashes or a very long time has passed.
It is useful in constructing Packet Exchange Protocol packets.