libosmocore
1.9.0.142-9cce.202401252026
Osmocom core library
|
io(_uring) abstraction osmo fd compatibility More...
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/socket.h>
#include <osmocom/core/utils.h>
Go to the source code of this file.
Data Structures | |
struct | osmo_io_ops |
Macros | |
#define | LOGPIO(iofd, level, fmt, args...) LOGP(DLIO, level, "iofd(%s)" fmt, iofd->name, ## args) |
Enumerations | |
enum | osmo_io_fd_mode { OSMO_IO_FD_MODE_READ_WRITE , OSMO_IO_FD_MODE_RECVFROM_SENDTO , OSMO_IO_FD_MODE_SCTP_RECVMSG_SEND } |
enum | osmo_io_backend { OSMO_IO_BACKEND_POLL , OSMO_IO_BACKEND_IO_URING } |
Functions | |
static const char * | osmo_io_backend_name (enum osmo_io_backend val) |
void | osmo_iofd_init (void) |
struct osmo_io_fd * | osmo_iofd_setup (const void *ctx, int fd, const char *name, enum osmo_io_fd_mode mode, const struct osmo_io_ops *ioops, void *data) |
int | osmo_iofd_register (struct osmo_io_fd *iofd, int fd) |
int | osmo_iofd_unregister (struct osmo_io_fd *iofd) |
unsigned int | osmo_iofd_txqueue_len (struct osmo_io_fd *iofd) |
void | osmo_iofd_txqueue_clear (struct osmo_io_fd *iofd) |
int | osmo_iofd_close (struct osmo_io_fd *iofd) |
void | osmo_iofd_free (struct osmo_io_fd *iofd) |
void | osmo_iofd_notify_connected (struct osmo_io_fd *iofd) |
int | osmo_iofd_write_msgb (struct osmo_io_fd *iofd, struct msgb *msg) |
int | osmo_iofd_sendto_msgb (struct osmo_io_fd *iofd, struct msgb *msg, int sendto_flags, const struct osmo_sockaddr *dest) |
void | osmo_iofd_set_alloc_info (struct osmo_io_fd *iofd, unsigned int size, unsigned int headroom) |
void | osmo_iofd_set_txqueue_max_length (struct osmo_io_fd *iofd, unsigned int size) |
void * | osmo_iofd_get_data (const struct osmo_io_fd *iofd) |
void | osmo_iofd_set_data (struct osmo_io_fd *iofd, void *data) |
unsigned int | osmo_iofd_get_priv_nr (const struct osmo_io_fd *iofd) |
void | osmo_iofd_set_priv_nr (struct osmo_io_fd *iofd, unsigned int priv_nr) |
int | osmo_iofd_get_fd (const struct osmo_io_fd *iofd) |
const char * | osmo_iofd_get_name (const struct osmo_io_fd *iofd) |
void | osmo_iofd_set_name (struct osmo_io_fd *iofd, const char *name) |
void | osmo_iofd_set_ioops (struct osmo_io_fd *iofd, const struct osmo_io_ops *ioops) |
Variables | |
const struct value_string | osmo_io_backend_names [] |
io(_uring) abstraction osmo fd compatibility
enum osmo_io_backend |
enum osmo_io_fd_mode |
|
inlinestatic |
References get_value_string(), and osmo_io_backend_names.
int osmo_iofd_close | ( | struct osmo_io_fd * | iofd | ) |
void osmo_iofd_free | ( | struct osmo_io_fd * | iofd | ) |
void* osmo_iofd_get_data | ( | const struct osmo_io_fd * | iofd | ) |
int osmo_iofd_get_fd | ( | const struct osmo_io_fd * | iofd | ) |
const char* osmo_iofd_get_name | ( | const struct osmo_io_fd * | iofd | ) |
unsigned int osmo_iofd_get_priv_nr | ( | const struct osmo_io_fd * | iofd | ) |
void osmo_iofd_init | ( | void | ) |
void osmo_iofd_notify_connected | ( | struct osmo_io_fd * | iofd | ) |
int osmo_iofd_register | ( | struct osmo_io_fd * | iofd, |
int | fd | ||
) |
int osmo_iofd_sendto_msgb | ( | struct osmo_io_fd * | iofd, |
struct msgb * | msg, | ||
int | sendto_flags, | ||
const struct osmo_sockaddr * | dest | ||
) |
void osmo_iofd_set_alloc_info | ( | struct osmo_io_fd * | iofd, |
unsigned int | size, | ||
unsigned int | headroom | ||
) |
void osmo_iofd_set_data | ( | struct osmo_io_fd * | iofd, |
void * | data | ||
) |
void osmo_iofd_set_ioops | ( | struct osmo_io_fd * | iofd, |
const struct osmo_io_ops * | ioops | ||
) |
void osmo_iofd_set_name | ( | struct osmo_io_fd * | iofd, |
const char * | name | ||
) |
void osmo_iofd_set_priv_nr | ( | struct osmo_io_fd * | iofd, |
unsigned int | priv_nr | ||
) |
void osmo_iofd_set_txqueue_max_length | ( | struct osmo_io_fd * | iofd, |
unsigned int | size | ||
) |
struct osmo_io_fd* osmo_iofd_setup | ( | const void * | ctx, |
int | fd, | ||
const char * | name, | ||
enum osmo_io_fd_mode | mode, | ||
const struct osmo_io_ops * | ioops, | ||
void * | data | ||
) |
void osmo_iofd_txqueue_clear | ( | struct osmo_io_fd * | iofd | ) |
unsigned int osmo_iofd_txqueue_len | ( | struct osmo_io_fd * | iofd | ) |
int osmo_iofd_unregister | ( | struct osmo_io_fd * | iofd | ) |
int osmo_iofd_write_msgb | ( | struct osmo_io_fd * | iofd, |
struct msgb * | msg | ||
) |
|
extern |
Referenced by osmo_io_backend_name().