All rights reserved.
%sccs.include.redist.man%
@(#)idp.4 1.3 (Berkeley) 06/23/90
s = socket(AF_NS, SOCK_DGRAM, 0);
Xerox protocols are built vertically on top of IDP. Thus, IDP address formats are identical to those used by SPP. Note that the IDP port space is the same as the SPP port space (i.e. a IDP port may be \*(lqconnected\*(rq to a SPP port, with certain options enabled below). 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.
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;
15 [ENOTCONN] when trying to send a datagram, but no destination address is specified, and the socket hasn't been connected;
15 [ENOBUFS] when the system runs out of memory for an internal data structure;
15 [EADDRINUSE] when an attempt is made to create a socket with a port which has already been allocated;
15 [EADDRNOTAVAIL] when an attempt is made to create a socket with a network address for which no network interface exists.
15 [SO_HEADERS_ON_INPUT] 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, as described by
struct idp { u_short idp_sum; u_short idp_len; u_char idp_tc; u_char idp_pt; struct ns_addr idp_dna; struct ns_addr idp_sna; };This allows the user to determine the packet type, and whether the packet was a multi-cast packet or directed specifically at the local host. When requested, gives the current state of the option, (NSP_RAWIN or 0).
15 [SO_HEADERS_ON_OUTPUT] 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 the local host. You can also misrepresent the sender of the packet. When requested, gives the current state of the option. (NSP_RAWOUT or 0).
15 [SO_DEFAULT_HEADERS] 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 connected.
15 [SO_ALL_PACKETS] When set, this option defeats automatic processing of Error packets, and Sequence Protocol packets.
15 [SO_SEQNO] 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.