Annotation of 43BSDReno/share/man/man4/idp.4, revision 1.1.1.1

1.1       root        1: .\" Copyright (c) 1985 The Regents of the University of California.
                      2: .\" All rights reserved.
                      3: .\"
                      4: .\" Redistribution and use in source and binary forms are permitted provided
                      5: .\" that: (1) source distributions retain this entire copyright notice and
                      6: .\" comment, and (2) distributions including binaries display the following
                      7: .\" acknowledgement:  ``This product includes software developed by the
                      8: .\" University of California, Berkeley and its contributors'' in the
                      9: .\" documentation or other materials provided with the distribution and in
                     10: .\" all advertising materials mentioning features or use of this software.
                     11: .\" Neither the name of the University nor the names of its contributors may
                     12: .\" be used to endorse or promote products derived from this software without
                     13: .\" specific prior written permission.
                     14: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
                     15: .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
                     16: .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
                     17: .\"
                     18: .\"    @(#)idp.4       1.3 (Berkeley) 6/23/90
                     19: .\"
                     20: .TH IDP 4 "July 30, 1985"
                     21: .UC 6
                     22: .SH NAME
                     23: idp \- Xerox Internet Datagram Protocol
                     24: .SH SYNOPSIS
                     25: .B #include <sys/socket.h>
                     26: .br
                     27: .B #include <netns/ns.h>
                     28: .br
                     29: .B #include <netns/idp.h>
                     30: .PP
                     31: .B s = socket(AF_NS, SOCK_DGRAM, 0);
                     32: .SH DESCRIPTION
                     33: IDP is a simple, unreliable datagram protocol which is used
                     34: to support the SOCK_DGRAM abstraction for the Internet
                     35: protocol family.  IDP sockets are connectionless, and are
                     36: normally used with the
                     37: .I sendto 
                     38: and
                     39: .IR recvfrom 
                     40: calls, though the
                     41: .IR connect (2)
                     42: call may also be used to fix the destination for future
                     43: packets (in which case the 
                     44: .IR recv (2)
                     45: or
                     46: .IR read (2)
                     47: and 
                     48: .IR send (2)
                     49: or
                     50: .IR write(2)
                     51: system calls may be used).
                     52: .PP
                     53: Xerox protocols are built vertically on top of IDP.
                     54: Thus, IDP address formats are identical to those used by
                     55: SPP.
                     56: Note that the IDP port
                     57: space is the same as the SPP port space (i.e. a IDP port
                     58: may be \*(lqconnected\*(rq to a SPP port, with certain
                     59: options enabled below).
                     60: In addition broadcast packets may be sent
                     61: (assuming the underlying network supports
                     62: this) by using a reserved \*(lqbroadcast address\*(rq; this address
                     63: is network interface dependent.
                     64: .SH DIAGNOSTICS
                     65: A socket operation may fail with one of the following errors returned:
                     66: .TP 15
                     67: [EISCONN]
                     68: when trying to establish a connection on a socket which
                     69: already has one, or when trying to send a datagram with the destination
                     70: address specified and the socket is already connected;
                     71: .TP 15
                     72: [ENOTCONN]
                     73: when trying to send a datagram, but
                     74: no destination address is specified, and the socket hasn't been
                     75: connected;
                     76: .TP 15
                     77: [ENOBUFS]
                     78: when the system runs out of memory for
                     79: an internal data structure;
                     80: .TP 15
                     81: [EADDRINUSE]
                     82: when an attempt
                     83: is made to create a socket with a port which has already been
                     84: allocated;
                     85: .TP 15
                     86: [EADDRNOTAVAIL]
                     87: when an attempt is made to create a 
                     88: socket with a network address for which no network interface
                     89: exists.
                     90: .SH SOCKET OPTIONS
                     91: .TP 15
                     92: [SO_HEADERS_ON_INPUT]
                     93: When set, the first 30 bytes of any data returned from a read
                     94: or recv from will be the initial 30 bytes of the IDP packet,
                     95: as described by
                     96: .nf
                     97: struct idp {
                     98:        u_short         idp_sum;
                     99:        u_short         idp_len;
                    100:        u_char          idp_tc;
                    101:        u_char          idp_pt;
                    102:        struct ns_addr  idp_dna;
                    103:        struct ns_addr  idp_sna;
                    104: };
                    105: .fi
                    106: This allows the user to determine the packet type, and whether
                    107: the packet was a multi-cast packet or directed specifically at
                    108: the local host.
                    109: When requested, gives the current state of the option,
                    110: (NSP_RAWIN or 0).
                    111: .TP 15
                    112: [SO_HEADERS_ON_OUTPUT]
                    113: When set, the first 30 bytes of any data sent
                    114: will be the initial 30 bytes of the IDP packet.
                    115: This allows the user to determine the packet type, and whether
                    116: the packet should be multi-cast packet or directed specifically at
                    117: the local host.
                    118: You can also misrepresent the sender of the packet.
                    119: When requested, gives the current state of the option.
                    120: (NSP_RAWOUT or 0).
                    121: .TP 15
                    122: [SO_DEFAULT_HEADERS]
                    123: The user provides the kernel an IDP header, from which
                    124: it gleans the Packet Type.
                    125: When requested, the kernel will provide an IDP header, showing
                    126: the default packet type, and local and foreign addresses, if
                    127: connected.
                    128: .TP 15
                    129: [SO_ALL_PACKETS]
                    130: When set, this option defeats automatic processing of Error packets,
                    131: and Sequence Protocol packets.
                    132: .TP 15
                    133: [SO_SEQNO]
                    134: When requested, this returns a sequence number which is not likely
                    135: to be repeated until the machine crashes or a very long time has passed.
                    136: It is useful in constructing Packet Exchange Protocol packets.
                    137: .SH SEE ALSO
                    138: send(2), recv(2), intro(4), ns(4)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.