UCNTL crap, default units, rm fixed bugs
[unix-history] / usr / src / share / man / man4 / ns.4
CommitLineData
cceff6ee
KS
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.\"
646db2df 5.\" @(#)ns.4 1.2 (Berkeley) %G%
cceff6ee
KS
6.\"
7.TH NS 4F "July 30, 1985"
8.UC 6
9.SH NAME
10ns \- Xerox Network Systems(tm) protocol family
11.SH SYNOPSIS
12\fBoptions NS\fP
13.br
14\fBoptions NSIP\fP
15.br
16\fBpseudo-device ns\fP
17.SH DESCRIPTION
18.IX "ns device" "" "\fLns\fP \(em Xerox NS protocol family"
19The NS protocol family is a collection of protocols
20layered atop the
21.I Internet Datagram Protocol
22(IDP) transport layer, and using the Xerox NS address formats.
23The NS family provides protocol support for the
24SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET, and SOCK_RAW socket types; the
25SOCK_RAW interface is a debugging tool, allowing you to trace all packets
26entering, (or with toggling kernel variable, additionally leaving) the local
27host.
28.SH ADDRESSING
29NS addresses are 12 byte quantities, consisting of a
304 byte Network number, a 6 byte Host number and a 2 byte port number,
31all stored in network standard format.
32(on the VAX these are word and byte reversed; on the Sun they are not
33reversed). The include file
34.RI < netns/ns.h >
35defines the NS address as a structure containing unions (for quicker
36comparisons).
37.PP
38Sockets in the Internet protocol family use the following
39addressing structure:
40.nf
41
42struct sockaddr_ns {
43 short sns_family;
44 struct ns_addr sns_addr;
45 char sns_zero[2];
46};
47
48where an ns_addr is composed as follows:
49
50union ns_host {
51 u_char c_host[6];
52 u_short s_host[3];
53};
54
55union ns_net {
56 u_char c_net[4];
57 u_short s_net[2];
58};
59
60struct ns_addr {
61 union ns_net x_net;
62 union ns_host x_host;
63 u_short x_port;
64};
65
66.fi
67Sockets may be created with an address of all zeroes to effect
68``wildcard'' matching on incoming messages.
69The local port address specified in a
70.IR bind (2)
71call is restricted to be greater than NSPORT_RESERVED
72(=3000, in <netns/ns.h>) unless the creating process is running
73as the super-user, providing a space of protected port numbers.
74.SH PROTOCOLS
75The NS protocol family supported by the operating system
76is comprised of
77the Internet Datagram Protocol (IDP)
78.IR idp (4P),
79Error Protocol (available through IDP),
80and
81Sequenced Packet Protocol (SPP)
82.IR spp (4P).
83.LP
84SPP is used to support the SOCK_STREAM and SOCK_SEQPACKET abstraction,
85while IDP is used to support the SOCK_DGRAM abstraction.
86The Error protocol is responded to by the kernel
87to handle and report errors in protocol processing;
88it is, however,
89only accessible to user programs through heroic actions.
90.SH SEE ALSO
646db2df
MK
91intro(3), byteorder(3N), gethostbyname(3N), getnetent(3N),
92getprotoent(3N), getservent(3N), ns(3N),
93intro(4N), spp(4P), idp(4P), nsip(4)
cceff6ee
KS
94.br
95Internet Transport Protocols, Xerox Corporation document XSIS-028112
96.br
646db2df 97An Advanced 4.3BSD Interprocess Communication Tutuorial