GLD implements several DLPI primitives. The DL_INFO_REQ primitive requests information about the DLPI Stream. The message consists of one M_PROTO message block. GLD returns device-dependent values in the DL_INFO_ACK response to this request, based on information the GLD-based driver specified in the gldm_mac_info(9S) structure passed to gld_register(). However, GLD returns the following values on behalf of all GLD-based drivers:
Version is DL_VERSION_2.
Service mode is DL_CLDLS -- GLD implements connectionless-mode service.
Provider style is DL_STYLE1 or DL_STYLE2, depending on how the Stream was opened.
No optional Quality Of Service (QOS) support is present and the QOS fields are zero.
Contrary to the DLPI specification, GLD returns the device's correct address length and broadcast address in DL_INFO_ACK even before the Stream has been attached to a PPA.
The DL_ATTACH_REQ primitive is called to associate a PPA with a Stream. This request is needed for Style 2 DLS providers to identify the physical medium over which the communication will transpire. Upon completion, the state changes from DL_UNATTACHED to DL_UNBOUND. The message consists of one M_PROTO message block. This request cannot be issued when using the driver in Style 1 mode; Streams opened using Style 1 are already attached to a PPA by the time the open completes.
The DL_DETACH_REQ primitive requests to detach the PPA from the Stream. This is only allowed if the Stream was opened using Style 2.
The DL_BIND_REQ and DL_UNBIND_REQ primitives bind and unbind a DLSAP to the Stream. The PPA associated with each Stream initializes upon completion of the processing of the DL_BIND_REQ. Multiple Streams can be bound to the same SAP; each such Stream receives a copy of any packets received for that SAP.
The DL_ENABMULTI_REQ and DL_DISABMULTI_REQ primitives enable and disable reception of individual multicast group addresses. A set of multicast addresses can be iteratively created and modified on a per-Stream basis using these primitives. The Stream must be attached to a PPA for these primitives to be accepted.
The DL_PROMISCON_REQ and DL_PROMISCOFF_REQ primitives enable and disable promiscuous mode on a per-Stream basis, either at a physical level or at the SAP level. The DL Provider routes all received messages on the media to the DLS user until either a DL_DETACH_REQ or a DL_PROMISCOFF_REQ is received or the Stream is closed. Physical level promiscuous mode can be specified for all packets on the medium or for multicast packets only.
The Stream must be attached to a PPA for these promiscuous mode primitives to be accepted.
The DL_UNITDATA_REQ primitive is used to send data in a connectionless transfer. Because this is an unacknowledged service, there is no guarantee of delivery. The message consists of one M_PROTO message block followed by one or more M_DATA blocks containing at least one byte of data.
The DL_UNITDATA_IND type is used when a packet is received and is to be passed upstream. The packet is put into an M_PROTO message with the primitive set to DL_UNITDATA_IND.
The DL_PHYS_ADDR_REQ primitive returns the MAC address currently associated with the PPA attached to the Stream, in the DL_PHYS_ADDR_ACK primitive. When using style 2, this primitive is only valid following a successful DL_ATTACH_REQ.
The DL_SET_PHYS_ADDR_REQ primitive changes the MAC address currently associated with the PPA attached to the Stream. This primitive affects all other current and future Streams attached to this device. Once changed, all Streams currently or subsequently opened and attached to this device can obtain this new physical address. The new physical address remains in effect until this primitive is used to change the physical address again or the driver is reloaded.
The physical address of a PPA can be changed by the superuser while other Streams are bound to the same PPA.
The DL_GET_STATISTICS_REQ primitive requests a DL_GET_STATISTICS_ACK response containing statistics information associated with the PPA attached to the Stream. Style 2 Streams must be attached to a particular PPA using DL_ATTACH_REQ before this primitive is successful.