Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ns(4f) [bsd man page]

NS(4F)																	    NS(4F)

NAME
ns - Xerox Network Systems(tm) protocol family SYNOPSIS
Not currently supported under 2.11BSD DESCRIPTION
The NS protocol family is a collection of protocols layered atop the Internet Datagram Protocol (IDP) transport layer, and using the Xerox NS address formats. The NS family provides protocol support for the SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET, and SOCK_RAW socket types; the SOCK_RAW interface is a debugging tool, allowing you to trace all packets entering, (or with toggling kernel variable, additionally leaving) the local host. ADDRESSING
NS addresses are 12 byte quantities, consisting of a 4 byte Network number, a 6 byte Host number and a 2 byte port number, all stored in network standard format. (on the VAX these are word and byte reversed; on the Sun they are not reversed). The include file <netns/ns.h> defines the NS address as a structure containing unions (for quicker comparisons). Sockets in the Internet protocol family use the following addressing structure: struct sockaddr_ns { short sns_family; struct ns_addr sns_addr; char sns_zero[2]; }; where an ns_addr is composed as follows: union ns_host { u_char c_host[6]; u_short s_host[3]; }; union ns_net { u_char c_net[4]; u_short s_net[2]; }; struct ns_addr { union ns_net x_net; union ns_host x_host; u_short x_port; }; Sockets may be created with an address of all zeroes to effect ``wildcard'' matching on incoming messages. The local port address speci- fied in a bind(2) call is restricted to be greater than NSPORT_RESERVED (=3000, in <netns/ns.h>) unless the creating process is running as the super-user, providing a space of protected port numbers. PROTOCOLS
The NS protocol family supported by the operating system is comprised of the Internet Datagram Protocol (IDP) idp(4P), Error Protocol (available through IDP), and Sequenced Packet Protocol (SPP) spp(4P). SPP is used to support the SOCK_STREAM and SOCK_SEQPACKET abstraction, while IDP is used to support the SOCK_DGRAM abstraction. The Error protocol is responded to by the kernel to handle and report errors in protocol processing; it is, however, only accessible to user programs through heroic actions. SEE ALSO
intro(3), byteorder(3N), gethostbyname(3N), getnetent(3N), getprotoent(3N), getservent(3N), ns(3N), intro(4N), spp(4P), idp(4P), nsip(4) Internet Transport Protocols, Xerox Corporation document XSIS-028112 An Advanced 4.3BSD Interprocess Communication Tutorial 3rd Berkeley Distribution January 27, 1996 NS(4F)

Check Out this Related Man Page

IDP(4P) 																   IDP(4P)

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
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 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. a IDP port may be "connected" to a SPP port, with certain options enabled below). In addi- tion broadcast packets may be sent (assuming the underlying network supports this) by using a reserved "broadcast address"; this address is network interface dependent. DIAGNOSTICS
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 destina- tion 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
[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_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_ALL_PACKETS] When set, this option defeats automatic processing of Error packets, and Sequence Protocol packets. [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
send(2), recv(2), intro(4N), ns(4F) 4.3 Berkeley Distribution July 30, 1985 IDP(4P)
Man Page

Featured Tech Videos