libosmo-netif 1.6.0.16-c51c Osmocom network interface library

Loading...
Searching...
No Matches
sctp.h
1#pragma once
2
3#include <osmocom/core/utils.h>
4
5/* Relevant SCTP RFCs:
6 * rfc9260 (obsoletes rfc4960): SCTP protocol
7 * rfc5061: SCTP Dynamic Address Reconfiguration
8 * rfc6458: SCTP Sockets API Extensions
9 */
10
11enum sctp_sac_state;
12extern const struct value_string osmo_sctp_assoc_chg_strs[];
13static inline const char *osmo_sctp_assoc_chg_str(enum sctp_sac_state val)
14{ return get_value_string(osmo_sctp_assoc_chg_strs, val); }
15
16enum sctp_spc_state;
17extern const struct value_string osmo_sctp_paddr_chg_strs[];
18static inline const char *osmo_sctp_paddr_chg_str(enum sctp_spc_state val)
19{ return get_value_string(osmo_sctp_paddr_chg_strs, val); }
20
21enum sctp_sn_type;
22extern const struct value_string osmo_sctp_sn_type_strs[];
23static inline const char *osmo_sctp_sn_type_str(enum sctp_sn_type val)
24{ return get_value_string(osmo_sctp_sn_type_strs, val); }
25
26enum sctp_sn_error;
27extern const struct value_string osmo_sctp_sn_error_strs[];
28static inline const char *osmo_sctp_sn_error_str(enum sctp_sn_error val)
29{ return get_value_string(osmo_sctp_sn_error_strs, val); }
30
31enum osmo_sctp_op_error {
32 OSMO_SCTP_OP_ERR_INVALID_STREAM_ID = 1,
33 OSMO_SCTP_OP_ERR_MISS_MAND_PARAM = 2,
34 OSMO_SCTP_OP_ERR_STALE_COOKIE = 3,
35 OSMO_SCTP_OP_ERR_NO_RESOURCES = 4,
36 OSMO_SCTP_OP_ERR_UNRESOLV_ADDR = 5,
37 OSMO_SCTP_OP_ERR_UNKN_CHUNK_TYPE = 6,
38 OSMO_SCTP_OP_ERR_INVALID_MAND_PARAM = 7,
39 OSMO_SCTP_OP_ERR_UNKN_PARAM = 8,
40 OSMO_SCTP_OP_ERR_NO_USER_DATA = 9,
41 OSMO_SCTP_OP_ERR_COOKIE_RX_WHILE_SHUTDOWN = 10,
42 OSMO_SCTP_OP_ERR_RESTART_ASSC_NEW_ADDR = 11,
43 OSMO_SCTP_OP_ERR_UNER_INITED_ABORT = 12,
44 OSMO_SCTP_OP_ERR_PROTO_VERSION = 13,
45};
46
47
48extern const struct value_string osmo_sctp_op_error_strs[];
49static inline const char *osmo_sctp_op_error_str(enum osmo_sctp_op_error val)
50{ return get_value_string(osmo_sctp_op_error_strs, val); }
51
52enum sctp_spinfo_state;
53extern const struct value_string osmo_sctp_spinfo_state_strs[];
54static inline const char *osmo_sctp_spinfo_state_str(enum sctp_spinfo_state val)
55{ return get_value_string(osmo_sctp_spinfo_state_strs, val); }
56
57enum sctp_sstat_state;
58extern const struct value_string osmo_sctp_sstat_state_strs[];
59static inline const char *osmo_sctp_sstat_state_str(enum sctp_sstat_state val)
60{ return get_value_string(osmo_sctp_sstat_state_strs, val); }