Merge tag 'libnvdimm-for-6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm...
[linux-2.6-block.git] / Documentation / networking / x25-iface.rst
CommitLineData
883780af
MCC
1.. SPDX-License-Identifier: GPL-2.0
2
883780af 3X.25 Device Driver Interface
77c964da 4============================
883780af
MCC
5
6Version 1.1
1da177e4
LT
7
8 Jonathan Naylor 26.12.96
9
10This is a description of the messages to be passed between the X.25 Packet
11Layer and the X.25 device driver. They are designed to allow for the easy
12setting of the LAPB mode from within the Packet Layer.
13
14The X.25 device driver will be coded normally as per the Linux device driver
15standards. Most X.25 device drivers will be moderately similar to the
16already existing Ethernet device drivers. However unlike those drivers, the
17X.25 device driver has a state associated with it, and this information
18needs to be passed to and from the Packet Layer for proper operation.
19
20All messages are held in sk_buff's just like real data to be transmitted
21over the LAPB link. The first byte of the skbuff indicates the meaning of
22the rest of the skbuff, if any more information does exist.
23
24
25Packet Layer to Device Driver
26-----------------------------
27
e904f0a4 28First Byte = 0x00 (X25_IFACE_DATA)
1da177e4
LT
29
30This indicates that the rest of the skbuff contains data to be transmitted
31over the LAPB link. The LAPB link should already exist before any data is
32passed down.
33
e904f0a4 34First Byte = 0x01 (X25_IFACE_CONNECT)
1da177e4
LT
35
36Establish the LAPB link. If the link is already established then the connect
37confirmation message should be returned as soon as possible.
38
e904f0a4 39First Byte = 0x02 (X25_IFACE_DISCONNECT)
1da177e4
LT
40
41Terminate the LAPB link. If it is already disconnected then the disconnect
42confirmation message should be returned as soon as possible.
43
e904f0a4 44First Byte = 0x03 (X25_IFACE_PARAMS)
1da177e4
LT
45
46LAPB parameters. To be defined.
47
48
49Device Driver to Packet Layer
50-----------------------------
51
e904f0a4 52First Byte = 0x00 (X25_IFACE_DATA)
1da177e4
LT
53
54This indicates that the rest of the skbuff contains data that has been
55received over the LAPB link.
56
e904f0a4 57First Byte = 0x01 (X25_IFACE_CONNECT)
1da177e4
LT
58
59LAPB link has been established. The same message is used for both a LAPB
60link connect_confirmation and a connect_indication.
61
e904f0a4 62First Byte = 0x02 (X25_IFACE_DISCONNECT)
1da177e4
LT
63
64LAPB link has been terminated. This same message is used for both a LAPB
65link disconnect_confirmation and a disconnect_indication.
66
e904f0a4 67First Byte = 0x03 (X25_IFACE_PARAMS)
1da177e4
LT
68
69LAPB parameters. To be defined.
70
71
514e1150
XH
72Requirements for the device driver
73----------------------------------
1da177e4 74
514e1150
XH
75Packets should not be reordered or dropped when delivering between the
76Packet Layer and the device driver.
77
78To avoid packets from being reordered or dropped when delivering from
79the device driver to the Packet Layer, the device driver should not
80call "netif_rx" to deliver the received packets. Instead, it should
81call "netif_receive_skb_core" from softirq context to deliver them.