Links

GitHub

Open HUB

Quick Links

Download

STREAMS

SIGTRAN

SS7

Hardware

SCTP

Related

Package

Manual

Manual Pages

References

Conformance

Performance

Design

Status

FAQ

OS

LDL

strinet

strsctp

DDI/DKI

STREAMS

Kernel

XTI

SOCKSYS

Sockets

TPI

NPI

DLPI

CDI

NLI

LLI

WAN

Man Pages

Applications

SS7 Stack

ISDN Stack

SIGTRAN Stack

VoIP Stack

MG Stack

SS7/ISDN Devices

IP Transport

Embedded Systems

OS

Documentation

FAQ

SIGTRAN

Design

Conformance

Performance

References

Man Pages

Manuals

Papers

Home

Overview

Status

Documentation

Resources

About

News

Linux Data Link (LDL)

Description: OpenSS7 Project Manual Pages Operating System


LDL

Section: OpenSS7 XNS Networking Devices (4)
Updated: 2008-10-31
Index Return to Main Contents

NAME

ldl - Linux Data Link (LDL) driver

SYNOPSIS

#include <unistd.h>
#include <stropts.h>
#include <sys/dlpi.h>
#include <sys/ldl.h>

int fd = open(/dev/ldl, oflag);

DESCRIPTION


The LDL driver provides an interface between STREAMS drivers and Linux network drivers. It registers itself as a client of a Linux network driver and then presents a DLPI Provider interface[1] to STREAMS drivers, which may be pushed or linked above LDL.

IOCTLS

The 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.


ic_cmd valueArgument Structure

Description

LDL_SETFLAGSIN/OUT: struct ldl_flags_ioctl

Used to set internal option flags for the open stream. See ldl.c source for details.

LDL_FINDPPAIN: char[] OUT: long

The agrument is an ASCII string representing a network device mnemonic such as eth0. If such a device can be found then the argument is overwritten with a long word whose numerical value can be used as the dl_ppa field of a DL_ATTACH_REQ(7).

LDL_GETNAMEIN: None OUT: char[]

This ioctl returns the ASCII string form of the network device mnemonic for the stream.

USAGE

The 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_REQ

A 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_REQ

A 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_REQ

The 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_REQ

A 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_REQ

A 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_REQ

A 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_REQ

A 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_REQ

A 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_REQ

The 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_REQ

The DL_PROMISCOFF_REQ(7) primitive would undo the effect of a DL_PROMISCON_REQ(7). However, it is unimplemented.

DL_UNITDATA_REQ

The 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_DATA

M_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

/dev/ldl
the ldl device
/dev/streams/ldl
the ldl device
/dev/streams/clone/ldl
the clone ldl device

SEE ALSO

ldlconfig(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).

BUGS

ldl has no known bugs. As this driver is largely untested, there may be unknown bugs. Report bugs to <bugs@openss7.org>.

COMPATIBILITY

ldl is compatible with the driver of the same name from the GCOM LiS-2.18.0 release.

CONFORMANCE

DLPI[1].

HISTORY

Most of the devices and modules here appeared in earlier releases of LiS.

REFERENCES

[1]
DLPI, Data Link Provider Interface (DLPI) Specification, Revision 2.0.0, Draft 2, August 20, 1991, (Parsippany, New Jersey), UNIX. International,Inc., UNIX International Press. <http://www.openss7.org/doc/dlpi.pdf>

TRADEMARKS

OpenSS7tm
is a trademark of OpenSS7 Corporation.
Linux®
is a registered trademark of Linus Torvalds.
UNIX®
is a registered trademark of The Open Group.
Solaris®
is a registered trademark of Sun Microsystems.

Other trademarks are the property of their respective owners.

IDENTIFICATION


OpenSS7 XNS Networking: Package strxns version 0.9.2.7 released 2008-10-31.

Copyright©1997-2008OpenSS7 Corp. All Rights Reserved.
(See roff source for permission notice.)



Index

NAME
SYNOPSIS
DESCRIPTION
IOCTLS
USAGE
DL_INFO_REQ
DL_PHYS_ADDR_REQ
DL_ATTACH_REQ
DL_DETACH_REQ
DL_BIND_REQ
DL_UNBIND_REQ
DL_SUBS_BIND_REQ
DL_SUBS_UNBIND_REQ
DL_PROMISCON_REQ
DL_PROMISCOFF_REQ
DL_UNITDATA_REQ
M_DATA
DEVICES
SEE ALSO
BUGS
COMPATIBILITY
CONFORMANCE
HISTORY
REFERENCES
TRADEMARKS
IDENTIFICATION

This document was created by man2html, using the manual pages.
Time: 04:06:24 GMT, November 19, 2024
Last modified: Sun, 05 Mar 2006 08:34:13 GMT  
Copyright © 2014 OpenSS7 Corporation All Rights Reserved.