libosmogsm  0.9.6-13.20170220git32ee5af8.fc33
Osmocom GSM library
a5.h File Reference

Osmocom GSM A5 ciphering algorithm header. More...

#include <stdint.h>
#include <osmocom/core/defs.h>
#include <osmocom/core/bits.h>

Go to the source code of this file.

Functions

static uint32_t osmo_a5_fn_count (uint32_t fn)
 Converts a frame number into the 22 bit number used in A5/x. More...
 
int osmo_a5 (int n, const uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul)
 Main method to generate a A5/x cipher stream. More...
 
void osmo_a5_1 (const uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul) OSMO_DEPRECATED("Use generic osmo_a5() instead")
 
void osmo_a5_2 (const uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul) OSMO_DEPRECATED("Use generic osmo_a5() instead")
 

Detailed Description

Osmocom GSM A5 ciphering algorithm header.

tlv_parse_one
int tlv_parse_one(uint8_t *o_tag, uint16_t *o_len, const uint8_t **o_val, const struct tlv_definition *def, const uint8_t *buf, int buf_len)
Parse a single TLV encoded IE.
Definition: tlv_parser.c:115
rsl_or_ipac_msg_name
const char * rsl_or_ipac_msg_name(uint8_t msg_type)
Get human-readable name of standard or ip.access RSL msg type. If msg_type is a standard RSL message ...
Definition: rsl.c:388
abis_rsl_rll_hdr::ie_link_id
uint8_t ie_link_id
RSL_IE_LINK_IDENT (tag)
Definition: gsm_08_58.h:45
osmo_match_shift_tlv
int osmo_match_shift_tlv(uint8_t **data, size_t *data_len, uint8_t tag, uint8_t **value, size_t *value_len)
Definition: tlv_parser.c:361
osmo_tlvp_copy
struct tlv_parsed * osmo_tlvp_copy(const struct tlv_parsed *tp_orig, void *ctx)
Copy tlv_parsed using given talloc context.
Definition: tlv_parser.c:52
tlv_p_entry::val
const uint8_t * val
pointer to value
Definition: tlv.h:365
link_id
uint8_t link_id
RSL link identifier (value)
Definition: gsm_08_58.h:6
gsm48_system_information_type_4
Definition: gsm_04_08.h:709
osmo_tlvp_merge
int osmo_tlvp_merge(struct tlv_parsed *dst, const struct tlv_parsed *src)
Merge all tlv_parsed attributes of 'src' into 'dst'.
Definition: tlv_parser.c:87
tlv_def_patch
void tlv_def_patch(struct tlv_definition *dst, const struct tlv_definition *src)
take a master (src) tlvdev and fill up all empty slots in 'dst'
Definition: tlv_parser.c:266
rsl_err_name
const char * rsl_err_name(uint8_t err)
Get human-readable name for RSL Error.
Definition: rsl.c:267
tlv_parse
int tlv_parse(struct tlv_parsed *dec, const struct tlv_definition *def, const uint8_t *buf, int buf_len, uint8_t lv_tag, uint8_t lv_tag2)
Parse an entire buffer of TLV encoded Information Elements.
Definition: tlv_parser.c:215
osmo_shift_tlv
int osmo_shift_tlv(uint8_t **data, size_t *data_len, uint8_t *tag, uint8_t **value, size_t *value_len)
Definition: tlv_parser.c:389
timeslot
uint8_t timeslot
E1 timeslot.
Definition: gsm_12_21.h:4
TLV_TYPE_FIXED
@ TLV_TYPE_FIXED
fixed-length value-only
Definition: tlv.h:371
tlv_p_entry::len
uint16_t len
length
Definition: tlv.h:364
msgb_v_put
static uint8_t * msgb_v_put(struct msgb *msg, uint8_t val)
put (append) a V field to a msgb
Definition: tlv.h:290
TLV_TYPE_T
@ TLV_TYPE_T
tag-only
Definition: tlv.h:372
gsm48_system_information_type_3
Definition: gsm_04_08.h:697
msgb_tv16_push
static uint8_t * msgb_tv16_push(struct msgb *msg, uint8_t tag, uint16_t val)
push (prepend) a TV16 field to a msgb
Definition: tlv.h:324
rsl_msg_name
const char * rsl_msg_name(uint8_t err)
Get human-readable string for RSL Message Type.
Definition: rsl.c:344
gsm48_system_information_type_header
Definition: gsm_04_08.h:605
TLV_TYPE_TLV
@ TLV_TYPE_TLV
tag-length-value
Definition: tlv.h:374
gsm48_system_information_type_13
Definition: gsm_04_08.h:757
TLV_TYPE_TvLV
@ TLV_TYPE_TvLV
tag, variable length, value
Definition: tlv.h:376
tlv_definition
Definition of All 256 IE / TLV.
Definition: tlv.h:388
abis_rsl_rll_hdr
Definition: gsm_08_58.h:41
rsl_rll_push_l3
void rsl_rll_push_l3(struct msgb *msg, uint8_t msg_type, uint8_t chan_nr, uint8_t link_id, int transparent)
Push a RSL RLL header with L3_INFO IE.
Definition: rsl.c:476
tlv_def::type
enum tlv_type type
TLV type.
Definition: tlv.h:383
TLV_TYPE_TL16V
@ TLV_TYPE_TL16V
tag, 16 bit length, value
Definition: tlv.h:375
rsl_init_cchan_hdr
void rsl_init_cchan_hdr(struct abis_rsl_cchan_hdr *ch, uint8_t msg_type)
Initialize a RSL Common Channel header.
Definition: rsl.c:52
gsm48_system_information_type_6
Definition: gsm_04_08.h:745
osmo_match_shift_tv_fixed
int osmo_match_shift_tv_fixed(uint8_t **data, size_t *data_len, uint8_t tag, size_t len, uint8_t **value)
Definition: tlv_parser.c:323
msgb_tlv_put
static uint8_t * msgb_tlv_put(struct msgb *msg, uint8_t tag, uint8_t len, const uint8_t *val)
put (append) a TLV field to a msgb
Definition: tlv.h:265
rsl_rll_simple
struct msgb * rsl_rll_simple(uint8_t msg_type, uint8_t chan_nr, uint8_t link_id, int transparent)
Create msgb with RSL RLL header.
Definition: rsl.c:492
TLV_TYPE_SINGLE_TV
@ TLV_TYPE_SINGLE_TV
tag and value (both 4 bit) in 1 byte
Definition: tlv.h:377
RSL_ALLOC_HEADROOM
#define RSL_ALLOC_HEADROOM
Headroom size for RSL msgb_alloc.
Definition: rsl.c:40
rsl_enc_chan_nr
uint8_t rsl_enc_chan_nr(uint8_t type, uint8_t subch, uint8_t timeslot)
Encode channel number as per Section 9.3.1.
Definition: rsl.c:141
rsl_rlm_cause_name
const char * rsl_rlm_cause_name(uint8_t err)
Get human-readable string for RLM cause.
Definition: rsl.c:415
tlv_def::fixed_len
uint8_t fixed_len
length in case of TLV_TYPE_FIXED
Definition: tlv.h:384
abis_rsl_rll_hdr::chan_nr
uint8_t chan_nr
RSL channel number (value)
Definition: gsm_08_58.h:44
data
uint8_t data[0]
actual payload data
Definition: gsm_08_58.h:4
RSL_ALLOC_SIZE
#define RSL_ALLOC_SIZE
Size for RSL msgb_alloc.
Definition: rsl.c:38
gsm48_system_information_type_2
Definition: gsm_04_08.h:668
rsl_init_rll_hdr
void rsl_init_rll_hdr(struct abis_rsl_rll_hdr *dh, uint8_t msg_type)
Initialize a RSL RLL header.
Definition: rsl.c:43
abis_rsl_cchan_hdr::ie_chan
uint8_t ie_chan
RSL_IE_CHAN_NR (tag)
Definition: gsm_08_58.h:61
msg_type
uint8_t msg_type
message type (abis_rsl_msgtype)
Definition: gsm_08_58.h:3
rsl_chan_nr_str
const char * rsl_chan_nr_str(uint8_t chan_nr)
Get human-readable string for RSL channel number.
Definition: rsl.c:205
rsl_ipac_msg_name
const char * rsl_ipac_msg_name(uint8_t msg_type)
Get human-readable name of ip.access RSL msg type.
Definition: rsl.c:380
abis_rsl_common_hdr::msg_type
uint8_t msg_type
message type (abis_rsl_msgtype)
Definition: gsm_08_58.h:36
gsm48_system_information_type_5
Definition: gsm_04_08.h:721
TLV_TYPE_NONE
@ TLV_TYPE_NONE
no type
Definition: tlv.h:370
osmo_shift_v_fixed
int osmo_shift_v_fixed(uint8_t **data, size_t *data_len, size_t len, uint8_t **value)
Definition: tlv_parser.c:295
osmo_earfcn_si2q
Definition: sysinfo.h:39
abis_rsl_rll_hdr::link_id
uint8_t link_id
RSL link identifier (value)
Definition: gsm_08_58.h:46
osmo_oap_message
Parsed/decoded OAP protocol message.
Definition: oap.h:56
abis_rsl_common_hdr::msg_discr
uint8_t msg_discr
message discriminator (ABIS_RSL_MDISC_*)
Definition: gsm_08_58.h:35
rsl_dec_chan_nr
int rsl_dec_chan_nr(uint8_t chan_nr, uint8_t *type, uint8_t *subch, uint8_t *timeslot)
Decode RSL channel number.
Definition: rsl.c:173
gsm48_system_information_type_1
Definition: gsm_04_08.h:660
rsl_rll_push_hdr
void rsl_rll_push_hdr(struct msgb *msg, uint8_t msg_type, uint8_t chan_nr, uint8_t link_id, int transparent)
Push a RSL RLL header onto an existing msgb.
Definition: rsl.c:459
tlv.h
gsm_08_58.h
osmo_shift_lv
int osmo_shift_lv(uint8_t **data, size_t *data_len, uint8_t **value, size_t *value_len)
Definition: tlv_parser.c:429
abis_rsl_cchan_hdr
Definition: gsm_08_58.h:59
gsm48_rach_control
Definition: gsm_04_08.h:456
rsl_ipac_msgt_names
static const struct value_string rsl_ipac_msgt_names[]
ip.access specific
Definition: rsl.c:350
tlv_parsed
result of the TLV parser
Definition: tlv.h:393
chan_nr
uint8_t chan_nr
RSL channel number (value)
Definition: gsm_08_58.h:4
rsl.h
TLV_TYPE_vTvLV_GAN
@ TLV_TYPE_vTvLV_GAN
variable-length tag, variable-length length
Definition: tlv.h:378
tlv_dump
int tlv_dump(struct tlv_parsed *dec)
Dump pasred TLV structure to stdout.
Definition: tlv_parser.c:35
TLV_TYPE_TV
@ TLV_TYPE_TV
tag-value (8bit)
Definition: tlv.h:373
rxlev_stats
Definition: rxlev_stat.h:6
abis_rsl_rll_hdr::ie_chan
uint8_t ie_chan
RSL_IE_CHAN_NR (tag)
Definition: gsm_08_58.h:43