libosmocore 1.13.1.1-afb4 Osmocom core library

Data Fields
osmo_io_fd Struct Reference

`#include <osmo_io_internal.h>`

## Data Fields
struct llist_head | list
| linked list for internal management More...
int | fd
| actual operating-system level file decriptor More...
enum osmo_io_fd_mode | mode
| type of read/write mode to use More...
uint32_t | flags
| flags to guard closing/freeing of iofd More...
char * | name
| human-readable name to associte with fd More...
struct osmo_io_ops | io_ops
| send/recv (msg) callback functions More...
struct msgb * | pending
| Pending msgb to keep partial data during segmentation. More...
void * | data
| data pointer passed through to call-back function More...
unsigned int | priv_nr
| private number, extending data More...
size_t | cmsg_size
| size of iofd_msghdr.cmsg[] when allocated in recvmsg path More...
uint8_t | io_read_buffers
| maximum number of message-buffers per read operation More...
uint8_t | io_write_buffers
| maximum number of message-buffers per write operation More...
struct {
const void * ctx
| talloc context from which to allocate msgb when reading More...
unsigned int size
| size of msgb to allocate (excluding headroom) More...
unsigned int headroom
| headroom to allocate when allocating msgb's More...
} | msgb_alloc
struct {
unsigned int max_length
| maximum length of write queue More...
unsigned int current_length
| current length of write queue More...
struct llist_head msg_queue
| actual linked list implementing the transmit queue More...
} | tx_queue
union {
struct {
struct osmo_fd ofd
} poll
struct {
struct {
bool enabled
| read is enabled, due to registration of callback function More...
uint8_t num_sqes
| requested number of simultaniously submitted read SQEs More...
void * msghdr [IOFD_MSGHDR_MAX_READ_SQES]
| array of simultaneously submitted read SQEs More...
struct io_uring * ring
| ring the read SQEs have been submitted to More...
uint8_t sqes_submitted
| current number of simultaneously submitted read SQEs More...
} read
struct {
bool enabled
| write is enabled, due to pending msghdr in tx_queue More...
void * msghdr
| submitted write SQE More...
struct io_uring * ring
| ring the write SQE has been submitted to More...
} write
struct osmo_fd connect_ofd
} uring
} | u

## Field Documentation

## ◆ cmsg_size

size_t osmo_io_fd::cmsg_size

size of iofd_msghdr.cmsg[] when allocated in recvmsg path

Referenced by iofd_poll_ofd_cb_recvmsg_sendmsg(), and osmo_iofd_set_cmsg_size().

## ◆ connect_ofd

struct osmo_fd osmo_io_fd::connect_ofd

## ◆ ctx

const void* osmo_io_fd::ctx

talloc context from which to allocate msgb when reading

Referenced by _call_read_cb(), iofd_handle_recv(), and osmo_iofd_setup().

## ◆ current_length

unsigned int osmo_io_fd::current_length

current length of write queue

Referenced by iofd_txqueue_dequeue(), iofd_txqueue_enqueue(), iofd_txqueue_enqueue_front(), osmo_iofd_register(), and osmo_iofd_txqueue_len().

## ◆ data

void* osmo_io_fd::data

data pointer passed through to call-back function

Referenced by osmo_iofd_get_data(), osmo_iofd_set_data(), and osmo_iofd_setup().

## ◆ enabled

bool osmo_io_fd::enabled

read is enabled, due to registration of callback function

write is enabled, due to pending msghdr in tx_queue

## ◆ fd

int osmo_io_fd::fd

actual operating-system level file decriptor

Referenced by _log_target_file_setup_iofd(), iofd_poll_register(), log_target_file_get_nonblock(), log_target_file_set_nonblock(), osmo_iofd_close(), osmo_iofd_get_fd(), osmo_iofd_register(), and osmo_iofd_setup().

## ◆ flags

uint32_t osmo_io_fd::flags

flags to guard closing/freeing of iofd

Referenced by log_target_file_get_nonblock(), and log_target_file_set_nonblock().

## ◆ headroom

unsigned int osmo_io_fd::headroom

headroom to allocate when allocating msgb's

Referenced by iofd_handle_segmented_read(), iofd_msgb_alloc2(), iofd_msgb_length_max(), osmo_iofd_set_alloc_info(), and osmo_iofd_setup().

## ◆ io_ops

struct osmo_io_ops osmo_io_fd::io_ops

send/recv (msg) callback functions

Referenced by _call_read_cb(), iofd_handle_recv(), iofd_handle_segmentation(), iofd_handle_send_completion(), iofd_poll_ofd_cb_recvmsg_sendmsg(), osmo_iofd_get_ioops(), osmo_iofd_register(), osmo_iofd_set_ioops(), and osmo_iofd_setup().

## ◆ io_read_buffers

uint8_t osmo_io_fd::io_read_buffers

maximum number of message-buffers per read operation

Referenced by iofd_msghdr_alloc(), osmo_iofd_set_io_buffers(), and osmo_iofd_setup().

## ◆ io_write_buffers

uint8_t osmo_io_fd::io_write_buffers

maximum number of message-buffers per write operation

Referenced by iofd_txqueue_dequeue(), osmo_iofd_set_io_buffers(), osmo_iofd_setup(), and osmo_iofd_write_msgb().

