\doxysection{include/osmocom/core/select.h File Reference}
\label{select_8h}\index{include/osmocom/core/select.h@{include/osmocom/core/select.h}}


libmnl integration  


{\ttfamily \#include $<$osmocom/core/linuxlist.\+h$>$}\newline
{\ttfamily \#include $<$stdbool.\+h$>$}\newline
{\ttfamily \#include $<$time.\+h$>$}\newline
{\ttfamily \#include $<$signal.\+h$>$}\newline
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ osmo\+\_\+fd}
\begin{DoxyCompactList}\small\item\em Structure representing a file dsecriptor. \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+signalfd}
\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ OSMO\+\_\+\+FD\+\_\+\+READ}~0x0001
\begin{DoxyCompactList}\small\item\em Indicate interest in reading from the file descriptor. \end{DoxyCompactList}\item 
\#define \textbf{ OSMO\+\_\+\+FD\+\_\+\+WRITE}~0x0002
\begin{DoxyCompactList}\small\item\em Indicate interest in writing to the file descriptor. \end{DoxyCompactList}\item 
\#define \textbf{ OSMO\+\_\+\+FD\+\_\+\+EXCEPT}~0x0004
\begin{DoxyCompactList}\small\item\em Indicate interest in exceptions from the file descriptor. \end{DoxyCompactList}\item 
\#define \textbf{ OSMO\+\_\+\+FD\+\_\+\+MASK}~0x\+FFFF
\begin{DoxyCompactList}\small\item\em Used as when\+\_\+mask in \doxyref{osmo\+\_\+fd\+\_\+update\+\_\+when()}{p.}{group__select_ga7334ab2c60124d85137cfd3e34fd6214} \end{DoxyCompactList}\item 
\#define \textbf{ BSC\+\_\+\+FD\+\_\+\+READ}~\textbf{ OSMO\+\_\+\+FD\+\_\+\+READ}
\item 
\#define \textbf{ BSC\+\_\+\+FD\+\_\+\+WRITE}~\textbf{ OSMO\+\_\+\+FD\+\_\+\+WRITE}
\item 
\#define \textbf{ BSC\+\_\+\+FD\+\_\+\+EXCEPT}~\textbf{ OSMO\+\_\+\+FD\+\_\+\+EXCEPT}
\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef void \textbf{ osmo\+\_\+signalfd\+\_\+cb}(struct \textbf{ osmo\+\_\+signalfd} $\ast$osfd, const struct signalfd\+\_\+siginfo $\ast$fdsi)
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \textbf{ osmo\+\_\+fd\+\_\+setup} (struct \textbf{ osmo\+\_\+fd} $\ast$ofd, int fd, unsigned int when, int($\ast$cb)(struct \textbf{ osmo\+\_\+fd} $\ast$fd, unsigned int what), void $\ast$\textbf{ data}, unsigned int priv\+\_\+nr)
\item 
void \textbf{ osmo\+\_\+fd\+\_\+update\+\_\+when} (struct \textbf{ osmo\+\_\+fd} $\ast$ofd, unsigned int when\+\_\+mask, unsigned int when)
\item 
static void \textbf{ osmo\+\_\+fd\+\_\+read\+\_\+enable} (struct \textbf{ osmo\+\_\+fd} $\ast$ofd)
\item 
static void \textbf{ osmo\+\_\+fd\+\_\+read\+\_\+disable} (struct \textbf{ osmo\+\_\+fd} $\ast$ofd)
\item 
static void \textbf{ osmo\+\_\+fd\+\_\+write\+\_\+enable} (struct \textbf{ osmo\+\_\+fd} $\ast$ofd)
\item 
static void \textbf{ osmo\+\_\+fd\+\_\+write\+\_\+disable} (struct \textbf{ osmo\+\_\+fd} $\ast$ofd)
\item 
bool \textbf{ osmo\+\_\+fd\+\_\+is\+\_\+registered} (struct \textbf{ osmo\+\_\+fd} $\ast$fd)
\item 
int \textbf{ osmo\+\_\+fd\+\_\+register} (struct \textbf{ osmo\+\_\+fd} $\ast$fd)
\item 
void \textbf{ osmo\+\_\+fd\+\_\+unregister} (struct \textbf{ osmo\+\_\+fd} $\ast$fd)
\item 
void \textbf{ osmo\+\_\+fd\+\_\+close} (struct \textbf{ osmo\+\_\+fd} $\ast$fd)
\item 
int \textbf{ osmo\+\_\+select\+\_\+main} (int polling)
\item 
int \textbf{ osmo\+\_\+select\+\_\+main\+\_\+ctx} (int polling)
\item 
void \textbf{ osmo\+\_\+select\+\_\+init} (void)
\item 
struct \textbf{ osmo\+\_\+fd} $\ast$ \textbf{ osmo\+\_\+fd\+\_\+get\+\_\+by\+\_\+fd} (int fd)
\item 
int \textbf{ osmo\+\_\+fd\+\_\+fill\+\_\+fds} (void $\ast$readset, void $\ast$writeset, void $\ast$exceptset)
\item 
int \textbf{ osmo\+\_\+fd\+\_\+disp\+\_\+fds} (void $\ast$readset, void $\ast$writeset, void $\ast$exceptset)
\item 
int \textbf{ osmo\+\_\+timerfd\+\_\+disable} (struct \textbf{ osmo\+\_\+fd} $\ast$ofd)
\item 
int \textbf{ osmo\+\_\+timerfd\+\_\+schedule} (struct \textbf{ osmo\+\_\+fd} $\ast$ofd, const struct timespec $\ast$first, const struct timespec $\ast$interval)
\item 
int \textbf{ osmo\+\_\+timerfd\+\_\+setup} (struct \textbf{ osmo\+\_\+fd} $\ast$ofd, int($\ast$cb)(struct \textbf{ osmo\+\_\+fd} $\ast$, unsigned int), void $\ast$\textbf{ data})
\item 
struct \textbf{ osmo\+\_\+signalfd} $\ast$ \textbf{ osmo\+\_\+signalfd\+\_\+setup} (void $\ast$ctx, sigset\+\_\+t set, \textbf{ osmo\+\_\+signalfd\+\_\+cb} $\ast$cb, void $\ast$\textbf{ data})
\item 
void \textbf{ osmo\+\_\+select\+\_\+shutdown\+\_\+request} (void)
\item 
int \textbf{ osmo\+\_\+select\+\_\+shutdown\+\_\+requested} (void)
\item 
bool \textbf{ osmo\+\_\+select\+\_\+shutdown\+\_\+done} (void)
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
libmnl integration 

select loop abstraction.