| Linux Data Link (LDL)Description: OpenSS7 Project Manual Pages Operating SystemLDLSection: OpenSS7 XNS Networking Devices (4)Updated: 2008-10-31 Index Return to Main Contents NAMEldl - Linux Data Link (LDL) driverSYNOPSIS#include <unistd.h>
DESCRIPTION
IOCTLSThe LDL driver implements the following ioctls. The user codes these ioctls as type I_STR (see streamio(7)) and passes a structure of type struct strioctl to the driver. The ic_cmd field of this structure is decoded according to the following table. the ic_dp and ic_len fields delimit an argument structure which is also passed to the driver. The argument structure differs for each type of ic_cmd.
USAGEThe LDL is controlled by dlpi(7) primitives from its upstream client. The DLPI primitives understood by this driver are as follows. DLPI mnemonics come from the file <sys/dlpi.h>. LDL mnemonics come from the file <sys/ldl.h>. DL_INFO_REQA DL_INFO_REQ(7) causes LDL to return a DL_INFO_ACK(7). If the stream has not been attached to a device then the returned values will consist of default values. If the stream has been attached then information will be returned that pertains the the underlying Linux network device. DL_PHYS_ADDR_REQA DL_PHYS_ADDR_REQ(7) causes LDL to return a DL_PHYS_ADDR_ACK(7) (or DL_ERROR_ACK(7)). The response will contain the current physical address of the Linux network device. The option to retrieve the factory address is not implemented and will always produce a DL_ERROR_ACK(7) response. DL_ATTACH_REQThe stream must be in the DL_UNATTACHED state for the DL_ATTACH_REQ(7) primitive to succeed. The dl_ppa field specifies the device number of the Linux network device to attach in its low order bits. In the LDL_FRAME_MASK bits, the dl_ppa specifies the framing type to use with the device. The valid framing types are: LDL_FRAME_EII, LDL_FRAME_802_2, LDL_FRAME_802_3, LDL_FRAME_SNAP and LDL_FRAME_RAW_LLC. The device number is usually obtained by issuing an LDL_FINDPPA ioctl. This ioctl takes a network device mnemonic, such as eth0, as an argument and produces a number suitable for use as the dl_ppa value in a DL_ATTACH_REQ(7). If the attach succeeds, LDL returns a DL_OK_ACK(7) and sets the state of the stream to DL_UNBOUND. It returns a DL_ERROR_ACK(7) if it fails. DL_DETACH_REQA DL_DETACH_REQ(7) causes LDL to detach from the Linux network device. The stream must be in the DL_UNBOUND state for this primitive to be valid. If the detach succeeds, LDL returns a DL_OK_ACK(7) and sets the state of the stream to DL_UNATTACHED. It returns a DL_ERROR_ACK(7) if it fails. DL_BIND_REQA DL_BIND_REQ(7) causes LDL to bind an address to the stream. The stream must be in the DL_UNBOUND state for this primitive to succeed. The bound address is used in demultiplexing frames received from the Linux network driver. The SAP conveyed in the DL_BIND_REQ(7) is used to select those received frames that are sent upstream on a particular stream. If the bind succeeds LDL returns a DL_OK_ACK(7) and sets the state of the stream to DL_IDLE. If it fails then a DL_ERROR_ACK(7) is sent upstream. DL_UNBIND_REQA DL_UNBIND_REQ(7) causes LDL to unbind all SAPs from the stream. The stream must be in the DL_IDLE state for this primitive to succeed. If the unbind succeeds, LDL returns a DL_OK_ACK(7) and sets the state of the stream to DL_UNBOUND. If it fails then a DL_ERROR_ACK(7) is sent upstream. DL_SUBS_BIND_REQA DL_SUBS_BIND_REQ(7) causes LDL to add an additional SAP to the list of SAPs associated with the stream. The stream must be in the DL_IDLE state for this primitive to succeed. If the subs-bind succeeds, LDL returns a DL_SUBS_BIND_ACK. If it fails then a DL_ERROR_ACK is sent upstream. DL_SUBS_UNBIND_REQA DL_SUBS_UNBIND_REQ(7) causes LDL to remove the given SAP from the list of SAPs associated with the stream. The stream must be in the DL_IDLE state for this primitive to succeed. If the subs-unbind succeeds, LDL returns a DL_OK_ACK(7). If it fails then a DL_ERROR_ACK(7) is sent upstream. The state of the stream is left in the DL_IDLE state in either case. DL_PROMISCON_REQThe intent of the DL_PROMISCON_REQ(7) primitive is to set the Linux network device into the so-called "promiscuous" mode of operation. However, it is unimplemented. DL_PROMISCOFF_REQThe DL_PROMISCOFF_REQ(7) primitive would undo the effect of a DL_PROMISCON_REQ(7). However, it is unimplemented. DL_UNITDATA_REQThe DL_UNITDATA_REQ(7) primitive is used to send data to the Linux network driver. The destination address is used to set the physical address of the receiver of the data. The stream must be in the DL_IDLE state for this primitive to succeed. If the stream is operating in raw mode then the address field is ignored and it is assumed that the client has completely formatted the frame for transmission by the Linux network driver. If this primitive fails, a DL_UDERROR_IND(7) is sent upstream. There is no response in the case of success. M_DATAM_DATA(9) is an acceptable alternative to a DL_UNITDATA_REQ(7) for sending data on a raw-mode stream. If the data transmission operation fails, a DL_UDERROR_IND(7) is sent upstream. There is no response in the case of success. For data received from the Linux network driver, LDL forwards a copy of the received data in a DL_UNITDATA_IND(7) DLPI message to each client whose stream is attached to the particular network driver and who has a SAP bound to the stream that matches the SAP information in the received frame. Note that for non-raw frame operations that the MAC header is stripped from the received frame prior to forwarding it to the client. The address of the sender is retained in the address field of the DL_UNITDATA_IND(7) primitive. DEVICES
SEE ALSOldlconfig(8), ldltest(8), dlpi(7), streamio(7), DL_ATTACH_REQ(7), DL_INFO_REQ(7), DL_PHYS_ADDR_REQ(7), DL_PHYS_ADDR_ACK(7), DL_ERROR_ACK(7), DL_ATTACH_REQ(7), DL_OK_ACK(7), DL_DETACH_REQ(7), DL_BIND_REQ(7), DL_UNBIND_REQ(7), DL_SUBS_BIND_REQ(7), DL_PROMISCON_REQ(7), DL_PROMISCOFF_REQ(7), DL_UNITDATA_REQ(7), DL_UDERROR_IND(7), DL_UNITDATA_IND(7), M_DATA(9). BUGSldl has no known bugs. As this driver is largely untested, there may be unknown bugs. Report bugs to <bugs@openss7.org>. COMPATIBILITYldl is compatible with the driver of the same name from the GCOM LiS-2.18.0 release. CONFORMANCEHISTORYMost of the devices and modules here appeared in earlier releases of LiS. REFERENCES
TRADEMARKS
Other trademarks are the property of their respective owners. IDENTIFICATION
Copyright©1997-2008OpenSS7 Corp.
All Rights Reserved.
Index
This document was created by man2html, using the manual pages. Time: 13:51:28 GMT, December 12, 2024 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Last modified: Sun, 05 Mar 2006 08:34:13 GMT Copyright © 2014 OpenSS7 Corporation All Rights Reserved. |