The scman driver is a style 2
data link provider interface. All M_PROTO and M_PCPROTO type messages are interpreted as DLPI
primitives. Valid DLPI primitives are defined in sys/dlpi.h. Refer to dlpi(7P) for more
information. An explicit DL_ATTACH_REQ message by the user
is required to associate the opened stream with a particular device or physical
point of attachment (PPA).
The PPA ID is interpreted as an unsigned long data
type and indicates the corresponding device instance (unit) number. The only
valid unit number is 0. An error (DL_ERROR_ACK) is
returned by the driver if the PPA field value does not
correspond to a valid device instance number for this system. The device is
initialized on the first attach and deinitialized (stopped) upon the last
detach.
The values returned by the scman driver in the DL_INFO_ACK primitive in response to the DL_INFO_REQ
from the user are:
- Maximum service data units (SDU) are 1500.
- Minimum SDU is 0.
- Data link service access point (DLSAP)
address length is 8.
- Media access control (MAC) type is DL_ETHER.
- Service access point (SAP) length value
is -2, meaning the physical address component is followed immediately by a
two-byte SAP component within the DLSAP
address.
- Service mode is DL_CLDLS.
- Optional quality of service (QOS) support
is not included; the QOS fields are 0.
- Provider style is DL_STYLE2.
- Version is DL_VERSION_2.
- Broadcast address value is Ethernet/IEEE broadcast address
(0xFFFFFF).
Once in the DL_ATTACHED state, you can transmit DL_BIND_REQ to associate a particular SAP with
the stream. The scman driver interprets the SAP field within the DL_BIND_REQ as an Ethernet
type; as a result, valid values for the SAP field are
in the 0 through 0xFFFF range. Only one Ethernet type can be bound to the
stream at any time.
If you select the SAP with a value of 0, the receiver
will be in 802.3 mode. All frames received from the
media having a type field in the range from 0 through 1500 are assumed to
be 802.3 frames and are routed up all open streams
that are bound to SAP value 0. If more than one stream
is in 802.3 mode, then the frame is duplicated and
routed up multiple streams as DL_UNITDATA_IND messages.
In transmission, the driver checks the DL_BIND_REQ SAP field to determine if the SAP value is 0
and the destination type field is in the range from 0 through 1500. If either
is true, the driver computes the length of the message, not including the
initial M_PROTO message block (mblk),
of all subsequent DL_UNITDATA_REQ messages and transmits 802.3 frames that have this value in the MAC
frame header length field.
The scman driver DLSAP address
format consists of the six-byte physical (Ethernet) address component followed
immediately by the two-byte SAP (type) component producing
an eight-byte DLSAP address. Applications should not be hard-coded to this implementation-specific DLSAP address format, but instead use information returned in the DL_INFO_ACK primitive to compose and decompose DLSAP
addresses. The SAP length, full DLSAP
length, and SAP physical ordering are included within
the DL_INFO_ACK. The physical address length can be computed
by subtracting the SAP length from the full DLSAP address length or by issuing the DL_PHYS_ADDR_REQ to obtain the current physical address associated with the stream.
Once in the DL_BOUND state, you can transmit frames
on the Ethernet by sending DL_UNITDATA_REQ messages to
the scman driver. The scman driver routes
received Ethernet frames as DL_UNITDATA_IND messages up
all open and bound streams having a SAP matching the Ethernet
type. Received Ethernet frames are duplicated and routed up multiple open
streams, if necessary. The DLSAP address contained within
the DL_UNITDATA_REQ and DL_UNITDATA_IND
messages consists of both the SAP (type) and physical (Ethernet)
components.
|