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
12 files changed
tree: 1490dcf4e45a7f6bf707624a0ea3c9c47f7cba20
  1. contrib/
  2. debian/
  3. doc/
  4. include/
  5. src/
  6. tests/
  7. .gitignore
  8. .gitreview
  9. AUTHORS
  10. configure.ac
  11. git-version-gen
  12. Makefile.am
  13. osmoappdesc.py
  14. README.md
  15. TODO-RELEASE
README.md

osmo-upf - Osmocom User Plane Function Implementation

Homepage

The official homepage of the project is https://osmocom.org/projects/osmoupf/wiki

GIT Repository

You can clone from the official osmo-upf.git repository using

git clone git://git.osmocom.org/osmo-upf.git

There is a cgit interface at https://git.osmocom.org/osmo-upf/

To submit patches, see "Contributing" below.

Documentation

User Manuals and VTY reference manuals are [optionally] built in PDF form as part of the build process.

Pre-rendered PDF version of the current "master" can be found at User Manual as well as the VTY Reference Manual

Mailing List

Discussions related to osmo-bts are happening on the osmocom-net-gprs@lists.osmocom.org mailing list, please see https://lists.osmocom.org/postorius/lists/osmocom-net-gprs@lists.osmocom.org/ for subscription options and the list archive.

Please observe the Osmocom Mailing List Rules when posting.

Contributing

Our coding standards are described at https://osmocom.org/projects/cellular-infrastructure/wiki/Coding_standards

Submit patches at https://gerrit.osmocom.org/ See also https://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit

The current patch queue for OsmoUPF can be seen at https://gerrit.osmocom.org/#/q/project:osmo-upf+status:open