libosmogsm  0.6.3
Osmocom GSM library
rsl.h
Go to the documentation of this file.
1 #ifndef _OSMOCORE_RSL_H
2 #define _OSMOCORE_RSL_H
3 
4 #include <stdint.h>
5 #include <osmocom/core/utils.h>
6 #include <osmocom/core/msgb.h>
8 
15 void rsl_init_rll_hdr(struct abis_rsl_rll_hdr *dh, uint8_t msg_type);
16 
17 void rsl_init_cchan_hdr(struct abis_rsl_cchan_hdr *ch, uint8_t msg_type);
18 
19 extern const struct tlv_definition rsl_att_tlvdef;
20 
22 #define rsl_tlv_parse(dec, buf, len) \
23  tlv_parse(dec, &rsl_att_tlvdef, buf, len, 0, 0)
24 
25 /* encode channel number as per Section 9.3.1 */
26 uint8_t rsl_enc_chan_nr(uint8_t type, uint8_t subch, uint8_t timeslot);
27 /* decode channel number as per Section 9.3.1 */
28 int rsl_dec_chan_nr(uint8_t chan_nr, uint8_t *type, uint8_t *subch, uint8_t *timeslot);
29 /* Turns channel number into a string */
30 const char *rsl_chan_nr_str(uint8_t chan_nr);
31 
32 
33 const char *rsl_err_name(uint8_t err);
34 const char *rsl_rlm_cause_name(uint8_t err);
35 const char *rsl_msg_name(uint8_t err);
36 const char *rsl_ipac_msg_name(uint8_t msg_type);
37 
38 /* Section 3.3.2.3 TS 05.02. I think this looks like a table */
39 int rsl_ccch_conf_to_bs_cc_chans(int ccch_conf);
40 
41 /* Push a RSL RLL header */
42 void rsl_rll_push_hdr(struct msgb *msg, uint8_t msg_type, uint8_t chan_nr,
43  uint8_t link_id, int transparent);
44 
45 /* Push a RSL RLL header with L3_INFO IE */
46 void rsl_rll_push_l3(struct msgb *msg, uint8_t msg_type, uint8_t chan_nr,
47  uint8_t link_id, int transparent);
48 
49 /* Allocate msgb and fill with simple RSL RLL header */
50 struct msgb *rsl_rll_simple(uint8_t msg_type, uint8_t chan_nr,
51  uint8_t link_id, int transparent);
52 
55 #endif /* _OSMOCORE_RSL_H */