aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2023-12-08 16:29:30 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2023-12-08 17:45:20 +0100
commita7650de412009e8cb43dab29e56cb8f2411fcd6d (patch)
tree35d17b61f68baf8c6edcdec4e8f9537936ded453 /include
parent1810e12df326291cd07c9d9a075a257e826289cb (diff)
netif: sctp.h: Introduce value_string for enum sctp_sstat_state
This can be used by apps retrieving struct sctp_status through getsockopt(SCTP_STATUS). The relevant field is spinfo_state: osmo_sctp_sstat_state_str(st.sstat_state); Change-Id: Id7d8a9ad7b32406ac603e520b33809d7ae5c762f Related: SYS#6636
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 374cf6e..9dcb6dd 100644
--- a/include/osmocom/netif/sctp.h
+++ b/include/osmocom/netif/sctp.h
@@ -53,3 +53,8 @@ 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); }
+
+enum sctp_sstat_state;
+extern const struct value_string osmo_sctp_sstat_state_strs[];
+static inline const char *osmo_sctp_sstat_state_str(enum sctp_sstat_state val)
+{ return get_value_string(osmo_sctp_sstat_state_strs, val); }