libosmogsm
0.9.6-12.20170220git32ee5af8.fc32
Osmocom GSM library
|
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.
|
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") |
|
Osmocom GSM A5 ciphering algorithm header.
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
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
uint8_t ie_link_id
RSL_IE_LINK_IDENT (tag)
Definition: gsm_08_58.h:45
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
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
const uint8_t * val
pointer to value
Definition: tlv.h:365
uint8_t link_id
RSL link identifier (value)
Definition: gsm_08_58.h:6
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
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
const char * rsl_err_name(uint8_t err)
Get human-readable name for RSL Error.
Definition: rsl.c:267
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
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
uint8_t timeslot
E1 timeslot.
Definition: gsm_12_21.h:4
@ TLV_TYPE_FIXED
fixed-length value-only
Definition: tlv.h:371
uint16_t len
length
Definition: tlv.h:364
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
tag-only
Definition: tlv.h:372
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
const char * rsl_msg_name(uint8_t err)
Get human-readable string for RSL Message Type.
Definition: rsl.c:344
@ TLV_TYPE_TLV
tag-length-value
Definition: tlv.h:374
@ TLV_TYPE_TvLV
tag, variable length, value
Definition: tlv.h:376
Definition of All 256 IE / TLV.
Definition: tlv.h:388
Definition: gsm_08_58.h:41
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
enum tlv_type type
TLV type.
Definition: tlv.h:383
@ TLV_TYPE_TL16V
tag, 16 bit length, value
Definition: tlv.h:375
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
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
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
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
tag and value (both 4 bit) in 1 byte
Definition: tlv.h:377
#define RSL_ALLOC_HEADROOM
Headroom size for RSL msgb_alloc.
Definition: rsl.c:40
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
const char * rsl_rlm_cause_name(uint8_t err)
Get human-readable string for RLM cause.
Definition: rsl.c:415
uint8_t fixed_len
length in case of TLV_TYPE_FIXED
Definition: tlv.h:384
uint8_t chan_nr
RSL channel number (value)
Definition: gsm_08_58.h:44
uint8_t data[0]
actual payload data
Definition: gsm_08_58.h:4
#define RSL_ALLOC_SIZE
Size for RSL msgb_alloc.
Definition: rsl.c:38
void rsl_init_rll_hdr(struct abis_rsl_rll_hdr *dh, uint8_t msg_type)
Initialize a RSL RLL header.
Definition: rsl.c:43
uint8_t ie_chan
RSL_IE_CHAN_NR (tag)
Definition: gsm_08_58.h:61
uint8_t msg_type
message type (abis_rsl_msgtype)
Definition: gsm_08_58.h:3
const char * rsl_chan_nr_str(uint8_t chan_nr)
Get human-readable string for RSL channel number.
Definition: rsl.c:205
const char * rsl_ipac_msg_name(uint8_t msg_type)
Get human-readable name of ip.access RSL msg type.
Definition: rsl.c:380
uint8_t msg_type
message type (abis_rsl_msgtype)
Definition: gsm_08_58.h:36
@ TLV_TYPE_NONE
no type
Definition: tlv.h:370
int osmo_shift_v_fixed(uint8_t **data, size_t *data_len, size_t len, uint8_t **value)
Definition: tlv_parser.c:295
uint8_t link_id
RSL link identifier (value)
Definition: gsm_08_58.h:46
Parsed/decoded OAP protocol message.
Definition: oap.h:56
uint8_t msg_discr
message discriminator (ABIS_RSL_MDISC_*)
Definition: gsm_08_58.h:35
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
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
int osmo_shift_lv(uint8_t **data, size_t *data_len, uint8_t **value, size_t *value_len)
Definition: tlv_parser.c:429
Definition: gsm_08_58.h:59
Definition: gsm_04_08.h:456
static const struct value_string rsl_ipac_msgt_names[]
ip.access specific
Definition: rsl.c:350
result of the TLV parser
Definition: tlv.h:393
uint8_t chan_nr
RSL channel number (value)
Definition: gsm_08_58.h:4
@ TLV_TYPE_vTvLV_GAN
variable-length tag, variable-length length
Definition: tlv.h:378
int tlv_dump(struct tlv_parsed *dec)
Dump pasred TLV structure to stdout.
Definition: tlv_parser.c:35
@ TLV_TYPE_TV
tag-value (8bit)
Definition: tlv.h:373
Definition: rxlev_stat.h:6
uint8_t ie_chan
RSL_IE_CHAN_NR (tag)
Definition: gsm_08_58.h:43