Content-type: text/html Man page of idp

idp

Section: Environments, Tables, and Troff Macros (7)
Index Return to Main Contents
 

NAME

idp - Xerox Internet Datagram Protocol  

SYNOPSIS

#include <sys/socket.h> #include <netns/ns.h> #include <netns/idp.h>

s = socket(AF_NS, SOCK_DGRAM, 0);  

DESCRIPTION

The Xerox Internet Datagram Protocol (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 normally used with the sendto() and recvfrom() functions. The connect() function may also be used to fix the destination for future packets, in which case the recv() or read() and send() or write() functions may be used.

Xerox protocols are built vertically on top of IDP. Thus, IDP address formats are identical to those used by the Sequenced Packet Protocol (SPP). Note that the IDP port space is the same as the SPP port space; that is, an IDP port may be connected to an SPP port, with certain options enabled as described below. In addition, broadcast packets may be sent (assuming the underlying network supports this) by using a reserved broadcast address; this address is network interface dependent.

The following socket options are available: When set, the first 30 bytes of any data returned from a read() or recv() function 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 multicast packet or directed specifically at the local host. When requested, gives the current state of the option as either NSP_RAWIN or 0 (zero). 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 a multicast 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 as either NSP_RAWOUT or 0 (zero). 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. When set, this option defeats automatic processing of error packets, and sequence protocol packets. When requested, this option 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.  

ERRORS

If a socket operation fails, errno may be set to one of the following values: The socket is already connected. This error occurs when trying to establish connection on a socket or when trying to send a datagram with the destination address specified. The destination address of a datagram was not specified, and the socket has not been connected. The system ran out of memory for an internal data structure. An attempt was made to create a socket with a network address for which no network interface exists. An attempt was made to create a socket with a network address for which no network interface exists.  

RELATED INFORMATION

Functions: send(2), recv(2)

Files: netintro(7), ns(7) delim off


 

Index

NAME
SYNOPSIS
DESCRIPTION
ERRORS
RELATED INFORMATION

This document was created by man2html, using the manual pages.
Time: 02:40:26 GMT, October 02, 2010