diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2011-05-24 18:31:13 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2011-05-24 18:31:13 +0200 |
commit | 4761ba9d33a61cb654d45c0e9037b30a77e3f94a (patch) | |
tree | 5d54af51411669a40ce3f86ec5ca623f2408686a /include | |
parent | 3056d012d3d5da853535488619f12beeea59a6a4 (diff) | |
parent | 11c7193ad8ceb4f3898799dc44b700b8b93a59b8 (diff) |
Merge branch 'master' of git.osmocom.org:libosmocore
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/gsm/Makefile.am | 3 | ||||
-rw-r--r-- | include/osmocom/gsm/abis_nm.h | 7 | ||||
-rw-r--r-- | include/osmocom/gsm/gsm_utils.h | 26 | ||||
-rw-r--r-- | include/osmocom/gsm/protocol/gsm_04_08.h | 3 | ||||
-rw-r--r-- | include/osmocom/gsm/sysinfo.h | 40 |
5 files changed, 76 insertions, 3 deletions
diff --git a/include/osmocom/gsm/Makefile.am b/include/osmocom/gsm/Makefile.am index c3670ec7..547933ec 100644 --- a/include/osmocom/gsm/Makefile.am +++ b/include/osmocom/gsm/Makefile.am @@ -1,5 +1,6 @@ osmogsm_HEADERS = a5.h comp128.h gsm0808.h gsm48_ie.h mncc.h rxlev_stat.h \ - gsm0480.h gsm48.h gsm_utils.h rsl.h tlv.h abis_nm.h + gsm0480.h gsm48.h gsm_utils.h rsl.h tlv.h abis_nm.h \ + sysinfo.h SUBDIRS = protocol diff --git a/include/osmocom/gsm/abis_nm.h b/include/osmocom/gsm/abis_nm.h index 04e4575d..dcc8d4bb 100644 --- a/include/osmocom/gsm/abis_nm.h +++ b/include/osmocom/gsm/abis_nm.h @@ -9,16 +9,19 @@ const enum abis_nm_msgtype abis_nm_no_ack_nack[3]; const enum abis_nm_msgtype abis_nm_sw_load_msgs[9]; const enum abis_nm_msgtype abis_nm_nacks[33]; +extern const struct value_string abis_nm_obj_class_names[]; +extern const struct value_string abis_nm_adm_state_names[]; + const char *abis_nm_nack_cause_name(uint8_t cause); const char *abis_nm_nack_name(uint8_t nack); const char *abis_nm_event_type_name(uint8_t cause); const char *abis_nm_severity_name(uint8_t cause); const struct tlv_definition abis_nm_att_tlvdef; -const char *abis_nm_obj_class_name(uint8_t oc); const char *abis_nm_opstate_name(uint8_t os); const char *abis_nm_avail_name(uint8_t avail); const char *abis_nm_test_name(uint8_t test); -const char *abis_nm_adm_name(uint8_t adm); void abis_nm_debugp_foh(int ss, struct abis_om_fom_hdr *foh); +int abis_nm_chcomb4pchan(enum gsm_phys_chan_config pchan); +enum abis_nm_chan_comb abis_nm_pchan4chcomb(uint8_t chcomb); #endif /* _OSMO_GSM_ABIS_NM_H */ diff --git a/include/osmocom/gsm/gsm_utils.h b/include/osmocom/gsm/gsm_utils.h index 19adb70a..a0ef3c4f 100644 --- a/include/osmocom/gsm/gsm_utils.h +++ b/include/osmocom/gsm/gsm_utils.h @@ -114,4 +114,30 @@ int gprs_tlli_type(uint32_t tlli); uint32_t gprs_tmsi2tlli(uint32_t p_tmsi, enum gprs_tlli_type type); +/* Osmocom internal, not part of any gsm spec */ +enum gsm_phys_chan_config { + GSM_PCHAN_NONE, + GSM_PCHAN_CCCH, + GSM_PCHAN_CCCH_SDCCH4, + GSM_PCHAN_TCH_F, + GSM_PCHAN_TCH_H, + GSM_PCHAN_SDCCH8_SACCH8C, + GSM_PCHAN_PDCH, /* GPRS PDCH */ + GSM_PCHAN_TCH_F_PDCH, /* TCH/F if used, PDCH otherwise */ + GSM_PCHAN_UNKNOWN, + _GSM_PCHAN_MAX +}; + +/* Osmocom internal, not part of any gsm spec */ +enum gsm_chan_t { + GSM_LCHAN_NONE, + GSM_LCHAN_SDCCH, + GSM_LCHAN_TCH_F, + GSM_LCHAN_TCH_H, + GSM_LCHAN_UNKNOWN, + GSM_LCHAN_CCCH, + _GSM_LCHAN_MAX +}; + + #endif diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index 3ad7dfdc..39470e78 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -1257,6 +1257,9 @@ struct gsm48_ra_id { uint8_t rac; /* Routing Area Code */ } __attribute__ ((packed)); +#define GSM48_CELL_CHAN_DESC_SIZE 16 +#define GSM_MACBLOCK_LEN 23 +#define GSM_MACBLOCK_PADDING 0x2b #endif /* PROTO_GSM_04_08_H */ diff --git a/include/osmocom/gsm/sysinfo.h b/include/osmocom/gsm/sysinfo.h new file mode 100644 index 00000000..a66f3f19 --- /dev/null +++ b/include/osmocom/gsm/sysinfo.h @@ -0,0 +1,40 @@ +#ifndef _OSMO_GSM_SYSINFO_H +#define _OSMO_GSM_SYSINFO_H + +#include <osmocom/gsm/protocol/gsm_04_08.h> + +enum osmo_sysinfo_type { + SYSINFO_TYPE_NONE, + SYSINFO_TYPE_1, + SYSINFO_TYPE_2, + SYSINFO_TYPE_3, + SYSINFO_TYPE_4, + SYSINFO_TYPE_5, + SYSINFO_TYPE_6, + SYSINFO_TYPE_7, + SYSINFO_TYPE_8, + SYSINFO_TYPE_9, + SYSINFO_TYPE_10, + SYSINFO_TYPE_13, + SYSINFO_TYPE_16, + SYSINFO_TYPE_17, + SYSINFO_TYPE_18, + SYSINFO_TYPE_19, + SYSINFO_TYPE_20, + SYSINFO_TYPE_2bis, + SYSINFO_TYPE_2ter, + SYSINFO_TYPE_2quater, + SYSINFO_TYPE_5bis, + SYSINFO_TYPE_5ter, + /* FIXME all the various bis and ter */ + _MAX_SYSINFO_TYPE +}; + +typedef uint8_t sysinfo_buf_t[GSM_MACBLOCK_LEN]; + +extern const struct value_string osmo_sitype_strs[_MAX_SYSINFO_TYPE]; + +uint8_t gsm_sitype2rsl(enum osmo_sysinfo_type si_type); +enum osmo_sysinfo_type osmo_rsl2sitype(uint8_t rsl_si); + +#endif /* _OSMO_GSM_SYSINFO_H */ |