Attention is currently required from: neels. Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-upf/+/27219
to look at the new patch set (#2).
Change subject: libosmo-tlv: add C code generator for IE structs and arrays ......................................................................
libosmo-tlv: add C code generator for IE structs and arrays
Defining a protocol of message types with lists of IEs bears a lot of repetitive, copy-paste-error-prone writing out of data structures. Add a third layer to libosmo-tlv, which allows helpful code generation.
By non-repetitive data structures that briefly describe the protocol's messages and IEs, generate possibly repetitive IE list arrays and decoded-struct definitions automatically, avoiding grunt work errors.
I tried C macros for this at first, but it became too convoluted. Generating C code that can be read and grepped makes things easier.
A usage example is found in tests/libosmo-tlv/test_tlv_gen/.
Related: SYS#5599 Change-Id: Ifb3ea54d2797ce060b95834aa117725ec2d6c4cf --- M configure.ac M include/osmocom/tlv/Makefile.am A include/osmocom/tlv/tlv_gen.h M src/libosmo-tlv/Makefile.am A src/libosmo-tlv/tlv_gen.c M tests/libosmo-tlv/Makefile.am A tests/libosmo-tlv/test_tlv_gen/Makefile.am A tests/libosmo-tlv/test_tlv_gen/gen__myproto_ies_auto.c A tests/libosmo-tlv/test_tlv_gen/myproto_ies_custom.c A tests/libosmo-tlv/test_tlv_gen/myproto_ies_custom.h A tests/libosmo-tlv/test_tlv_gen/tlv_gen_test.c A tests/libosmo-tlv/test_tlv_gen/tlv_gen_test.ok M tests/testsuite.at 13 files changed, 1,390 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/19/27219/2