INET(4F) Series 300 Only INET(4F)
NAME
inet - Internet protocol family
SYNOPSIS
#include <sys/types.h>
#include <netinet/in.h>
HP-UX COMPATIBILITY
Level: HP-UX/NON-STANDARD
Origin: UCB
Remarks: Implemented on the Series 300 only.
DESCRIPTION
The internet protocol family is a collection of protocols
layered atop the Internet Protocol (IP) network layer, which
utilizes the internet address format. The internet family
supports the SOCK_STREAM and SOCK_DGRAM socket types.
Addressing
Internet addresses are four byte entities. The include file
<netinet/in.h> defines this address as a discriminated
union, called ``struct in_addr''.
Sockets bound to the Internet protocol family utilize an
addressing structure called ``struct sockaddr_in''.
Pointers to this structure may be used in system calls
wherever they ask for a pointer to a ``struct sockaddr''.
There are three fields of interest within this structure.
The first is sin_family, which should always be set to be
AF_INET. The next is sin_port, which specifies the port
number to be used on the desired host. The third is
sin_addr, which is of type struct in_addr, and specifies the
address of the desired host.
Protocols
The internet protocol family is comprised of the IP network
protocol, Internet Control Message Protocol (ICMP),
Transmission Control Protocol (TCP), and User Datagram
Protocol (UDP). TCP is used to support the SOCK_STREAM
socket type while UDP is used to support the SOCK_DGRAM
socket type. The ICMP message protocol and IP network
protocol are not directly accessible.
The local port address is selected from independent domains
for TCP and UDP sockets. This means that creating a TCP
socket and binding it to local port number 10000, for
example, will not interfere with creating a UDP socket and
also binding it to local port number 10000 at the same time.
Hewlett-Packard - 1 - (printed 7/16/86)
INET(4F) Series 300 Only INET(4F)
SEE ALSO
tcp(4P), udp(4P).
Hewlett-Packard - 2 - (printed 7/16/86)