8 #include <osmocom/core/timer.h> 9 #include <osmocom/core/msgb.h> 30 #define MDL_CAUSE_T200_EXPIRED 0x01 31 #define MDL_CAUSE_REEST_REQ 0x02 32 #define MDL_CAUSE_UNSOL_UA_RESP 0x03 33 #define MDL_CAUSE_UNSOL_DM_RESP 0x04 34 #define MDL_CAUSE_UNSOL_DM_RESP_MF 0x05 35 #define MDL_CAUSE_UNSOL_SPRV_RESP 0x06 36 #define MDL_CAUSE_SEQ_ERR 0x07 37 #define MDL_CAUSE_UFRM_INC_PARAM 0x08 38 #define MDL_CAUSE_SFRM_INC_PARAM 0x09 39 #define MDL_CAUSE_IFRM_INC_MBITS 0x0a 40 #define MDL_CAUSE_IFRM_INC_LEN 0x0b 41 #define MDL_CAUSE_FRM_UNIMPL 0x0c 42 #define MDL_CAUSE_SABM_MF 0x0d 43 #define MDL_CAUSE_SABM_INFO_NOTALL 0x0e 44 #define MDL_CAUSE_FRMR 0x0f 58 struct osmo_prim_hdr oph;
150 struct osmo_timer_list t200;
151 struct osmo_timer_list t203;
153 struct llist_head tx_queue;
154 struct llist_head send_queue;
uint8_t v_recv
seq nr of next I frame expected to be received
Definition: lapd_core.h:143
primitive header for LAPD DL-SAP primitives
Definition: lapd_core.h:57
int n200_est_rel
number of retranmissions
Definition: lapd_core.h:136
struct msgb * send_buffer
current frame transmitting
Definition: lapd_core.h:155
DL-RESUME.
Definition: lapd_core.h:24
MDL-ERROR.
Definition: lapd_core.h:26
uint8_t n_recv
Definition: lapd_core.h:105
lapd_mode
LAPD mode/role.
Definition: lapd_core.h:66
uint8_t more
Definition: lapd_core.h:109
int t200_usec
retry timer (default 1 sec)
Definition: lapd_core.h:148
Definition: lapd_core.h:77
DL-ESTABLISH.
Definition: lapd_core.h:21
Definition: lapd_core.h:81
uint8_t lpd
Definition: lapd_core.h:100
Definition: lapd_core.h:73
DL-UNIT-DATA.
Definition: lapd_core.h:19
Definition: lapd_core.h:75
int lapd_recv_dlsap(struct osmo_dlsap_prim *dp, struct lapd_msg_ctx *lctx)
Definition: lapd_core.c:2209
int lapd_ph_data_ind(struct msgb *msg, struct lapd_msg_ctx *lctx)
Definition: lapd_core.c:1692
for DL-REL.req
Definition: lapd_core.h:52
int seq_err_cond
condition of sequence error
Definition: lapd_core.h:145
struct lapd_history * tx_hist
tx history structure array
Definition: lapd_core.h:157
uint8_t own_busy
receiver busy on our side
Definition: lapd_core.h:146
uint8_t k
maximum number of unacknowledged frames
Definition: lapd_core.h:139
void lapd_dl_reset(struct lapd_datalink *dl)
Definition: lapd_core.c:308
int maxf
maximum frame size (after defragmentation)
Definition: lapd_core.h:138
DL-RECONNECT.
Definition: lapd_core.h:25
Definition: lapd_core.h:117
for MDL-ERROR.ind
Definition: lapd_core.h:47
uint8_t cmd
Definition: lapd_core.h:113
uint8_t cr
Definition: lapd_core.h:97
uint8_t tei
Definition: lapd_core.h:99
uint8_t mode
release mode
Definition: lapd_core.h:53
Definition: lapd_core.h:86
struct msgb * cont_res
buffer to store content resolution data on network side, to detect multiple phones on same channel ...
Definition: lapd_core.h:160
static int update_pending_frames(struct lapd_msg_ctx *lctx)
Definition: lapdm.c:521
void lapd_dl_exit(struct lapd_datalink *dl)
Definition: lapd_core.c:330
uint8_t p_f
Definition: lapd_core.h:103
uint8_t range_hist
range of history buffer 2..2^n
Definition: lapd_core.h:158
Definition: lapd_core.h:88
struct lapd_datalink * dl
Definition: lapd_core.h:94
LAPD datalink.
Definition: lapd_core.h:123
osmo_dl_prim
LAPD related primitives (L2<->L3 SAP)
Definition: lapd_core.h:18
LAPD message context.
Definition: lapd_core.h:93
DL-RLEEASE.
Definition: lapd_core.h:22
uint8_t peer_busy
receiver busy on remote side
Definition: lapd_core.h:147
Definition: lapd_core.h:74
Definition: lapd_core.h:112
behave like network
Definition: lapd_core.h:68
int lapd_set_mode(struct lapd_datalink *dl, enum lapd_mode mode)
Set the lapdm_mode of a LAPDm entity.
Definition: lapd_core.c:344
uint8_t mode
Definition: gsm_04_08.h:633
behave like user
Definition: lapd_core.h:67
void lapd_dl_init(struct lapd_datalink *dl, uint8_t k, uint8_t v_range, int maxf)
Definition: lapd_core.c:258
int length
Definition: lapd_core.h:108
uint32_t state
LAPD state (lapd_state)
Definition: lapd_core.h:144
Definition: lapd_core.h:80
DL-DATA.
Definition: lapd_core.h:20
Definition: lapd_core.h:87
uint8_t retrans_ctr
re-transmission counter
Definition: lapd_core.h:152
Definition: lapd_core.h:89
int n201
Definition: lapd_core.h:95
int send_out
how much was sent from send_buffer
Definition: lapd_core.h:156
int t203_usec
retry timer (default 10 secs)
Definition: lapd_core.h:149
uint8_t format
Definition: lapd_core.h:102
struct msgb * msg
Definition: lapd_core.h:118
uint8_t v_ack
last frame ACKed by peer
Definition: lapd_core.h:142
uint8_t s_u
Definition: lapd_core.h:106
Definition: lapd_core.h:79
uint8_t v_send
seq nr of next I frame to be transmitted
Definition: lapd_core.h:141
int reestablish
enable reestablish support
Definition: lapd_core.h:135
uint8_t cause
generic cause value
Definition: lapd_core.h:48
uint8_t cr
Definition: gsm_04_08.h:714
uint8_t n_send
Definition: lapd_core.h:104
int use_sabme
use SABME instead of SABM
Definition: lapd_core.h:134
struct msgb * rcv_buffer
buffer to assemble the received message
Definition: lapd_core.h:159
lapd_format
LAPD message format (I / S / U)
Definition: lapd_core.h:85
lapd_state
LAPD state (Figure B.2/Q.921)
Definition: lapd_core.h:72
int more
Definition: lapd_core.h:119
uint8_t resp
Definition: lapd_core.h:114
Definition: lapd_core.h:78
DL-SUSPEND.
Definition: lapd_core.h:23
Definition: lapd_core.h:76
uint8_t v_range
range of sequence numbers
Definition: lapd_core.h:140
uint8_t sapi
Definition: lapd_core.h:98