ie6(7) UNIX System V ie6(7)
NAME
ie6 - 3C503 3Com Ethernet Driver
SYNOPSIS
#include <sys/dlpi.h>
#include <sys/dlpiether.h>
#include <sys/ie6.h>
fd = open ("/dev/ie60", ORDWR)
DESCRIPTION
The ie6 driver provides a data link interface to the 3C503 ethernet
controller from 3Com. It is a STREAMS-based driver that is compatible
with the Data Link Protocol Interface (DLPI) and Logical Link Interface
(LLI) software interfaces.
The ie6 driver supports DLETHER as MAC type, DLCLETHER as service
mode, and DLSTYLE1 provider style. The driver can operate as a cloned
or non-cloned device.
A process must issue a DLBINDREQ primitive to receive frames from the
network. This primitive includes a dlbindreqt structure.
The process must specify the dlsap field of the dlbindreqt structure
in host order. The type field of an incoming frame is converted to host
order and compared to the dlsap value. If the values are equal, the
frame is placed on the STREAMS read queue of the requesting process. A
privileged process (that is, a process with a uid of 0) may set the
dlsap field to PROMISCUOUSSAP. The PROMISCUOUSSAP matches all
incoming frames.
A privileged process may bind to an SAP already bound by another process.
In cases where a frame qualifies to be sent to more than one process,
independent copies of the frame are made and placed on the STREAMS read
queue of each process.
Received frames are delivered in dlunitdataindt structures. The
source and destination address contains the 6 byte ethernet address
followed by the two byte SAP, written in network order.
ioctl Calls
The following ioctls are supported:
DLIOCGMIB
This ioctl returns the DLmibt structure, which contains the
Management Information Base (MIB). The MIB holds the Ethernet
statistics that are kept in the driver.
/*
* Ether statistics structure.
*/
10/89 Page 1
ie6(7) UNIX System V ie6(7)
typedef struct {
int etherAlignErrors;/* Frame alignment errors */
int etherCRCerrors;/* CRC errors */
int etherMissedPkts;/* Packet overflow or missed inter */
int etherOverrunErrors;/* Overrun errors */
int etherUnderrunErrors;/* Underrun errors */
int etherCollisions;/* Total collisions */
int etherAbortErrors;/* Transmits aborted at interface */
int etherCarrierLost;/* Carrier sense signal lost */
int etherReadqFull;/* STREAMS read queue full */
int etherRcvResources;/* Receive resource alloc faliure */
int etherDependent1;/* Device dependent statistic */
int etherDependent2;/* Device dependent statistic */
int etherDependent3;/* Device dependent statistic */
int etherDependent4;/* Device dependent statistic */
int etherDependent5;/* Device dependent statistic */
} DLetherstatt;
/*
* Interface statistics compatible with MIB II SNMP requirements.
*/
typedef struct {
int ifIndex; /* 1 through ifNumber */
int ifDescrLen; /* len of desc. following this struct */
int ifType; /* type of interface */
int ifMtu; /* datagram size that can be sent/rcv */
ulongt ifSpeed;/* estimate of bandwith in bits PS */
uchart ifPhyAddress[DLMACADDRLEN];/* Ethernet Address */
int ifAdminStatus;/* desired state of the interface */
int ifOperStatus;/* current state of the interface */
ulongt ifLastChange;/* sysUpTime when state was entered */
ulongt ifInOctets;/* octets received on interface */
ulongt ifInUcastPkts;/* unicast packets delivered */
ulongt ifInNUcastPkts;/* non-unicast packets delivered */
ulongt ifInDiscards;/* good packets received but dropped */
ulongt ifInErrors;/* packets received with errors */
ulongt ifInUnknownProtos;/* packets recv'd to unbound proto */
ulongt ifOutOctets;/* octets transmitted on interface `*/
ulongt ifOutUcastPkts;/* unicast packets transmited */
ulongt ifOutNUcastPkts;/* non-unicast packets transmited */
ulongt ifOutDiscards;/* good outbound packets dropped */
ulongt ifOutErrors;/* number of transmit errors */
ulongt ifOutQlen;/* length of output queue */
DLetherstatt ifSpecific;/* ethernet specific stats */
} DLmibt;
The values in the MIB are compatible with those needed by the SNMP
protocol.
Page 2 10/89
ie6(7) UNIX System V ie6(7)
The ifDescrLen field indicates the length of the null-terminated
description string that immediately follows the DLmibt structure.
There are three fields in the MIB that are specific to the ie6
driver: The ifSpecific.etherDependent1 field contains the number
of times the transceiver failed to transmit a collision signal
after transmission of a packet. The ifSpecific.etherDependent2
field contains the number of collisions that occurred after a slot
time (out-of-window collisions). The ifSpecific.etherDependent3
field contains the number of times a transmit interrupt timeout
condition occurred.
DLIOCSMIG
This ioctl allows a privileged process to initialize the values in
the MIB (that is, the DLmibt structure). A process cannot use
this ioctl to change the ifPhyAddress, the ifDescrLen, or the text
of the description fields.
DLIOCGENADDR
This iotcl returns the ethernet address in network order.
DLIOCGLPCFLG
This ioctl returns the state of the local packet copy flag in the
iocrval of the iocblk structure. The local copy flag determines
if packets looped back by the driver should also be sent to the
network. A non-zero value indicates that frames should also be be
sent to the network after being looped back. The default value of
this flag is zero.
DLIOCSLPCFLG
This ioctl allows a privileged process to set the local packet copy
flag, causing all packets looped back by the driver to also be sent
to the network.
DLIOCGPROMISC
This ioctl returns the value of the promiscuous flag in the
iocrval of the iocblk structure. A non-zero value indicates that
the ethernet interface will receive all frames on the network. The
default value of this flag is zero.
DLIOCSPROMISC
This ioctl allows a privileged process to toggle the current state
of the promiscuous flag. When the flag is non-zero, the driver
captures all frames from the network. Processes that are bound to
the promiscuous SAP, or to an SAP that matches the type field of
the received frame, receive a copy of the frame.
10/89 Page 3
ie6(7) UNIX System V ie6(7)
Configuration
The ie6 driver has four configurable parameters in the
/etc/conf/pack.d/ie6/space.c file. If you change this file, you must
rebuild the kernel and reboot the system in order for the changes to take
effect.
The configurable parameters are:
NSAPS
This defines the number of SAPs that can be bound at any one time.
This value should be only slightly larger than anticipated SAP
usage. A typical TCP/IP system requires two SAPs (0x800 and
0x806). If you assign too large a value to this parameter, system
performance and memory usage may suffer.
CABLETYPE
This defines the type of ethernet cable attached to the ethernet
controller card. A value of 0 specifies thin ethernet cable with a
BNC connector. A value of 1 specifies thick ethernet cable with a
AUI connector.
STREAMSLOG
This parameter defines whether the driver should log debugging
messages to the STREAMS logger for the strace utility [see
strace(1M)] to display. The module ID used with strace is 2101. A
value of 0 indicates that no STREAMS debug messages should be
generated. A value of 1 causes STREAMS debug messages to be
generated. You can also direct the driver to log messages
temporarily by using the kernel debugger to change the value of
ie6strlog (a 4 byte integer) to 1.
Use STREAMS tracing only when debugging a network problem, because
system performace suffers when full ie6 STREAMS logging is
occurring.
IFNAME
This parameter is important only in a TCP/IP networking
environment. It defines the string used in displaying network
statistics with the netstat command [see netstat(1)]. This string
should match the logical interface name assigned in the
/etc/inet/strcf file and with ifconfig commands [see ifconfig(1M)]
used in the /etc/inet/rc.inet configuration script.
DIAGNOSTICS
The ie6 driver can return the following error codes:
Page 4 10/89
ie6(7) UNIX System V ie6(7)
ENXIO Invalid major number or board is not installed.
ECHRNG No minor devices left if configured as a cloned
device. Increase NSAP value in
/etc/conf/pack.d/ie6/space.c Invalid minor device
number if configured as a non-cloned device.
EPERM An ioctl was made without the appropriate privilege.
EINVAL An ioctl was made that did not supply a required
input and/or output buffer.
DLNOTSUPPORTED Requested service primitive is not supported.
DLBADPRIM Unknown service primitive was requested.
DLOUTSTATE DLBINDREQ, DLUNBINDREQ, or DLUNITDATAREQ was
issued when the stream was bound, unbound, or unbound
respectively.
DLACCESS An attempt was made to bind to PROMISCUOUSSAP with
insufficient privilege.
DLBOUND The requested SAP is already bound. A privileged
process may bind to an already bound SAP.
DLNOTINIT A DLUNITDATAREQ was made on an ethernet board that
has gone offline due to an error.
DLBADDATA DLUNITDATAREQ was made with a data size that was
either larger than the SPDU maximum or smaller than
the SPDU minimum.
FILES
/dev/ie6*
/etc/conf/pack.d/ie6/space.c
SEE ALSO
ifconfig(1M), strace(1M), netstat(1).
open(2), putmsg(2), getmsg(2), ioctl(2), in the Programmer's Reference
Manual.
10/89 Page 5