Annotation of 43BSDTahoe/man/man4/idp.4, revision 1.1

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

unix.superglobalmegacorp.com

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