## ◆ list

struct llist_head osmo_io_fd::list

linked list for internal management

## ◆ max_length

unsigned int osmo_io_fd::max_length

maximum length of write queue

Referenced by iofd_txqueue_enqueue(), osmo_iofd_get_txqueue_max_length(), osmo_iofd_set_txqueue_max_length(), and osmo_iofd_setup().

## ◆ mode

enum osmo_io_fd_mode osmo_io_fd::mode

type of read/write mode to use

Referenced by iofd_handle_recv(), iofd_handle_segmented_read(), iofd_poll_ofd_cb_recvmsg_sendmsg(), osmo_iofd_notify_connected(), osmo_iofd_register(), osmo_iofd_sendmsg_msgb(), osmo_iofd_sendto_msgb(), osmo_iofd_set_cmsg_size(), osmo_iofd_set_io_buffers(), osmo_iofd_set_ioops(), osmo_iofd_set_sqes(), osmo_iofd_setup(), and osmo_iofd_write_msgb().

## ◆ msg_queue

struct llist_head osmo_io_fd::msg_queue

actual linked list implementing the transmit queue

Referenced by iofd_txqueue_dequeue(), iofd_txqueue_enqueue(), iofd_txqueue_enqueue_front(), osmo_iofd_setup(), and osmo_iofd_write_msgb().

## ◆

struct { ... } osmo_io_fd::msgb_alloc

Referenced by _call_read_cb(), iofd_handle_recv(), iofd_handle_segmented_read(), iofd_msgb_alloc(), iofd_msgb_alloc2(), iofd_msgb_length_max(), osmo_iofd_set_alloc_info(), and osmo_iofd_setup().

## ◆ msghdr

void* osmo_io_fd::msghdr

array of simultaneously submitted read SQEs

submitted write SQE

Referenced by iofd_poll_handle_recv().

## ◆ name

char* osmo_io_fd::name

human-readable name to associte with fd

Referenced by osmo_iofd_get_name(), osmo_iofd_set_name(), osmo_iofd_set_name_f(), and osmo_iofd_setup().

## ◆ num_sqes

uint8_t osmo_io_fd::num_sqes

requested number of simultaniously submitted read SQEs

Referenced by osmo_iofd_set_sqes().

## ◆ ofd

struct osmo_fd osmo_io_fd::ofd

Referenced by iofd_poll_close(), iofd_poll_handle_recv(), iofd_poll_notify_connected(), iofd_poll_ofd_cb_dispatch(), iofd_poll_ofd_cb_recvmsg_sendmsg(), iofd_poll_read_disable(), iofd_poll_read_enable(), iofd_poll_register(), iofd_poll_unregister(), iofd_poll_write_disable(), and iofd_poll_write_enable().

## ◆ pending

struct msgb* osmo_io_fd::pending

Pending msgb to keep partial data during segmentation.

Referenced by iofd_handle_segmented_read(), iofd_prepare_handle_segmentation(), osmo_iofd_close(), and osmo_iofd_setup().

## ◆

struct { ... } osmo_io_fd::poll

Referenced by iofd_poll_close(), iofd_poll_handle_recv(), iofd_poll_notify_connected(), iofd_poll_read_disable(), iofd_poll_read_enable(), iofd_poll_register(), iofd_poll_unregister(), iofd_poll_write_disable(), and iofd_poll_write_enable().

## ◆ priv_nr

unsigned int osmo_io_fd::priv_nr

private number, extending data

Referenced by osmo_iofd_get_priv_nr(), and osmo_iofd_set_priv_nr().

## ◆

struct { ... } osmo_io_fd::read

Referenced by osmo_iofd_set_sqes().

## ◆ ring

struct io_uring* osmo_io_fd::ring

ring the read SQEs have been submitted to

ring the write SQE has been submitted to

## ◆ size

unsigned int osmo_io_fd::size

size of msgb to allocate (excluding headroom)

Referenced by iofd_msgb_alloc(), osmo_iofd_set_alloc_info(), and osmo_iofd_setup().

## ◆ sqes_submitted

uint8_t osmo_io_fd::sqes_submitted

current number of simultaneously submitted read SQEs

## ◆

struct { ... } osmo_io_fd::tx_queue

Referenced by iofd_txqueue_dequeue(), iofd_txqueue_enqueue(), iofd_txqueue_enqueue_front(), osmo_iofd_get_txqueue_max_length(), osmo_iofd_register(), osmo_iofd_set_txqueue_max_length(), osmo_iofd_setup(), osmo_iofd_txqueue_len(), and osmo_iofd_write_msgb().

## ◆

union { ... } osmo_io_fd::u

Referenced by iofd_poll_close(), iofd_poll_handle_recv(), iofd_poll_notify_connected(), iofd_poll_read_disable(), iofd_poll_read_enable(), iofd_poll_register(), iofd_poll_unregister(), iofd_poll_write_disable(), iofd_poll_write_enable(), and osmo_iofd_set_sqes().

## ◆

struct { ... } osmo_io_fd::uring

Referenced by osmo_iofd_set_sqes().

## ◆

struct { ... } osmo_io_fd::write

The documentation for this struct was generated from the following file:

- src/core/osmo_io_internal.h