Documentation/networking/lapb-module.rst

Source file repositories/reference/linux-study-clean/Documentation/networking/lapb-module.rst

File Facts

System
Linux kernel
Corpus path
Documentation/networking/lapb-module.rst
Extension
.rst
Size
11370 bytes
Lines
306
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

struct lapb_register_struct {
		void (*connect_confirmation)(int token, int reason);
		void (*connect_indication)(int token, int reason);
		void (*disconnect_confirmation)(int token, int reason);
		void (*disconnect_indication)(int token, int reason);
		int  (*data_indication)(int token, struct sk_buff *skb);
		void (*data_transmit)(int token, struct sk_buff *skb);
	};

Each member of this structure corresponds to a function in the device driver
that is called when a particular event in the LAPB module occurs. These will
be described in detail below. If a callback is not required (!!) then a NULL
may be substituted.


LAPB Parameter Structure
------------------------

This structure is used with the lapb_getparms and lapb_setparms functions
(see below). They are used to allow the device driver to get and set the
operational parameters of the LAPB implementation for a given connection::

	struct lapb_parms_struct {
		unsigned int t1;
		unsigned int t1timer;
		unsigned int t2;
		unsigned int t2timer;
		unsigned int n2;
		unsigned int n2count;
		unsigned int window;
		unsigned int state;
		unsigned int mode;
	};

T1 and T2 are protocol timing parameters and are given in units of 100ms. N2
is the maximum number of tries on the link before it is declared a failure.
The window size is the maximum number of outstanding data packets allowed to
be unacknowledged by the remote end, the value of the window is between 1
and 7 for a standard LAPB link, and between 1 and 127 for an extended LAPB
link.

The mode variable is a bit field used for setting (at present) three values.
The bit fields have the following meanings:

======  =================================================
Bit	Meaning
======  =================================================
0	LAPB operation (0=LAPB_STANDARD 1=LAPB_EXTENDED).
1	[SM]LP operation (0=LAPB_SLP 1=LAPB=MLP).
2	DTE/DCE operation (0=LAPB_DTE 1=LAPB_DCE)
3-31	Reserved, must be 0.
======  =================================================

Extended LAPB operation indicates the use of extended sequence numbers and
consequently larger window sizes, the default is standard LAPB operation.
MLP operation is the same as SLP operation except that the addresses used by
LAPB are different to indicate the mode of operation, the default is Single
Link Procedure. The difference between DCE and DTE operation is (i) the
addresses used for commands and responses, and (ii) when the DCE is not
connected, it sends DM without polls set, every T1. The upper case constant
names will be defined in the public LAPB header file.


Functions
---------

The LAPB module provides a number of function entry points.

::

Annotation

Implementation Notes