libosmocore UNKNOWN
Osmocom core library
Loading...
Searching...
No Matches
osmo_io_ops::[struct].__unnamed1__ Struct Reference

Data Fields

void(*) recvfrom_cb (struct osmo_io_fd *iofd, int res, struct msgb *msg, const struct osmo_sockaddr *saddr)
 completion call-back function when recvfrom(2) has completed.
void(*) sendto_cb (struct osmo_io_fd *iofd, int res, struct msgb *msg, const struct osmo_sockaddr *daddr)
 completion call-back function when sendto() issued via osmo_iofd_sendto_msgb() has completed on fd.

Field Documentation

◆ recvfrom_cb

void(*) osmo_io_ops::[struct].__unnamed1__(struct osmo_io_fd *iofd, int res, struct msgb *msg, const struct osmo_sockaddr *saddr)

completion call-back function when recvfrom(2) has completed.

Only valid in OSMO_IO_FD_MODE_RECVFROM_SENDTO.

Parameters
[in]iofdosmo_io_fd for which recvfrom() has completed.
[in]resreturn value of the recvfrom() call, or -errno in case of error.
[in]msgmessage buffer containing the read data. Ownership is transferred to the call-back, and it must make sure to msgb_free() it eventually!
[in]saddrsocket-address of sender from which data was received.

◆ sendto_cb

void(*) osmo_io_ops::[struct].__unnamed1__(struct osmo_io_fd *iofd, int res, struct msgb *msg, const struct osmo_sockaddr *daddr)

completion call-back function when sendto() issued via osmo_iofd_sendto_msgb() has completed on fd.

Only valid in OSMO_IO_FD_MODE_RECVFROM_SENDTO.

Parameters
[in]iofdon which a sendto() has completed.
[in]resreturn value of the sendto() call, or -errno in case of error.
[in]msgmessage buffer whose write has completed. Ownership is not transferred to the call-back; it is automatically freed after the call-back terminates!
[in]daddrsocket-address of destination to which data was sent.

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