βsphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget*/translations/zh_CN/networking/lapb-modulemodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/zh_TW/networking/lapb-modulemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/it_IT/networking/lapb-modulemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ja_JP/networking/lapb-modulemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ko_KR/networking/lapb-modulemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/sp_SP/networking/lapb-modulemodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhD/var/lib/git/docbuild/linux/Documentation/networking/lapb-module.rsthKubhsection)}(hhh](htitle)}(hThe Linux LAPB Module Interfaceh]hThe Linux LAPB Module Interface}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(h Version 1.3h]h Version 1.3}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hJonathan Naylor 29.12.96h]hJonathan Naylor 29.12.96}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hJChanged (Henner Eisen, 2000-10-29): int return value for data_indication()h]hJChanged (Henner Eisen, 2000-10-29): int return value for data_indication()}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hXThe LAPB module will be a separately compiled module for use by any parts of the Linux operating system that require a LAPB service. This document defines the interfaces to, and the services provided by this module. The term module in this context does not imply that the LAPB module is a separately loadable module, although it may be. The term module is used in its more standard meaning.h]hXThe LAPB module will be a separately compiled module for use by any parts of the Linux operating system that require a LAPB service. This document defines the interfaces to, and the services provided by this module. The term module in this context does not imply that the LAPB module is a separately loadable module, although it may be. The term module is used in its more standard meaning.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hThe interface to the LAPB module consists of functions to the module, callbacks from the module to indicate important state changes, and structures for getting and setting information about the module.h]hThe interface to the LAPB module consists of functions to the module, callbacks from the module to indicate important state changes, and structures for getting and setting information about the module.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(h Structuresh]h Structures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hProbably the most important structure is the skbuff structure for holding received and transmitted data, however it is beyond the scope of this document.h]hProbably the most important structure is the skbuff structure for holding received and transmitted data, however it is beyond the scope of this document.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hThe two LAPB specific structures are the LAPB initialisation structure and the LAPB parameter structure. These will be defined in a standard header file, . The header file is internal to the LAPB module and is not for use.h]hThe two LAPB specific structures are the LAPB initialisation structure and the LAPB parameter structure. These will be defined in a standard header file, . The header file is internal to the LAPB module and is not for use.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h] structuresah ]h"] structuresah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hLAPB Initialisation Structureh]hLAPB Initialisation Structure}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhhhhhK%ubh)}(hThis structure is used only once, in the call to lapb_register (see below). It contains information about the device driver that requires the services of the LAPB module::h]hThis structure is used only once, in the call to lapb_register (see below). It contains information about the device driver that requires the services of the LAPB module:}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hjFhhubh literal_block)}(hXstruct 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); };h]hXstruct 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); };}hjgsbah}(h]h ]h"]h$]h&]hhuh1jehhhK+hjFhhubh)}(hEach 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.h]hEach 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.}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK4hjFhhubeh}(h]lapb-initialisation-structureah ]h"]lapb initialisation structureah$]h&]uh1hhhhhhhhK%ubh)}(hhh](h)}(hLAPB Parameter Structureh]hLAPB Parameter Structure}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK;ubh)}(hThis 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::h]hThis 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:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK=hjhhubjf)}(hXstruct 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; };h]hXstruct 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; };}hjsbah}(h]h ]h"]h$]h&]hhuh1jehhhKAhjhhubh)}(hXT1 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.h]hXT1 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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhjhhubh)}(hxThe mode variable is a bit field used for setting (at present) three values. The bit fields have the following meanings:h]hxThe mode variable is a bit field used for setting (at present) three values. The bit fields have the following meanings:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThjhhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK1uh1jhjubhthead)}(hhh]hrow)}(hhh](hentry)}(hhh]h)}(hBith]hBit}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKXhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hMeaningh]hMeaning}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKXhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubhtbody)}(hhh](j)}(hhh](j)}(hhh]h)}(h0h]h0}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKZhjBubah}(h]h ]h"]h$]h&]uh1jhj?ubj)}(hhh]h)}(h1LAPB operation (0=LAPB_STANDARD 1=LAPB_EXTENDED).h]h1LAPB operation (0=LAPB_STANDARD 1=LAPB_EXTENDED).}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKZhjYubah}(h]h ]h"]h$]h&]uh1jhj?ubeh}(h]h ]h"]h$]h&]uh1jhj<ubj)}(hhh](j)}(hhh]h)}(h1h]h1}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK[hjyubah}(h]h ]h"]h$]h&]uh1jhjvubj)}(hhh]h)}(h)[SM]LP operation (0=LAPB_SLP 1=LAPB=MLP).h]h)[SM]LP operation (0=LAPB_SLP 1=LAPB=MLP).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK[hjubah}(h]h ]h"]h$]h&]uh1jhjvubeh}(h]h ]h"]h$]h&]uh1jhj<ubj)}(hhh](j)}(hhh]h)}(h2h]h2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK\hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h)DTE/DCE operation (0=LAPB_DTE 1=LAPB_DCE)h]h)DTE/DCE operation (0=LAPB_DTE 1=LAPB_DCE)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK\hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj<ubj)}(hhh](j)}(hhh]h)}(h3-31h]h3-31}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK]hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hReserved, must be 0.h]hReserved, must be 0.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK]hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj<ubeh}(h]h ]h"]h$]h&]uh1j:hjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubh)}(hX?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.h]hX?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.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK`hjhhubeh}(h]lapb-parameter-structureah ]h"]lapb parameter structureah$]h&]uh1hhhhhhhhK;ubh)}(hhh](h)}(h Functionsh]h Functions}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDhhhhhKkubh)}(h;The LAPB module provides a number of function entry points.h]h;The LAPB module provides a number of function entry points.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhjDhhubjf)}(hhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj;ubah}(h]h ]h"]h$]h&]uh1jhj8ubj)}(hhh]h)}(hInvalid/unknown LAPB token.h]hInvalid/unknown LAPB token.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjRubah}(h]h ]h"]h$]h&]uh1jhj8ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h LAPB_INVALUEh]h LAPB_INVALUE}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjrubah}(h]h ]h"]h$]h&]uh1jhjoubj)}(hhh]h)}(h1One of the values was out of its allowable range.h]h1One of the values was out of its allowable range.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjoubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j:hjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubah}(h]h ]h"]h$]h&]uh1jhjDhhhhhNubjf)}(h&int lapb_connect_request(void *token);h]h&int lapb_connect_request(void *token);}hjsbah}(h]h ]h"]h$]h&]hhuh1jehhhKhjDhhubh)}(hUInitiate a connect using the current parameter settings. The valid return values are:h]hUInitiate a connect using the current parameter settings. The valid return values are:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjDhhubj)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK!uh1jhjubj;)}(hhh](j)}(hhh](j)}(hhh]h)}(hLAPB_OKh]hLAPB_OK}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hLAPB is starting to connect.h]hLAPB is starting to connect.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h LAPB_BADTOKENh]h LAPB_BADTOKEN}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj,ubah}(h]h ]h"]h$]h&]uh1jhj)ubj)}(hhh]h)}(hInvalid/unknown LAPB token.h]hInvalid/unknown LAPB token.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjCubah}(h]h ]h"]h$]h&]uh1jhj)ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hLAPB_CONNECTEDh]hLAPB_CONNECTED}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjcubah}(h]h ]h"]h$]h&]uh1jhj`ubj)}(hhh]h)}(h!LAPB module is already connected.h]h!LAPB module is already connected.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjzubah}(h]h ]h"]h$]h&]uh1jhj`ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j:hjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubah}(h]h ]h"]h$]h&]uh1jhjDhhhhhNubjf)}(h)int lapb_disconnect_request(void *token);h]h)int lapb_disconnect_request(void *token);}hjsbah}(h]h ]h"]h$]h&]hhuh1jehhhKhjDhhubh)}(h3Initiate a disconnect. The valid return values are:h]h3Initiate a disconnect. The valid return values are:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjDhhubj)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj;)}(hhh](j)}(hhh](j)}(hhh]h)}(hLAPB_OKh]hLAPB_OK}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hLAPB is starting to disconnect.h]hLAPB is starting to disconnect.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h LAPB_BADTOKENh]h LAPB_BADTOKEN}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hInvalid/unknown LAPB token.h]hInvalid/unknown LAPB token.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj4ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hLAPB_NOTCONNECTEDh]hLAPB_NOTCONNECTED}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjTubah}(h]h ]h"]h$]h&]uh1jhjQubj)}(hhh]h)}(hLAPB module is not connected.h]hLAPB module is not connected.}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjkubah}(h]h ]h"]h$]h&]uh1jhjQubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j:hjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubah}(h]h ]h"]h$]h&]uh1jhjDhhhhhNubjf)}(h8int lapb_data_request(void *token, struct sk_buff *skb);h]h8int lapb_data_request(void *token, struct sk_buff *skb);}hjsbah}(h]h ]h"]h$]h&]hhuh1jehhhKhjDhhubh)}(hQueue data with the LAPB module for transmitting over the link. If the call is successful then the skbuff is owned by the LAPB module and may not be used by the device driver again. The valid return values are:h]hQueue data with the LAPB module for transmitting over the link. If the call is successful then the skbuff is owned by the LAPB module and may not be used by the device driver again. The valid return values are:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjDhhubj)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj;)}(hhh](j)}(hhh](j)}(hhh]h)}(hLAPB_OKh]hLAPB_OK}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hLAPB has accepted the data.h]hLAPB has accepted the data.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h LAPB_BADTOKENh]h LAPB_BADTOKEN}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hInvalid/unknown LAPB token.h]hInvalid/unknown LAPB token.}(hj( hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj% ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hLAPB_NOTCONNECTEDh]hLAPB_NOTCONNECTED}(hjH hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjE ubah}(h]h ]h"]h$]h&]uh1jhjB ubj)}(hhh]h)}(hLAPB module is not connected.h]hLAPB module is not connected.}(hj_ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj\ ubah}(h]h ]h"]h$]h&]uh1jhjB ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j:hjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubah}(h]h ]h"]h$]h&]uh1jhjDhhhhhNubjf)}(h9int lapb_data_received(void *token, struct sk_buff *skb);h]h9int lapb_data_received(void *token, struct sk_buff *skb);}hj sbah}(h]h ]h"]h$]h&]hhuh1jehhhKhjDhhubh)}(hXLQueue data with the LAPB module which has been received from the device. It is expected that the data passed to the LAPB module has skb->data pointing to the beginning of the LAPB data. If the call is successful then the skbuff is owned by the LAPB module and may not be used by the device driver again. The valid return values are:h]hXLQueue data with the LAPB module which has been received from the device. It is expected that the data passed to the LAPB module has skb->data pointing to the beginning of the LAPB data. If the call is successful then the skbuff is owned by the LAPB module and may not be used by the device driver again. The valid return values are:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjDhhubj)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jhj ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj ubj;)}(hhh](j)}(hhh](j)}(hhh]h)}(hLAPB_OKh]hLAPB_OK}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hLAPB has accepted the data.h]hLAPB has accepted the data.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(h LAPB_BADTOKENh]h LAPB_BADTOKEN}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hInvalid/unknown LAPB token.h]hInvalid/unknown LAPB token.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j:hj ubeh}(h]h ]h"]h$]h&]colsKuh1jhj ubah}(h]h ]h"]h$]h&]uh1jhjDhhhhhNubeh}(h] functionsah ]h"] functionsah$]h&]uh1hhhhhhhhKkubh)}(hhh](h)}(h Callbacksh]h Callbacks}(hjQ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjN hhhhhKubh)}(hThese callbacks are functions provided by the device driver for the LAPB module to call when an event occurs. They are registered with the LAPB module with lapb_register (see above) in the structure lapb_register_struct (see above).h]hThese callbacks are functions provided by the device driver for the LAPB module to call when an event occurs. They are registered with the LAPB module with lapb_register (see above) in the structure lapb_register_struct (see above).}(hj_ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjN hhubjf)}(h6void (*connect_confirmation)(void *token, int reason);h]h6void (*connect_confirmation)(void *token, int reason);}hjm sbah}(h]h ]h"]h$]h&]hhuh1jehhhKhjN hhubh)}(hThis is called by the LAPB module when a connection is established after being requested by a call to lapb_connect_request (see above). The reason is always LAPB_OK.h]hThis is called by the LAPB module when a connection is established after being requested by a call to lapb_connect_request (see above). The reason is always LAPB_OK.}(hj{ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjN hhubjf)}(h4void (*connect_indication)(void *token, int reason);h]h4void (*connect_indication)(void *token, int reason);}hj sbah}(h]h ]h"]h$]h&]hhuh1jehhhKhjN hhubh)}(h{This is called by the LAPB module when the link is established by the remote system. The value of reason is always LAPB_OK.h]h{This is called by the LAPB module when the link is established by the remote system. The value of reason is always LAPB_OK.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjN hhubjf)}(h9void (*disconnect_confirmation)(void *token, int reason);h]h9void (*disconnect_confirmation)(void *token, int reason);}hj sbah}(h]h ]h"]h$]h&]hhuh1jehhhKhjN hhubh)}(hXThis is called by the LAPB module when an event occurs after the device driver has called lapb_disconnect_request (see above). The reason indicates what has happened. In all cases the LAPB link can be regarded as being terminated. The values for reason are:h]hXThis is called by the LAPB module when an event occurs after the device driver has called lapb_disconnect_request (see above). The reason indicates what has happened. In all cases the LAPB link can be regarded as being terminated. The values for reason are:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjN hhubj)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK4uh1jhj ubj;)}(hhh](j)}(hhh](j)}(hhh]h)}(hLAPB_OKh]hLAPB_OK}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h&The LAPB link was terminated normally.h]h&The LAPB link was terminated normally.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(hLAPB_NOTCONNECTEDh]hLAPB_NOTCONNECTED}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h$The remote system was not connected.h]h$The remote system was not connected.}(hj2 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj/ ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(h LAPB_TIMEDOUTh]h LAPB_TIMEDOUT}(hjR hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjO ubah}(h]h ]h"]h$]h&]uh1jhjL ubj)}(hhh]h)}(hdata pointer will be pointing to the first byte of data after the LAPB header.h]hX_This is called by the LAPB module when data has been received from the remote system that should be passed onto the next layer in the protocol stack. The skbuff becomes the property of the device driver and the LAPB module will not perform any more actions on it. The skb->data pointer will be pointing to the first byte of data after the LAPB header.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjN hhubh)}(hThis method should return NET_RX_DROP (as defined in the header file include/linux/netdevice.h) if and only if the frame was dropped before it could be delivered to the upper layer.h]hThis method should return NET_RX_DROP (as defined in the header file include/linux/netdevice.h) if and only if the frame was dropped before it could be delivered to the upper layer.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hjN hhubjf)}(h8void (*data_transmit)(void *token, struct sk_buff *skb);h]h8void (*data_transmit)(void *token, struct sk_buff *skb);}hj sbah}(h]h ]h"]h$]h&]hhuh1jehhhM,hjN hhubh)}(hX*This is called by the LAPB module when data is to be transmitted to the remote system by the device driver. The skbuff becomes the property of the device driver and the LAPB module will not perform any more actions on it. The skb->data pointer will be pointing to the first byte of the LAPB header.h]hX*This is called by the LAPB module when data is to be transmitted to the remote system by the device driver. The skbuff becomes the property of the device driver and the LAPB module will not perform any more actions on it. The skb->data pointer will be pointing to the first byte of the LAPB header.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM.hjN hhubeh}(h] callbacksah ]h"] callbacksah$]h&]uh1hhhhhhhhKubeh}(h]the-linux-lapb-module-interfaceah ]h"]the linux lapb module interfaceah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj6 error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j j jCj@jjjAj>jK jH j j u nametypes}(j jCjjAjK j uh}(j hj@jjjFj>jjH jDj jN u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.