Visit Our UNIX and Linux User Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #705
Difficulty: Medium
Confirmation bias is the tendency to search for, interpret, favor, and recall information in a way that affirms what we currently believe or think we already know.
True or False?
Linux & Unix Commands - Search Man Pages

ns(4f) [bsd man page]

NS(4F)																	    NS(4F)

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

inet(7) 						 Miscellaneous Information Manual						   inet(7)

inet - Internet Protocol family SYNOPSIS
#include <sys/types.h> #include <netinet/in.h> DESCRIPTION
The Internet Protocol family is a collection of protocols layered atop the Internet Protocol (IP) Version 4 and Version 6 transport layers, and utilizing the Internet address format. The Internet family provides protocol support for the SOCK_STREAM, SOCK_DGRAM, and SOCK_RAW socket types; the SOCK_RAW interface provides access to the IP protocol. Internet addresses are 4-byte (AF_INET) or 16-byte (AF_INET6) quantities, stored in network standard format (on the Alpha, VAX and other machines, these are word and byte reversed). The netinet/in.h include file defines the in_addr and in6_addr (AF_INET6) structures to hold these addresses. Sockets bound to the Internet protocol family utilize an addressing structure sockaddr_in (AF_INET) or sockaddr_in6 (AF_INET6), whose for- mat is dependent on whether _SOCKADDR_LEN has been defined prior to including the netinet/in.h header file. If _SOCKADDR_LEN is defined, the sockaddr_in (AF_INET) or sockaddr_in6 (AF_INET6) structure takes 4.4BSD behavior, with a separate field for specifying the length of the address; otherwise, the default 4.3BSD behavior is used. Sockets may be created with the local address INADDR_ANY (AF_INET) or in6addr_any (AF_INET6) to effect wildcard matching on incoming mes- sages. The address in a connect() or sendto() call may be given as INADDR_ANY (AF_INET) or in6addr_any (AF_INET6) to mean ``this host.'' The distinguished address INADDR_BROADCAST (AF_INET) is allowed as a shorthand for the broadcast address on the primary network if the first network configured supports broadcast. There is no broadcast in IPv6. The Internet protocol family comprises the IP transport protocol, Internet Control Message Protocol (ICMP) Version 4 and Version 6, Trans- mission Control Protocol (TCP), and User Datagram Protocol (UDP). TCP is used to support the SOCK_STREAM abstraction while UDP is used to support the SOCK_DGRAM abstraction. A raw interface to IP is available by creating an Internet socket of type SOCK_RAW. The ICMP message protocol is accessible from a raw socket. The 32-bit IP Version 4 address contains both network and host parts. It is frequency-encoded; the most-significant bit is clear in Class A addresses, in which the high-order 8 bits are the network number. Class B addresses use the high-order 16 bits as the network field, and Class C addresses have a 24-bit network part. Sites with a cluster of local networks and a connection to the Internet may chose to use a single network number for the cluster; this is done by using subnet addressing. The local (host) portion of the address is further subdi- vided into subnet and host parts. Within a subnet, each subnet appears to be an individual network; externally, the entire cluster appears to be a single, uniform network requiring only a single routing entry. IPv4 subnet addressing is enabled and examined by the following ioctl() commands on a datagram socket in the Internet domain; they have the same form as the SIOCSIFADDR command (see the reference page for the netintro function). Set interface network mask. The network mask defines the network part of the address; if it contains more of the address than the address type would indicate, then subnets are in use. Get interface network mask. The 128-bit IP Version 6 address has several formats. One format is as follows: x:x:x:x:x:x:x:x In this format, x is the hexadecimal value of a 16-bit piece of the address. See the Network Programmer's Guide for more information on IPv6 addresses. NOTES
The Internet protocol support is subject to change as the Internet protocols develop. Users should not depend on details of the current implementation, but rather the services exported. RELATED INFORMATION
Functions: ioctl(2), socket(2). Network Information: netintro(7), tcp(7), udp(7), ip(7), icmp(7). Network Programmer's Guide Technical Overview RFC 2373, IP Version 6 Addressing Architecture, July 1998 delim off inet(7)

Featured Tech Videos