diff options
author | Pablo Neira Ayuso <pablo@gnumonks.org> | 2011-04-26 00:28:18 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@gnumonks.org> | 2011-04-26 00:28:18 +0200 |
commit | f0059596a20bfa406a500ca5d6b34bf88d333ed3 (patch) | |
tree | 41bc483077171529e20084ede0784dd6af076056 /src/shared/libosmocore/include/osmocom/gsm/gsm48.h | |
parent | d9639bb010d05a96a6cbced94668c5754a4f0de9 (diff) | |
parent | 28dbfe9bf7a799ab1da2563fd5e007d007b54168 (diff) |
Merge commit '28dbfe9bf7a799ab1da2563fd5e007d007b54168'
Diffstat (limited to 'src/shared/libosmocore/include/osmocom/gsm/gsm48.h')
-rw-r--r-- | src/shared/libosmocore/include/osmocom/gsm/gsm48.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/shared/libosmocore/include/osmocom/gsm/gsm48.h b/src/shared/libosmocore/include/osmocom/gsm/gsm48.h new file mode 100644 index 00000000..1e9403bc --- /dev/null +++ b/src/shared/libosmocore/include/osmocom/gsm/gsm48.h @@ -0,0 +1,36 @@ +#ifndef _OSMOCORE_GSM48_H +#define _OSMOCORE_GSM48_H + +#include <osmocom/gsm/tlv.h> +#include <osmocom/gsm/protocol/gsm_04_08.h> +#include <osmocom/gsm/gsm48_ie.h> + +/* A parsed GPRS routing area */ +struct gprs_ra_id { + uint16_t mnc; + uint16_t mcc; + uint16_t lac; + uint8_t rac; +}; + +extern const struct tlv_definition gsm48_att_tlvdef; +extern const struct tlv_definition gsm48_rr_att_tlvdef; +extern const struct tlv_definition gsm48_mm_att_tlvdef; +const char *gsm48_cc_state_name(uint8_t state); +const char *gsm48_cc_msg_name(uint8_t msgtype); +const char *rr_cause_name(uint8_t cause); + +void gsm48_generate_lai(struct gsm48_loc_area_id *lai48, uint16_t mcc, + uint16_t mnc, uint16_t lac); +int gsm48_generate_mid_from_tmsi(uint8_t *buf, uint32_t tmsi); +int gsm48_generate_mid_from_imsi(uint8_t *buf, const char *imsi); + +/* Convert Mobile Identity (10.5.1.4) to string */ +int gsm48_mi_to_string(char *string, const int str_len, + const uint8_t *mi, const int mi_len); + +/* Parse Routeing Area Identifier */ +void gsm48_parse_ra(struct gprs_ra_id *raid, const uint8_t *buf); +int gsm48_construct_ra(uint8_t *buf, const struct gprs_ra_id *raid); + +#endif |