Commit Graph

6 Commits

Author SHA1 Message Date
Neels Hofmeyr 1dd8f06ea7 add osmo_pfcp_ie_outer_header_creation_to_str_*()
Make osmo_pfcp_enc_to_str_outer_header_creation() as
osmo_pfcp_ie_outer_header_creation_to_str_*() functions.

Used by I0d4d9edcfc94b61bdc74cfd4ff837f151d1c28ae (osmo-upf)

Change-Id: I4ad1570485c8081b82284e4e6b4de4d7eed414b0
2022-12-01 01:03:41 +01:00
Neels Hofmeyr c41bfcbbf0 add osmo_pfcp_ip_addrs_to_str_*()
Move static function ip_addrs_to_str_buf() to public API as
osmo_pfcp_ip_addrs_to_str_buf() and osmo_pfcp_ip_addrs_to_str_c().

So far the static function was only used in places where it follows
other strings, so that it made sense to always start with a comma. Move
this comma out of the function to the callers.

Sensibly handle a NULL pointer and an empty address set.

Rationale: osmo-upf would like to print an osmo_pfcp_ip_addrs struct in
logging.

Change-Id: I5f67db8d347690cbb1ce273a2d072636859f1bf6
2022-11-26 03:04:13 +01:00
Neels Hofmeyr 3b8fc0d694 add osmo_pfcp_ie_f_seid_cmp
Related: SYS#5599
Change-Id: Iacaeebfad0fe77788da40c3ed7da2ffa3b27043c
2022-06-17 13:34:14 +02:00
Neels Hofmeyr 8bcc7faa62 libosmo-pfcp: implement PFCP header and msg handling
Related: SYS#5599
Change-Id: I3f85ea052a6b7c064244a8093777e53a47c8c61e
2022-06-16 13:04:33 +02:00
Neels Hofmeyr ace6adb548 api: add osmo_pfcp_ie_node_id_to_str_c()
So far we had only osmo_pfcp_enc_to_str_node_id(), used for PFCP message
to string conversion. It behaves like a common _to_str_buf() function,
but has an inconvenient void* arg (for use with libosmo-tlv).

Implement the string conversion as common _to_str_buf() and _to_str_c()
functions, and call that from osmo_pfcp_enc_to_str_node_id(). That's
useful for log messages coming up in a subsequent patch.

Related: SYS#5599
Change-Id: I5c580bc510afce58a03dea0861db9630b063b2ae
2022-06-16 13:04:33 +02:00
Neels Hofmeyr b53c785d78 libosmo-pfcp: implement/generate TLV and IE value coding
Related: SYS#5599
Change-Id: I3069045b2d42dac88d955c636230adc64a7a4aa7
2022-06-16 13:04:33 +02:00