|
static int | sctp_sock_activate_events (int fd) |
|
static int | setsockopt_nodelay (int fd, int proto, int on) |
|
void | osmo_stream_cli_close (struct osmo_stream_cli *cli) |
| Close an Osmocom Stream Client. More...
|
|
void | osmo_stream_cli_reconnect (struct osmo_stream_cli *cli) |
| Re-connect an Osmocom Stream Client If re-connection is enabled for this client (which is the case unless negative timeout was explicitly set via osmo_stream_cli_set_reconnect_timeout() call), we close any existing connection (if any) and schedule a re-connect timer.
|
|
static void | osmo_stream_cli_read (struct osmo_stream_cli *cli) |
|
static int | osmo_stream_cli_write (struct osmo_stream_cli *cli) |
|
static int | osmo_stream_cli_fd_cb (struct osmo_fd *ofd, unsigned int what) |
|
static void | cli_timer_cb (void *data) |
|
struct osmo_stream_cli * | osmo_stream_cli_create (void *ctx) |
| Create an Osmocom stream client. More...
|
|
void | osmo_stream_cli_set_addr (struct osmo_stream_cli *cli, const char *addr) |
| Set the remote address to which we connect. More...
|
|
void | osmo_stream_cli_set_port (struct osmo_stream_cli *cli, uint16_t port) |
| Set the remote port number to which we connect. More...
|
|
void | osmo_stream_cli_set_local_port (struct osmo_stream_cli *cli, uint16_t port) |
| Set the local port number for the socket (to be bound to) More...
|
|
void | osmo_stream_cli_set_local_addr (struct osmo_stream_cli *cli, const char *addr) |
| Set the local address for the socket (to be bound to) More...
|
|
void | osmo_stream_cli_set_proto (struct osmo_stream_cli *cli, uint16_t proto) |
| Set the protocol for the stream client socket. More...
|
|
void | osmo_stream_cli_set_reconnect_timeout (struct osmo_stream_cli *cli, int timeout) |
| Set the reconnect time of the stream client socket. More...
|
|
void | osmo_stream_cli_set_data (struct osmo_stream_cli *cli, void *data) |
| Set application private data of the stream client socket. More...
|
|
void * | osmo_stream_cli_get_data (struct osmo_stream_cli *cli) |
| Get application private data of the stream client socket. More...
|
|
char * | osmo_stream_cli_get_sockname (const struct osmo_stream_cli *cli) |
| Get the stream client socket description. More...
|
|
struct osmo_fd * | osmo_stream_cli_get_ofd (struct osmo_stream_cli *cli) |
| Get Osmocom File Descriptor of the stream client socket. More...
|
|
void | osmo_stream_cli_set_connect_cb (struct osmo_stream_cli *cli, int(*connect_cb)(struct osmo_stream_cli *cli)) |
| Set the call-back function called on connect of the stream client socket. More...
|
|
void | osmo_stream_cli_set_disconnect_cb (struct osmo_stream_cli *cli, int(*disconnect_cb)(struct osmo_stream_cli *cli)) |
| Set the call-back function called on disconnect of the stream client socket. More...
|
|
void | osmo_stream_cli_set_read_cb (struct osmo_stream_cli *cli, int(*read_cb)(struct osmo_stream_cli *cli)) |
| Set the call-back function called to read from the stream client socket. More...
|
|
void | osmo_stream_cli_destroy (struct osmo_stream_cli *cli) |
| Destroy a Osmocom stream client (includes close) More...
|
|
int | osmo_stream_cli_open2 (struct osmo_stream_cli *cli, int reconnect) |
| DEPRECATED: use osmo_stream_cli_set_reconnect_timeout() or osmo_stream_cli_reconnect() instead! Open connection of an Osmocom stream client. More...
|
|
void | osmo_stream_cli_set_nodelay (struct osmo_stream_cli *cli, bool nodelay) |
| Set the NODELAY socket option to avoid Nagle-like behavior Setting this to nodelay=true will automatically set the NODELAY socket option on any socket established via osmo_stream_cli_open or any re-connect. You have to set this before opening the socket. More...
|
|
int | osmo_stream_cli_open (struct osmo_stream_cli *cli) |
| Open connection of an Osmocom stream client By default the client will automatically reconnect after default timeout. To disable this, use osmo_stream_cli_set_reconnect_timeout() before calling this function. More...
|
|
void | osmo_stream_cli_send (struct osmo_stream_cli *cli, struct msgb *msg) |
| Enqueue data to be sent via an Osmocom stream client. More...
|
|
int | osmo_stream_cli_recv (struct osmo_stream_cli *cli, struct msgb *msg) |
| Receive data via an Osmocom stream client. More...
|
|
static int | osmo_stream_srv_fd_cb (struct osmo_fd *ofd, unsigned int what) |
|
struct osmo_stream_srv_link * | osmo_stream_srv_link_create (void *ctx) |
| Create an Osmocom Stream Server Link A Stream Server Link is the listen()+accept() "parent" to individual Stream Servers. More...
|
|
void | osmo_stream_srv_link_set_nodelay (struct osmo_stream_srv_link *link, bool nodelay) |
| Set the NODELAY socket option to avoid Nagle-like behavior Setting this to nodelay=true will automatically set the NODELAY socket option on any socket established via this server link, before calling the accept_cb() More...
|
|
void | osmo_stream_srv_link_set_addr (struct osmo_stream_srv_link *link, const char *addr) |
| Set the local address to which we bind. More...
|
|
void | osmo_stream_srv_link_set_port (struct osmo_stream_srv_link *link, uint16_t port) |
| Set the local port number to which we bind. More...
|
|
void | osmo_stream_srv_link_set_proto (struct osmo_stream_srv_link *link, uint16_t proto) |
| Set the protocol for the stream server link. More...
|
|
void | osmo_stream_srv_link_set_data (struct osmo_stream_srv_link *link, void *data) |
| Set application private data of the stream server link. More...
|
|
void * | osmo_stream_srv_link_get_data (struct osmo_stream_srv_link *link) |
| Get application private data of the stream server link. More...
|
|
char * | osmo_stream_srv_link_get_sockname (const struct osmo_stream_srv_link *link) |
| Get description of the stream server link e. g. 127.0.0.1:1234. More...
|
|
struct osmo_fd * | osmo_stream_srv_link_get_ofd (struct osmo_stream_srv_link *link) |
| Get Osmocom File Descriptor of the stream server link. More...
|
|
void | osmo_stream_srv_link_set_accept_cb (struct osmo_stream_srv_link *link, int(*accept_cb)(struct osmo_stream_srv_link *link, int fd)) |
| Set the accept() call-back of the stream server link. More...
|
|
void | osmo_stream_srv_link_destroy (struct osmo_stream_srv_link *link) |
| Destroy the stream server link. Closes + Releases Memory. More...
|
|
int | osmo_stream_srv_link_open (struct osmo_stream_srv_link *link) |
| Open the stream server link. This actually initializes the underlying socket and binds it to the configured ip/port. More...
|
|
void | osmo_stream_srv_link_close (struct osmo_stream_srv_link *link) |
| Close the stream server link and unregister from select loop Does not destroy the server link, merely closes it! More...
|
|
static int | osmo_stream_srv_read (struct osmo_stream_srv *conn) |
|
static void | osmo_stream_srv_write (struct osmo_stream_srv *conn) |
|
static int | osmo_stream_srv_cb (struct osmo_fd *ofd, unsigned int what) |
|
struct osmo_stream_srv * | osmo_stream_srv_create (void *ctx, struct osmo_stream_srv_link *link, int fd, int(*cb)(struct osmo_stream_srv *conn), int(*closed_cb)(struct osmo_stream_srv *conn), void *data) |
| Create a Stream Server inside the specified link. More...
|
|
void | osmo_stream_srv_set_flush_and_destroy (struct osmo_stream_srv *conn) |
| Prepare to send out all pending messages on the connection's Tx queue and then automatically destroy the stream with osmo_stream_srv_destroy(). This function disables queuing of new messages on the connection and also disables reception of new messages on the connection. More...
|
|
void | osmo_stream_srv_set_data (struct osmo_stream_srv *conn, void *data) |
| Set application private data of the stream server. More...
|
|
void * | osmo_stream_srv_get_data (struct osmo_stream_srv *conn) |
| Get application private data of the stream server. More...
|
|
struct osmo_fd * | osmo_stream_srv_get_ofd (struct osmo_stream_srv *conn) |
| Get Osmocom File Descriptor of the stream server. More...
|
|
struct osmo_stream_srv_link * | osmo_stream_srv_get_master (struct osmo_stream_srv *conn) |
| Get the master (Link) from a Stream Server. More...
|
|
void | osmo_stream_srv_destroy (struct osmo_stream_srv *conn) |
| Destroy given Stream Server This function closes the Stream Server socket, unregisters from select loop, invokes the connection's closed_cb() callback to allow API users to clean up any associated state they have for this connection, and then de-allocates associated memory. More...
|
|
void | osmo_stream_srv_send (struct osmo_stream_srv *conn, struct msgb *msg) |
| Enqueue data to be sent via an Osmocom stream server. More...
|
|
int | osmo_stream_srv_recv (struct osmo_stream_srv *conn, struct msgb *msg) |
| Receive data via Osmocom stream server. More...
|
|
Osmocom stream socket helpers.