libosmocore
1.9.0.169-ada8.202403032026
Osmocom core library
|
#include <osmo_io.h>
Data Fields | |
struct { | |
void(* read_cb )(struct osmo_io_fd *iofd, int res, struct msgb *msg) | |
call-back function when something was read from fd More... | |
void(* write_cb )(struct osmo_io_fd *iofd, int res, struct msgb *msg) | |
call-back function when write has completed on fd More... | |
int(* segmentation_cb )(struct msgb *msg) | |
call-back function to segment the data at message boundaries. More... | |
}; | |
struct { | |
void(* recvfrom_cb )(struct osmo_io_fd *iofd, int res, struct msgb *msg, const struct osmo_sockaddr *saddr) | |
call-back function emulating recvfrom More... | |
void(* sendto_cb )(struct osmo_io_fd *iofd, int res, struct msgb *msg, const struct osmo_sockaddr *daddr) | |
call-back function emulating sendto More... | |
}; | |
struct { | |
void(* recvmsg_cb )(struct osmo_io_fd *iofd, int res, struct msgb *msg, const struct msghdr *msgh) | |
void(* sendmsg_cb )(struct osmo_io_fd *iofd, int res, struct msgb *msg) | |
}; | |
struct { ... } |
struct { ... } |
struct { ... } |
void(* osmo_io_ops::read_cb) (struct osmo_io_fd *iofd, int res, struct msgb *msg) |
call-back function when something was read from fd
void(* osmo_io_ops::recvfrom_cb) (struct osmo_io_fd *iofd, int res, struct msgb *msg, const struct osmo_sockaddr *saddr) |
call-back function emulating recvfrom
void(* osmo_io_ops::recvmsg_cb) (struct osmo_io_fd *iofd, int res, struct msgb *msg, const struct msghdr *msgh) |
call-back function to segment the data at message boundaries.
Needs to return the size of the next message. If it returns -EAGAIN or a value larger than msgb_length() (message is incomplete) osmo_io will wait for more data to be read. Other negative values cause the msg to be discarded. If a full message was received (segmentation_cb() returns a value <= msgb_length()) the msgb will be trimmed to size by osmo_io and forwarded to the read call-back. Any parsing done to the msgb by segmentation_cb() will be preserved for the read_cb() (e.g. setting lxh or msgb->cb).
void(* osmo_io_ops::sendmsg_cb) (struct osmo_io_fd *iofd, int res, struct msgb *msg) |
void(* osmo_io_ops::sendto_cb) (struct osmo_io_fd *iofd, int res, struct msgb *msg, const struct osmo_sockaddr *daddr) |
call-back function emulating sendto
void(* osmo_io_ops::write_cb) (struct osmo_io_fd *iofd, int res, struct msgb *msg) |
call-back function when write has completed on fd