Loading...
Searching...
No Matches
osmo_fd Struct Reference
Select loop abstraction

Structure representing a file dsecriptor. More...

`#include <select.h>`

## Data Fields

struct llist_head | list
| linked list for internal management
int | fd
| actual operating-system level file decriptor
unsigned int | when
| bit-mask or of OSMO_FD_READ, OSMO_FD_WRITE and/or OSMO_FD_EXCEPT
int(* | cb )(struct osmo_fd *fd, unsigned int what)
| call-back function to be called once file descriptor becomes available
void * | data
| data pointer passed through to call-back function
unsigned int | priv_nr
| private number, extending data

## Detailed Description

Structure representing a file dsecriptor.

## Field Documentation

## cb

int(* osmo_fd::cb) (struct osmo_fd *fd, unsigned int what)

call-back function to be called once file descriptor becomes available

Referenced by gsmtap_source_add_sink(), osmo_fd_setup(), osmo_timerfd_setup(), and osmo_wqueue_init().

## data

void* osmo_fd::data

data pointer passed through to call-back function

Referenced by osmo_fd_setup(), osmo_it_q_fd_cb(), osmo_mnl_fd_cb(), osmo_timerfd_setup(), and signalfd_callback().

## fd

int osmo_fd::fd

actual operating-system level file decriptor

Referenced by _file_wq_write_cb(), _osmo_it_q_enqueue(), fill_stats(), gsmtap_inst_fd(), gsmtap_sink_fd_cb(), gsmtap_source_add_sink(), gsmtap_source_free(), gsmtap_source_init(), gsmtap_wq_w_cb(), is_tcp(), log_target_create_file(), log_target_destroy(), log_target_file_reopen(), log_target_file_switch_to_stream(), log_target_file_switch_to_wqueue(), osmo_fd_close(), osmo_fd_get_by_fd(), osmo_fd_init_ofd(), osmo_fd_is_registered(), osmo_fd_register(), osmo_fd_setup(), osmo_it_q_alloc(), osmo_it_q_destroy(), osmo_it_q_fd_cb(), osmo_stats_tcp_osmo_fd_unregister(), osmo_stats_timer_cb(), osmo_timerfd_disable(), osmo_timerfd_schedule(), osmo_timerfd_setup(), signalfd_callback(), and start_timer().

## list

struct llist_head osmo_fd::list

linked list for internal management

Referenced by osmo_fd_disp_fds(), osmo_fd_fill_fds(), osmo_fd_get_by_fd(), osmo_fd_is_registered(), osmo_fd_register(), osmo_fd_unregister(), and poll_fill_fds().

## priv_nr

unsigned int osmo_fd::priv_nr

private number, extending data

Referenced by osmo_fd_setup().

## when

unsigned int osmo_fd::when

bit-mask or of OSMO_FD_READ, OSMO_FD_WRITE and/or OSMO_FD_EXCEPT

Referenced by gsmtap_source_add_sink(), log_target_create_file(), log_target_file_switch_to_wqueue(), osmo_fd_close(), osmo_fd_init_ofd(), osmo_fd_setup(), osmo_fd_update_when(), osmo_timerfd_setup(), osmo_wqueue_bfd_cb(), osmo_wqueue_clear(), and osmo_wqueue_enqueue_quiet().

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

- include/osmocom/core/select.h