From 61dc63e354e1a68317f72d485bea4b6a0194e863 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 23 May 2011 20:30:17 +0200 Subject: rename abis_nm_adm_name() to abis_nm_adm_state_name() --- include/osmocom/gsm/abis_nm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/osmocom') diff --git a/include/osmocom/gsm/abis_nm.h b/include/osmocom/gsm/abis_nm.h index 04e4575d..fc096dc2 100644 --- a/include/osmocom/gsm/abis_nm.h +++ b/include/osmocom/gsm/abis_nm.h @@ -18,7 +18,7 @@ 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); +const char *abis_nm_adm_state_name(uint8_t adm); void abis_nm_debugp_foh(int ss, struct abis_om_fom_hdr *foh); #endif /* _OSMO_GSM_ABIS_NM_H */ -- cgit v1.2.3 From ea4b12aa5ddc054547926f5eca0e036268c1e98e Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 23 May 2011 20:41:31 +0200 Subject: abis_nm: remove abis_nm_obj_class_name / abis_nm_adm_state_name and export the underlying raw value_string arrays instead: abis_nm_obj_class_names / abis_nm_adm_state_names. This permits the caller to use get_string_value() as well as get_value_string(). --- include/osmocom/gsm/abis_nm.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/osmocom') diff --git a/include/osmocom/gsm/abis_nm.h b/include/osmocom/gsm/abis_nm.h index fc096dc2..e7c3769d 100644 --- a/include/osmocom/gsm/abis_nm.h +++ b/include/osmocom/gsm/abis_nm.h @@ -9,16 +9,17 @@ 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]; +const struct value_string abis_nm_obj_class_names[]; +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_state_name(uint8_t adm); void abis_nm_debugp_foh(int ss, struct abis_om_fom_hdr *foh); #endif /* _OSMO_GSM_ABIS_NM_H */ -- cgit v1.2.3 From 3036612d59a5c8d97b2086a5e7817613f45948ef Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 23 May 2011 21:41:34 +0200 Subject: abis_nm: Mark the structs as extern to avoid compiler warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit warning: array ‘abis_nm_obj_class_names’ assumed to have one element --- include/osmocom/gsm/abis_nm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/osmocom') diff --git a/include/osmocom/gsm/abis_nm.h b/include/osmocom/gsm/abis_nm.h index e7c3769d..720b603d 100644 --- a/include/osmocom/gsm/abis_nm.h +++ b/include/osmocom/gsm/abis_nm.h @@ -9,8 +9,8 @@ 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]; -const struct value_string abis_nm_obj_class_names[]; -const struct value_string abis_nm_adm_state_names[]; +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); -- cgit v1.2.3 From b5503136fa234690d5493b19a8aee3a4ef74190d Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 24 May 2011 15:01:53 +0200 Subject: Import sytem information related definitions + code from openbsc --- include/osmocom/gsm/Makefile.am | 3 ++- include/osmocom/gsm/protocol/gsm_04_08.h | 3 +++ include/osmocom/gsm/sysinfo.h | 40 ++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 include/osmocom/gsm/sysinfo.h (limited to 'include/osmocom') 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/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 + +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 */ -- cgit v1.2.3 From 11c7193ad8ceb4f3898799dc44b700b8b93a59b8 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 24 May 2011 17:15:12 +0200 Subject: Import abis_nm_{chcomb4pchan,pchan4chcomb}() from openbsc --- include/osmocom/gsm/abis_nm.h | 2 ++ include/osmocom/gsm/gsm_utils.h | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) (limited to 'include/osmocom') diff --git a/include/osmocom/gsm/abis_nm.h b/include/osmocom/gsm/abis_nm.h index 720b603d..dcc8d4bb 100644 --- a/include/osmocom/gsm/abis_nm.h +++ b/include/osmocom/gsm/abis_nm.h @@ -22,4 +22,6 @@ const char *abis_nm_avail_name(uint8_t avail); const char *abis_nm_test_name(uint8_t test); 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 -- cgit v1.2.3