libosmoisdn 1.13.1.1-afb4 Osmocom ISDN library

Data Fields
lapd_datalink Struct Reference
LAPD implementation common part

LAPD datalink. More...

`#include <lapd_core.h>`

## Data Fields
int(* | send_dlsap )(struct osmo_dlsap_prim *dp, struct lapd_msg_ctx *lctx)
int(* | send_ph_data_req )(struct lapd_msg_ctx *lctx, struct msgb *msg)
int(* | update_pending_frames )(struct lapd_msg_ctx *lctx)
struct {
struct lapd_cr_ent loc2rem
| filled-in once we set the lapd_mode above More...
struct lapd_cr_ent rem2loc
} | cr
enum lapd_mode | mode
| current mode of link More...
unsigned int | lapd_flags
| lapd_flags to change processing More...
int | use_sabme
| use SABME instead of SABM More...
int | reestablish
| enable reestablish support More...
int | n200
int | n200_est_rel
| number of retranmissions More...
struct lapd_msg_ctx | lctx
| LAPD context. More...
int | maxf
| maximum frame size (after defragmentation) More...
uint8_t | k
| maximum number of unacknowledged frames More...
uint8_t | v_range
| range of sequence numbers More...
uint8_t | v_send
| seq nr of next I frame to be transmitted More...
uint8_t | v_ack
| last frame ACKed by peer More...
uint8_t | v_recv
| seq nr of next I frame expected to be received More...
uint32_t | state
| LAPD state (lapd_state) More...
int | seq_err_cond
| condition of sequence error More...
uint8_t | own_busy
| receiver busy on our side More...
uint8_t | peer_busy
| receiver busy on remote side More...
int | t200_sec
int | t200_usec
| retry timer (default 1 sec) More...
int | t203_sec
int | t203_usec
| retry timer (default 10 secs) More...
enum lapd_t200_rts | t200_rts
| state of T200 in RTS mode More...
struct osmo_timer_list | t200
| T200 timer. More...
struct osmo_timer_list | t203
| T203 timer. More...
uint8_t | retrans_ctr
| re-transmission counter More...
struct llist_head | tx_queue
| frames to L1 More...
struct llist_head | send_queue
| frames from L3 More...
struct msgb * | send_buffer
| current frame transmitting More...
int | send_out
| how much was sent from send_buffer More...
struct lapd_history * | tx_hist
| tx history structure array More...
uint8_t | range_hist
| range of history buffer 2..2^n More...
struct msgb * | rcv_buffer
| buffer to assemble the received message More...
struct msgb * | cont_res
| buffer to store content resolution data on network side, to detect multiple phones on same channel More...
char * | name
| user-provided name More...

## Detailed Description

LAPD datalink.

## Field Documentation

## ◆ cont_res

struct msgb* lapd_datalink::cont_res

buffer to store content resolution data on network side, to detect multiple phones on same channel

Referenced by lapd_dl_newstate(), and lapd_rx_u_sabm().

## ◆

struct { ... } lapd_datalink::cr

Referenced by lapd_est_req(), lapd_rel_req(), lapd_res_req(), lapd_rx_i(), lapd_rx_s(), lapd_rx_u_disc(), lapd_rx_u_dm(), lapd_rx_u_sabm(), lapd_rx_u_ua(), lapd_rx_u_ui(), lapd_send_dm(), lapd_send_i(), lapd_send_rej(), lapd_send_resend(), lapd_send_rnr(), lapd_send_rr(), lapd_send_ua(), lapd_set_mode(), lapd_t200_cb(), and lapd_udata_req().

## ◆ k

uint8_t lapd_datalink::k

maximum number of unacknowledged frames

Referenced by lapd_dl_init2(), and lapd_send_i().

## ◆ lapd_flags

unsigned int lapd_datalink::lapd_flags

lapd_flags to change processing

Referenced by lapd_dl_set_flags(), lapd_is_t200_started(), lapd_rx_i(), lapd_send_i(), lapd_start_t200(), lapd_stop_t200(), and lapd_t200_timeout().

## ◆ lctx

struct lapd_msg_ctx lapd_datalink::lctx

LAPD context.

Referenced by lapd_acknowledge(), lapd_data_req(), lapd_est_req(), lapd_ph_data_ind(), lapd_ph_rts_ind(), lapd_recv_dlsap(), lapd_reestablish(), lapd_rel_req(), lapd_rel_req_idle(), lapd_res_req(), lapd_rx_i(), lapd_rx_s(), lapd_rx_u(), lapd_rx_u_disc(), lapd_rx_u_dm(), lapd_rx_u_frmr(), lapd_rx_u_sabm(), lapd_rx_u_ua(), lapd_rx_u_ui(), lapd_send_dm(), lapd_send_i(), lapd_send_rej(), lapd_send_resend(), lapd_send_rnr(), lapd_send_rr(), lapd_send_ua(), lapd_susp_req(), lapd_t200_cb(), lapd_t203_cb(), lapd_udata_req(), mdl_error(), and send_dl_l3().

