1NS(4F)                                                                  NS(4F)
2
3
4

NAME

6       ns - Xerox Network Systems(tm) protocol family
7

SYNOPSIS

9       Not currently supported under 2.11BSD
10

DESCRIPTION

12       The  NS  protocol  family is a collection of protocols layered atop the
13       Internet Datagram Protocol (IDP) transport layer, and using  the  Xerox
14       NS  address  formats.   The NS family provides protocol support for the
15       SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET, and SOCK_RAW socket types; the
16       SOCK_RAW interface is a debugging tool, allowing you to trace all pack‐
17       ets entering, (or with toggling kernel variable, additionally  leaving)
18       the local host.
19

ADDRESSING

21       NS  addresses  are  12  byte quantities, consisting of a 4 byte Network
22       number, a 6 byte Host number and a 2 byte port number,  all  stored  in
23       network standard format.  (on the VAX these are word and byte reversed;
24       on the Sun they are  not  reversed).   The  include  file  <netns/ns.h>
25       defines  the  NS  address as a structure containing unions (for quicker
26       comparisons).
27
28       Sockets in the Internet protocol family use  the  following  addressing
29       structure:
30
31       struct sockaddr_ns {
32            short          sns_family;
33            struct ns_addr sns_addr;
34            char      sns_zero[2];
35       };
36
37       where an ns_addr is composed as follows:
38
39       union ns_host {
40            u_char         c_host[6];
41            u_short        s_host[3];
42       };
43
44       union ns_net {
45            u_char         c_net[4];
46            u_short        s_net[2];
47       };
48
49       struct ns_addr {
50            union ns_net   x_net;
51            union ns_host  x_host;
52            u_short   x_port;
53       };
54
55       Sockets  may be created with an address of all zeroes to effect ``wild‐
56       card'' matching on incoming messages.  The local port address specified
57       in  a  bind(2)  call  is  restricted to be greater than NSPORT_RESERVED
58       (=3000, in <netns/ns.h>) unless the creating process is running as  the
59       super-user, providing a space of protected port numbers.
60

PROTOCOLS

62       The  NS  protocol family supported by the operating system is comprised
63       of the Internet Datagram Protocol (IDP) idp(4P), Error Protocol (avail‐
64       able through IDP), and Sequenced Packet Protocol (SPP) spp(4P).
65
66       SPP  is used to support the SOCK_STREAM and SOCK_SEQPACKET abstraction,
67       while IDP is used to support the  SOCK_DGRAM  abstraction.   The  Error
68       protocol  is  responded to by the kernel to handle and report errors in
69       protocol processing; it is, however, only accessible to  user  programs
70       through heroic actions.
71

SEE ALSO

73       intro(3),   byteorder(3N),  gethostbyname(3N),  getnetent(3N),  getpro‐
74       toent(3N), getservent(3N), ns(3N), intro(4N), spp(4P), idp(4P), nsip(4)
75       Internet Transport Protocols, Xerox Corporation document XSIS-028112
76       An Advanced 4.3BSD Interprocess Communication Tutorial
77
78
79
803rd Berkeley Distribution      January 27, 1996                         NS(4F)
Impressum