Attention is currently required from: neels.

neels uploaded patch set #5 to this change.

View Change

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,442 insertions(+), 0 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/19/27219/5

To view, visit change 27219. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: Ifb3ea54d2797ce060b95834aa117725ec2d6c4cf
Gerrit-Change-Number: 27219
Gerrit-PatchSet: 5
Gerrit-Owner: neels <nhofmeyr@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: neels <nhofmeyr@sysmocom.de>
Gerrit-MessageType: newpatchset