## ◆ loc2rem

struct lapd_cr_ent lapd_datalink::loc2rem

filled-in once we set the lapd_mode above

Referenced by lapd_est_req(), lapd_rel_req(), lapd_res_req(), lapd_send_dm(), lapd_send_i(), lapd_send_rej(), lapd_send_resend(), lapd_send_rnr(), lapd_send_rr(), lapd_send_ua(), lapd_set_mode(), lapd_t200_cb(), and lapd_udata_req().

## ◆ maxf

int lapd_datalink::maxf

maximum frame size (after defragmentation)

Referenced by lapd_dl_init2(), and lapd_rx_i().

## ◆ mode

enum lapd_mode lapd_datalink::mode

current mode of link

Referenced by lapd_rx_u_sabm(), and lapd_set_mode().

## ◆ n200

int lapd_datalink::n200

Referenced by lapd_dl_init2(), and lapd_t200_cb().

## ◆ n200_est_rel

int lapd_datalink::n200_est_rel

number of retranmissions

Referenced by lapd_dl_init2(), and lapd_t200_cb().

## ◆ name

char* lapd_datalink::name

user-provided name

Referenced by lapd_dl_exit(), lapd_dl_init2(), and lapd_dl_set_name().

## ◆ own_busy

uint8_t lapd_datalink::own_busy

receiver busy on our side

Referenced by lapd_est_req(), lapd_rel_req(), lapd_res_req(), lapd_rx_i(), lapd_rx_s(), lapd_t200_cb(), and lapd_t203_cb().

## ◆ peer_busy

uint8_t lapd_datalink::peer_busy

receiver busy on remote side

Referenced by lapd_est_req(), lapd_rel_req(), lapd_res_req(), lapd_rx_s(), and lapd_send_i().

## ◆ range_hist

uint8_t lapd_datalink::range_hist

range of history buffer 2..2^n

Referenced by lapd_acknowledge(), lapd_dl_flush_hist(), lapd_dl_init2(), lapd_send_i(), lapd_send_resend(), and lapd_t200_cb().

## ◆ rcv_buffer

struct msgb* lapd_datalink::rcv_buffer

buffer to assemble the received message

Referenced by lapd_dl_reset(), lapd_est_req(), lapd_res_req(), and lapd_rx_i().

## ◆ reestablish

int lapd_datalink::reestablish

enable reestablish support

Referenced by lapd_dl_init2(), lapd_rx_u_dm(), lapd_rx_u_frmr(), and lapd_t200_cb().

## ◆ rem2loc

struct lapd_cr_ent lapd_datalink::rem2loc

Referenced by lapd_rx_i(), lapd_rx_s(), lapd_rx_u_disc(), lapd_rx_u_dm(), lapd_rx_u_sabm(), lapd_rx_u_ua(), lapd_rx_u_ui(), and lapd_set_mode().

## ◆ retrans_ctr

uint8_t lapd_datalink::retrans_ctr

re-transmission counter

Referenced by lapd_est_req(), lapd_rel_req(), lapd_res_req(), lapd_t200_cb(), and lapd_t203_cb().

## ◆ send_buffer

struct msgb* lapd_datalink::send_buffer

current frame transmitting

Referenced by lapd_dl_flush_send(), lapd_res_req(), lapd_send_i(), and lapd_susp_req().

## ◆ send_dlsap

int(* lapd_datalink::send_dlsap) (struct osmo_dlsap_prim *dp, struct lapd_msg_ctx *lctx)

Referenced by mdl_error(), and send_dl_l3().

## ◆ send_out

int lapd_datalink::send_out

how much was sent from send_buffer

Referenced by lapd_res_req(), and lapd_send_i().

## ◆ send_ph_data_req

int(* lapd_datalink::send_ph_data_req) (struct lapd_msg_ctx *lctx, struct msgb *msg)

Referenced by lapd_est_req(), lapd_rel_req(), lapd_res_req(), lapd_send_dm(), lapd_send_i(), lapd_send_rej(), lapd_send_resend(), lapd_send_rnr(), lapd_send_rr(), lapd_send_ua(), lapd_t200_cb(), and lapd_udata_req().

## ◆ send_queue

struct llist_head lapd_datalink::send_queue

frames from L3

