aboutsummaryrefslogtreecommitdiffstats
path: root/tests/libosmo-gtlv/Makefile.am
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2022-01-12 02:38:39 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2022-06-16 13:04:33 +0200
commit2100097ef1be98a338b583f15bb5f529690829ff (patch)
treead4d0d13806e476472581b2bde554c6595cd9848 /tests/libosmo-gtlv/Makefile.am
parentcf11908f9c39ee98b063d1ca33770179f34a3652 (diff)
libosmo-gtlv: add generic TLV de- and encoder
An all new TLV parser supporting: - Any size of T and L (determined by callback function), - "Grouped IEs", so that an IE payload is a nested IE structure, - optional/mandatory/multi-occurence IEs, - decoding unordered tags (or enforcing strict order). Will be used for PFCP message decoding and encoding, a T16L16V protocol which requires above features. Upcoming patches add - translating PDUs to plain C structs and vice versa - TLV generator to reduce repetition a in protocol definition - TLIV capability Previously, the way we deal with TLVs causes a lot of code re-implementation: the TL decoding is taken care of by the API, but for encoding, we essentially re-implement each protocol and each encoded message in the individual programs. This API is an improvement in that we only once implement the TL coding (or just use osmo_t8l8v_cfg / osmo_t16l16v_cfg), get symmetric de- and encoding of the TL, and only need to deal with the value part of each IE. The common pattern of - store TL preliminarily, - write V data and - update L after V is complete is conveniently done by osmo_gtlv_put_update_tl(). Related: SYS#5599 Change-Id: Ib0fd00d9f288ffe13b7e67701f3e47073587404a
Diffstat (limited to 'tests/libosmo-gtlv/Makefile.am')
-rw-r--r--tests/libosmo-gtlv/Makefile.am30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/libosmo-gtlv/Makefile.am b/tests/libosmo-gtlv/Makefile.am
new file mode 100644
index 0000000..7ab4ae0
--- /dev/null
+++ b/tests/libosmo-gtlv/Makefile.am
@@ -0,0 +1,30 @@
+AM_CPPFLAGS = \
+ $(all_includes) \
+ -I$(top_srcdir)/include \
+ $(NULL)
+
+AM_CFLAGS = \
+ -Wall \
+ $(LIBOSMOCORE_CFLAGS) \
+ $(NULL)
+
+noinst_PROGRAMS = \
+ gtlv_test \
+ $(NULL)
+
+EXTRA_DIST = \
+ gtlv_test.ok \
+ $(NULL)
+
+gtlv_test_SOURCES = \
+ gtlv_test.c \
+ $(NULL)
+
+gtlv_test_LDADD = \
+ $(top_builddir)/src/libosmo-gtlv/libosmo-gtlv.a \
+ $(LIBOSMOCORE_LIBS) \
+ $(NULL)
+
+.PHONY: update_exp
+update_exp:
+ $(builddir)/gtlv_test >$(srcdir)/gtlv_test.ok