45 #define LAPDM_ENT_F_EMPTY_FRAME 0x0001
46 #define LAPDM_ENT_F_POLLING_ONLY 0x0002
void lapdm_channel_exit(struct lapdm_channel *lc)
Definition: lapdm.c:190
struct lapdm_datalink * dl
Definition: lapdm.h:20
LAPDm message context.
Definition: lapdm.h:19
void lapdm_entity_set_flags(struct lapdm_entity *le, unsigned int flags)
Set the flags of a LAPDm entity.
Definition: lapdm.c:1318
enum lapdm_mode mode
are we in BTS mode or MS mode
Definition: lapdm.h:54
struct lapdm_channel * lapdm_ch
pointer to lapdm_channel of which we're part
Definition: lapdm.h:64
behave like a MS (mobile phone)
Definition: lapdm.h:12
LAPDm datalink like TS 04.06 / Section 3.5.2.
Definition: lapdm.h:29
void lapdm_channel_reset(struct lapdm_channel *lc)
Reset a LAPDm channel with all its entities.
Definition: lapdm.c:1311
uint8_t tx_power_ind
Definition: lapdm.h:25
int(* lapdm_cb_t)(struct msgb *msg, struct lapdm_entity *le, void *ctx)
Definition: lapdm.h:43
unsigned int flags
Definition: lapdm.h:55
int tx_pending
currently a pending frame not confirmed by L1
Definition: lapdm.h:53
const char * get_rsl_name(int value)
void * l1_ctx
context for layer1 instance
Definition: lapdm.h:57
the two lapdm_entities that form a GSM logical channel (ACCH + DCCH)
Definition: lapdm.h:71
SAPI 0.
Definition: lapdm.h:38
const char * lapdm_state_names[]
struct lapdm_datalink * lapdm_datalink_for_sapi(struct lapdm_entity *le, uint8_t sapi)
Definition: lapdm.c:196
void * l3_ctx
context for layer3 instance
Definition: lapdm.h:58
int(* osmo_prim_cb)(struct osmo_prim_hdr *oph, void *ctx)
struct lapd_datalink dl
Definition: lapdm.h:30
SAPI 1.
Definition: lapdm.h:39
void lapdm_channel_set_l3(struct lapdm_channel *lc, lapdm_cb_t cb, void *ctx)
Set the L3 callback and context of a LAPDm channel.
Definition: lapdm.c:1290
void lapdm_entity_exit(struct lapdm_entity *le)
flush and release all resoures in LAPDm entity
Definition: lapdm.c:174
int lapdm_rslms_recvmsg(struct msgb *msg, struct lapdm_channel *lc)
Receive a RSLms Message buffers from Layer 3.
Definition: lapdm.c:1215
int lapdm_phsap_up(struct osmo_prim_hdr *oph, struct lapdm_entity *le)
Receive a PH-SAP primitive from L1.
Definition: lapdm.c:713
void lapdm_entity_init(struct lapdm_entity *le, enum lapdm_mode mode, int t200)
initialize a LAPDm entity and all datalinks inside
Definition: lapdm.c:149
int lapdm_entity_set_mode(struct lapdm_entity *le, enum lapdm_mode mode)
Set the lapdm_mode of a LAPDm entity.
Definition: lapdm.c:1243
void lapdm_channel_set_l1(struct lapdm_channel *lc, osmo_prim_cb cb, void *ctx)
Set the L1 callback and context of a LAPDm channel.
Definition: lapdm.c:1281
struct lapdm_msg_ctx mctx
context of established connection
Definition: lapdm.h:31
LAPD datalink.
Definition: lapd_core.h:123
char * name
human-readable name
Definition: lapdm.h:73
behave like a BTS (network)
Definition: lapdm.h:13
void lapdm_entity_reset(struct lapdm_entity *le)
Reset an entire LAPDm entity and all its datalinks.
Definition: lapdm.c:1299
uint8_t mode
Definition: gsm_04_08.h:92
struct lapdm_entity * entity
LAPDm entity we are part of.
Definition: lapdm.h:33
struct llist_head list
internal linked list
Definition: lapdm.h:72
uint8_t ta
Definition: lapdm.h:66
struct lapdm_datalink datalink[_NR_DL_SAPI]
the SAPIs of the LAPDm entity
Definition: lapdm.h:51
osmo_prim_cb l1_prim_cb
callback for sending prims to L1
Definition: lapdm.h:60
lapdm_mode
LAPDm mode/role.
Definition: lapdm.h:11
int last_tx_dequeue
last entity that was dequeued
Definition: lapdm.h:52
uint8_t link_id
Definition: lapdm.h:23
void lapdm_channel_init(struct lapdm_channel *lc, enum lapdm_mode mode)
initialize a LAPDm channel and all its channels
Definition: lapdm.c:166
int lapdm_channel_set_mode(struct lapdm_channel *lc, enum lapdm_mode mode)
Set the lapdm_mode of a LAPDm channel.
Definition: lapdm.c:1269
uint8_t tx_power
Definition: lapdm.h:67
lapdm_cb_t l3_cb
callback for sending stuff to L3
Definition: lapdm.h:61
struct lapdm_entity lapdm_acch
Associated Control Channel.
Definition: lapdm.h:74
int lapdm_fmt
Definition: lapdm.h:21
lapdm_dl_sapi
LAPDm datalink SAPIs.
Definition: lapdm.h:37
void lapdm_channel_set_flags(struct lapdm_channel *lc, unsigned int flags)
Set the flags of all LAPDm entities in a LAPDm channel.
Definition: lapdm.c:1324
a LAPDm Entity
Definition: lapdm.h:49
int lapdm_phsap_dequeue_prim(struct lapdm_entity *le, struct osmo_phsap_prim *pp)
dequeue a msg that's pending transmission via L1 and wrap it into a osmo_phsap_prim ...
Definition: lapdm.c:290
uint8_t ta_ind
Definition: lapdm.h:24
primitive header for PH-SAP primitives
Definition: l1sap.h:144
struct lapdm_entity lapdm_dcch
Dedicated Control Channel.
Definition: lapdm.h:75
uint8_t chan_nr
Definition: lapdm.h:22