Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ inet(7) — GL2 W2.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

net(7)

tcp(7)

udp(7)

ip(7)

lo(7)

INET(7)  —  Silicon Graphics

NAME

inet − Internet Protocol family

SYNOPSIS

#include <sys/types.h>
#include <net/in.h>

DESCRIPTION

The Internet Protocol family is a collection of protocols (Internet address format) layered atop the Internet Protocol (IP) transport layer.  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. 

ADDRESSING

Internet addresses are four byte quantities, stored in network standard format (this may vary from the user or host native data order).  The include file <net/in.h> defines this address as a discriminated union with the following conventions:

struct in_addr *sin;
sin->s_addr  = 0;/* entire address */
sin->s_host  = 0;/* host on imp */
sin->s_net   = 0;/* network */
sin->s_imp   = 0;/* 2-byte imp */
sin->s_impno = 0;/* imp # and ... */
sin->s_lh    = 0;/* ... logical host */

Sockets bound to the IP family use this addressing structure:

struct sockaddr_in {
shortsin_family;
u_shortsin_port;  /*TCP and UDP use this as the socket
     address on a given host*/
structin_addr sin_addr;
charsin_zero[8];
};

Sockets may be created  with the address INADDR_ANY to effect "wildcard" matching on incoming messages. 

PROTOCOLS

The Internet Protocol family comprises the IP transport protocol, Internet Control Message Protocol (ICMP), Transmission Control Protocol (TCP), and User Datagram Protocol (UDP).  TCP supports the SOCK_STREAM abstraction while UDP supports the SOCK_DGRAM abstraction.  An Internet socket of type SOCK_RAW creates a raw interface to IP.  The ICMP message protocol is not directly accessible. 

SEE ALSO

net(7), tcp(7), udp(7), ip(7), lo(7)

Version 2.3  —  July 04, 1985

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026