Referenced by lapd_data_req(), lapd_dl_flush_send(), lapd_dl_init2(), lapd_send_i(), and lapd_susp_req().

## ◆ seq_err_cond

int lapd_datalink::seq_err_cond

condition of sequence error

Referenced by lapd_rx_i(), lapd_rx_s(), lapd_rx_u_disc(), lapd_rx_u_sabm(), and lapd_t200_cb().

## ◆ state

uint32_t lapd_datalink::state

LAPD state (lapd_state)

Referenced by lapd_acknowledge(), lapd_dl_newstate(), lapd_dl_reset(), lapd_ph_rts_ind(), lapd_recv_dlsap(), lapd_rel_req(), lapd_rx_i(), lapd_rx_s(), lapd_rx_u_disc(), lapd_rx_u_dm(), lapd_rx_u_sabm(), lapd_rx_u_ua(), lapd_send_i(), lapd_send_resend(), lapd_t200_cb(), lapd_t203_cb(), and mdl_error().

## ◆ t200

struct osmo_timer_list lapd_datalink::t200

T200 timer.

Referenced by lapd_dl_init2(), lapd_is_t200_started(), lapd_start_t200(), and lapd_stop_t200().

## ◆ t200_rts

enum lapd_t200_rts lapd_datalink::t200_rts

state of T200 in RTS mode

Referenced by lapd_is_t200_started(), lapd_ph_rts_ind(), lapd_start_t200(), lapd_stop_t200(), and lapd_t200_timeout().

## ◆ t200_sec

int lapd_datalink::t200_sec

Referenced by lapd_dl_init2(), and lapd_start_t200().

## ◆ t200_usec

int lapd_datalink::t200_usec

retry timer (default 1 sec)

Referenced by lapd_dl_init2(), and lapd_start_t200().

## ◆ t203

struct osmo_timer_list lapd_datalink::t203

T203 timer.

Referenced by lapd_dl_init2(), lapd_start_t203(), and lapd_stop_t203().

## ◆ t203_sec

int lapd_datalink::t203_sec

Referenced by lapd_acknowledge(), lapd_dl_init2(), lapd_dl_newstate(), and lapd_start_t203().

## ◆ t203_usec

int lapd_datalink::t203_usec

retry timer (default 10 secs)

Referenced by lapd_acknowledge(), lapd_dl_init2(), lapd_dl_newstate(), and lapd_start_t203().

## ◆ tx_hist

struct lapd_history* lapd_datalink::tx_hist

tx history structure array

Referenced by lapd_acknowledge(), lapd_dl_exit(), lapd_dl_flush_hist(), lapd_dl_init2(), lapd_rx_u_sabm(), lapd_rx_u_ua(), lapd_send_i(), lapd_send_resend(), lapd_t200_cb(), and msg_to_tx_hist0().

## ◆ tx_queue

struct llist_head lapd_datalink::tx_queue

frames to L1

Referenced by lapd_dl_flush_tx_queue(), lapd_dl_init2(), lapd_ph_rts_ind(), and lapd_send_i().

## ◆ update_pending_frames

int(* lapd_datalink::update_pending_frames) (struct lapd_msg_ctx *lctx)

Referenced by lapd_rx_i().

## ◆ use_sabme

int lapd_datalink::use_sabme

use SABME instead of SABM

Referenced by lapd_est_req(), lapd_res_req(), and lapd_send_resend().

## ◆ v_ack

uint8_t lapd_datalink::v_ack

last frame ACKed by peer

Referenced by lapd_acknowledge(), lapd_rx_s(), lapd_rx_u_sabm(), lapd_rx_u_ua(), and lapd_send_i().

## ◆ v_range

uint8_t lapd_datalink::v_range

range of sequence numbers

Referenced by lapd_acknowledge(), lapd_dl_init2(), lapd_rx_i(), lapd_send_i(), and lapd_t200_cb().

## ◆ v_recv

uint8_t lapd_datalink::v_recv

seq nr of next I frame expected to be received

Referenced by lapd_rx_i(), lapd_rx_u_sabm(), lapd_rx_u_ua(), lapd_send_i(), lapd_send_rej(), lapd_send_rnr(), lapd_send_rr(), and lapd_t200_cb().

## ◆ v_send

uint8_t lapd_datalink::v_send

seq nr of next I frame to be transmitted

Referenced by lapd_acknowledge(), lapd_est_req(), lapd_rel_req(), lapd_res_req(), lapd_rx_s(), lapd_rx_u_sabm(), lapd_rx_u_ua(), lapd_send_i(), lapd_send_resend(), and lapd_t200_cb().

The documentation for this struct was generated from the following file:

- include/osmocom/isdn/lapd_core.h