*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> idp (4)              
Title
Content
Arch
Section
 

IDP(4)

Contents


NAME    [Toc]    [Back]

     idp - Xerox Internet Datagram Protocol

SYNOPSIS    [Toc]    [Back]

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

     int
     socket(AF_NS, SOCK_DGRAM, 0);

DESCRIPTION    [Toc]    [Back]

     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(2)
and
     recvfrom(2)  calls,  though  the connect(2) call may also be
used to fix the
     destination for future packets (in which case the recv(2) or
read(2) and
     send(2) or write(2) system calls may be used).

     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. an IDP port may be
``connected''
     to an SPP port, with certain options enabled 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.

DIAGNOSTICS    [Toc]    [Back]

     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;

     [EADDRINUSE]     when an attempt is made to create a  socket
with a port
                      which has already been allocated;

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

SOCKET OPTIONS    [Toc]    [Back]

     [SO_ALL_PACKETS]         When set, this option defeats automatic processing
 of Error packets,  and  Sequence
Protocol packets.


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

     [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).

     [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).

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

SEE ALSO    [Toc]    [Back]

      
      
     recv(2), send(2), netintro(4), ns(4)

HISTORY    [Toc]    [Back]

     The idp protocol appeared in 4.3BSD.

OpenBSD      3.6                           June      5,      1993
[ Back ]
 Similar pages
Name OS Title
udp Tru64 Internet user datagram protocol (UDP)
udp OpenBSD Internet User Datagram Protocol
udp IRIX Internet User Datagram Protocol
udp FreeBSD Internet User Datagram Protocol
udp Linux User Datagram Protocol for IPv4
spp OpenBSD Xerox Sequenced Packet Protocol
ns OpenBSD Xerox Network Systems(tm) protocol family
ip IRIX Internet Protocol
ip OpenBSD Internet Protocol
ip FreeBSD Internet Protocol
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service