Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dlce(7) — Motorola System V 88k Release 4 Version 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ifconfig(1M)

slink(1M)

strace(1M)

edt_data(4)

master(4)

strcf(4N)

arp(7)

clone(7)

intro(7)

ip(7)

streamio(7)

dlce(7)  —  SPECIAL FILES AND DEVICES

NAME

dlce − Data Link  /  Common Environment interface

SYNOPSIS

#include <sys/dlpi.h>
#include <sys/dlce.h>
fd = open("/dev/dlce0", O_RDWR);

DESCRIPTION

The dlce is a STREAMS-based cloned software driver used with the MVME374 ­Ethernet board/driver.  The dlce interface conforms to the Data Link Provider Interface (DLPI). 

The dlce driver can be opened directly, or indirectly from the clone device driver.  During the TCP/IP startup, the dlce device is opened and linked to the IP and ARP STREAMS modules via the slink command.  From then on, dlce converts all the outgoing packets, received from IP/ARP, to the format defined by Common Environment/BPP interface and passes these packets to the MVME374 driver (which is currently named MVME37X). 

Upon receiving incoming packets from the MVME374 driver, dlce converts these packets to the STREAMS-based DLPI format messages and passes these packets to IP/ARP. 

When the MVME37X package is installed, the postinstall script in the package creates the device nodes for the DLCE driver.  The name of a device node is composed of the string “dlce” followed by the board number (0 or 1) of the MVME374 which the DLCE driver is associated with.  The board number must be the same as the MVME374’s cpu number minus 2 (cpu 0 and 1 are reserved for the Common Environment and the local cpu).  For instance, an MVME374 with cpu 2 (as defined in the edt_data file), would have a device name of /dev/dlce0. 

A dlce node major device number is the major device number of the clone device driver.  A dlce minor device number is the major number of the dlce device, found in /etc/master.d/dlce, concatenated with the board number corresponding to this device.  See intro(7) for the pictorial representation of the minor device number as passed to the device driver.  For the dlce device driver, the bit fields in the minor format are defined as:

The BOARD bits define the board device number.  Boards are numbered from 0.  The maximum board device number supported is 1.  The MAJOR # bits correspond to the real major number of the dlce device as specified in the file /etc/master.d/dlce. 

The device node name is also used as the Ethernet network interface name by cenet in the network database file /etc/strcf and by ifconfig in the script /etc/inet/rc.inet. 

Each dlce device may have up to four (4) minor devices open simultaneously.  This number is configurable by modifying the #DEV field in /etc/master.d/dlce. 

USAGE

STREAM Message Processing

The following are the types of STREAMS messages the driver can process:

M_PROTO/M_PCPROTO
Four DLPI protocol messages are supported: DL_INFO_REQ, DL_UNITDATA_REQ, DL_BIND_REQ, and DL_UNBIND_REQ,.  Unsupported message types that are received are ignored and the STREAM message is freed. 

DL_INFO_REQ is a request for driver information.  Driver information is passed back up the stream in a message of type dl_info_ack_t with dl_primitive set to DL_INFO_ACK.  However, if enough memory is not available for the driver information, an error message of type dl_error_ack_t is sent back up the stream with dl_primitive set to DL_ERROR_ACK. 

DL_UNITDATA_REQ is a request to transmit data.  The message is in the dl_unitdata_req_t format.  The driver will process this message and send data to the appropriate destination address.  Most errors that can occur during this message are turned around in the message itself and sent back up stream in a message with dl_primitive set to DL_UDERROR_IND.  If enough memory is not available for processing, an error message of type dl_error_ack_t is sent back up the stream with dl_primitive set to DL_ERROR_ACK. 

DL_BIND_REQ is a request to bind a service access point (SAP) to the minor device number associated with the current stream.  The request message is of type dl_bind_req_t.  Once the stream has been bound, an acknowledgement message type dl_bind_ack_t is sent back up the stream.  Errors generated during the processing of this message that cause an error message of type dl_error_ack_t to be sent back up the stream are: stream already bound, bad sap value, and cannot allocate memory for acknowledgement.  Currently, the only SAPs supported by dlce are IP_SAP and ARP_SAP; IEEE802.3 frames are not supported. 

DL_UNBIND_REQ is a request to unbind the minor device associated with the current stream.  Errors generated during message processing that cause an error message of type dl_error_ack_t are: minor device is not bound and cannot allocate enough memory for acknowledgement.  An acknowledgement message of type dl_ok_ack_t is generated when the stream has been unbound. 

M_IOCTL
ioctl commands are received in messages of type iocblk.  Command data must be stored in a connected message block type M_DATA.  Some commands do not require M_DATA blocks; M_DATA block requirements are listed.  Data passed back upstream is always contained in an M_DATA block. 

A description of user ioctl stream messages can be found under the I_STR command in streamio(7).  A sample code extract can be found in the STREAMS Mechanism chapter of the STREAMS Programming Guide. 

SIOCGENADDR is a type of request to return the Ethernet address of the LANCE controller associated with the current queue.  This command requires an M_DATA block of type struct ifreq. 

M_FLUSH
If the command is a read queue flush, the read queue of the driver is flushed and the message is passed back up stream.  If the command is a write queue flush, the write queue of the driver is flushed.

FILES

/dev/dlce_∗
/usr/include/sys/dlpi.h
/usr/include/sys/dlce.h
/usr/include/sys/dlcecommon.h
/usr/include/sys/dlceuser.h

SEE ALSO

ifconfig(1M), slink(1M), strace(1M), edt_data(4), master(4), strcf(4N), arp(7), clone(7), intro(7), ip(7), streamio(7)
Programmer’s Guide: STREAMS
McGrath, G., A STREAMS-based Data Link Provider Interface (DLPI), Version 1.3, AT&T Bell Laboratories, Summit, N.J., February 1989

  —  TCP/IP

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