Attention is currently required from: pespin.
neels uploaded patch set #2 to this change.
libosmo-tlv: add versatile 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.
Will be used for PFCP message decoding and encoding, a T16L16V protocol
which requires above features.
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 the TL encoding for each protocol
and each encoded message. 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_tlv_put_update_tl().
Related: SYS#5599
Change-Id: Ib0fd00d9f288ffe13b7e67701f3e47073587404a
---
M configure.ac
M include/osmocom/Makefile.am
A include/osmocom/tlv/Makefile.am
A include/osmocom/tlv/tlv.h
M src/Makefile.am
A src/libosmo-tlv/Makefile.am
A src/libosmo-tlv/tlv.c
M tests/Makefile.am
A tests/libosmo-tlv/Makefile.am
A tests/libosmo-tlv/tlv_test.c
A tests/libosmo-tlv/tlv_test.ok
M tests/testsuite.at
12 files changed, 1,252 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/17/27217/2
To view, visit change 27217. To unsubscribe, or for help writing mail filters, visit settings.