| United States-English |
|
|
|
![]() |
HP DLPI Programmer's Guide: HP-UX 11i v2 > Chapter 3 DLPI Input/Output ControlsSupported ioctls |
|
DLPI supports the following ioctls:
For all ioctls, either an M_IOCACK or M_IOCNACK message is sent to the DLS user, and if an error occurs, the ioc_error field is set. DL_IOC_DRIVER_OPTIONS negotiates the options between DLPI and a DLS user. In other words, this ioctl negotiates the features with an instance of the driver.
DLS user sets the feature bits about which it wants to enquire. DLPI compares the DLS user’s feature with the driver’s feature and its own internal capability. After the comparison, DLPI clears the bits in driver_ops_type (defined later in this section) that are not supported or not understood by DLPI or driver. The DLS user that negotiates the driver features and header template must also request for link event notifications using the DL_HP_NOTIFY_EVENT_REQ primitive (see “DL_HP_NOTIFY_EVENT_REQ”). Format typedef struct { Parameters driver_ops_type
driver_ops_type_1
driver_ops_type_2
State The message is valid in DL_IDLE or DL_UNBOUND. If the message is not in either of these states, DLPI returns ioc_error as EBUSY. New State The resulting state is unchanged. Response If the driver does not support any of the options supported by the transport layer, EOPNOTSUPP is returned.If the associated information is invalid, EINVAL is returned. DL_IOC_HDR_INFO permits the transport layer (like TCP/IP) to request a Link Layer header template from DLPI on a per-stream basis, thus avoiding the construction of header every time.
The header template enables transport layer to add the Link Layer header before sending the packet to DLPI. After receiving the DL_IOC_HDR_INFO ioctl, DLPI constructs the MAC+LLC header template with Out-Of-Packet (OOP) data template. The OOP data template can be used by transport layer to communicate additional information to DLPI or the driver. In response to DL_IOC_HDR_INFO, DLPI returns the OOP header and the Link Layer header template. The mblk containing the MAC/LLC and OOP header is the last (third) mblk in the M_IOCACK response. The DLS user must renegotiate the feature and request DLPI to build a new header template when it receives a DL_LINK_UP_IND event (see “DL_LINK_UP_IND”) from DLPI, because the link state changes may be due to the driver feature changes. These changes can impact the header template.
The M_IOCTL message block that contains DL_IOC_HDR_INFO is followed by one M_PROTO message block containing the following structure. Format typedef struct { Parameters dl_primitive
dl_dest_addr_length
dl_dest_addr_offset
dl_priority
State The message is valid in DL_IDLE or DL_UNBOUND state. If the stream is not in either of these states, ioc_error is set to EBUSY. New State The resulting state is unchanged. Response If the driver does not support fast path, EINVAL is returned.If the dl_unitdata_req_t structure in the b_cont of the ioctl is invalid (if b_cont is NULL), EINVAL is returned. DL_HP_SET_DRV_PARAM_IOCTL is a DLPI defined transparent ioctl. You can use it to set the driver parameters. This ioctl provides an interface to set Speed, Duplex mode, autoneg/auto sense, and Maximum Transmission Unit (MTU). In addition, you can use it to reset MTU of an interface. Before using DL_HP_SET_DRV_PARAM_IOCTL, please note the following points:
Format typededef struct dl_hp_set_drv_param_ioctl { Parameters dl_request
Table 3-2 dl_hp_drv_param_req_type_t Enumeration
dl_speed
dl_duplex
dl_autoneg
Table 3-4 dl_hp_autoneg_sense_t Enumeration
dl_mtu
dl_value1
dl_value2
dl_value3
dl_reserved1 [2]
dl_reserved2 [2]
State The message is valid in DL_IDLE or DL_UNBOUND. New State The resulting state is unchanged. Response If the ioctl is successfully processed, 0 (zero) is returned. If the process fails, an error (see Table 2-2 “Error Return Values”) is returned. DL_HP_GET_DRV_PARAM_IOCTL is a DLPI defined transparent ioctl that retrieves the driver parameters. Before using DL_HP_GET_DRV_PARAM_IOCTL, please note the following points:
Format typededef struct dl_hp_get_drv_param_ioctl { Parameters dl_request
dl_speed
dl_duplex
dl_autoneg
dl_mtu
dl_value1
dl_value2
dl_value3
dl_reserved1 [2]
dl_reserved2 [2]
State The message is valid in DL_IDLE or DL_UNBOUND. New State The resulting state is unchanged. Response If the ioctl is successfully processed, 0 (zero) is returned. If the process fails, error (see Table 2-1 “dl_hp_event_t Enumeration”) is returned. The DLPI_SET_NOLOOPBACK IOCTL contains an M_IOCTL message block with ioc_cmd set to DLPI_SET_NOLOOPBACK, and the b_cont of the M_IOCTL message block contains a uint32_t value. If uint32_t value is set to 1 (one), DLPI/driver does not loopback, multicast, and broadcast packets for this stream. If uint32_t is set to 0 (zero), the ioctl enables DLPI/driver to loopback, multicast, and broadcast packets. State The message is valid in all the states. New State The resulting state is unchanged. Reason for Failure If data is not provided, EINVAL is returned. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||