2011-03-23 17:08:08 +00:00
|
|
|
# This is _NOT_ the library release version, it's an API version.
|
2016-12-13 17:41:17 +00:00
|
|
|
# Please read chapter "Library interface versions" of the libtool documentation
|
|
|
|
# before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html
|
implement support for 3-digit MNC with leading zeros
Enable representing three-digit MNC with leading zeros. The MNCs 23 and 023 are
actually different; so far we treated both as 23. Re-encode an incoming BCD or
string of 023 as it were, i.e. not dropping the leading zero as 23.
Break ABI compatibility by changing the size and ordering of structs
gprs_ra_id, osmo_plmn_id, osmo_cell_global_id, ... by adding an mnc_3_digits
flag.
Change ordering in gprs_ra_id because the canonical oder is {Mobile Country
Code, Mobile Network Code}, so have the mcc member first.
ABI compatibility cannot be maintained for struct gprs_ra_id, since it is a
direct member of structs bssgp_bvc_ctx and bssgp_paging_info, and even just
adding a flag to the end would cause ABI changes of those structs. Similarly,
osmo_plmn_id is a direct member of osmo_location_area_id, and so forth.
Add new API to set and read this additional flag to preserve leading zeros:
- osmo_plmn_to_bcd(), osmo_plmn_from_bcd() after
gsm48_mcc_mnc_to_bcd() and gsm48_mcc_mnc_from_bcd().
- gsm48_decode_lai2(), gsm48_generate_lai2() after
gsm48_decode_lai(), gsm48_generate_lai().
- gsm0808_create_layer3_2() after gsm0808_create_layer3() and gsm0808_create_layer3_aoip().
- various osmo_*_name() functions in gsm23003.h (osmo_rai_name() still in
gsm48.h close to struct gprs_ra_id definition). The amount and duplication of
these may seem a bit overboard, but IMO they do make sense in this way.
Though most code will soon see patches unifying the data structures used, in
some cases (vty, ctrl) they are required singled out. Without these
functions, the formatting ("%0*u", mnc_3_digits ? 3 : 2, mnc) would be
duplicated all over our diverse repositories.
In various log output, include the leading MNC zeros.
Mark one TODO in card_fs_sim.c, I am not sure how to communicate a leading zero
to/from a SIM card FS. The focus here is on the core network / BSS.
To indicate ABI incompatibility, bump libosmogsm and libosmogb LIBVERSIONs;
adjust debian files accordingly.
Implementation choices:
- The default behavior upon zero-initialization will be the mnc_3_digits flag
set to false, which yields exactly the previous behavior.
- I decided against packing the mnc with the mnc_3_digits field into a
sub-struct because it would immediately break all builds of dependent
projects: it would require immediate merging of numerous patches in other
repositories, and it would make compiling older code against a newer
libosmocore unneccessarily hard.
Change-Id: Id2240f7f518494c9df6c8bda52c0d5092f90f221
2018-02-20 12:47:08 +00:00
|
|
|
LIBVERSION=9:0:0
|
2011-03-23 17:08:08 +00:00
|
|
|
|
2015-12-05 22:38:18 +00:00
|
|
|
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(TALLOC_CFLAGS)
|
2013-06-02 23:59:25 +00:00
|
|
|
AM_CFLAGS = -Wall ${GCC_FVISIBILITY_HIDDEN}
|
2011-03-23 17:08:08 +00:00
|
|
|
|
2017-05-15 19:37:34 +00:00
|
|
|
if ENABLE_PSEUDOTALLOC
|
|
|
|
AM_CPPFLAGS += -I$(top_srcdir)/src/pseudotalloc
|
|
|
|
endif
|
|
|
|
|
2011-12-06 23:24:32 +00:00
|
|
|
# FIXME: this should eventually go into a milenage/Makefile.am
|
|
|
|
noinst_HEADERS = milenage/aes.h milenage/aes_i.h milenage/aes_wrap.h \
|
|
|
|
milenage/common.h milenage/crypto.h milenage/includes.h \
|
|
|
|
milenage/milenage.h
|
|
|
|
|
2015-09-16 12:32:31 +00:00
|
|
|
noinst_LTLIBRARIES = libgsmint.la
|
2011-03-23 17:08:08 +00:00
|
|
|
lib_LTLIBRARIES = libosmogsm.la
|
|
|
|
|
2017-03-07 23:06:40 +00:00
|
|
|
BUILT_SOURCES = gsm0503_conv.c
|
|
|
|
|
2015-09-16 12:32:31 +00:00
|
|
|
libgsmint_la_SOURCES = a5.c rxlev_stat.c tlv_parser.c comp128.c comp128v23.c \
|
2013-11-02 17:11:01 +00:00
|
|
|
gsm_utils.c rsl.c gsm48.c gsm48_ie.c gsm0808.c sysinfo.c \
|
2016-07-14 22:13:45 +00:00
|
|
|
gprs_cipher_core.c gprs_rlc.c gsm0480.c abis_nm.c gsm0502.c \
|
2017-05-29 13:58:43 +00:00
|
|
|
gsm0411_utils.c gsm0411_smc.c gsm0411_smr.c gsm0414.c \
|
2016-04-20 15:12:24 +00:00
|
|
|
lapd_core.c lapdm.c kasumi.c gsm_04_08_gprs.c \
|
2013-11-02 17:11:01 +00:00
|
|
|
auth_core.c auth_comp128v1.c auth_comp128v23.c \
|
2016-06-30 08:39:00 +00:00
|
|
|
auth_milenage.c milenage/aes-encblock.c gea.c \
|
2013-11-02 17:11:01 +00:00
|
|
|
milenage/aes-internal.c milenage/aes-internal-enc.c \
|
2016-04-25 16:46:22 +00:00
|
|
|
milenage/milenage.c gan.c ipa.c gsm0341.c apn.c \
|
2017-10-04 01:15:47 +00:00
|
|
|
gsup.c gprs_gea.c gsm0503_conv.c oap.c gsm0808_utils.c \
|
2018-03-01 18:13:05 +00:00
|
|
|
gsm23003.c mncc.c bts_features.c
|
2015-09-16 12:32:31 +00:00
|
|
|
libgsmint_la_LDFLAGS = -no-undefined
|
2016-10-12 13:27:42 +00:00
|
|
|
libgsmint_la_LIBADD = $(top_builddir)/src/libosmocore.la
|
2011-11-06 19:22:12 +00:00
|
|
|
|
2015-09-16 12:32:31 +00:00
|
|
|
libosmogsm_la_SOURCES =
|
2017-10-30 12:19:58 +00:00
|
|
|
libosmogsm_la_LDFLAGS = $(LTLDFLAGS_OSMOGSM) -version-info $(LIBVERSION) -no-undefined
|
|
|
|
libosmogsm_la_LIBADD = libgsmint.la $(TALLOC_LIBS)
|
2012-04-04 22:44:46 +00:00
|
|
|
|
2017-10-26 08:56:04 +00:00
|
|
|
if ENABLE_GNUTLS
|
|
|
|
AM_CPPFLAGS += $(LIBGNUTLS_CFLAGS)
|
|
|
|
libosmogsm_la_LIBADD += $(LIBGNUTLS_LIBS)
|
|
|
|
endif
|
|
|
|
|
2012-04-04 22:44:46 +00:00
|
|
|
EXTRA_DIST = libosmogsm.map
|
2016-04-29 11:17:22 +00:00
|
|
|
|
utils/conv_gen.py: generate a single file
Instead of generating every convolutional code into a separate
file (such as conv_xcch_gen.c, conv_cs3_gen.c), it is better to
have a single file, containing all definitions, because as many
convolutional codes we add, as many entries we will have to add
into 'src/gsm/Makefile.am'. This approach increases readability
of the Makefile.am, and also makes us able to share some data
between some convolutional code definitions.
For example: xCCH, RACH, SCH, TCH/F, both CS2 and CS3 may use
the same *_state[][2] and *_output[][2] arrays within a single
file. This optimization is currently WIP.
Change-Id: Ib4e4ee5fdde38429e68e3b2fa50ec03a18f59daa
2016-09-07 15:18:10 +00:00
|
|
|
# Convolutional codes generation
|
2017-03-07 23:06:40 +00:00
|
|
|
gsm0503_conv.c: $(top_srcdir)/utils/conv_gen.py $(top_srcdir)/utils/conv_codes_gsm.py
|
2018-07-02 13:28:55 +00:00
|
|
|
$(AM_V_GEN)python $(top_srcdir)/utils/conv_gen.py gen_codes gsm
|
utils/conv_gen.py: generate a single file
Instead of generating every convolutional code into a separate
file (such as conv_xcch_gen.c, conv_cs3_gen.c), it is better to
have a single file, containing all definitions, because as many
convolutional codes we add, as many entries we will have to add
into 'src/gsm/Makefile.am'. This approach increases readability
of the Makefile.am, and also makes us able to share some data
between some convolutional code definitions.
For example: xCCH, RACH, SCH, TCH/F, both CS2 and CS3 may use
the same *_state[][2] and *_output[][2] arrays within a single
file. This optimization is currently WIP.
Change-Id: Ib4e4ee5fdde38429e68e3b2fa50ec03a18f59daa
2016-09-07 15:18:10 +00:00
|
|
|
|
|
|
|
CLEANFILES = gsm0503_conv.c
|