'\" te .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the .\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH ipnet 7D "8 Apr 2009" "SunOS 5.11" "Devices" .SH NAME ipnet, lo0 \- ipnet device driver .SH SYNOPSIS .LP .nf \fB/dev/ipnet/*, /dev/lo0\fR .fi .SH DESCRIPTION .sp .LP The \fBipnet\fR device driver creates, removes and manages nodes in the \fB/dev/ipnet/\fR namespace. .sp .LP A node is created in \fB/dev/ipnet\fR for every IP interface on the system, including interfaces that exist only in software and for which there is no hardware device. The \fBipnet\fR device also provides access to all IP traffic to and from the system. To provide access to packets that are internally looped-back in IP, the \fBipnet\fR driver creates a \fB/dev/lo0\fR DLPI device. .SH APPLICATION PROGRAMMING INTERFACE .SS "ipnet and DLPI" .sp .LP Device nodes created in \fB/dev/ipnet\fR are DLPI style-1 devices. All \fBM_PROTO\fR and \fBM_PCPROTO\fR-type messages are interpreted as DLPI primitives. Because the device is read-only and packets can only be observed by opening them, the following subset of DLPI primitives is supported: .sp .in +2 .nf DL_INFO_REQ DL_BIND_REQ DL_UNBIND_REQ DL_PROMISCON_REQ DL_PROMISCOFF_REQ DLIOCRAW .fi .in -2 .sp .LP The values returned by the driver in the \fBDL_INFO_ACK\fR primitive in response to the \fBDL_INFO_REQ\fR are: .RS +4 .TP .ie t \(bu .el o Maximum \fBSDU\fR is \fBINT_MAX\fR .RE .RS +4 .TP .ie t \(bu .el o Minimum \fBSDU\fR is \fB0\fR. .RE .RS +4 .TP .ie t \(bu .el o \fBDLSAP\fR address length is \fB2.\fR .RE .RS +4 .TP .ie t \(bu .el o \fBMAC\fR type is \fBDL_IPNET\fR. .RE .RS +4 .TP .ie t \(bu .el o \fBSAP\fR length value is \fB2\fR. .RE .RS +4 .TP .ie t \(bu .el o Service mode is \fBDL_CLDLS\fR. .RE .RS +4 .TP .ie t \(bu .el o No optional quality of service (QOS) support is provided. Accordingly, the QOS fields are 0. .RE .RS +4 .TP .ie t \(bu .el o Provider style is \fBDL_STYLE1\fR. .RE .RS +4 .TP .ie t \(bu .el o Version is \fBDL_VERSION_2\fR. .RE .sp .LP The \fB/dev/ipnet/*\fR and \fB/dev/lo0\fR devices only accept \fBDL_BIND_REQ\fR requests for SAPs 4 (IPv4 packets), 6 (IPv6 packets), or 0 (all IP packets). \fBDL_BIND_REQ\fR requests for other SAP values result in a \fBDL_ERROR_ACK\fR of \fBDL_BADSAP\fR. .SS "ipnet primitives" .sp .LP For \fB/dev/ipnet/*\fR devices, the \fBDL_PROMISCON_REQ\fR and \fBDL_PROMISCOFF_REQ\fR primitives with the \fBDL_PROMISC_PHYS\fR flag set in the \fBdl_level\fR field enables/disables the reception of all packets. When disabled, only packets with addresses matching any of the configured addresses on the IP interface are received. When used with the \fBDL_PROMISC_MULTI\fR flag set, reception of all multicast group addresses can be enabled/disabled. \fBDL_PROMISC_PHYS\fR and \fBDL_PROMISC_MULTI\fR have no effect for \fB/dev/lo0\fR. When the \fBDL_PROMISC_SAP\fR flag is set, reception of all IPv4/IPv6 can be enabled/disabled. .sp .LP The \fBDLIOCRAW\fR ioctl is supported but has no effect on the data returned from the device. .sp .LP The \fBDL_IOC_IPNET_INFO\fR ioctl enables/disables the inclusion of a \fBdl_ipnetinfo_t\fR structure that is prepended to the IP header when receiving packet data. When enabled, a non-zero integer is returned reflecting the current \fBDL_IOC_IPNET_INFO\fR version. The \fBdl_ipnetinfo_t\fR data structure is defined in \fB\fR and includes the following fields: .sp .in +2 .nf uint8_t dli_version; /* DL_IPNETINFO_* version */ uint8_t dli_ipver; /* packet IP header version */ uint16_t dli_len; /* length of dl_ipnetinfo_t */ uint64_t dli_srczone; /* packet source zone ID (if any) */ uint64_t dli_dstzone; /* packet dest zone ID (if any) */ .fi .in -2 .sp .LP The current \fBdli_version\fR is 1. To robustly support future \fBdl_ipnetinfo_t\fR versions, consumers should check that \fBdli_version\fR is a value they recognize, and must use the \fBdli_len\fR field to advance past the \fBdl_ipnetinfo_t\fR header. .SH FILES .sp .ne 2 .mk .na \fB\fB/dev/ipnet/*, /dev/lo0\fR\fR .ad .RS 26n .rt Special character devices. .RE .sp .ne 2 .mk .na \fB\fB/kernel/drv/ipnet.conf\fR\fR .ad .RS 26n .rt Configuration file. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; lw(2.75i) lw(2.75i) lw(2.75i) lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE ArchitectureSPARC, x86 Interface StabilityCommitted .TE .SH SEE ALSO .sp .LP \fBattributes\fR(5), \fBdlpi\fR(7P)