Loading...
Searching...
No Matches
iofd_msghdr Struct Reference

serialized version of 'struct msghdr' employed by sendmsg/recvmsg More...

`#include <osmo_io_internal.h>`

## Public Member Functions

char | _Alignas (struct cmsghdr) cmsg[0]
| control message buffer for passing sctp_sndrcvinfo along.

## Data Fields

struct llist_head | list
| entry into osmo_io_fd.tx_queue.msg_queue
enum iofd_msg_action | action
struct msghdr | hdr
| the 'struct msghdr' we are wrapping/ecapsulating here
struct osmo_sockaddr | osa
| socket address of the remote peer
struct iovec | iov [IOFD_MSGHDR_IO_BUFFERS]
| io-vector we need to pass as argument to sendmsg/recvmsg; is set up to point into msg below
int | flags
| flags we pass as argument to sendmsg / recvmsg
uint8_t | io_len
| current number of message-buffers that are stored
struct msgb * | msg [IOFD_MSGHDR_IO_BUFFERS]
| message-buffer containing data for this I/O operation
struct osmo_io_fd * | iofd
| I/O file descriptor on which we perform this I/O operation.
bool | in_cancel_queue
| msghdr is in the cancel_queue list

## Detailed Description

serialized version of 'struct msghdr' employed by sendmsg/recvmsg

## Member Function Documentation

## _Alignas()

char iofd_msghdr::_Alignas | ( | struct cmsghdr |  | ) |

control message buffer for passing sctp_sndrcvinfo along.

Size is determined by iofd->cmsg_size on recvmsg, and by mcghdr->msg_controllen on sendmsg. Alignment of the array is required due to cast to "struct cmsghdr", eg. by CMSG_FIRSTHDR().

## Field Documentation

## action

enum iofd_msg_action iofd_msghdr::action

Referenced by iofd_msghdr_alloc(), iofd_poll_ofd_cb_recvmsg_sendmsg(), and iofd_send_completion_cb().

## flags

int iofd_msghdr::flags

flags we pass as argument to sendmsg / recvmsg

Referenced by iofd_poll_ofd_cb_recvmsg_sendmsg(), osmo_iofd_sendto_msgb(), and osmo_iofd_write_msgb().

## hdr

struct msghdr iofd_msghdr::hdr

the 'struct msghdr' we are wrapping/ecapsulating here

Referenced by iofd_handle_send_completion(), iofd_poll_ofd_cb_recvmsg_sendmsg(), iofd_txqueue_dequeue(), osmo_iofd_sendmsg_msgb(), osmo_iofd_sendto_msgb(), and osmo_iofd_write_msgb().

## in_cancel_queue

bool iofd_msghdr::in_cancel_queue

msghdr is in the cancel_queue list

## io_len

uint8_t iofd_msghdr::io_len

current number of message-buffers that are stored

Referenced by iofd_handle_send_completion(), iofd_msghdr_alloc(), iofd_poll_ofd_cb_recvmsg_sendmsg(), iofd_txqueue_dequeue(), and osmo_iofd_write_msgb().

## iofd

struct osmo_io_fd* iofd_msghdr::iofd

I/O file descriptor on which we perform this I/O operation.

Referenced by iofd_msghdr_alloc(), iofd_poll_ofd_cb_recvmsg_sendmsg(), iofd_txqueue_dequeue(), osmo_iofd_close(), osmo_iofd_free(), osmo_iofd_get_data(), osmo_iofd_get_fd(), osmo_iofd_get_ioops(), osmo_iofd_get_name(), osmo_iofd_get_priv_nr(), osmo_iofd_get_txqueue_max_length(), osmo_iofd_notify_connected(), osmo_iofd_sendmsg_msgb(), osmo_iofd_sendto_msgb(), osmo_iofd_set_alloc_info(), osmo_iofd_set_data(), osmo_iofd_set_ioops(), osmo_iofd_set_name(), osmo_iofd_set_name_f(), osmo_iofd_set_priv_nr(), osmo_iofd_set_txqueue_max_length(), osmo_iofd_txqueue_clear(), and osmo_iofd_write_msgb().

## iov

struct iovec iofd_msghdr::iov[IOFD_MSGHDR_IO_BUFFERS]

io-vector we need to pass as argument to sendmsg/recvmsg; is set up to point into msg below

Referenced by iofd_handle_send_completion(), iofd_poll_handle_recv(), iofd_poll_ofd_cb_recvmsg_sendmsg(), iofd_txqueue_dequeue(), osmo_iofd_sendmsg_msgb(), osmo_iofd_sendto_msgb(), and osmo_iofd_write_msgb().

## list

struct llist_head iofd_msghdr::list

entry into osmo_io_fd.tx_queue.msg_queue

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

## msg

struct msgb* iofd_msghdr::msg[IOFD_MSGHDR_IO_BUFFERS]

message-buffer containing data for this I/O operation

Referenced by iofd_handle_send_completion(), iofd_poll_handle_recv(), iofd_poll_ofd_cb_recvmsg_sendmsg(), iofd_txqueue_dequeue(), osmo_iofd_sendmsg_msgb(), osmo_iofd_sendto_msgb(), and osmo_iofd_write_msgb().

## osa

struct osmo_sockaddr iofd_msghdr::osa

socket address of the remote peer

Referenced by iofd_poll_ofd_cb_recvmsg_sendmsg(), iofd_send_completion_cb(), osmo_iofd_sendmsg_msgb(), and osmo_iofd_sendto_msgb().

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

- src/core/osmo_io_internal.h