libosmoisdn  1.8.0
Osmocom ISDN library
i460_mux.h File Reference
#include <stdint.h>
#include <osmocom/core/bits.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/msgb.h>

Go to the source code of this file.

Data Structures

struct  osmo_i460_subchan_demux
 
struct  osmo_i460_subchan_mux
 
struct  osmo_i460_subchan
 
struct  osmo_i460_timeslot
 
struct  osmo_i460_schan_desc
 description of a sub-channel; passed by caller More...
 

Typedefs

typedef void(* out_cb_bits_t) (struct osmo_i460_subchan *schan, void *user_data, const ubit_t *bits, unsigned int num_bits)
 
typedef void(* out_cb_bytes_t) (struct osmo_i460_subchan *schan, void *user_data, const uint8_t *bytes, unsigned int num_bytes)
 
typedef void(* in_cb_queue_empty_t) (struct osmo_i460_subchan *schan, void *user_data)
 

Enumerations

enum  osmo_i460_rate {
  OSMO_I460_RATE_NONE,
  OSMO_I460_RATE_64k,
  OSMO_I460_RATE_32k,
  OSMO_I460_RATE_16k,
  OSMO_I460_RATE_8k
}
 

Functions

void osmo_i460_demux_in (struct osmo_i460_timeslot *ts, const uint8_t *data, size_t data_len)
 Data from E1 timeslot into de-multiplexer. More...
 
void osmo_i460_mux_enqueue (struct osmo_i460_subchan *schan, struct msgb *msg)
 enqueue a to-be-transmitted message buffer containing unpacked bits More...
 
int osmo_i460_mux_out (struct osmo_i460_timeslot *ts, uint8_t *out, size_t out_len)
 Data from E1 timeslot into de-multiplexer. More...
 
void osmo_i460_ts_init (struct osmo_i460_timeslot *ts)
 initialize an I.460 timeslot More...
 
struct osmo_i460_subchanosmo_i460_subchan_add (void *ctx, struct osmo_i460_timeslot *ts, const struct osmo_i460_schan_desc *chd)
 add a new sub-channel to the given timeslot More...
 
void osmo_i460_subchan_del (struct osmo_i460_subchan *schan)
 

Detailed Description

ITU-T I.460 sub-channel multiplexer + demultiplexer

Typedef Documentation

◆ in_cb_queue_empty_t

typedef void(* in_cb_queue_empty_t) (struct osmo_i460_subchan *schan, void *user_data)

◆ out_cb_bits_t

typedef void(* out_cb_bits_t) (struct osmo_i460_subchan *schan, void *user_data, const ubit_t *bits, unsigned int num_bits)

◆ out_cb_bytes_t

typedef void(* out_cb_bytes_t) (struct osmo_i460_subchan *schan, void *user_data, const uint8_t *bytes, unsigned int num_bytes)

Enumeration Type Documentation

◆ osmo_i460_rate

Enumerator
OSMO_I460_RATE_NONE 
OSMO_I460_RATE_64k 
OSMO_I460_RATE_32k 
OSMO_I460_RATE_16k 
OSMO_I460_RATE_8k 

Function Documentation

◆ osmo_i460_demux_in()

void osmo_i460_demux_in ( struct osmo_i460_timeslot ts,
const uint8_t *  data,
size_t  data_len 
)

Data from E1 timeslot into de-multiplexer.

Parameters
[in]tstimeslot state
[in]datainput data bytes as received from E1/T1
[in]data_lenlength of data in bytes

References ARRAY_SIZE, data, osmo_i460_subchan::demux, demux_subchan_extract_bits(), osmo_i460_has_single_64k_schan(), OSMO_I460_RATE_NONE, osmo_pbit2ubit(), osmo_i460_subchan_demux::out_cb_bits, osmo_i460_subchan_demux::out_cb_bytes, osmo_i460_subchan::rate, ts, and osmo_i460_subchan_demux::user_data.

◆ osmo_i460_mux_enqueue()

void osmo_i460_mux_enqueue ( struct osmo_i460_subchan schan,
struct msgb msg 
)

enqueue a to-be-transmitted message buffer containing unpacked bits

References msgb_enqueue(), msgb_length(), osmo_i460_subchan::mux, OSMO_ASSERT, and osmo_i460_subchan_mux::tx_queue.

