diff options
author | Harald Welte <laforge@osmocom.org> | 2022-11-29 22:33:54 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2023-01-21 22:41:57 +0100 |
commit | d55a209d1c1eaf48d11d851c6a5082af7df36d69 (patch) | |
tree | f6395ad8e875a619354e9687951af086b5e3cee1 /src | |
parent | 88955fb5506280a82860b026f8d7db9ad57bb504 (diff) |
create libosmoisdn sub-library
There are some parts of libosmogsm which are not really GSM specific,
but rather ISDN bits that were inherited by GSM. This includes the
I.460 multiplex as well as the core LAPD protocol.
Let's move those bits to its own libosmoisdn library, before we add
more ISDN specific bits to the wrong place.
Backwards-compatibility is created by making libosmogsm depend on
libosmoisdn, and by providing wrapper include files for source
compatibility.
Change-Id: Ib1a6c762322fd5047be3188b1df22408ef06aa50
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/gsm/Makefile.am | 6 | ||||
-rw-r--r-- | src/isdn/Makefile.am | 25 | ||||
-rw-r--r-- | src/isdn/i460_mux.c (renamed from src/gsm/i460_mux.c) | 2 | ||||
-rw-r--r-- | src/isdn/lapd_core.c (renamed from src/gsm/lapd_core.c) | 2 | ||||
-rw-r--r-- | src/isdn/libosmoisdn.map | 24 |
6 files changed, 55 insertions, 5 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 5d8343c8..86066466 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,7 @@ SUBDIRS = \ core \ vty \ + isdn \ codec \ gsm \ coding \ diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index eb0f7e45..aa2e6ec2 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -25,18 +25,18 @@ libgsmint_la_SOURCES = a5.c rxlev_stat.c tlv_parser.c comp128.c comp128v23.c \ gsm48_ie.c gsm0808.c sysinfo.c \ gprs_cipher_core.c gprs_rlc.c gsm0480.c abis_nm.c gsm0502.c \ gsm0411_utils.c gsm0411_smc.c gsm0411_smr.c gsm0414.c \ - lapd_core.c lapdm.c kasumi.c gsm29205.c gsm_04_08_gprs.c \ + lapdm.c kasumi.c gsm29205.c gsm_04_08_gprs.c \ auth_core.c auth_comp128v1.c auth_comp128v23.c auth_xor.c \ auth_milenage.c milenage/aes-encblock.c gea.c \ milenage/aes-internal.c milenage/aes-internal-enc.c \ milenage/milenage.c gan.c ipa.c gsm0341.c apn.c \ gsup.c gsup_sms.c gprs_gea.c gsm0503_conv.c oap.c gsm0808_utils.c \ gsm23003.c gsm23236.c mncc.c bts_features.c oap_client.c \ - gsm29118.c gsm48_rest_octets.c cbsp.c gsm48049.c i460_mux.c \ + gsm29118.c gsm48_rest_octets.c cbsp.c gsm48049.c \ gad.c bsslap.c bssmap_le.c kdf.c iuup.c libgsmint_la_LDFLAGS = -no-undefined -libgsmint_la_LIBADD = $(top_builddir)/src/core/libosmocore.la +libgsmint_la_LIBADD = $(top_builddir)/src/core/libosmocore.la $(top_builddir)/src/isdn/libosmoisdn.la libosmogsm_la_SOURCES = libosmogsm_la_LDFLAGS = $(LTLDFLAGS_OSMOGSM) -version-info $(LIBVERSION) -no-undefined diff --git a/src/isdn/Makefile.am b/src/isdn/Makefile.am new file mode 100644 index 00000000..97e7a280 --- /dev/null +++ b/src/isdn/Makefile.am @@ -0,0 +1,25 @@ +# This is _NOT_ the library release version, it's an API version. +# 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 +LIBVERSION=0:0:0 + +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include +AM_CFLAGS = -Wall $(TALLOC_CFLAGS) + +if ENABLE_PSEUDOTALLOC +AM_CPPFLAGS += -I$(top_srcdir)/src/pseudotalloc +endif + +noinst_LTLIBRARIES = libisdnint.la +lib_LTLIBRARIES = libosmoisdn.la + +libisdnint_la_SOURCES = i460_mux.c lapd_core.c + +libisdnint_la_LDFLAGS = -no-undefined +libisdnint_la_LIBADD = $(top_builddir)/src/core/libosmocore.la + +libosmoisdn_la_SOURCES = +libosmoisdn_la_LDFLAGS = $(LTLDFLAGS_OSMOISDN) -version-info $(LIBVERSION) -no-undefined +libosmoisdn_la_LIBADD = libisdnint.la $(TALLOC_LIBS) + +EXTRA_DIST = libosmoisdn.map diff --git a/src/gsm/i460_mux.c b/src/isdn/i460_mux.c index a6a0835c..eeaed3c7 100644 --- a/src/gsm/i460_mux.c +++ b/src/isdn/i460_mux.c @@ -21,7 +21,7 @@ #include <osmocom/core/bits.h> #include <osmocom/core/utils.h> #include <osmocom/core/msgb.h> -#include <osmocom/gsm/i460_mux.h> +#include <osmocom/isdn/i460_mux.h> /* count the number of sub-channels in this I460 slot */ static int osmo_i460_subchan_count(struct osmo_i460_timeslot *ts) diff --git a/src/gsm/lapd_core.c b/src/isdn/lapd_core.c index 7441285d..6475cb0f 100644 --- a/src/gsm/lapd_core.c +++ b/src/isdn/lapd_core.c @@ -79,7 +79,7 @@ #include <osmocom/core/msgb.h> #include <osmocom/core/utils.h> #include <osmocom/core/talloc.h> -#include <osmocom/gsm/lapd_core.h> +#include <osmocom/isdn/lapd_core.h> #include <osmocom/gsm/rsl.h> /* TS 04.06 Table 4 / Section 3.8.1 */ diff --git a/src/isdn/libosmoisdn.map b/src/isdn/libosmoisdn.map new file mode 100644 index 00000000..76e8c813 --- /dev/null +++ b/src/isdn/libosmoisdn.map @@ -0,0 +1,24 @@ +LIBOSMOISDN_1.0 { +global: + +tall_lapd_ctx; +lapd_dl_exit; +lapd_dl_init; +lapd_dl_init2; +lapd_dl_set_name; +lapd_dl_reset; +lapd_msgb_alloc; +lapd_ph_data_ind; +lapd_recv_dlsap; +lapd_set_mode; +lapd_state_names; + +osmo_i460_demux_in; +osmo_i460_mux_enqueue; +osmo_i460_mux_out; +osmo_i460_subchan_add; +osmo_i460_subchan_del; +osmo_i460_ts_init; + +local: *; +}; |