6#include <osmocom/core/socket.h>
11#include <netinet/sctp.h>
12 #define OSMO_STREAM_MAX_ADDRS OSMO_SOCK_MAX_ADDRS
18 #define MSG_NOSIGNAL 0
21 #define OSMO_STREAM_MAX_ADDRS 1
26enum osmo_stream_mode {
27 OSMO_STREAM_MODE_UNKNOWN,
28 OSMO_STREAM_MODE_OSMO_FD,
29 OSMO_STREAM_MODE_OSMO_IO,
32struct stream_tcp_keepalive_pars {
41int stream_setsockopt_tcp_keepalive(
int fd,
int on);
42int stream_setsockopt_tcp_keepidle(
int fd,
int keepalive_time);
43int stream_setsockopt_tcp_keepintvl(
int fd,
int keepalive_intvl);
44int stream_setsockopt_tcp_keepcnt(
int fd,
int keepalive_probes);
45int stream_tcp_keepalive_pars_apply(
int fd,
const struct stream_tcp_keepalive_pars *tkp);
47struct stream_tcp_pars {
48 struct stream_tcp_keepalive_pars ka;
49 bool user_timeout_present;
50 unsigned int user_timeout_value;
52int stream_setsockopt_tcp_user_timeout(
int fd,
unsigned int user_timeout);
57int stream_sctp_sock_activate_events(
int fd);
58int stream_setsockopt_nodelay(
int fd,
int proto,
int on);
59int stream_sctp_recvmsg_wrapper(
int fd,
struct msgb *msg,
const char *log_pfx);
61int stream_iofd_sctp_send_msgb(
struct osmo_io_fd *iofd,
struct msgb *msg,
int sendmsg_flags);
62int stream_iofd_sctp_recvmsg_trailer(
struct osmo_io_fd *iofd,
struct msgb *msg,
int ret,
const struct msghdr *msgh);