aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2023-12-08 15:43:11 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2023-12-08 17:45:07 +0100
commit1810e12df326291cd07c9d9a075a257e826289cb (patch)
tree7bb9a9328f5bc9a2cb9b18a201bfa8ea03485f5f /include
parent14dd5ba3297fbc794b09fd6776d40490296f3c94 (diff)
netif: sctp.h: Introduce value_string for enum sctp_spinfo_state
This can be used by apps retrieving struct sctp_paddrinfo through getsockopt(SCTP_GET_PEER_ADDR_INFO). The relevant field is spinfo_state: osmo_sctp_spinfo_state_str(pinfo.spinfo_state); Related: SYS#6636 Change-Id: I78a0bd8279a04f4011c7273e0f542981308e482f
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/netif/sctp.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/osmocom/netif/sctp.h b/include/osmocom/netif/sctp.h
index bb8acda..374cf6e 100644
--- a/include/osmocom/netif/sctp.h
+++ b/include/osmocom/netif/sctp.h
@@ -48,3 +48,8 @@ enum osmo_sctp_op_error {
extern const struct value_string osmo_sctp_op_error_strs[];
static inline const char *osmo_sctp_op_error_str(enum osmo_sctp_op_error val)
{ return get_value_string(osmo_sctp_op_error_strs, val); }
+
+enum sctp_spinfo_state;
+extern const struct value_string osmo_sctp_spinfo_state_strs[];
+static inline const char *osmo_sctp_spinfo_state_str(enum sctp_spinfo_state val)
+{ return get_value_string(osmo_sctp_spinfo_state_strs, val); }