◆ osmo_i460_mux_out()

int osmo_i460_mux_out ( struct osmo_i460_timeslot ts,
uint8_t *  out,
size_t  out_len 
)

Data from E1 timeslot into de-multiplexer.

Parameters
[in]tstimeslot state
[out]outcaller-provided buffer where to store generated output bytes
[in]out_lennumber of bytes to be stored at out

References mux_timeslot_provide_bits(), and osmo_i460_subchan::ts.

◆ osmo_i460_subchan_add()

◆ osmo_i460_subchan_del()

void osmo_i460_subchan_del ( struct osmo_i460_subchan schan)

References subchan_reset().

◆ osmo_i460_ts_init()

void osmo_i460_ts_init ( struct osmo_i460_timeslot ts)

initialize an I.460 timeslot

References ARRAY_SIZE, osmo_i460_timeslot::schan, subchan_reset(), and osmo_i460_subchan::ts.

l2downstatelist
static const struct l2downstate l2downstatelist[]
msgb::list
struct llist_head list
PRIM_DL_REL
@ PRIM_DL_REL
DL-RLEEASE.
Definition: lapd_core.h:25
PRIM_DL_EST
@ PRIM_DL_EST
DL-ESTABLISH.
Definition: lapd_core.h:24
LAPD_STATE_TIMER_RECOV
@ LAPD_STATE_TIMER_RECOV
Definition: lapd_core.h:84
lapd_rx_s
static int lapd_rx_s(struct msgb *msg, struct lapd_msg_ctx *lctx)
Definition: lapd_core.c:1295
osmo_i460_subchan_demux::out_cb_bits
out_cb_bits_t out_cb_bits
callback to be called once we have received out_bitbuf_size bits
Definition: i460_mux.h:49
lapd_cr_ent::resp
uint8_t resp
Definition: lapd_core.h:117
MDL_CAUSE_UFRM_INC_PARAM
#define MDL_CAUSE_UFRM_INC_PARAM
Definition: lapd_core.h:40
msgb::l3h
unsigned char * l3h
tall_lapd_ctx
void * tall_lapd_ctx
Definition: lapd_core.c:254
msgb_alloc_headroom
static struct msgb * msgb_alloc_headroom(uint16_t size, uint16_t headroom, const char *name)
LAPD_U_UI
#define LAPD_U_UI
Definition: lapd_core.c:89
osmo_i460_timeslot
Definition: i460_mux.h:71
osmo_i460_mux_out
int osmo_i460_mux_out(struct osmo_i460_timeslot *ts, uint8_t *out, size_t out_len)
Data from E1 timeslot into de-multiplexer.
Definition: i460_mux.c:270
msg_to_tx_hist0
static void msg_to_tx_hist0(struct lapd_datalink *dl, const struct msgb *msg)
Definition: lapd_core.c:1750
osmo_ubit2pbit
int osmo_ubit2pbit(pbit_t *out, const ubit_t *in, unsigned int num_bits)
LAPD_MODE_NETWORK
@ LAPD_MODE_NETWORK
behave like network
Definition: lapd_core.h:71
lapd_msg_ctx::length
int length
Definition: lapd_core.h:111
lapd_history::more
int more
Definition: lapd_core.h:122
PRIM_DL_SUSP
@ PRIM_DL_SUSP
DL-SUSPEND.
Definition: lapd_core.h:26
LAPD_HEADROOM
#define LAPD_HEADROOM
Definition: lapd_core.c:103
i460_mux.h
get_value_string
const char * get_value_string(const struct value_string *vs, uint32_t val)
alloc_bitbuf
static int alloc_bitbuf(void *ctx, struct osmo_i460_subchan *schan, size_t num_bits)
Definition: i460_mux.c:289
osmo_pbit2ubit
int osmo_pbit2ubit(ubit_t *out, const pbit_t *in, unsigned int num_bits)
len
static size_t len(const char *str)
osmo_i460_schan_desc
description of a sub-channel; passed by caller
Definition: i460_mux.h:76
MDL_CAUSE_UNSOL_DM_RESP
#define MDL_CAUSE_UNSOL_DM_RESP
Definition: lapd_core.h:36
l2downstate
Definition: lapd_core.c:2141
lapd_res_req
static int lapd_res_req(struct osmo_dlsap_prim *dp, struct lapd_msg_ctx *lctx)
Definition: lapd_core.c:2002
lapd_msg_ctx::n_send
uint8_t n_send
Definition: lapd_core.h:107
OSMO_ASSERT
#define OSMO_ASSERT(exp)
lapd_rx_u_frmr
static int lapd_rx_u_frmr(struct msgb *msg, struct lapd_msg_ctx *lctx)
Definition: lapd_core.c:1253
subchan_reset
static void subchan_reset(struct osmo_i460_subchan *schan, bool first_time)
Definition: i460_mux.c:316
LAPD_STATE_IDLE
@ LAPD_STATE_IDLE
Definition: lapd_core.h:80
osmo_i460_subchan_mux::user_data
void * user_data
Definition: i460_mux.h:60
msgb_put
static unsigned char * msgb_put(struct msgb *msgb, unsigned int len)
osmo_prim_init
static void osmo_prim_init(struct osmo_prim_hdr *oph, unsigned int sap, unsigned int primitive, enum osmo_prim_operation operation, struct msgb *msg)
lapd_data_req
static int lapd_data_req(struct osmo_dlsap_prim *dp, struct lapd_msg_ctx *lctx)
Definition: lapd_core.c:1811
utils.h
lapd_msg_ctx::sapi
uint8_t sapi
Definition: lapd_core.h:101
msgb::data
unsigned char * data
MDL_CAUSE_IFRM_INC_MBITS
#define MDL_CAUSE_IFRM_INC_MBITS
Definition: lapd_core.h:42
lapd_recv_dlsap
int lapd_recv_dlsap(struct osmo_dlsap_prim *dp, struct lapd_msg_ctx *lctx)
Definition: lapd_core.c:2200
MDL_CAUSE_SABM_MF
#define MDL_CAUSE_SABM_MF
Definition: lapd_core.h:45
osmo_i460_mux_enqueue
void osmo_i460_mux_enqueue(struct osmo_i460_subchan *schan, struct msgb *msg)
enqueue a to-be-transmitted message buffer containing unpacked bits
Definition: i460_mux.c:161
lapd_t203_cb
static void lapd_t203_cb(void *data)
Definition: lapd_core.c:712
SBIT
#define SBIT(a)
Definition: lapd_core.c:106
osmo_i460_subchan_count
static int osmo_i460_subchan_count(struct osmo_i460_timeslot *ts)
Definition: i460_mux.c:27
msg_to_tx_hist
static void msg_to_tx_hist(struct lapd_history *tx_hist, const struct msgb *msg, int length, int more)
Definition: lapd_core.c:1741
lapd_dl_exit
void lapd_dl_exit(struct lapd_datalink *dl)
Definition: lapd_core.c:358
LAPD_MODE_USER
@ LAPD_MODE_USER
behave like user
Definition: lapd_core.h:70
lapd_msg_ctx::format
uint8_t format
Definition: lapd_core.h:105
lapd_msg_ctx::s_u
uint8_t s_u
Definition: lapd_core.h:109
PRIM_OP_INDICATION
PRIM_OP_INDICATION
lapd_rx_u_disc
static int lapd_rx_u_disc(struct msgb *msg, struct lapd_msg_ctx *lctx)
Definition: lapd_core.c:1082
msgb.h
LAPD_STATE_ASS_TEI_WAIT
@ LAPD_STATE_ASS_TEI_WAIT
Definition: lapd_core.h:78
msgb_pull_u8
static uint8_t msgb_pull_u8(struct msgb *msgb)
PRIM_DL_UNIT_DATA
@ PRIM_DL_UNIT_DATA
DL-UNIT-DATA.
Definition: lapd_core.h:22
lapd_set_mode
int lapd_set_mode(struct lapd_datalink *dl, enum lapd_mode mode)
Set the lapdm_mode of a LAPDm entity.
Definition: lapd_core.c:374
osmo_i460_subchan::bit_offset
uint8_t bit_offset
Definition: i460_mux.h:66
PRIM_OP_REQUEST
PRIM_OP_REQUEST
lapd_dl_newstate
static void lapd_dl_newstate(struct lapd_datalink *dl, uint32_t state)
Definition: lapd_core.c:233
lapd_send_rnr
static int lapd_send_rnr(struct lapd_msg_ctx *lctx, uint8_t f_bit, uint8_t cmd)
Definition: lapd_core.c:497
llist_head::next
struct llist_head * next
osmo_dlsap_prim::oph
struct osmo_prim_hdr oph
generic primitive header
Definition: lapd_core.h:61
demux_subchan_append_bit
static void demux_subchan_append_bit(struct osmo_i460_subchan *schan, uint8_t bit)
Definition: i460_mux.c:56
lapd_dl_reset
void lapd_dl_reset(struct lapd_datalink *dl)
Definition: lapd_core.c:337
osmo_talloc_replace_string
static void osmo_talloc_replace_string(void *ctx, char **dst, const char *newstr)
osmo_i460_subchan_demux::out_bitbuf
uint8_t * out_bitbuf
bit-buffer for output bits
Definition: i460_mux.h:43
LAPD_S_RR
#define LAPD_S_RR
Definition: lapd_core.c:94
LAPD_U_DM
#define LAPD_U_DM
Definition: lapd_core.c:88
lapd_msgb_alloc
struct msgb * lapd_msgb_alloc(int length, const char *name)
Definition: lapd_core.c:116
osmo_i460_schan_desc::mux
struct osmo_i460_schan_desc::@1 mux
MDL_CAUSE_FRM_UNIMPL
#define MDL_CAUSE_FRM_UNIMPL
Definition: lapd_core.h:44
MDL_CAUSE_T200_EXPIRED
#define MDL_CAUSE_T200_EXPIRED
Definition: lapd_core.h:33
INIT_LLIST_HEAD
#define INIT_LLIST_HEAD(ptr)
osmo_i460_schan_desc::demux
struct osmo_i460_schan_desc::@0 demux
osmo_i460_has_single_64k_schan
static bool osmo_i460_has_single_64k_schan(struct osmo_i460_timeslot *ts)
Definition: i460_mux.c:40
osmo_i460_subchan_demux
Definition: i460_mux.h:41
msgb::len
uint16_t len
osmo_i460_schan_desc::out_cb_bytes
out_cb_bytes_t out_cb_bytes
out_cb_bytes call-back function called whenever we received num_bits.
Definition: i460_mux.h:90
osmo_i460_subchan_demux::out_bitbuf_size
unsigned int out_bitbuf_size
size of out_bitbuf in bytes
Definition: i460_mux.h:45
sub_mod
static uint8_t sub_mod(uint8_t x, uint8_t y, uint8_t m)
Definition: lapd_core.c:139
osmo_i460_schan_desc::num_bits
size_t num_bits
Definition: i460_mux.h:81
OSMO_I460_RATE_32k
@ OSMO_I460_RATE_32k
Definition: i460_mux.h:29
l2downstate::name
const char * name
Definition: lapd_core.c:2144
msgb_length
uint16_t msgb_length(const struct msgb *msg)
llist_del
static void llist_del(struct llist_head *entry)
LOGDL
#define LOGDL(dl, level, fmt, args...)
Definition: lapd_core.h:17
osmo_dlsap_prim
primitive header for LAPD DL-SAP primitives
Definition: lapd_core.h:60
osmo_dlsap_prim::rel_req
struct dl_rel_req_param rel_req
Definition: lapd_core.h:64
lapd_send_resend
static int lapd_send_resend(struct lapd_datalink *dl)
Definition: lapd_core.c:541
osmo_i460_subchan::mux
struct osmo_i460_subchan_mux mux
Definition: i460_mux.h:68
osmo_prim_hdr::operation
enum osmo_prim_operation operation
data
uint8_t data[0]
msgb
LOGL_INFO
#define LOGL_INFO
OSMO_I460_RATE_NONE
@ OSMO_I460_RATE_NONE
Definition: i460_mux.h:27
MDL_CAUSE_SFRM_INC_PARAM
#define MDL_CAUSE_SFRM_INC_PARAM
Definition: lapd_core.h:41
msgb_l3len
static unsigned int msgb_l3len(const struct msgb *msgb)
dl_rel_req_param::mode
uint8_t mode
release mode
Definition: lapd_core.h:56
lapd_cr_ent::cmd
uint8_t cmd
Definition: lapd_core.h:116
LAPD_U_SABM
#define LAPD_U_SABM
Definition: lapd_core.c:86
lapd_ph_data_ind
int lapd_ph_data_ind(struct msgb *msg, struct lapd_msg_ctx *lctx)
Definition: lapd_core.c:1696
lapd_dl_init2
void lapd_dl_init2(struct lapd_datalink *dl, uint8_t k, uint8_t v_range, int maxf, const char *name)
Initialize LAPD datalink instance and allocate history.
Definition: lapd_core.c:262
LAPD_STATE_TEI_UNASS
@ LAPD_STATE_TEI_UNASS
Definition: lapd_core.h:77
LAPD_STATE_NULL
@ LAPD_STATE_NULL
Definition: lapd_core.h:76
msgb_free
void msgb_free(struct msgb *m)
PRIM_MDL_ERROR
@ PRIM_MDL_ERROR
MDL-ERROR.
Definition: lapd_core.h:29
osmo_i460_subchan_mux::in_cb_queue_empty
in_cb_queue_empty_t in_cb_queue_empty
Definition: i460_mux.h:59
LAPD_S_REJ
#define LAPD_S_REJ
Definition: lapd_core.c:96
LAPD_U_DISC
#define LAPD_U_DISC
Definition: lapd_core.c:90
CR_USER2NET_RESP
#define CR_USER2NET_RESP
Definition: lapd_core.c:99
lapd_est_req
static int lapd_est_req(struct osmo_dlsap_prim *dp, struct lapd_msg_ctx *lctx)
Definition: lapd_core.c:1756
LAPD_U_FRMR
#define LAPD_U_FRMR
Definition: lapd_core.c:92
lapd_msg_ctx::p_f
uint8_t p_f
Definition: lapd_core.h:106
MDL_CAUSE_UNSOL_DM_RESP_MF
#define MDL_CAUSE_UNSOL_DM_RESP_MF
Definition: lapd_core.h:37
osmo_i460_subchan_add
struct osmo_i460_subchan * osmo_i460_subchan_add(void *ctx, struct osmo_i460_timeslot *ts, const struct osmo_i460_schan_desc *chd)
add a new sub-channel to the given timeslot
Definition: i460_mux.c:353
osmo_timer_schedule
void osmo_timer_schedule(struct osmo_timer_list *timer, int seconds, int microseconds)
lapd_history
Definition: lapd_core.h:120
lapd_rx_u_sabm
static int lapd_rx_u_sabm(struct msgb *msg, struct lapd_msg_ctx *lctx)
Definition: lapd_core.c:814
LAPD_S_RNR
#define LAPD_S_RNR
Definition: lapd_core.c:95
lapd_rx_u_dm
static int lapd_rx_u_dm(struct msgb *msg, struct lapd_msg_ctx *lctx)
Definition: lapd_core.c:961
MDL_CAUSE_UNSOL_SPRV_RESP
#define MDL_CAUSE_UNSOL_SPRV_RESP
Definition: lapd_core.h:38
mux_subchan_provide_bits
static uint8_t mux_subchan_provide_bits(struct osmo_i460_subchan *schan, uint8_t *mask)
provide one byte with the subchan-specific bits of given sub-channel.
Definition: i460_mux.c:200
mux_timeslot_provide_bits
static uint8_t mux_timeslot_provide_bits(struct osmo_i460_timeslot *ts)
Definition: i460_mux.c:244
lapd_msg_ctx::n201
int n201
Definition: lapd_core.h:98
osmo_i460_subchan_demux::out_cb_bytes
out_cb_bytes_t out_cb_bytes
Definition: i460_mux.h:50
lapd_send_dm
static int lapd_send_dm(struct lapd_msg_ctx *lctx)
Definition: lapd_core.c:454
CR_NET2USER_CMD
#define CR_NET2USER_CMD
Definition: lapd_core.c:100
lapd_dl_set_name
void lapd_dl_set_name(struct lapd_datalink *dl, const char *name)
Definition: lapd_core.c:329
LAPD_STATE_EST_TEI_WAIT
@ LAPD_STATE_EST_TEI_WAIT
Definition: lapd_core.h:79
osmo_i460_subchan::demux
struct osmo_i460_subchan_demux demux
Definition: i460_mux.h:67
osmo_i460_ts_init
void osmo_i460_ts_init(struct osmo_i460_timeslot *ts)
initialize an I.460 timeslot
Definition: i460_mux.c:336
ts
struct @6 ts
PRIM_DL_RECON
@ PRIM_DL_RECON
DL-RECONNECT.
Definition: lapd_core.h:28
MDL_CAUSE_IFRM_INC_LEN
#define MDL_CAUSE_IFRM_INC_LEN
Definition: lapd_core.h:43
LAPD_U_SABME
#define LAPD_U_SABME
Definition: lapd_core.c:87
lapd_history::msg
struct msgb * msg
Definition: lapd_core.h:121
talloc.h
LAPD_FORM_U
@ LAPD_FORM_U
Definition: lapd_core.h:92
osmo_prim_hdr::msg
struct msgb * msg
name
const char * name
lapd_rx_u
static int lapd_rx_u(struct msgb *msg, struct lapd_msg_ctx *lctx)
Definition: lapd_core.c:1269
lapd_start_t200
static void lapd_start_t200(struct lapd_datalink *dl)
Definition: lapd_core.c:200
inc_mod
static uint8_t inc_mod(uint8_t x, uint8_t m)
Definition: lapd_core.c:129
osmo_i460_subchan_mux::tx_queue
struct llist_head tx_queue
list of to-be-transmitted message buffers
Definition: i460_mux.h:58
msgb_trim
static int msgb_trim(struct msgb *msg, int len)
osmo_i460_subchan_demux::out_idx
unsigned int out_idx
offset of next bit to be written in out_bitbuf
Definition: i460_mux.h:47
lapd_dl_init
void lapd_dl_init(struct lapd_datalink *dl, uint8_t k, uint8_t v_range, int maxf) OSMO_DEPRECATED("Use lapd_dl_init2() instead")
Initialize LAPD datalink instance and allocate history.
Definition: lapd_core.c:324
osmo_i460_schan_desc::out_cb_bits
out_cb_bits_t out_cb_bits
call-back function called whenever we received num_bits
Definition: i460_mux.h:83
lapd_reestablish
static int lapd_reestablish(struct lapd_datalink *dl)
Definition: lapd_core.c:573
mdl_error
static int mdl_error(uint8_t cause, struct lapd_msg_ctx *lctx)
Definition: lapd_core.c:416
lapd_rx_u_ui
static int lapd_rx_u_ui(struct msgb *msg, struct lapd_msg_ctx *lctx)
Definition: lapd_core.c:1043
osmo_timer_setup
void osmo_timer_setup(struct osmo_timer_list *timer, void(*cb)(void *data), void *data)
ALL_STATES
#define ALL_STATES
Definition: lapd_core.c:107
OSMO_I460_RATE_64k
@ OSMO_I460_RATE_64k
Definition: i460_mux.h:28
OSMO_VALUE_STRING
#define OSMO_VALUE_STRING(x)
lapd_msg_ctx::cr
uint8_t cr
Definition: lapd_core.h:100
timer.h
lapd_stop_t203
static void lapd_stop_t203(struct lapd_datalink *dl)
Definition: lapd_core.c:225
osmo_i460_subchan_demux::user_data
void * user_data
Definition: i460_mux.h:51
lapd_dl_flush_hist
static void lapd_dl_flush_hist(struct lapd_datalink *dl)
Definition: lapd_core.c:157
lapd_send_ua
static int lapd_send_ua(struct lapd_msg_ctx *lctx, uint8_t len, uint8_t *data)
Definition: lapd_core.c:430
LAPD_FORM_I
@ LAPD_FORM_I
Definition: lapd_core.h:90
lapd_dl_flush_tx
static void lapd_dl_flush_tx(struct lapd_datalink *dl)
Definition: lapd_core.c:172
PRIM_DL_RES
@ PRIM_DL_RES
DL-RESUME.
Definition: lapd_core.h:27
lapd_msg_ctx::n_recv
uint8_t n_recv
Definition: lapd_core.h:108
mux_schan_provide_bit
static ubit_t mux_schan_provide_bit(struct osmo_i460_subchan *schan)
Definition: i460_mux.c:168
CR_USER2NET_CMD
#define CR_USER2NET_CMD
Definition: lapd_core.c:98
lapd_send_rr
static int lapd_send_rr(struct lapd_msg_ctx *lctx, uint8_t f_bit, uint8_t cmd)
Definition: lapd_core.c:475
LOGL_NOTICE
#define LOGL_NOTICE
lapd_t200_cb
static void lapd_t200_cb(void *data)
Definition: lapd_core.c:587
l2downstate::op
int op
Definition: lapd_core.c:2143
llist_add
static void llist_add(struct llist_head *_new, struct llist_head *head)
MDL_CAUSE_FRMR
#define MDL_CAUSE_FRMR
Definition: lapd_core.h:47
value_string
osmo_i460_subchan
Definition: i460_mux.h:63
LAPD_STATE_DISC_SENT
@ LAPD_STATE_DISC_SENT
Definition: lapd_core.h:82
lapd_mode
lapd_mode
LAPD mode/role.
Definition: lapd_core.h:69
lapd_udata_req
static int lapd_udata_req(struct osmo_dlsap_prim *dp, struct lapd_msg_ctx *lctx)
Definition: lapd_core.c:1721
lapd_state_name
static const char * lapd_state_name(enum lapd_state state)
Definition: lapd_core.c:195
lapd_msg_ctx
LAPD message context.
Definition: lapd_core.h:96
ubit_t
uint8_t ubit_t
ARRAY_SIZE
#define ARRAY_SIZE(x)
osmo_dlsap_prim::u
union osmo_dlsap_prim::@2 u
request-specific data
lapd_rel_req
static int lapd_rel_req(struct osmo_dlsap_prim *dp, struct lapd_msg_ctx *lctx)
Definition: lapd_core.c:2067
OSMO_I460_RATE_16k
@ OSMO_I460_RATE_16k
Definition: i460_mux.h:30
osmo_i460_timeslot::schan
struct osmo_i460_subchan schan[8]
Definition: i460_mux.h:72
osmo_timer_pending
int osmo_timer_pending(const struct osmo_timer_list *timer)
osmo_timer_del
void osmo_timer_del(struct osmo_timer_list *timer)
l2downstate::prim
int prim
Definition: lapd_core.c:2143
LAPD_FORM_S
@ LAPD_FORM_S
Definition: lapd_core.h:91
lapd_msg_ctx::dl
struct lapd_datalink * dl
Definition: lapd_core.h:97
llist_entry
#define llist_entry(ptr, type, member)
lapd_acknowledge
static void lapd_acknowledge(struct lapd_msg_ctx *lctx)
Definition: lapd_core.c:742
MDL_CAUSE_UNSOL_UA_RESP
#define MDL_CAUSE_UNSOL_UA_RESP
Definition: lapd_core.h:35
osmo_i460_schan_desc::user_data
void * user_data
Definition: i460_mux.h:92
send_dl_simple
static int send_dl_simple(uint8_t prim, uint8_t op, struct lapd_msg_ctx *lctx)
Definition: lapd_core.c:409
send_dl_l3
static int send_dl_l3(uint8_t prim, uint8_t op, struct lapd_msg_ctx *lctx, struct msgb *msg)
Definition: lapd_core.c:398
lapd_susp_req
static int lapd_susp_req(struct osmo_dlsap_prim *dp, struct lapd_msg_ctx *lctx)
Definition: lapd_core.c:1975
lapd_state_names
const struct value_string lapd_state_names[]
Definition: lapd_core.c:182
MDL_CAUSE_SEQ_ERR
#define MDL_CAUSE_SEQ_ERR
Definition: lapd_core.h:39
l2downstate::rout
int(* rout)(struct osmo_dlsap_prim *dp, struct lapd_msg_ctx *lctx)
Definition: lapd_core.c:2145
msgb_queue_free
static void msgb_queue_free(struct llist_head *queue)
lapd_rel_req_idle
static int lapd_rel_req_idle(struct osmo_dlsap_prim *dp, struct lapd_msg_ctx *lctx)
Definition: lapd_core.c:2128
osmo_i460_schan_desc::in_cb_queue_empty
in_cb_queue_empty_t in_cb_queue_empty
Definition: i460_mux.h:98
LAPD_U_UA
#define LAPD_U_UA
Definition: lapd_core.c:91
osmo_i460_schan_desc::bit_offset
uint8_t bit_offset
Definition: i460_mux.h:78
lapd_send_rej
static int lapd_send_rej(struct lapd_msg_ctx *lctx, uint8_t f_bit)
Definition: lapd_core.c:519
do_mod
static uint8_t do_mod(uint8_t x, uint8_t m)
Definition: lapd_core.c:124
llist_empty
static int llist_empty(const struct llist_head *head)
osmo_i460_subchan_del
void osmo_i460_subchan_del(struct osmo_i460_subchan *schan)
Definition: i460_mux.c:383
osmo_i460_subchan::ts
struct osmo_i460_timeslot * ts
Definition: i460_mux.h:64
osmo_i460_demux_in
void osmo_i460_demux_in(struct osmo_i460_timeslot *ts, const uint8_t *data, size_t data_len)
Data from E1 timeslot into de-multiplexer.
Definition: i460_mux.c:126
osmo_i460_subchan_mux
Definition: i460_mux.h:56
find_unused_subchan_idx
static int find_unused_subchan_idx(const struct osmo_i460_timeslot *ts)
Definition: i460_mux.c:303
CR_NET2USER_RESP
#define CR_NET2USER_RESP
Definition: lapd_core.c:101
logging.h
bits.h
OSMO_I460_RATE_8k
@ OSMO_I460_RATE_8k
Definition: i460_mux.h:31
msgb_dequeue
struct msgb * msgb_dequeue(struct llist_head *queue)
MDL_CAUSE_SABM_INFO_NOTALL
#define MDL_CAUSE_SABM_INFO_NOTALL
Definition: lapd_core.h:46
lapd_msg_ctx::more
uint8_t more
Definition: lapd_core.h:112
osmo_i460_subchan::rate
enum osmo_i460_rate rate
Definition: i460_mux.h:65
LAPD_STATE_SABM_SENT
@ LAPD_STATE_SABM_SENT
Definition: lapd_core.h:81
lapd_rx_u_ua
static int lapd_rx_u_ua(struct msgb *msg, struct lapd_msg_ctx *lctx)
Definition: lapd_core.c:1160
lapd_stop_t200
static void lapd_stop_t200(struct lapd_datalink *dl)
Definition: lapd_core.c:217
mdl_error_ind_param::cause
uint8_t cause
generic cause value
Definition: lapd_core.h:51
lapd_start_t203
static void lapd_start_t203(struct lapd_datalink *dl)
Definition: lapd_core.c:209
PRIM_DL_DATA
@ PRIM_DL_DATA
DL-DATA.
Definition: lapd_core.h:23
LOGL_DEBUG
#define LOGL_DEBUG
msgb_enqueue
void msgb_enqueue(struct llist_head *queue, struct msgb *msg)
lapd_dl_flush_send
static void lapd_dl_flush_send(struct lapd_datalink *dl)
Definition: lapd_core.c:144
osmo_prim_hdr::primitive
unsigned int primitive
L2DOWNSLLEN
#define L2DOWNSLLEN
Definition: lapd_core.c:2197
lapd_rx_i
static int lapd_rx_i(struct msgb *msg, struct lapd_msg_ctx *lctx)
Definition: lapd_core.c:1506
LOGL_ERROR
#define LOGL_ERROR
osmo_i460_schan_desc::rate
enum osmo_i460_rate rate
Definition: i460_mux.h:77
osmo_dlsap_prim::error_ind
struct mdl_error_ind_param error_ind
Definition: lapd_core.h:63
LAPD_STATE_MF_EST
@ LAPD_STATE_MF_EST
Definition: lapd_core.h:83
lapd_state
lapd_state
LAPD state (Figure B.2/Q.921)
Definition: lapd_core.h:75
l2downstate::states
uint32_t states
Definition: lapd_core.c:2142
PRIM_OP_CONFIRM
PRIM_OP_CONFIRM
lapd_core.h
LAPD_TAILROOM
#define LAPD_TAILROOM
Definition: lapd_core.c:104
demux_subchan_extract_bits
static void demux_subchan_extract_bits(struct osmo_i460_subchan *schan, const uint8_t *data, size_t data_len)
Definition: i460_mux.c:81
add_mod
static uint8_t add_mod(uint8_t x, uint8_t y, uint8_t m)
Definition: lapd_core.c:134
lapd_send_i
static int lapd_send_i(struct lapd_msg_ctx *lctx, int line)
Definition: lapd_core.c:1834