Content-type: text/html Man page of ns

ns

Section: Environments, Tables, and Troff Macros (7)
Index Return to Main Contents
 

NAME

ns - Xerox Network Systems protocol family  

SYNOPSIS

options NS options NSIP pseudo-device ns  

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

The 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 and other machines, these are word and byte reversed; on a Sun machine, they are not reversed). The netns/ns.h include file defines the NS address as a structure containing unions (for quicker comparisons).

Both the 4.3BSD and 4.4BSD sockaddr_ns structures are supported by Digital UNIX . The default sockaddr_ns structure is the 4.3BSD structure, which is as follows:

struct sockaddr_ns {
        u_short         sns_family;
        struct ns_addr  sns_addr;
        char            sns_zero[2]; };

If the compile-time option _SOCKADDR_LEN is defined before the netns/ns.h header file is included, however, the 4.4BSD sockaddr structure is defined, which is as follows:

struct sockaddr_ns {
        u_char          sns_len;
        u_char          sns_family;
        struct ns_addr  sns_addr;
        char            sns_zero[2]; };

The 4.4BSD sockaddr_in structure provides for a sns_len field, which contains the total length of the structure.

The ns_addr field 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 zeros to effect ``wildcard'' matching on incoming messages. The local port address specified 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 superuser, 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(7), Error Protocol (available through IDP), and Sequenced Packet Protocol (SPP) spp(7).

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, not easily accessible to user programs.  

RELATED INFORMATION

Functions: gethostbyname(3), getnetent(3), getprotoent(3), getservent(3), ns_addr(3)

Files: netintro(7), spp(7), idp(7), nsip(7) delim off


 

Index

NAME
SYNOPSIS
DESCRIPTION
Addressing
Protocols
RELATED INFORMATION

This document was created by man2html, using the manual pages.
Time: 02:40:19 GMT, October 02, 2010