x25-iface.rst 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. .. SPDX-License-Identifier: GPL-2.0
  2. X.25 Device Driver Interface
  3. ============================
  4. Version 1.1
  5. Jonathan Naylor 26.12.96
  6. This is a description of the messages to be passed between the X.25 Packet
  7. Layer and the X.25 device driver. They are designed to allow for the easy
  8. setting of the LAPB mode from within the Packet Layer.
  9. The X.25 device driver will be coded normally as per the Linux device driver
  10. standards. Most X.25 device drivers will be moderately similar to the
  11. already existing Ethernet device drivers. However unlike those drivers, the
  12. X.25 device driver has a state associated with it, and this information
  13. needs to be passed to and from the Packet Layer for proper operation.
  14. All messages are held in sk_buff's just like real data to be transmitted
  15. over the LAPB link. The first byte of the skbuff indicates the meaning of
  16. the rest of the skbuff, if any more information does exist.
  17. Packet Layer to Device Driver
  18. -----------------------------
  19. First Byte = 0x00 (X25_IFACE_DATA)
  20. This indicates that the rest of the skbuff contains data to be transmitted
  21. over the LAPB link. The LAPB link should already exist before any data is
  22. passed down.
  23. First Byte = 0x01 (X25_IFACE_CONNECT)
  24. Establish the LAPB link. If the link is already established then the connect
  25. confirmation message should be returned as soon as possible.
  26. First Byte = 0x02 (X25_IFACE_DISCONNECT)
  27. Terminate the LAPB link. If it is already disconnected then the disconnect
  28. confirmation message should be returned as soon as possible.
  29. First Byte = 0x03 (X25_IFACE_PARAMS)
  30. LAPB parameters. To be defined.
  31. Device Driver to Packet Layer
  32. -----------------------------
  33. First Byte = 0x00 (X25_IFACE_DATA)
  34. This indicates that the rest of the skbuff contains data that has been
  35. received over the LAPB link.
  36. First Byte = 0x01 (X25_IFACE_CONNECT)
  37. LAPB link has been established. The same message is used for both a LAPB
  38. link connect_confirmation and a connect_indication.
  39. First Byte = 0x02 (X25_IFACE_DISCONNECT)
  40. LAPB link has been terminated. This same message is used for both a LAPB
  41. link disconnect_confirmation and a disconnect_indication.
  42. First Byte = 0x03 (X25_IFACE_PARAMS)
  43. LAPB parameters. To be defined.
  44. Requirements for the device driver
  45. ----------------------------------
  46. Packets should not be reordered or dropped when delivering between the
  47. Packet Layer and the device driver.
  48. To avoid packets from being reordered or dropped when delivering from
  49. the device driver to the Packet Layer, the device driver should not
  50. call "netif_rx" to deliver the received packets. Instead, it should
  51. call "netif_receive_skb_core" from softirq context to deliver them.