Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GPL-2.0
0002 
0003 ============================-
0004 X.25 Device Driver Interface
0005 ============================-
0006 
0007 Version 1.1
0008 
0009                            Jonathan Naylor 26.12.96
0010 
0011 This is a description of the messages to be passed between the X.25 Packet
0012 Layer and the X.25 device driver. They are designed to allow for the easy
0013 setting of the LAPB mode from within the Packet Layer.
0014 
0015 The X.25 device driver will be coded normally as per the Linux device driver
0016 standards. Most X.25 device drivers will be moderately similar to the
0017 already existing Ethernet device drivers. However unlike those drivers, the
0018 X.25 device driver has a state associated with it, and this information
0019 needs to be passed to and from the Packet Layer for proper operation.
0020 
0021 All messages are held in sk_buff's just like real data to be transmitted
0022 over the LAPB link. The first byte of the skbuff indicates the meaning of
0023 the rest of the skbuff, if any more information does exist.
0024 
0025 
0026 Packet Layer to Device Driver
0027 -----------------------------
0028 
0029 First Byte = 0x00 (X25_IFACE_DATA)
0030 
0031 This indicates that the rest of the skbuff contains data to be transmitted
0032 over the LAPB link. The LAPB link should already exist before any data is
0033 passed down.
0034 
0035 First Byte = 0x01 (X25_IFACE_CONNECT)
0036 
0037 Establish the LAPB link. If the link is already established then the connect
0038 confirmation message should be returned as soon as possible.
0039 
0040 First Byte = 0x02 (X25_IFACE_DISCONNECT)
0041 
0042 Terminate the LAPB link. If it is already disconnected then the disconnect
0043 confirmation message should be returned as soon as possible.
0044 
0045 First Byte = 0x03 (X25_IFACE_PARAMS)
0046 
0047 LAPB parameters. To be defined.
0048 
0049 
0050 Device Driver to Packet Layer
0051 -----------------------------
0052 
0053 First Byte = 0x00 (X25_IFACE_DATA)
0054 
0055 This indicates that the rest of the skbuff contains data that has been
0056 received over the LAPB link.
0057 
0058 First Byte = 0x01 (X25_IFACE_CONNECT)
0059 
0060 LAPB link has been established. The same message is used for both a LAPB
0061 link connect_confirmation and a connect_indication.
0062 
0063 First Byte = 0x02 (X25_IFACE_DISCONNECT)
0064 
0065 LAPB link has been terminated. This same message is used for both a LAPB
0066 link disconnect_confirmation and a disconnect_indication.
0067 
0068 First Byte = 0x03 (X25_IFACE_PARAMS)
0069 
0070 LAPB parameters. To be defined.
0071 
0072 
0073 Requirements for the device driver
0074 ----------------------------------
0075 
0076 Packets should not be reordered or dropped when delivering between the
0077 Packet Layer and the device driver.
0078 
0079 To avoid packets from being reordered or dropped when delivering from
0080 the device driver to the Packet Layer, the device driver should not
0081 call "netif_rx" to deliver the received packets. Instead, it should
0082 call "netif_receive_skb_core" from softirq context to deliver them.