ip(7) —
NAME
ip − internet protocol
SYNOPSIS
#include <sys/socket.h>
#include <netinet/in.h>
s = socket(AF_INET, SOCK_RAW, protocol);
or #include <sys/niuser.h>
#include <sys/ip.h>
#include <netinet/in.h>
t = t_open("/dev/ip", O_RDWR);
DESCRIPTION
ip is a STREAMS multiplexing driver (both upper and lower), which implements the Department of Defense Internet Protocol and Internet Control Message Protocol. It utilizes the Network Interface protocol to communicate with an upstream user. ip only implements a connectionless protocol and thus uses the same model as the TLI T_CLTS interface. The Network Provider Interface is basically the same as the TLI connectionless model.
Each upper STREAM can be bound to a unique Network Service Access Point (NSAP), which is mapped into the ip protocol identifier. This NSAP is an eight-bit quantity with values defined for each higher layer protocol as defined in RFC1010 − Assigned Numbers. There is a wildcard value (IPPROTO_RAW), which allows a STREAM to get copies of all messages that aren’t directed to a protocol bound to some other STREAM.
A number of data link level device STREAMS may be linked below the ip driver to provide network access. These STREAMS must understand the Link Interface protocol.
ip normally determines the name of the lower device by looking at the qinfo structure at I_LINK time. The name is used in later configuration specific ioctl calls. If the arp device is linked below the ip driver, a new name should be assigned with the SIOCSIFNAME ioctl in order to provide better identification for use with the configuration ioctl calls. ip also treats the case of the loopback driver, /dev/lo, as a special case.
In addition to the Network Interface protocol, there is provision for passing control information between ip and higher layer protocols which is implemented using the M_CTL message format. This is only of interest to other STREAMS modules/drivers and not to user-level processes.
Currently, the user must provide a valid ip header, but the critical fields are filled in by the ip driver. This may change in later releases.
SEE ALSO
netd(1M), arp(7), ec(7), llc(7), socket(7), tcp(7), ub(7), udp(7), wd(7).
\*U — Version 1.0