Commit Graph

18 Commits

Author SHA1 Message Date
Neels Hofmeyr 27a90869c7 add unique_ids_test.c
Verify that skipping used IDs works for:
- PFCP UP-SEID
- GTP local TEID
- chain_id for nft rulesets -- so far expected to fail,
  fix follows in I139b46de0bd15185a7a06109d55f7c759755ec81.

Related: OS#5900
Change-Id: I36acff15f22d23ade4d281c2af3eb117dfc10359
2023-03-18 01:33:05 +00:00
Vadim Yanitskiy 7c3eeb0760 update git URLs (git -> https; gitea)
Change-Id: I7e0190b36861710d8cc8dd0cfd50d3dbe301ede5
2022-09-08 13:47:38 +00:00
Neels Hofmeyr f95bd5b895 drop charts/, duplicated from libosmo-pfcp.git
When placing libosmo-pfcp in a separate repository, I accidentally
duplicated the charts. Since the charts are generally valid for PFCP,
libosmo-pfcp is the proper place, not here.

Change-Id: I95f11e1525b3bc6b782e5f8aecddea672a104c99
2022-08-30 14:21:31 +00:00
Neels Hofmeyr b78cc91e4a configure: set libosmocore >= 1.6.0 like in packaging
Change-Id: Ib31f96ffca844c2b62361cc4ff1fbb98bbe3258c
2022-08-24 16:49:08 +02:00
Neels Hofmeyr 22006ba039 debian,RPM,configure: fix packaging (deps etc)
Related: SYS#5599
Change-Id: I068736d513ddb54b9a62c1d7970a0fbff3095b4b
2022-08-24 16:11:21 +02:00
Vadim Yanitskiy 183ff5c0a9 configure.ac: do not require unused dlopen
Change-Id: Ied459216cc13f1481e8b0db978a284363197f32a
2022-08-17 08:29:44 +00:00
Neels Hofmeyr 7493d6db71 add osmo-pfcp-tool
A tool for quick testing of PFCP interaction with a UPF, based on VTY
scripts / interaction.

The main motivation to create this tool was to test both the CPF and UPF
sides of the new PFCP protocol encoding and decoding, and then to test
interaction of osmo-upf with the kernel modules. It may also come in
handy as a fast way to verify basic operation in a production
environment.

Related: SYS#5599
Change-Id: I34a80d43a14c7b68952c7d337d8042d6f28ceae7
2022-07-22 12:18:29 +02:00
Neels Hofmeyr d87748957a add netfilter deps: libnftnl, libnftables
Will be used by subsequent patch to implement GTP tunnel mapping via
netfilter.

Related: SYS#5599
Change-Id: Ia8be861fe1303e82e57fe83a50cfa4ff0280db02
2022-06-19 14:13:28 +02:00
Neels Hofmeyr 6c7261640f add libgtpnl dependency
Related: SYS#5599
Change-Id: I9928be6f62f5a89d98bdac63428f7a046c95c855
2022-06-18 13:52:36 +02:00
Neels Hofmeyr f93859548f move libosmo-pfcp to libosmo-pfcp.git
The first user of this is osmo-hnbgw, to implement GTP mapping via a
UPF.

Related: SYS#5895
Change-Id: I1464cdd846b00707b0abba9126aa5bb784b7caf1
2022-06-17 16:59:15 +02:00
Neels Hofmeyr 3574c79194 move libosmo-gtlv to libosmo-pfcp.git
Related: SYS#5599
Change-Id: Id72cdf94da60d4b6d09d0044c74e672c4412c15d
2022-06-17 16:59:15 +02:00
Neels Hofmeyr 38ce6deeea add initial FSM design charts
Related: SYS#5599
Change-Id: I55474daa6bb204a0fe7da0a3bf888bb7d1c46677
2022-06-08 18:09:31 +02:00
Neels Hofmeyr d5b98172f9 add pfcp msg test
Related: SYS#5599
Change-Id: I30bdfc66a8f96c0639513ef406e9b66525dced6d
2022-06-08 18:08:20 +02:00
Neels Hofmeyr e1abe10cfa libosmo-pfcp: add pfcp_proto.h pfcp_strs.h
Related: SYS#5599
Change-Id: I568b821e89007ed52eeefcdbcb6edd8052a8b5be
2022-04-01 12:17:34 +02:00
Neels Hofmeyr d879afd381 libosmo-gtlv: add TLIV capability
During code review, it was indicated that some TLV protocols that we
will likely deal with in the near future also employ an I, and instance
value of a tag. Add TLIV support.

A usage example for a manually implemented TLIV structure is found in
tests/libosmo-gtlv/gtlv_test.c.

A usage example for a generated TLIV protocol is found in
tests/libosmo-gtlv/test_tliv/.

Related: SYS#5599
Change-Id: I0a076e54dfba6038cc779cb7c8f3967d212226aa
2022-03-22 00:27:08 +01:00
Neels Hofmeyr a92d57422d libosmo-gtlv: 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-gtlv, 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-gtlv/test_gtlv_gen/.

Related: SYS#5599
Change-Id: Ifb3ea54d2797ce060b95834aa117725ec2d6c4cf
2022-03-22 00:27:08 +01:00
Neels Hofmeyr f927727f61 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
2022-03-22 00:17:08 +01:00
Neels Hofmeyr 103b69d99c initial osmocom boilerplate source tree
Related: SYS#5599
Depends: I0a46b147ec6a76d909df28136cfd2b764b2c75ea (libosmocore)
Change-Id: I4352dd8738a1a9de6ba2fc250ee8eef69c65ff1e
2022-01-21 01:45:44 +01:00