\doxysection{Statistics reporting}
\label{group__stats}\index{Statistics reporting@{Statistics reporting}}


This module implements periodic reporting of statistics / counters.  


\doxysubsection*{Files}
\begin{DoxyCompactItemize}
\item 
file \textbf{ stats.\+h}
\item 
file \textbf{ stats.\+c}
\item 
file \textbf{ stats\+\_\+statsd.\+c}
\item 
file \textbf{ stats\+\_\+tcp.\+c}
\end{DoxyCompactItemize}
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ osmo\+\_\+stats\+\_\+reporter}
\begin{DoxyCompactList}\small\item\em One statistics reporter instance. \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+stats\+\_\+config}
\item 
struct \textbf{ stats\+\_\+tcp\+\_\+entry}
\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ TRACE}(probe)
\item 
\#define \textbf{ TRACE\+\_\+\+ENABLED}(probe)~(0)
\item 
\#define \textbf{ STATS\+\_\+\+DEFAULT\+\_\+\+INTERVAL}~5 /$\ast$ secs $\ast$/
\item 
\#define \textbf{ STATS\+\_\+\+DEFAULT\+\_\+\+BUFLEN}~256
\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \textbf{ osmo\+\_\+stats\+\_\+class} \{ \newline
\textbf{ OSMO\+\_\+\+STATS\+\_\+\+CLASS\+\_\+\+UNKNOWN}
, \newline
\textbf{ OSMO\+\_\+\+STATS\+\_\+\+CLASS\+\_\+\+GLOBAL}
, \newline
\textbf{ OSMO\+\_\+\+STATS\+\_\+\+CLASS\+\_\+\+PEER}
, \newline
\textbf{ OSMO\+\_\+\+STATS\+\_\+\+CLASS\+\_\+\+SUBSCRIBER}
 \}
\begin{DoxyCompactList}\small\item\em Statistics Class definitions. \end{DoxyCompactList}\item 
enum \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+type} \{ \newline
\textbf{ OSMO\+\_\+\+STATS\+\_\+\+REPORTER\+\_\+\+LOG}
, \newline
\textbf{ OSMO\+\_\+\+STATS\+\_\+\+REPORTER\+\_\+\+STATSD}
 \}
\begin{DoxyCompactList}\small\item\em Statistics Reporter Type. \end{DoxyCompactList}\item 
enum \{ \newline
\textbf{ STATS\+\_\+\+TCP\+\_\+\+UNACKED}
, \newline
\textbf{ STATS\+\_\+\+TCP\+\_\+\+LOST}
, \newline
\textbf{ STATS\+\_\+\+TCP\+\_\+\+RETRANS}
, \newline
\textbf{ STATS\+\_\+\+TCP\+\_\+\+RTT}
, \newline
\textbf{ STATS\+\_\+\+TCP\+\_\+\+RCV\+\_\+\+RTT}
, \newline
\textbf{ STATS\+\_\+\+TCP\+\_\+\+NOTSENT\+\_\+\+BYTES}
, \newline
\textbf{ STATS\+\_\+\+TCP\+\_\+\+RWND\+\_\+\+LIMITED}
, \newline
\textbf{ STATS\+\_\+\+TCP\+\_\+\+SNDBUF\+\_\+\+LIMITED}
, \newline
\textbf{ STATS\+\_\+\+TCP\+\_\+\+REORD\+\_\+\+SEEN}
 \}
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \textbf{ vty\+\_\+out\+\_\+stat\+\_\+item\+\_\+group2} (struct \textbf{ vty} $\ast$\textbf{ vty}, const char $\ast$prefix, struct \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group} $\ast$statg, bool skip\+\_\+zero)
\item 
void \textbf{ vty\+\_\+out\+\_\+stat\+\_\+item\+\_\+group} (struct \textbf{ vty} $\ast$\textbf{ vty}, const char $\ast$prefix, struct \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group} $\ast$statg)
\item 
void \textbf{ osmo\+\_\+stats\+\_\+init} (void $\ast$ctx)
\begin{DoxyCompactList}\small\item\em Initialize the stats reporting module; call this once in your program. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+stats\+\_\+report} (void)
\item 
int \textbf{ osmo\+\_\+stats\+\_\+set\+\_\+interval} (int interval)
\begin{DoxyCompactList}\small\item\em Set the reporting interval (common for all reporters) \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$ \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+alloc} (enum \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+type} \textbf{ type}, const char $\ast$\textbf{ name})
\item 
void \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+free} (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep)
\begin{DoxyCompactList}\small\item\em Destroy a given stats\+\_\+reporter. \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$ \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+find} (enum \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+type} \textbf{ type}, const char $\ast$\textbf{ name})
\begin{DoxyCompactList}\small\item\em Find a stats\+\_\+reporter of given {\itshape type} and {\itshape name}. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+set\+\_\+remote\+\_\+addr} (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep, const char $\ast$addr)
\item 
int \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+set\+\_\+remote\+\_\+port} (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep, int port)
\item 
int \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+set\+\_\+local\+\_\+addr} (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep, const char $\ast$addr)
\item 
int \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+set\+\_\+mtu} (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep, int mtu)
\item 
int \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+set\+\_\+max\+\_\+class} (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep, enum \textbf{ osmo\+\_\+stats\+\_\+class} class\+\_\+id)
\item 
int \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+set\+\_\+name\+\_\+prefix} (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep, const char $\ast$prefix)
\begin{DoxyCompactList}\small\item\em Set the name prefix of a given stats\+\_\+reporter. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+enable} (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep)
\begin{DoxyCompactList}\small\item\em Enable the given stats\+\_\+reporter. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+disable} (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep)
\begin{DoxyCompactList}\small\item\em Disable the given stats\+\_\+reporter. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+set\+\_\+flush\+\_\+period} (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep, unsigned int period)
\begin{DoxyCompactList}\small\item\em Set the regular flush period for a given stats\+\_\+reporter. \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$ \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+create\+\_\+log} (const char $\ast$\textbf{ name})
\begin{DoxyCompactList}\small\item\em Create a stats\+\_\+reporter that logs via libosmocore logging. \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$ \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+create\+\_\+statsd} (const char $\ast$\textbf{ name})
\begin{DoxyCompactList}\small\item\em Create a stats\+\_\+reporter reporting to statsd. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+send} (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep, const char $\ast$\textbf{ data}, int data\+\_\+len)
\item 
int \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+send\+\_\+buffer} (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep)
\item 
int \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+udp\+\_\+open} (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep)
\item 
int \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+udp\+\_\+close} (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep)
\item 
\textbf{ LLIST\+\_\+\+HEAD} (\textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+list})
\item 
static int \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+log\+\_\+send\+\_\+counter} (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep, const struct \textbf{ rate\+\_\+ctr\+\_\+group} $\ast$ctrg, const struct \textbf{ rate\+\_\+ctr\+\_\+desc} $\ast$\textbf{ desc}, int64\+\_\+t value, int64\+\_\+t delta)
\item 
static int \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+log\+\_\+send\+\_\+item} (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep, const struct \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group} $\ast$statg, const struct \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+desc} $\ast$\textbf{ desc}, int64\+\_\+t value)
\item 
static int \textbf{ update\+\_\+srep\+\_\+config} (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep)
\item 
static int \textbf{ osmo\+\_\+stats\+\_\+timer\+\_\+cb} (struct \textbf{ osmo\+\_\+fd} $\ast$ofd, unsigned int what)
\item 
static int \textbf{ start\+\_\+timer} (void)
\item 
static int \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+log\+\_\+send} (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep, const char $\ast$\textbf{ type}, const char $\ast$name1, unsigned int index1, const char $\ast$name2, int value, const char $\ast$unit)
\item 
static int \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+check\+\_\+config} (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep, unsigned int index, int class\+\_\+id)
\item 
static int \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+send\+\_\+counter} (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep, const struct \textbf{ rate\+\_\+ctr\+\_\+group} $\ast$ctrg, const struct \textbf{ rate\+\_\+ctr\+\_\+desc} $\ast$\textbf{ desc}, int64\+\_\+t value, int64\+\_\+t delta)
\item 
static int \textbf{ rate\+\_\+ctr\+\_\+handler} (struct \textbf{ rate\+\_\+ctr\+\_\+group} $\ast$ctrg, struct \textbf{ rate\+\_\+ctr} $\ast$ctr, const struct \textbf{ rate\+\_\+ctr\+\_\+desc} $\ast$\textbf{ desc}, void $\ast$sctx\+\_\+)
\item 
static int \textbf{ rate\+\_\+ctr\+\_\+group\+\_\+handler} (struct \textbf{ rate\+\_\+ctr\+\_\+group} $\ast$ctrg, void $\ast$sctx\+\_\+)
\item 
static int \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+send\+\_\+item} (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep, const struct \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group} $\ast$statg, const struct \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+desc} $\ast$\textbf{ desc}, int32\+\_\+t value)
\item 
static int \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+handler} (struct \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group} $\ast$statg, struct \textbf{ osmo\+\_\+stat\+\_\+item} $\ast$item, void $\ast$sctx\+\_\+)
\item 
static int \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group\+\_\+handler} (struct \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group} $\ast$statg, void $\ast$sctx\+\_\+)
\item 
static int \textbf{ handle\+\_\+counter} (struct \textbf{ osmo\+\_\+counter} $\ast$counter, void $\ast$sctx\+\_\+)
\item 
static void \textbf{ flush\+\_\+all\+\_\+reporters} (void)
\item 
static int \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+statsd\+\_\+send\+\_\+counter} (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep, const struct \textbf{ rate\+\_\+ctr\+\_\+group} $\ast$ctrg, const struct \textbf{ rate\+\_\+ctr\+\_\+desc} $\ast$\textbf{ desc}, int64\+\_\+t value, int64\+\_\+t delta)
\item 
static int \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+statsd\+\_\+send\+\_\+item} (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep, const struct \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group} $\ast$statg, const struct \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+desc} $\ast$\textbf{ desc}, int64\+\_\+t value)
\item 
static void \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+sanitize\+\_\+name} (char $\ast$buf)
\begin{DoxyCompactList}\small\item\em Replace all illegal \textquotesingle{}\+:\textquotesingle{} in the stats name, but not when used as value seperator. \end{DoxyCompactList}\item 
static int \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+statsd\+\_\+send} (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep, const char $\ast$name1, const char $\ast$index1, const char $\ast$name2, int64\+\_\+t value, const char $\ast$unit)
\item 
static \textbf{ LLIST\+\_\+\+HEAD} (stats\+\_\+tcp)
\item 
static void \textbf{ fill\+\_\+stats} (struct \textbf{ stats\+\_\+tcp\+\_\+entry} $\ast$\textbf{ stats\+\_\+tcp\+\_\+entry})
\item 
static bool \textbf{ is\+\_\+tcp} (const struct \textbf{ osmo\+\_\+fd} $\ast$fd)
\item 
int \textbf{ osmo\+\_\+stats\+\_\+tcp\+\_\+osmo\+\_\+fd\+\_\+register} (const struct \textbf{ osmo\+\_\+fd} $\ast$fd, const char $\ast$\textbf{ name})
\begin{DoxyCompactList}\small\item\em Register an \doxyref{osmo\+\_\+fd}{p.}{structosmo__fd} for TCP stats monitoring. \end{DoxyCompactList}\item 
static void \textbf{ next\+\_\+stats\+\_\+tcp\+\_\+entry} (void)
\item 
int \textbf{ osmo\+\_\+stats\+\_\+tcp\+\_\+osmo\+\_\+fd\+\_\+unregister} (const struct \textbf{ osmo\+\_\+fd} $\ast$fd)
\begin{DoxyCompactList}\small\item\em Register an \doxyref{osmo\+\_\+fd}{p.}{structosmo__fd} for TCP stats monitoring. \end{DoxyCompactList}\item 
static void \textbf{ stats\+\_\+tcp\+\_\+poll\+\_\+timer\+\_\+cb} (void $\ast$\textbf{ data})
\item 
int \textbf{ osmo\+\_\+stats\+\_\+tcp\+\_\+set\+\_\+interval} (int interval)
\begin{DoxyCompactList}\small\item\em Set the polling interval (common for all sockets) \end{DoxyCompactList}\item 
static \textbf{ \+\_\+\+\_\+attribute\+\_\+\+\_\+} ((constructor))
\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ llist\+\_\+head} \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+list}
\item 
struct \textbf{ osmo\+\_\+stats\+\_\+config} $\ast$ \textbf{ osmo\+\_\+stats\+\_\+config}
\item 
static void $\ast$ \textbf{ osmo\+\_\+stats\+\_\+ctx} = NULL
\item 
static int \textbf{ is\+\_\+initialised} = 0
\item 
static struct \textbf{ osmo\+\_\+stats\+\_\+config} \textbf{ s\+\_\+stats\+\_\+config}
\item 
struct \textbf{ osmo\+\_\+stats\+\_\+config} $\ast$ \textbf{ osmo\+\_\+stats\+\_\+config} = \&\textbf{ s\+\_\+stats\+\_\+config}
\item 
static struct \textbf{ osmo\+\_\+fd} \textbf{ osmo\+\_\+stats\+\_\+timer} = \{ .fd = -\/1 \}
\item 
static struct \textbf{ osmo\+\_\+tcp\+\_\+stats\+\_\+config} \textbf{ s\+\_\+tcp\+\_\+stats\+\_\+config}
\item 
struct \textbf{ osmo\+\_\+tcp\+\_\+stats\+\_\+config} $\ast$ \textbf{ osmo\+\_\+tcp\+\_\+stats\+\_\+config} = \&\textbf{ s\+\_\+tcp\+\_\+stats\+\_\+config}
\item 
static struct \textbf{ osmo\+\_\+timer\+\_\+list} \textbf{ stats\+\_\+tcp\+\_\+poll\+\_\+timer}
\item 
static struct \textbf{ stats\+\_\+tcp\+\_\+entry} $\ast$ \textbf{ stats\+\_\+tcp\+\_\+entry\+\_\+cur}
\item 
pthread\+\_\+mutex\+\_\+t \textbf{ stats\+\_\+tcp\+\_\+lock}
\item 
struct \textbf{ llist\+\_\+head} \textbf{ stats\+\_\+tcp\+\_\+entry\+::entry}
\item 
const struct \textbf{ osmo\+\_\+fd} $\ast$ \textbf{ stats\+\_\+tcp\+\_\+entry\+::fd}
\item 
struct \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group} $\ast$ \textbf{ stats\+\_\+tcp\+\_\+entry\+::stats\+\_\+tcp}
\item 
const char $\ast$ \textbf{ stats\+\_\+tcp\+\_\+entry\+::name}
\item 
static struct \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+desc} \textbf{ stats\+\_\+tcp\+\_\+item\+\_\+desc} [$\,$]
\item 
static struct \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group\+\_\+desc} \textbf{ stats\+\_\+tcp\+\_\+desc}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This module implements periodic reporting of statistics / counters. 

It supports the notion of multiple \doxyref{osmo\+\_\+stats\+\_\+reporter}{p.}{structosmo__stats__reporter} objects which independently of each other can report statistics at different configurable intervals to different destinations.

In order to use this facility, you have to call \doxyref{osmo\+\_\+stats\+\_\+init()}{p.}{group__stats_gab6f9cb91a533a0b2a30cd075ec811acc} once at application start-\/up and then create one or more \doxyref{osmo\+\_\+stats\+\_\+reporter}{p.}{structosmo__stats__reporter}, either using the direct API functions or by using the optional VTY bindings\+:


\begin{DoxyItemize}
\item reporting to any of the libosmocore log targets \doxyref{osmo\+\_\+stats\+\_\+reporter\+\_\+create\+\_\+log()}{p.}{group__stats_gaa6e7ebfa5b99d90a5b465c93c8d40175} creates a new stats\+\_\+reporter which reports to the libosmcoore \doxyref{Osmocom logging framework}{p.}{group__logging} subsystem.
\item reporting to statsd (a front-\/end proxy for the Graphite/\+Carbon metrics server \doxyref{osmo\+\_\+stats\+\_\+reporter\+\_\+create\+\_\+statsd()}{p.}{group__stats_ga82f58af39526c20141673c7c33e8b1cc} creates a new stats\+\_\+reporter which reports via UDP to statsd.
\end{DoxyItemize}

You can either use the above API functions directly to create \doxyref{osmo\+\_\+stats\+\_\+reporter}{p.}{structosmo__stats__reporter} instances, or you can use the VTY support contained in libosmovty. See the \char`\"{}stats\char`\"{} configuration node installed by osmo\+\_\+stats\+\_\+vty\+\_\+\+Add\+\_\+cmds().

An \doxyref{osmo\+\_\+stats\+\_\+reporter}{p.}{structosmo__stats__reporter} reports statistics on all of the following libosmocore internal counter/statistics objects\+:
\begin{DoxyItemize}
\item \doxyref{osmo\+\_\+counter}{p.}{structosmo__counter}
\item \doxyref{Rate counters}{p.}{group__rate__ctr}
\item \doxyref{Statistics value item}{p.}{group__osmo__stat__item}
\end{DoxyItemize}

You do not need to do anything in particular to expose a given counter or stat\+\_\+item, they are all exported automatically via any \doxyref{osmo\+\_\+stats\+\_\+reporter}{p.}{structosmo__stats__reporter}. If you have multiple \doxyref{osmo\+\_\+stats\+\_\+reporter}{p.}{structosmo__stats__reporter}, they will each report all counters/stat\+\_\+items. 

\doxysubsection{Macro Definition Documentation}
\mbox{\label{group__stats_ga9f25eb15952748082b42df8b60d563ce}} 
\index{Statistics reporting@{Statistics reporting}!STATS\_DEFAULT\_BUFLEN@{STATS\_DEFAULT\_BUFLEN}}
\index{STATS\_DEFAULT\_BUFLEN@{STATS\_DEFAULT\_BUFLEN}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{STATS\_DEFAULT\_BUFLEN}
{\footnotesize\ttfamily \#define STATS\+\_\+\+DEFAULT\+\_\+\+BUFLEN~256}

\mbox{\label{group__stats_gac2bb04a248ead7da04e3012ed277b003}} 
\index{Statistics reporting@{Statistics reporting}!STATS\_DEFAULT\_INTERVAL@{STATS\_DEFAULT\_INTERVAL}}
\index{STATS\_DEFAULT\_INTERVAL@{STATS\_DEFAULT\_INTERVAL}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{STATS\_DEFAULT\_INTERVAL}
{\footnotesize\ttfamily \#define STATS\+\_\+\+DEFAULT\+\_\+\+INTERVAL~5 /$\ast$ secs $\ast$/}

\mbox{\label{group__stats_ga9b44d241a9984069d3c9de002b6c149c}} 
\index{Statistics reporting@{Statistics reporting}!TRACE@{TRACE}}
\index{TRACE@{TRACE}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{TRACE}
{\footnotesize\ttfamily \#define TRACE(\begin{DoxyParamCaption}\item[{}]{probe }\end{DoxyParamCaption})}

\mbox{\label{group__stats_gaa753ae2ccad22fb27615272c6b2b04e0}} 
\index{Statistics reporting@{Statistics reporting}!TRACE\_ENABLED@{TRACE\_ENABLED}}
\index{TRACE\_ENABLED@{TRACE\_ENABLED}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{TRACE\_ENABLED}
{\footnotesize\ttfamily \#define TRACE\+\_\+\+ENABLED(\begin{DoxyParamCaption}\item[{}]{probe }\end{DoxyParamCaption})~(0)}



\doxysubsection{Enumeration Type Documentation}
\mbox{\label{group__stats_ga1fb9092bcdeada2d206bdc74afbbe122}} 
\doxysubsubsection{anonymous enum}
{\footnotesize\ttfamily anonymous enum}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{STATS\_TCP\_UNACKED@{STATS\_TCP\_UNACKED}!Statistics reporting@{Statistics reporting}}\index{Statistics reporting@{Statistics reporting}!STATS\_TCP\_UNACKED@{STATS\_TCP\_UNACKED}}}\mbox{\label{group__stats_gga1fb9092bcdeada2d206bdc74afbbe122acf1c44b41d4cdad3da9b4badb82a5931}} 
STATS\+\_\+\+TCP\+\_\+\+UNACKED&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{STATS\_TCP\_LOST@{STATS\_TCP\_LOST}!Statistics reporting@{Statistics reporting}}\index{Statistics reporting@{Statistics reporting}!STATS\_TCP\_LOST@{STATS\_TCP\_LOST}}}\mbox{\label{group__stats_gga1fb9092bcdeada2d206bdc74afbbe122a8d66e18957d6bd8d7f9bd6d66049c39c}} 
STATS\+\_\+\+TCP\+\_\+\+LOST&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{STATS\_TCP\_RETRANS@{STATS\_TCP\_RETRANS}!Statistics reporting@{Statistics reporting}}\index{Statistics reporting@{Statistics reporting}!STATS\_TCP\_RETRANS@{STATS\_TCP\_RETRANS}}}\mbox{\label{group__stats_gga1fb9092bcdeada2d206bdc74afbbe122a465e39d0245d33b7d278d311ae166898}} 
STATS\+\_\+\+TCP\+\_\+\+RETRANS&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{STATS\_TCP\_RTT@{STATS\_TCP\_RTT}!Statistics reporting@{Statistics reporting}}\index{Statistics reporting@{Statistics reporting}!STATS\_TCP\_RTT@{STATS\_TCP\_RTT}}}\mbox{\label{group__stats_gga1fb9092bcdeada2d206bdc74afbbe122af4ecfaa232288769e7191a69ff62cf15}} 
STATS\+\_\+\+TCP\+\_\+\+RTT&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{STATS\_TCP\_RCV\_RTT@{STATS\_TCP\_RCV\_RTT}!Statistics reporting@{Statistics reporting}}\index{Statistics reporting@{Statistics reporting}!STATS\_TCP\_RCV\_RTT@{STATS\_TCP\_RCV\_RTT}}}\mbox{\label{group__stats_gga1fb9092bcdeada2d206bdc74afbbe122aac455b819cd42928fcb53003674631b4}} 
STATS\+\_\+\+TCP\+\_\+\+RCV\+\_\+\+RTT&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{STATS\_TCP\_NOTSENT\_BYTES@{STATS\_TCP\_NOTSENT\_BYTES}!Statistics reporting@{Statistics reporting}}\index{Statistics reporting@{Statistics reporting}!STATS\_TCP\_NOTSENT\_BYTES@{STATS\_TCP\_NOTSENT\_BYTES}}}\mbox{\label{group__stats_gga1fb9092bcdeada2d206bdc74afbbe122ab73260272f77f0e8352e6d5176d9e028}} 
STATS\+\_\+\+TCP\+\_\+\+NOTSENT\+\_\+\+BYTES&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{STATS\_TCP\_RWND\_LIMITED@{STATS\_TCP\_RWND\_LIMITED}!Statistics reporting@{Statistics reporting}}\index{Statistics reporting@{Statistics reporting}!STATS\_TCP\_RWND\_LIMITED@{STATS\_TCP\_RWND\_LIMITED}}}\mbox{\label{group__stats_gga1fb9092bcdeada2d206bdc74afbbe122a276c70ce13d5459baf521b702ba4ba70}} 
STATS\+\_\+\+TCP\+\_\+\+RWND\+\_\+\+LIMITED&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{STATS\_TCP\_SNDBUF\_LIMITED@{STATS\_TCP\_SNDBUF\_LIMITED}!Statistics reporting@{Statistics reporting}}\index{Statistics reporting@{Statistics reporting}!STATS\_TCP\_SNDBUF\_LIMITED@{STATS\_TCP\_SNDBUF\_LIMITED}}}\mbox{\label{group__stats_gga1fb9092bcdeada2d206bdc74afbbe122ae34acf0b997bdb3ec2997cae1361792e}} 
STATS\+\_\+\+TCP\+\_\+\+SNDBUF\+\_\+\+LIMITED&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{STATS\_TCP\_REORD\_SEEN@{STATS\_TCP\_REORD\_SEEN}!Statistics reporting@{Statistics reporting}}\index{Statistics reporting@{Statistics reporting}!STATS\_TCP\_REORD\_SEEN@{STATS\_TCP\_REORD\_SEEN}}}\mbox{\label{group__stats_gga1fb9092bcdeada2d206bdc74afbbe122acc451d7d0b3f4c4d873e4502b780caa6}} 
STATS\+\_\+\+TCP\+\_\+\+REORD\+\_\+\+SEEN&\\
\hline

\end{DoxyEnumFields}
\mbox{\label{group__stats_gafddb6e01c247cdbeed1be06d9796aea3}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_class@{osmo\_stats\_class}}
\index{osmo\_stats\_class@{osmo\_stats\_class}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_class}
{\footnotesize\ttfamily enum \textbf{ osmo\+\_\+stats\+\_\+class}}



Statistics Class definitions. 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_STATS\_CLASS\_UNKNOWN@{OSMO\_STATS\_CLASS\_UNKNOWN}!Statistics reporting@{Statistics reporting}}\index{Statistics reporting@{Statistics reporting}!OSMO\_STATS\_CLASS\_UNKNOWN@{OSMO\_STATS\_CLASS\_UNKNOWN}}}\mbox{\label{group__stats_ggafddb6e01c247cdbeed1be06d9796aea3a0459a5d9b53597f2203ec2d77dfbc2a8}} 
OSMO\+\_\+\+STATS\+\_\+\+CLASS\+\_\+\+UNKNOWN&unknown class \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_STATS\_CLASS\_GLOBAL@{OSMO\_STATS\_CLASS\_GLOBAL}!Statistics reporting@{Statistics reporting}}\index{Statistics reporting@{Statistics reporting}!OSMO\_STATS\_CLASS\_GLOBAL@{OSMO\_STATS\_CLASS\_GLOBAL}}}\mbox{\label{group__stats_ggafddb6e01c247cdbeed1be06d9796aea3a3ad84bbf056b57bdc89e245c56174038}} 
OSMO\+\_\+\+STATS\+\_\+\+CLASS\+\_\+\+GLOBAL&global counter/stat\+\_\+item \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_STATS\_CLASS\_PEER@{OSMO\_STATS\_CLASS\_PEER}!Statistics reporting@{Statistics reporting}}\index{Statistics reporting@{Statistics reporting}!OSMO\_STATS\_CLASS\_PEER@{OSMO\_STATS\_CLASS\_PEER}}}\mbox{\label{group__stats_ggafddb6e01c247cdbeed1be06d9796aea3a2ecdba3d9fb058b4599b47fce4e74471}} 
OSMO\+\_\+\+STATS\+\_\+\+CLASS\+\_\+\+PEER&peer in a communications link \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_STATS\_CLASS\_SUBSCRIBER@{OSMO\_STATS\_CLASS\_SUBSCRIBER}!Statistics reporting@{Statistics reporting}}\index{Statistics reporting@{Statistics reporting}!OSMO\_STATS\_CLASS\_SUBSCRIBER@{OSMO\_STATS\_CLASS\_SUBSCRIBER}}}\mbox{\label{group__stats_ggafddb6e01c247cdbeed1be06d9796aea3a5e588a697b84b76f628a63e2acb54f5e}} 
OSMO\+\_\+\+STATS\+\_\+\+CLASS\+\_\+\+SUBSCRIBER&subscriber \\
\hline

\end{DoxyEnumFields}
\mbox{\label{group__stats_ga920dfa18cd7fbbf34f52c6dcf92d692d}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_type@{osmo\_stats\_reporter\_type}}
\index{osmo\_stats\_reporter\_type@{osmo\_stats\_reporter\_type}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_type}
{\footnotesize\ttfamily enum \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+type}}



Statistics Reporter Type. 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_STATS\_REPORTER\_LOG@{OSMO\_STATS\_REPORTER\_LOG}!Statistics reporting@{Statistics reporting}}\index{Statistics reporting@{Statistics reporting}!OSMO\_STATS\_REPORTER\_LOG@{OSMO\_STATS\_REPORTER\_LOG}}}\mbox{\label{group__stats_gga920dfa18cd7fbbf34f52c6dcf92d692da359f33b122453c1bfbbdcd4028091f6a}} 
OSMO\+\_\+\+STATS\+\_\+\+REPORTER\+\_\+\+LOG&libosmocore logging \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_STATS\_REPORTER\_STATSD@{OSMO\_STATS\_REPORTER\_STATSD}!Statistics reporting@{Statistics reporting}}\index{Statistics reporting@{Statistics reporting}!OSMO\_STATS\_REPORTER\_STATSD@{OSMO\_STATS\_REPORTER\_STATSD}}}\mbox{\label{group__stats_gga920dfa18cd7fbbf34f52c6dcf92d692da46bb81b0d1d1fe55f6fa50018e82cba8}} 
OSMO\+\_\+\+STATS\+\_\+\+REPORTER\+\_\+\+STATSD&statsd backend \\
\hline

\end{DoxyEnumFields}


\doxysubsection{Function Documentation}
\mbox{\label{group__stats_ga9ed16867a9394d9ccf1132194edae298}} 
\index{Statistics reporting@{Statistics reporting}!\_\_attribute\_\_@{\_\_attribute\_\_}}
\index{\_\_attribute\_\_@{\_\_attribute\_\_}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{\_\_attribute\_\_()}
{\footnotesize\ttfamily static \+\_\+\+\_\+attribute\+\_\+\+\_\+ (\begin{DoxyParamCaption}\item[{(constructor)}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+tcp\+\_\+stats\+\_\+config\+::batch\+\_\+size}, \textbf{ osmo\+\_\+tcp\+\_\+stats\+\_\+config\+::interval}, \textbf{ osmo\+\_\+timer\+\_\+setup()}, \textbf{ stats\+\_\+tcp\+\_\+entry\+\_\+cur}, \textbf{ stats\+\_\+tcp\+\_\+lock}, \textbf{ stats\+\_\+tcp\+\_\+poll\+\_\+timer}, \textbf{ stats\+\_\+tcp\+\_\+poll\+\_\+timer\+\_\+cb()}, \textbf{ TCP\+\_\+\+STATS\+\_\+\+DEFAULT\+\_\+\+BATCH\+\_\+\+SIZE}, and \textbf{ TCP\+\_\+\+STATS\+\_\+\+DEFAULT\+\_\+\+INTERVAL}.

\mbox{\label{group__stats_ga47d2a6744ae0b2bf9335e7c471172686}} 
\index{Statistics reporting@{Statistics reporting}!fill\_stats@{fill\_stats}}
\index{fill\_stats@{fill\_stats}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{fill\_stats()}
{\footnotesize\ttfamily static void fill\+\_\+stats (\begin{DoxyParamCaption}\item[{struct \textbf{ stats\+\_\+tcp\+\_\+entry} $\ast$}]{stats\+\_\+tcp\+\_\+entry }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+fd\+::fd}, \textbf{ stats\+\_\+tcp\+\_\+entry\+::fd}, \textbf{ stats\+\_\+tcp\+\_\+entry\+::name}, \textbf{ OSMO\+\_\+\+ASSERT}, \textbf{ osmo\+\_\+sock\+\_\+get\+\_\+ip\+\_\+and\+\_\+port()}, \textbf{ osmo\+\_\+sock\+\_\+get\+\_\+name2()}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group\+\_\+alloc()}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group\+\_\+get\+\_\+item()}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group\+\_\+set\+\_\+name()}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+set()}, \textbf{ stats\+\_\+tcp\+\_\+entry\+::stats\+\_\+tcp}, \textbf{ stats\+\_\+tcp\+\_\+desc}, \textbf{ STATS\+\_\+\+TCP\+\_\+\+LOST}, \textbf{ STATS\+\_\+\+TCP\+\_\+\+NOTSENT\+\_\+\+BYTES}, \textbf{ STATS\+\_\+\+TCP\+\_\+\+RCV\+\_\+\+RTT}, \textbf{ STATS\+\_\+\+TCP\+\_\+\+REORD\+\_\+\+SEEN}, \textbf{ STATS\+\_\+\+TCP\+\_\+\+RETRANS}, \textbf{ STATS\+\_\+\+TCP\+\_\+\+RTT}, \textbf{ STATS\+\_\+\+TCP\+\_\+\+RWND\+\_\+\+LIMITED}, and \textbf{ STATS\+\_\+\+TCP\+\_\+\+UNACKED}.



Referenced by \textbf{ stats\+\_\+tcp\+\_\+poll\+\_\+timer\+\_\+cb()}.

\mbox{\label{group__stats_ga2e835741c94f1a7f0ca732cc3bcbd3b5}} 
\index{Statistics reporting@{Statistics reporting}!flush\_all\_reporters@{flush\_all\_reporters}}
\index{flush\_all\_reporters@{flush\_all\_reporters}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{flush\_all\_reporters()}
{\footnotesize\ttfamily static void flush\+\_\+all\+\_\+reporters (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+stats\+\_\+reporter\+::flush\+\_\+period}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+::flush\+\_\+period\+\_\+counter}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+::force\+\_\+single\+\_\+flush}, \textbf{ list}, \textbf{ llist\+\_\+for\+\_\+each\+\_\+entry}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+list}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+send\+\_\+buffer()}, and \textbf{ osmo\+\_\+stats\+\_\+reporter\+::running}.



Referenced by \textbf{ osmo\+\_\+stats\+\_\+report()}.

\mbox{\label{group__stats_gaaf185b3549510e956756cad507846f93}} 
\index{Statistics reporting@{Statistics reporting}!handle\_counter@{handle\_counter}}
\index{handle\_counter@{handle\_counter}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{handle\_counter()}
{\footnotesize\ttfamily static int handle\+\_\+counter (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+counter} $\ast$}]{counter,  }\item[{void $\ast$}]{sctx\+\_\+ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+counter\+::description}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+::force\+\_\+single\+\_\+flush}, \textbf{ list}, \textbf{ llist\+\_\+for\+\_\+each\+\_\+entry}, \textbf{ osmo\+\_\+counter\+::name}, \textbf{ osmo\+\_\+counter\+\_\+difference()}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+list}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+send\+\_\+counter()}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+::running}, and \textbf{ osmo\+\_\+counter\+::value}.



Referenced by \textbf{ osmo\+\_\+stats\+\_\+report()}.

\mbox{\label{group__stats_ga3b51f36a5fe001e1354ab87f8fdfe8b7}} 
\index{Statistics reporting@{Statistics reporting}!is\_tcp@{is\_tcp}}
\index{is\_tcp@{is\_tcp}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{is\_tcp()}
{\footnotesize\ttfamily static bool is\+\_\+tcp (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+fd} $\ast$}]{fd }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+fd\+::fd}.



Referenced by \textbf{ osmo\+\_\+stats\+\_\+tcp\+\_\+osmo\+\_\+fd\+\_\+register()}.

\mbox{\label{group__stats_ga4cfa9333d7da6952b2b86af3f3c5f1ae}} 
\index{Statistics reporting@{Statistics reporting}!LLIST\_HEAD@{LLIST\_HEAD}}
\index{LLIST\_HEAD@{LLIST\_HEAD}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{LLIST\_HEAD()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily LLIST\+\_\+\+HEAD (\begin{DoxyParamCaption}\item[{\textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+list}}]{ }\end{DoxyParamCaption})}

\mbox{\label{group__stats_ga867db2d32f7867914e722a6da8d8bae9}} 
\index{Statistics reporting@{Statistics reporting}!LLIST\_HEAD@{LLIST\_HEAD}}
\index{LLIST\_HEAD@{LLIST\_HEAD}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{LLIST\_HEAD()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily static LLIST\+\_\+\+HEAD (\begin{DoxyParamCaption}\item[{stats\+\_\+tcp}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}

\mbox{\label{group__stats_gab94e83e543f9e45c5771750a23d8ef1d}} 
\index{Statistics reporting@{Statistics reporting}!next\_stats\_tcp\_entry@{next\_stats\_tcp\_entry}}
\index{next\_stats\_tcp\_entry@{next\_stats\_tcp\_entry}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{next\_stats\_tcp\_entry()}
{\footnotesize\ttfamily static void next\+\_\+stats\+\_\+tcp\+\_\+entry (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ stats\+\_\+tcp\+\_\+entry\+::entry}, \textbf{ llist\+\_\+empty()}, \textbf{ llist\+\_\+entry}, \textbf{ llist\+\_\+first\+\_\+entry}, \textbf{ llist\+\_\+last\+\_\+entry}, \textbf{ llist\+\_\+head\+::next}, \textbf{ stats\+\_\+tcp\+\_\+entry\+::stats\+\_\+tcp}, and \textbf{ stats\+\_\+tcp\+\_\+entry\+\_\+cur}.



Referenced by \textbf{ osmo\+\_\+stats\+\_\+tcp\+\_\+osmo\+\_\+fd\+\_\+unregister()}, and \textbf{ stats\+\_\+tcp\+\_\+poll\+\_\+timer\+\_\+cb()}.

\mbox{\label{group__stats_ga1f68226f8cab58ed861ed06aa70eeacc}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stat\_item\_group\_handler@{osmo\_stat\_item\_group\_handler}}
\index{osmo\_stat\_item\_group\_handler@{osmo\_stat\_item\_group\_handler}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stat\_item\_group\_handler()}
{\footnotesize\ttfamily static int osmo\+\_\+stat\+\_\+item\+\_\+group\+\_\+handler (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group} $\ast$}]{statg,  }\item[{void $\ast$}]{sctx\+\_\+ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+for\+\_\+each\+\_\+item()}, and \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+handler()}.



Referenced by \textbf{ osmo\+\_\+stats\+\_\+report()}.

\mbox{\label{group__stats_gaf542dbe9d1e8d114dc9b81af94ed9f04}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stat\_item\_handler@{osmo\_stat\_item\_handler}}
\index{osmo\_stat\_item\_handler@{osmo\_stat\_item\_handler}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stat\_item\_handler()}
{\footnotesize\ttfamily static int osmo\+\_\+stat\+\_\+item\+\_\+handler (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group} $\ast$}]{statg,  }\item[{struct \textbf{ osmo\+\_\+stat\+\_\+item} $\ast$}]{item,  }\item[{void $\ast$}]{sctx\+\_\+ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group\+\_\+desc\+::class\+\_\+id}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group\+::desc}, \textbf{ osmo\+\_\+stat\+\_\+item\+::desc}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+::force\+\_\+single\+\_\+flush}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group\+::idx}, \textbf{ list}, \textbf{ llist\+\_\+for\+\_\+each\+\_\+entry}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+period\+::max}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+flush()}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+check\+\_\+config()}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+list}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+send\+\_\+item()}, \textbf{ osmo\+\_\+stat\+\_\+item\+::reported}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+::running}, and \textbf{ osmo\+\_\+stat\+\_\+item\+::value}.



Referenced by \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group\+\_\+handler()}.

\mbox{\label{group__stats_gab6f9cb91a533a0b2a30cd075ec811acc}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_init@{osmo\_stats\_init}}
\index{osmo\_stats\_init@{osmo\_stats\_init}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_init()}
{\footnotesize\ttfamily void osmo\+\_\+stats\+\_\+init (\begin{DoxyParamCaption}\item[{void $\ast$}]{ctx }\end{DoxyParamCaption})}



Initialize the stats reporting module; call this once in your program. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em ctx} & Talloc context from which stats related memory is allocated \\
\hline
\end{DoxyParams}


References \textbf{ osmo\+\_\+tcp\+\_\+stats\+\_\+config\+::interval}, \textbf{ is\+\_\+initialised}, \textbf{ osmo\+\_\+stats\+\_\+ctx}, \textbf{ osmo\+\_\+stats\+\_\+tcp\+\_\+set\+\_\+interval()}, and \textbf{ start\+\_\+timer()}.

\mbox{\label{group__stats_ga7b9e1f1d7a9e1e469fbb796bbe019fbc}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_report@{osmo\_stats\_report}}
\index{osmo\_stats\_report@{osmo\_stats\_report}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_report()}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+report (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



References \textbf{ flush\+\_\+all\+\_\+reporters()}, \textbf{ handle\+\_\+counter()}, \textbf{ osmo\+\_\+counters\+\_\+for\+\_\+each()}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+for\+\_\+each\+\_\+group()}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group\+\_\+handler()}, \textbf{ rate\+\_\+ctr\+\_\+for\+\_\+each\+\_\+group()}, \textbf{ rate\+\_\+ctr\+\_\+group\+\_\+handler()}, and \textbf{ TRACE}.



Referenced by \textbf{ osmo\+\_\+stats\+\_\+timer\+\_\+cb()}.

\mbox{\label{group__stats_ga0a6f227702938604e3162499395a1a9d}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_alloc@{osmo\_stats\_reporter\_alloc}}
\index{osmo\_stats\_reporter\_alloc@{osmo\_stats\_reporter\_alloc}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_alloc()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$ osmo\+\_\+stats\+\_\+reporter\+\_\+alloc (\begin{DoxyParamCaption}\item[{enum \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+type}}]{type,  }\item[{const char $\ast$}]{name }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+stats\+\_\+reporter\+::fd}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+::list}, \textbf{ llist\+\_\+add\+\_\+tail()}, \textbf{ name}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+::name}, \textbf{ osmo\+\_\+stats\+\_\+ctx}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+list}, \textbf{ type}, and \textbf{ osmo\+\_\+stats\+\_\+reporter\+::type}.



Referenced by \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+create\+\_\+log()}, and \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+create\+\_\+statsd()}.

\mbox{\label{group__stats_ga915f63bb63276a8a98aad6c3cfac9124}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_check\_config@{osmo\_stats\_reporter\_check\_config}}
\index{osmo\_stats\_reporter\_check\_config@{osmo\_stats\_reporter\_check\_config}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_check\_config()}
{\footnotesize\ttfamily static int osmo\+\_\+stats\+\_\+reporter\+\_\+check\+\_\+config (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$}]{srep,  }\item[{unsigned int}]{index,  }\item[{int}]{class\+\_\+id }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+stats\+\_\+reporter\+::max\+\_\+class}, \textbf{ OSMO\+\_\+\+STATS\+\_\+\+CLASS\+\_\+\+GLOBAL}, \textbf{ OSMO\+\_\+\+STATS\+\_\+\+CLASS\+\_\+\+SUBSCRIBER}, and \textbf{ OSMO\+\_\+\+STATS\+\_\+\+CLASS\+\_\+\+UNKNOWN}.



Referenced by \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+handler()}, and \textbf{ rate\+\_\+ctr\+\_\+handler()}.

\mbox{\label{group__stats_gaa6e7ebfa5b99d90a5b465c93c8d40175}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_create\_log@{osmo\_stats\_reporter\_create\_log}}
\index{osmo\_stats\_reporter\_create\_log@{osmo\_stats\_reporter\_create\_log}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_create\_log()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$ osmo\+\_\+stats\+\_\+reporter\+\_\+create\+\_\+log (\begin{DoxyParamCaption}\item[{const char $\ast$}]{name }\end{DoxyParamCaption})}



Create a stats\+\_\+reporter that logs via libosmocore logging. 

A stats\+\_\+reporter created via this function will simply print the statistics via the libosmocore logging framework, using DLSTATS subsystem and LOGL\+\_\+\+INFO priority. The configuration of the libosmocore log targets define where this information will end up (ignored, text file, stderr, syslog, ...). 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em name} & Name of the to-\/be-\/created stats\+\_\+reporter \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
stats\+\_\+reporter on success; NULL on error 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+stats\+\_\+reporter\+::have\+\_\+net\+\_\+config}, \textbf{ name}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+alloc()}, \textbf{ OSMO\+\_\+\+STATS\+\_\+\+REPORTER\+\_\+\+LOG}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+log\+\_\+send\+\_\+counter()}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+log\+\_\+send\+\_\+item()}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+::send\+\_\+counter}, and \textbf{ osmo\+\_\+stats\+\_\+reporter\+::send\+\_\+item}.

\mbox{\label{group__stats_ga82f58af39526c20141673c7c33e8b1cc}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_create\_statsd@{osmo\_stats\_reporter\_create\_statsd}}
\index{osmo\_stats\_reporter\_create\_statsd@{osmo\_stats\_reporter\_create\_statsd}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_create\_statsd()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$ osmo\+\_\+stats\+\_\+reporter\+\_\+create\+\_\+statsd (\begin{DoxyParamCaption}\item[{const char $\ast$}]{name }\end{DoxyParamCaption})}



Create a stats\+\_\+reporter reporting to statsd. 

This creates a stats\+\_\+reporter instance which reports the related statistics data to statsd. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em name} & Name of the to-\/be-\/created stats\+\_\+reporter \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
stats\+\_\+reporter on success; NULL on error 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+stats\+\_\+reporter\+::close}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+::have\+\_\+net\+\_\+config}, \textbf{ name}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+::open}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+alloc()}, \textbf{ OSMO\+\_\+\+STATS\+\_\+\+REPORTER\+\_\+\+STATSD}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+statsd\+\_\+send\+\_\+counter()}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+statsd\+\_\+send\+\_\+item()}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+udp\+\_\+close()}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+udp\+\_\+open()}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+::send\+\_\+counter}, and \textbf{ osmo\+\_\+stats\+\_\+reporter\+::send\+\_\+item}.

\mbox{\label{group__stats_ga411097be97933654c345f9fc29a27abc}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_disable@{osmo\_stats\_reporter\_disable}}
\index{osmo\_stats\_reporter\_disable@{osmo\_stats\_reporter\_disable}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_disable()}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+reporter\+\_\+disable (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$}]{srep }\end{DoxyParamCaption})}



Disable the given stats\+\_\+reporter. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em srep} & stats\+\_\+reporter who is to be disabled \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative on error 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+stats\+\_\+reporter\+::enabled}, and \textbf{ update\+\_\+srep\+\_\+config()}.



Referenced by \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+free()}.

\mbox{\label{group__stats_gad4c76af3ecaf57ea243193bf33321da8}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_enable@{osmo\_stats\_reporter\_enable}}
\index{osmo\_stats\_reporter\_enable@{osmo\_stats\_reporter\_enable}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_enable()}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+reporter\+\_\+enable (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$}]{srep }\end{DoxyParamCaption})}



Enable the given stats\+\_\+reporter. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em srep} & stats\+\_\+reporter who is to be enabled \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative on error 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+stats\+\_\+reporter\+::enabled}, and \textbf{ update\+\_\+srep\+\_\+config()}.

\mbox{\label{group__stats_ga71590de43187f692b30b3ff315f11efb}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_find@{osmo\_stats\_reporter\_find}}
\index{osmo\_stats\_reporter\_find@{osmo\_stats\_reporter\_find}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_find()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$ osmo\+\_\+stats\+\_\+reporter\+\_\+find (\begin{DoxyParamCaption}\item[{enum \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+type}}]{type,  }\item[{const char $\ast$}]{name }\end{DoxyParamCaption})}



Find a stats\+\_\+reporter of given {\itshape type} and {\itshape name}. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em type} & Type of stats\+\_\+reporter to find \\
\hline
\mbox{\texttt{ in}}  & {\em name} & Name of stats\+\_\+reporter to find \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
stats\+\_\+reporter matching {\itshape type} and {\itshape name}; NULL otherwise 
\end{DoxyReturn}


References \textbf{ list}, \textbf{ llist\+\_\+for\+\_\+each\+\_\+entry}, \textbf{ name}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+::name}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+list}, \textbf{ type}, and \textbf{ osmo\+\_\+stats\+\_\+reporter\+::type}.

\mbox{\label{group__stats_ga16a001641deb34a4ff7106cf00bee62b}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_free@{osmo\_stats\_reporter\_free}}
\index{osmo\_stats\_reporter\_free@{osmo\_stats\_reporter\_free}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_free()}
{\footnotesize\ttfamily void osmo\+\_\+stats\+\_\+reporter\+\_\+free (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$}]{srep }\end{DoxyParamCaption})}



Destroy a given stats\+\_\+reporter. 

Takes care of first disabling it. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em srep} & stats\+\_\+reporter that shall be disabled + destroyed \\
\hline
\end{DoxyParams}


References \textbf{ osmo\+\_\+stats\+\_\+reporter\+::list}, \textbf{ llist\+\_\+del()}, and \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+disable()}.

\mbox{\label{group__stats_ga2fc7f059975bf4a18b32171b931a641e}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_log\_send@{osmo\_stats\_reporter\_log\_send}}
\index{osmo\_stats\_reporter\_log\_send@{osmo\_stats\_reporter\_log\_send}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_log\_send()}
{\footnotesize\ttfamily static int osmo\+\_\+stats\+\_\+reporter\+\_\+log\+\_\+send (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$}]{srep,  }\item[{const char $\ast$}]{type,  }\item[{const char $\ast$}]{name1,  }\item[{unsigned int}]{index1,  }\item[{const char $\ast$}]{name2,  }\item[{int}]{value,  }\item[{const char $\ast$}]{unit }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ DLSTATS}, \textbf{ LOGL\+\_\+\+INFO}, \textbf{ LOGP}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+::name\+\_\+prefix}, and \textbf{ type}.



Referenced by \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+log\+\_\+send\+\_\+counter()}, and \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+log\+\_\+send\+\_\+item()}.

\mbox{\label{group__stats_gafc5d56a462747ffcd7d57fa761adf2bb}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_log\_send\_counter@{osmo\_stats\_reporter\_log\_send\_counter}}
\index{osmo\_stats\_reporter\_log\_send\_counter@{osmo\_stats\_reporter\_log\_send\_counter}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_log\_send\_counter()}
{\footnotesize\ttfamily static int osmo\+\_\+stats\+\_\+reporter\+\_\+log\+\_\+send\+\_\+counter (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$}]{srep,  }\item[{const struct \textbf{ rate\+\_\+ctr\+\_\+group} $\ast$}]{ctrg,  }\item[{const struct \textbf{ rate\+\_\+ctr\+\_\+desc} $\ast$}]{desc,  }\item[{int64\+\_\+t}]{value,  }\item[{int64\+\_\+t}]{delta }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ rate\+\_\+ctr\+\_\+group\+::desc}, \textbf{ rate\+\_\+ctr\+\_\+group\+\_\+desc\+::group\+\_\+name\+\_\+prefix}, \textbf{ rate\+\_\+ctr\+\_\+group\+::idx}, and \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+log\+\_\+send()}.



Referenced by \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+create\+\_\+log()}.

\mbox{\label{group__stats_gac3639eaadd98ace3c4e7c81119f85fbe}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_log\_send\_item@{osmo\_stats\_reporter\_log\_send\_item}}
\index{osmo\_stats\_reporter\_log\_send\_item@{osmo\_stats\_reporter\_log\_send\_item}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_log\_send\_item()}
{\footnotesize\ttfamily static int osmo\+\_\+stats\+\_\+reporter\+\_\+log\+\_\+send\+\_\+item (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$}]{srep,  }\item[{const struct \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group} $\ast$}]{statg,  }\item[{const struct \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+desc} $\ast$}]{desc,  }\item[{int64\+\_\+t}]{value }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group\+::desc}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group\+\_\+desc\+::group\+\_\+name\+\_\+prefix}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group\+::idx}, and \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+log\+\_\+send()}.



Referenced by \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+create\+\_\+log()}.

\mbox{\label{group__stats_gac75583e4c34f7749adfcc1dbd639beaa}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_sanitize\_name@{osmo\_stats\_reporter\_sanitize\_name}}
\index{osmo\_stats\_reporter\_sanitize\_name@{osmo\_stats\_reporter\_sanitize\_name}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_sanitize\_name()}
{\footnotesize\ttfamily static void osmo\+\_\+stats\+\_\+reporter\+\_\+sanitize\+\_\+name (\begin{DoxyParamCaption}\item[{char $\ast$}]{buf }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Replace all illegal \textquotesingle{}\+:\textquotesingle{} in the stats name, but not when used as value seperator. 

\textquotesingle{}\+:\textquotesingle{} is used as seperator between the name and the value in the statsd protocol. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em buf} & is a null terminated string containing name, value, unit. \\
\hline
\end{DoxyParams}


Referenced by \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+statsd\+\_\+send()}.

\mbox{\label{group__stats_gadad3370deddae99f492506c173136a5b}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_send@{osmo\_stats\_reporter\_send}}
\index{osmo\_stats\_reporter\_send@{osmo\_stats\_reporter\_send}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_send()}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+reporter\+\_\+send (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$}]{srep,  }\item[{const char $\ast$}]{data,  }\item[{int}]{data\+\_\+len }\end{DoxyParamCaption})}

\mbox{\label{group__stats_gad6f5b67ba5486abddbd1029bee186c74}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_send\_buffer@{osmo\_stats\_reporter\_send\_buffer}}
\index{osmo\_stats\_reporter\_send\_buffer@{osmo\_stats\_reporter\_send\_buffer}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_send\_buffer()}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+reporter\+\_\+send\+\_\+buffer (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$}]{srep }\end{DoxyParamCaption})}



Referenced by \textbf{ flush\+\_\+all\+\_\+reporters()}, and \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+statsd\+\_\+send()}.

\mbox{\label{group__stats_ga74eb80f5d3bcfdc0e720975b96dd28f6}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_send\_counter@{osmo\_stats\_reporter\_send\_counter}}
\index{osmo\_stats\_reporter\_send\_counter@{osmo\_stats\_reporter\_send\_counter}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_send\_counter()}
{\footnotesize\ttfamily static int osmo\+\_\+stats\+\_\+reporter\+\_\+send\+\_\+counter (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$}]{srep,  }\item[{const struct \textbf{ rate\+\_\+ctr\+\_\+group} $\ast$}]{ctrg,  }\item[{const struct \textbf{ rate\+\_\+ctr\+\_\+desc} $\ast$}]{desc,  }\item[{int64\+\_\+t}]{value,  }\item[{int64\+\_\+t}]{delta }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+stats\+\_\+reporter\+::send\+\_\+counter}.



Referenced by \textbf{ handle\+\_\+counter()}, and \textbf{ rate\+\_\+ctr\+\_\+handler()}.

\mbox{\label{group__stats_gaf90de2e2999acd6d49f9c6175fa3bcbb}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_send\_item@{osmo\_stats\_reporter\_send\_item}}
\index{osmo\_stats\_reporter\_send\_item@{osmo\_stats\_reporter\_send\_item}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_send\_item()}
{\footnotesize\ttfamily static int osmo\+\_\+stats\+\_\+reporter\+\_\+send\+\_\+item (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$}]{srep,  }\item[{const struct \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group} $\ast$}]{statg,  }\item[{const struct \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+desc} $\ast$}]{desc,  }\item[{int32\+\_\+t}]{value }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+stats\+\_\+reporter\+::send\+\_\+item}.



Referenced by \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+handler()}.

\mbox{\label{group__stats_ga2a07dfcee5d2d5bf13a287fc8f45adce}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_set\_flush\_period@{osmo\_stats\_reporter\_set\_flush\_period}}
\index{osmo\_stats\_reporter\_set\_flush\_period@{osmo\_stats\_reporter\_set\_flush\_period}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_set\_flush\_period()}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+reporter\+\_\+set\+\_\+flush\+\_\+period (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$}]{srep,  }\item[{unsigned int}]{period }\end{DoxyParamCaption})}



Set the regular flush period for a given stats\+\_\+reporter. 

Send all stats even if they have not changed (i.\+e. force the flush) every N-\/th reporting interval. Set to 0 to disable regular flush, set to 1 to flush every time, set to 2 to flush every 2nd time, etc. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em srep} & stats\+\_\+reporter to set flush period for \\
\hline
\mbox{\texttt{ in}}  & {\em period} & Reporting interval in seconds \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative on error 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+stats\+\_\+reporter\+::flush\+\_\+period}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+::flush\+\_\+period\+\_\+counter}, and \textbf{ osmo\+\_\+stats\+\_\+reporter\+::force\+\_\+single\+\_\+flush}.

\mbox{\label{group__stats_gab9a3e2056ec39cb2013e8dc3da7461d9}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_set\_local\_addr@{osmo\_stats\_reporter\_set\_local\_addr}}
\index{osmo\_stats\_reporter\_set\_local\_addr@{osmo\_stats\_reporter\_set\_local\_addr}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_set\_local\_addr()}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+reporter\+\_\+set\+\_\+local\+\_\+addr (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$}]{srep,  }\item[{const char $\ast$}]{addr }\end{DoxyParamCaption})}

\mbox{\label{group__stats_ga510a4ce51e37e732238cf3b0ba9c5d34}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_set\_max\_class@{osmo\_stats\_reporter\_set\_max\_class}}
\index{osmo\_stats\_reporter\_set\_max\_class@{osmo\_stats\_reporter\_set\_max\_class}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_set\_max\_class()}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+reporter\+\_\+set\+\_\+max\+\_\+class (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$}]{srep,  }\item[{enum \textbf{ osmo\+\_\+stats\+\_\+class}}]{class\+\_\+id }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+stats\+\_\+reporter\+::max\+\_\+class}, and \textbf{ OSMO\+\_\+\+STATS\+\_\+\+CLASS\+\_\+\+UNKNOWN}.

\mbox{\label{group__stats_ga55a1ab6d22940d1d19356e9c5dd0f6a5}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_set\_mtu@{osmo\_stats\_reporter\_set\_mtu}}
\index{osmo\_stats\_reporter\_set\_mtu@{osmo\_stats\_reporter\_set\_mtu}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_set\_mtu()}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+reporter\+\_\+set\+\_\+mtu (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$}]{srep,  }\item[{int}]{mtu }\end{DoxyParamCaption})}

\mbox{\label{group__stats_ga1be0c1ca85a6f3cac145394648e973e3}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_set\_name\_prefix@{osmo\_stats\_reporter\_set\_name\_prefix}}
\index{osmo\_stats\_reporter\_set\_name\_prefix@{osmo\_stats\_reporter\_set\_name\_prefix}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_set\_name\_prefix()}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+reporter\+\_\+set\+\_\+name\+\_\+prefix (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$}]{srep,  }\item[{const char $\ast$}]{prefix }\end{DoxyParamCaption})}



Set the name prefix of a given stats\+\_\+reporter. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em srep} & stats\+\_\+reporter whose name prefix is to be set \\
\hline
\mbox{\texttt{ in}}  & {\em prefix} & Name prefix to pre-\/pend for any reported value \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative on error 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+stats\+\_\+reporter\+::name\+\_\+prefix}, and \textbf{ update\+\_\+srep\+\_\+config()}.

\mbox{\label{group__stats_ga898201b3f86936afe7c767e72fabd30a}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_set\_remote\_addr@{osmo\_stats\_reporter\_set\_remote\_addr}}
\index{osmo\_stats\_reporter\_set\_remote\_addr@{osmo\_stats\_reporter\_set\_remote\_addr}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_set\_remote\_addr()}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+reporter\+\_\+set\+\_\+remote\+\_\+addr (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$}]{srep,  }\item[{const char $\ast$}]{addr }\end{DoxyParamCaption})}

\mbox{\label{group__stats_ga34ef3e79272f99afdca7ed7c2eeaf844}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_set\_remote\_port@{osmo\_stats\_reporter\_set\_remote\_port}}
\index{osmo\_stats\_reporter\_set\_remote\_port@{osmo\_stats\_reporter\_set\_remote\_port}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_set\_remote\_port()}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+reporter\+\_\+set\+\_\+remote\+\_\+port (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$}]{srep,  }\item[{int}]{port }\end{DoxyParamCaption})}

\mbox{\label{group__stats_gaae6bd21b1cd1869e42a8212b520d6375}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_statsd\_send@{osmo\_stats\_reporter\_statsd\_send}}
\index{osmo\_stats\_reporter\_statsd\_send@{osmo\_stats\_reporter\_statsd\_send}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_statsd\_send()}
{\footnotesize\ttfamily static int osmo\+\_\+stats\+\_\+reporter\+\_\+statsd\+\_\+send (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$}]{srep,  }\item[{const char $\ast$}]{name1,  }\item[{const char $\ast$}]{index1,  }\item[{const char $\ast$}]{name2,  }\item[{int64\+\_\+t}]{value,  }\item[{const char $\ast$}]{unit }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+stats\+\_\+reporter\+::agg\+\_\+enabled}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+::buffer}, \textbf{ msgb\+\_\+length()}, \textbf{ msgb\+\_\+put()}, \textbf{ msgb\+\_\+put\+\_\+u8()}, \textbf{ msgb\+\_\+tailroom()}, \textbf{ msgb\+\_\+trim()}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+::name\+\_\+prefix}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+sanitize\+\_\+name()}, and \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+send\+\_\+buffer()}.



Referenced by \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+statsd\+\_\+send\+\_\+counter()}, and \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+statsd\+\_\+send\+\_\+item()}.

\mbox{\label{group__stats_ga3a41360f016ef3c9c58fb925611b9dbb}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_statsd\_send\_counter@{osmo\_stats\_reporter\_statsd\_send\_counter}}
\index{osmo\_stats\_reporter\_statsd\_send\_counter@{osmo\_stats\_reporter\_statsd\_send\_counter}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_statsd\_send\_counter()}
{\footnotesize\ttfamily static int osmo\+\_\+stats\+\_\+reporter\+\_\+statsd\+\_\+send\+\_\+counter (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$}]{srep,  }\item[{const struct \textbf{ rate\+\_\+ctr\+\_\+group} $\ast$}]{ctrg,  }\item[{const struct \textbf{ rate\+\_\+ctr\+\_\+desc} $\ast$}]{desc,  }\item[{int64\+\_\+t}]{value,  }\item[{int64\+\_\+t}]{delta }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ rate\+\_\+ctr\+\_\+group\+::desc}, \textbf{ rate\+\_\+ctr\+\_\+group\+\_\+desc\+::group\+\_\+name\+\_\+prefix}, \textbf{ rate\+\_\+ctr\+\_\+group\+::idx}, \textbf{ rate\+\_\+ctr\+\_\+group\+::name}, and \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+statsd\+\_\+send()}.



Referenced by \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+create\+\_\+statsd()}.

\mbox{\label{group__stats_ga2199d156ce5a865fed49582ab3c5d9f6}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_statsd\_send\_item@{osmo\_stats\_reporter\_statsd\_send\_item}}
\index{osmo\_stats\_reporter\_statsd\_send\_item@{osmo\_stats\_reporter\_statsd\_send\_item}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_statsd\_send\_item()}
{\footnotesize\ttfamily static int osmo\+\_\+stats\+\_\+reporter\+\_\+statsd\+\_\+send\+\_\+item (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$}]{srep,  }\item[{const struct \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group} $\ast$}]{statg,  }\item[{const struct \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+desc} $\ast$}]{desc,  }\item[{int64\+\_\+t}]{value }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group\+::desc}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group\+\_\+desc\+::group\+\_\+name\+\_\+prefix}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group\+::idx}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group\+::name}, and \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+statsd\+\_\+send()}.



Referenced by \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+create\+\_\+statsd()}.

\mbox{\label{group__stats_ga70ec5896932d94079ad55a537b7c5327}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_udp\_close@{osmo\_stats\_reporter\_udp\_close}}
\index{osmo\_stats\_reporter\_udp\_close@{osmo\_stats\_reporter\_udp\_close}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_udp\_close()}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+reporter\+\_\+udp\+\_\+close (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$}]{srep }\end{DoxyParamCaption})}



Referenced by \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+create\+\_\+statsd()}.

\mbox{\label{group__stats_ga11fa50b5ad82e9805e8cbfa9910d3da4}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_udp\_open@{osmo\_stats\_reporter\_udp\_open}}
\index{osmo\_stats\_reporter\_udp\_open@{osmo\_stats\_reporter\_udp\_open}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_udp\_open()}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+reporter\+\_\+udp\+\_\+open (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$}]{srep }\end{DoxyParamCaption})}



Referenced by \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+create\+\_\+statsd()}.

\mbox{\label{group__stats_ga6b876111cf8223000e1e68aa85fa021d}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_set\_interval@{osmo\_stats\_set\_interval}}
\index{osmo\_stats\_set\_interval@{osmo\_stats\_set\_interval}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_set\_interval()}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+set\+\_\+interval (\begin{DoxyParamCaption}\item[{int}]{interval }\end{DoxyParamCaption})}



Set the reporting interval (common for all reporters) 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em interval} & Reporting interval in seconds \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative on error 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+stats\+\_\+config\+::interval}, \textbf{ is\+\_\+initialised}, and \textbf{ start\+\_\+timer()}.

\mbox{\label{group__stats_ga355e09b1123c1271eeb5122a4b522349}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_tcp\_osmo\_fd\_register@{osmo\_stats\_tcp\_osmo\_fd\_register}}
\index{osmo\_stats\_tcp\_osmo\_fd\_register@{osmo\_stats\_tcp\_osmo\_fd\_register}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_tcp\_osmo\_fd\_register()}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+tcp\+\_\+osmo\+\_\+fd\+\_\+register (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+fd} $\ast$}]{fd,  }\item[{const char $\ast$}]{name }\end{DoxyParamCaption})}



Register an \doxyref{osmo\+\_\+fd}{p.}{structosmo__fd} for TCP stats monitoring. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em fd} & osmocom file descriptor to be registered. \\
\hline
\mbox{\texttt{ in}}  & {\em human} & readbla name that is used as prefix for the related stats item. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative in case of error. 
\end{DoxyReturn}


References \textbf{ stats\+\_\+tcp\+\_\+entry\+::entry}, \textbf{ stats\+\_\+tcp\+\_\+entry\+::fd}, \textbf{ is\+\_\+tcp()}, \textbf{ llist\+\_\+add\+\_\+tail()}, \textbf{ name}, \textbf{ stats\+\_\+tcp\+\_\+entry\+::name}, \textbf{ OSMO\+\_\+\+ASSERT}, \textbf{ osmo\+\_\+stats\+\_\+tcp\+\_\+osmo\+\_\+fd\+\_\+unregister()}, \textbf{ OTC\+\_\+\+GLOBAL}, \textbf{ stats\+\_\+tcp\+\_\+entry\+::stats\+\_\+tcp}, and \textbf{ stats\+\_\+tcp\+\_\+lock}.

\mbox{\label{group__stats_ga05b395c0e693d508ce0eb6bbec07a506}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_tcp\_osmo\_fd\_unregister@{osmo\_stats\_tcp\_osmo\_fd\_unregister}}
\index{osmo\_stats\_tcp\_osmo\_fd\_unregister@{osmo\_stats\_tcp\_osmo\_fd\_unregister}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_tcp\_osmo\_fd\_unregister()}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+tcp\+\_\+osmo\+\_\+fd\+\_\+unregister (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+fd} $\ast$}]{fd }\end{DoxyParamCaption})}



Register an \doxyref{osmo\+\_\+fd}{p.}{structosmo__fd} for TCP stats monitoring. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em fd} & osmocom file descriptor to be unregistered. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative in case of error. 
\end{DoxyReturn}


References \textbf{ stats\+\_\+tcp\+\_\+entry\+::entry}, \textbf{ osmo\+\_\+fd\+::fd}, \textbf{ stats\+\_\+tcp\+\_\+entry\+::fd}, \textbf{ llist\+\_\+count()}, \textbf{ llist\+\_\+del()}, \textbf{ llist\+\_\+for\+\_\+each\+\_\+entry}, \textbf{ next\+\_\+stats\+\_\+tcp\+\_\+entry()}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group\+\_\+free()}, \textbf{ stats\+\_\+tcp\+\_\+entry\+::stats\+\_\+tcp}, \textbf{ stats\+\_\+tcp\+\_\+entry\+\_\+cur}, and \textbf{ stats\+\_\+tcp\+\_\+lock}.



Referenced by \textbf{ osmo\+\_\+stats\+\_\+tcp\+\_\+osmo\+\_\+fd\+\_\+register()}.

\mbox{\label{group__stats_ga867c62bffd27c6066a952a2b061b888b}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_tcp\_set\_interval@{osmo\_stats\_tcp\_set\_interval}}
\index{osmo\_stats\_tcp\_set\_interval@{osmo\_stats\_tcp\_set\_interval}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_tcp\_set\_interval()}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+tcp\+\_\+set\+\_\+interval (\begin{DoxyParamCaption}\item[{int}]{interval }\end{DoxyParamCaption})}



Set the polling interval (common for all sockets) 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em interval} & Poll interval in seconds \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative on error 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+tcp\+\_\+stats\+\_\+config\+::interval}, \textbf{ osmo\+\_\+timer\+\_\+schedule()}, and \textbf{ stats\+\_\+tcp\+\_\+poll\+\_\+timer}.



Referenced by \textbf{ osmo\+\_\+stats\+\_\+init()}.

\mbox{\label{group__stats_gae722f21779b58b9cf1bafc9b4b97d8b1}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_timer\_cb@{osmo\_stats\_timer\_cb}}
\index{osmo\_stats\_timer\_cb@{osmo\_stats\_timer\_cb}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_timer\_cb()}
{\footnotesize\ttfamily static int osmo\+\_\+stats\+\_\+timer\+\_\+cb (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+fd} $\ast$}]{ofd,  }\item[{unsigned int}]{what }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ DLSTATS}, \textbf{ osmo\+\_\+fd\+::fd}, \textbf{ llist\+\_\+empty()}, \textbf{ LOGL\+\_\+\+NOTICE}, \textbf{ LOGP}, \textbf{ OSMO\+\_\+\+ASSERT}, \textbf{ OSMO\+\_\+\+FD\+\_\+\+READ}, \textbf{ osmo\+\_\+stats\+\_\+report()}, and \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+list}.



Referenced by \textbf{ start\+\_\+timer()}.

\mbox{\label{group__stats_ga47631ccc3d69c5bfa3fd0c48735a6612}} 
\index{Statistics reporting@{Statistics reporting}!rate\_ctr\_group\_handler@{rate\_ctr\_group\_handler}}
\index{rate\_ctr\_group\_handler@{rate\_ctr\_group\_handler}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{rate\_ctr\_group\_handler()}
{\footnotesize\ttfamily static int rate\+\_\+ctr\+\_\+group\+\_\+handler (\begin{DoxyParamCaption}\item[{struct \textbf{ rate\+\_\+ctr\+\_\+group} $\ast$}]{ctrg,  }\item[{void $\ast$}]{sctx\+\_\+ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ rate\+\_\+ctr\+\_\+for\+\_\+each\+\_\+counter()}, and \textbf{ rate\+\_\+ctr\+\_\+handler()}.



Referenced by \textbf{ osmo\+\_\+stats\+\_\+report()}.

\mbox{\label{group__stats_ga1b029e32e54b05edadbfcf4c814b12f9}} 
\index{Statistics reporting@{Statistics reporting}!rate\_ctr\_handler@{rate\_ctr\_handler}}
\index{rate\_ctr\_handler@{rate\_ctr\_handler}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{rate\_ctr\_handler()}
{\footnotesize\ttfamily static int rate\+\_\+ctr\+\_\+handler (\begin{DoxyParamCaption}\item[{struct \textbf{ rate\+\_\+ctr\+\_\+group} $\ast$}]{ctrg,  }\item[{struct \textbf{ rate\+\_\+ctr} $\ast$}]{ctr,  }\item[{const struct \textbf{ rate\+\_\+ctr\+\_\+desc} $\ast$}]{desc,  }\item[{void $\ast$}]{sctx\+\_\+ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ rate\+\_\+ctr\+\_\+group\+\_\+desc\+::class\+\_\+id}, \textbf{ rate\+\_\+ctr\+::current}, \textbf{ rate\+\_\+ctr\+\_\+group\+::desc}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+::force\+\_\+single\+\_\+flush}, \textbf{ rate\+\_\+ctr\+\_\+group\+::idx}, \textbf{ list}, \textbf{ llist\+\_\+for\+\_\+each\+\_\+entry}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+check\+\_\+config()}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+list}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+send\+\_\+counter()}, \textbf{ rate\+\_\+ctr\+\_\+difference()}, and \textbf{ osmo\+\_\+stats\+\_\+reporter\+::running}.



Referenced by \textbf{ rate\+\_\+ctr\+\_\+group\+\_\+handler()}.

\mbox{\label{group__stats_gaf99f98cfd0da9f59b9e490bf04b12100}} 
\index{Statistics reporting@{Statistics reporting}!start\_timer@{start\_timer}}
\index{start\_timer@{start\_timer}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{start\_timer()}
{\footnotesize\ttfamily static int start\+\_\+timer (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ DLSTATS}, \textbf{ osmo\+\_\+fd\+::fd}, \textbf{ osmo\+\_\+stats\+\_\+config\+::interval}, \textbf{ is\+\_\+initialised}, \textbf{ LOGL\+\_\+\+ERROR}, \textbf{ LOGL\+\_\+\+INFO}, \textbf{ LOGP}, \textbf{ osmo\+\_\+stats\+\_\+timer}, \textbf{ osmo\+\_\+stats\+\_\+timer\+\_\+cb()}, \textbf{ osmo\+\_\+timerfd\+\_\+disable()}, \textbf{ osmo\+\_\+timerfd\+\_\+schedule()}, and \textbf{ osmo\+\_\+timerfd\+\_\+setup()}.



Referenced by \textbf{ osmo\+\_\+stats\+\_\+init()}, and \textbf{ osmo\+\_\+stats\+\_\+set\+\_\+interval()}.

\mbox{\label{group__stats_ga3e8bd5ada487390ab4b6193a21469251}} 
\index{Statistics reporting@{Statistics reporting}!stats\_tcp\_poll\_timer\_cb@{stats\_tcp\_poll\_timer\_cb}}
\index{stats\_tcp\_poll\_timer\_cb@{stats\_tcp\_poll\_timer\_cb}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{stats\_tcp\_poll\_timer\_cb()}
{\footnotesize\ttfamily static void stats\+\_\+tcp\+\_\+poll\+\_\+timer\+\_\+cb (\begin{DoxyParamCaption}\item[{void $\ast$}]{data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+tcp\+\_\+stats\+\_\+config\+::batch\+\_\+size}, \textbf{ fill\+\_\+stats()}, \textbf{ osmo\+\_\+tcp\+\_\+stats\+\_\+config\+::interval}, \textbf{ llist\+\_\+count()}, \textbf{ next\+\_\+stats\+\_\+tcp\+\_\+entry()}, \textbf{ osmo\+\_\+timer\+\_\+schedule()}, \textbf{ stats\+\_\+tcp\+\_\+entry\+::stats\+\_\+tcp}, \textbf{ stats\+\_\+tcp\+\_\+entry\+\_\+cur}, \textbf{ stats\+\_\+tcp\+\_\+lock}, and \textbf{ stats\+\_\+tcp\+\_\+poll\+\_\+timer}.



Referenced by \textbf{ \+\_\+\+\_\+attribute\+\_\+\+\_\+()}.

\mbox{\label{group__stats_gab7df28b2e32b2437bfc88185a1a5c06f}} 
\index{Statistics reporting@{Statistics reporting}!update\_srep\_config@{update\_srep\_config}}
\index{update\_srep\_config@{update\_srep\_config}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{update\_srep\_config()}
{\footnotesize\ttfamily static int update\+\_\+srep\+\_\+config (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$}]{srep }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+stats\+\_\+reporter\+::close}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+::enabled}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+::force\+\_\+single\+\_\+flush}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+::open}, and \textbf{ osmo\+\_\+stats\+\_\+reporter\+::running}.



Referenced by \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+disable()}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+enable()}, and \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+set\+\_\+name\+\_\+prefix()}.



\doxysubsection{Variable Documentation}
\mbox{\label{group__stats_ga49517a0801e7745c2a0969520a669818}} 
\index{Statistics reporting@{Statistics reporting}!entry@{entry}}
\index{entry@{entry}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{entry}
{\footnotesize\ttfamily struct \textbf{ llist\+\_\+head} stats\+\_\+tcp\+\_\+entry\+::entry}



Referenced by \textbf{ next\+\_\+stats\+\_\+tcp\+\_\+entry()}, \textbf{ osmo\+\_\+stats\+\_\+tcp\+\_\+osmo\+\_\+fd\+\_\+register()}, and \textbf{ osmo\+\_\+stats\+\_\+tcp\+\_\+osmo\+\_\+fd\+\_\+unregister()}.

\mbox{\label{group__stats_ga9d9f0c3b3827ffe926712944c31e5c5f}} 
\index{Statistics reporting@{Statistics reporting}!fd@{fd}}
\index{fd@{fd}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{fd}
{\footnotesize\ttfamily const struct \textbf{ osmo\+\_\+fd}$\ast$ stats\+\_\+tcp\+\_\+entry\+::fd}



Referenced by \textbf{ fill\+\_\+stats()}, \textbf{ osmo\+\_\+stats\+\_\+tcp\+\_\+osmo\+\_\+fd\+\_\+register()}, and \textbf{ osmo\+\_\+stats\+\_\+tcp\+\_\+osmo\+\_\+fd\+\_\+unregister()}.

\mbox{\label{group__stats_ga7f43ce07ecb101dec32db3ff82597024}} 
\index{Statistics reporting@{Statistics reporting}!is\_initialised@{is\_initialised}}
\index{is\_initialised@{is\_initialised}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{is\_initialised}
{\footnotesize\ttfamily int is\+\_\+initialised = 0\hspace{0.3cm}{\ttfamily [static]}}



Referenced by \textbf{ osmo\+\_\+stats\+\_\+init()}, \textbf{ osmo\+\_\+stats\+\_\+set\+\_\+interval()}, and \textbf{ start\+\_\+timer()}.

\mbox{\label{group__stats_gaeda411f2f93765207bc551afc71844f2}} 
\index{Statistics reporting@{Statistics reporting}!name@{name}}
\index{name@{name}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{name}
{\footnotesize\ttfamily const char$\ast$ stats\+\_\+tcp\+\_\+entry\+::name}



Referenced by \textbf{ fill\+\_\+stats()}, and \textbf{ osmo\+\_\+stats\+\_\+tcp\+\_\+osmo\+\_\+fd\+\_\+register()}.

\mbox{\label{group__stats_ga69cc1eef57bf721fad3eb0b08b44231a}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_config@{osmo\_stats\_config}}
\index{osmo\_stats\_config@{osmo\_stats\_config}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_config\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+stats\+\_\+config}$\ast$ \textbf{ osmo\+\_\+stats\+\_\+config}\hspace{0.3cm}{\ttfamily [extern]}}

\mbox{\label{group__stats_ga69cc1eef57bf721fad3eb0b08b44231a}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_config@{osmo\_stats\_config}}
\index{osmo\_stats\_config@{osmo\_stats\_config}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_config\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+stats\+\_\+config}$\ast$ \textbf{ osmo\+\_\+stats\+\_\+config} = \&\textbf{ s\+\_\+stats\+\_\+config}}

\mbox{\label{group__stats_ga4e0b725ba99e4703c4d886dacda2557b}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_ctx@{osmo\_stats\_ctx}}
\index{osmo\_stats\_ctx@{osmo\_stats\_ctx}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_ctx}
{\footnotesize\ttfamily void$\ast$ osmo\+\_\+stats\+\_\+ctx = NULL\hspace{0.3cm}{\ttfamily [static]}}



Referenced by \textbf{ osmo\+\_\+stats\+\_\+init()}, and \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+alloc()}.

\mbox{\label{group__stats_gaef85c887394f0465c12a1fe46dfee1b1}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_reporter\_list@{osmo\_stats\_reporter\_list}}
\index{osmo\_stats\_reporter\_list@{osmo\_stats\_reporter\_list}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_reporter\_list}
{\footnotesize\ttfamily struct \textbf{ llist\+\_\+head} osmo\+\_\+stats\+\_\+reporter\+\_\+list\hspace{0.3cm}{\ttfamily [extern]}}



Referenced by \textbf{ flush\+\_\+all\+\_\+reporters()}, \textbf{ handle\+\_\+counter()}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+handler()}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+alloc()}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+find()}, \textbf{ osmo\+\_\+stats\+\_\+timer\+\_\+cb()}, and \textbf{ rate\+\_\+ctr\+\_\+handler()}.

\mbox{\label{group__stats_ga54c4286630b9ee36ce26a8a71b5d3420}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_stats\_timer@{osmo\_stats\_timer}}
\index{osmo\_stats\_timer@{osmo\_stats\_timer}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_stats\_timer}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+fd} osmo\+\_\+stats\+\_\+timer = \{ .fd = -\/1 \}\hspace{0.3cm}{\ttfamily [static]}}



Referenced by \textbf{ start\+\_\+timer()}.

\mbox{\label{group__stats_ga240c607283cc0da3b2f1732fa54b6ca6}} 
\index{Statistics reporting@{Statistics reporting}!osmo\_tcp\_stats\_config@{osmo\_tcp\_stats\_config}}
\index{osmo\_tcp\_stats\_config@{osmo\_tcp\_stats\_config}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{osmo\_tcp\_stats\_config}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+tcp\+\_\+stats\+\_\+config}$\ast$ \textbf{ osmo\+\_\+tcp\+\_\+stats\+\_\+config} = \&\textbf{ s\+\_\+tcp\+\_\+stats\+\_\+config}}

\mbox{\label{group__stats_gaf5364d1732312969d6ade23325ce1493}} 
\index{Statistics reporting@{Statistics reporting}!s\_stats\_config@{s\_stats\_config}}
\index{s\_stats\_config@{s\_stats\_config}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{s\_stats\_config}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+stats\+\_\+config} s\+\_\+stats\+\_\+config\hspace{0.3cm}{\ttfamily [static]}}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{}
\DoxyCodeLine{        .interval = STATS\_DEFAULT\_INTERVAL,}
\DoxyCodeLine{\}}

\end{DoxyCode}
\mbox{\label{group__stats_ga93f90d34c7469d7f3a5bfb46c03e9bc2}} 
\index{Statistics reporting@{Statistics reporting}!s\_tcp\_stats\_config@{s\_tcp\_stats\_config}}
\index{s\_tcp\_stats\_config@{s\_tcp\_stats\_config}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{s\_tcp\_stats\_config}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+tcp\+\_\+stats\+\_\+config} s\+\_\+tcp\+\_\+stats\+\_\+config\hspace{0.3cm}{\ttfamily [static]}}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{}
\DoxyCodeLine{        .interval = TCP\_STATS\_DEFAULT\_INTERVAL,}
\DoxyCodeLine{\}}

\end{DoxyCode}
\mbox{\label{group__stats_ga0c3ffb84b9a2b9d2bfcfc72398fb00db}} 
\index{Statistics reporting@{Statistics reporting}!stats\_tcp@{stats\_tcp}}
\index{stats\_tcp@{stats\_tcp}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{stats\_tcp}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group}$\ast$ stats\+\_\+tcp\+\_\+entry\+::stats\+\_\+tcp}



Referenced by \textbf{ fill\+\_\+stats()}, \textbf{ next\+\_\+stats\+\_\+tcp\+\_\+entry()}, \textbf{ osmo\+\_\+stats\+\_\+tcp\+\_\+osmo\+\_\+fd\+\_\+register()}, \textbf{ osmo\+\_\+stats\+\_\+tcp\+\_\+osmo\+\_\+fd\+\_\+unregister()}, and \textbf{ stats\+\_\+tcp\+\_\+poll\+\_\+timer\+\_\+cb()}.

\mbox{\label{group__stats_gae849459892e6bec1ad95fb167a1800f8}} 
\index{Statistics reporting@{Statistics reporting}!stats\_tcp\_desc@{stats\_tcp\_desc}}
\index{stats\_tcp\_desc@{stats\_tcp\_desc}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{stats\_tcp\_desc}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group\+\_\+desc} stats\+\_\+tcp\+\_\+desc\hspace{0.3cm}{\ttfamily [static]}}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{}
\DoxyCodeLine{        .group\_name\_prefix = \textcolor{stringliteral}{"{}tcp"{}},}
\DoxyCodeLine{        .group\_description = \textcolor{stringliteral}{"{}stats tcp"{}},}
\DoxyCodeLine{        .class\_id = OSMO\_STATS\_CLASS\_GLOBAL,}
\DoxyCodeLine{        .num\_items = ARRAY\_SIZE(stats\_tcp\_item\_desc),}
\DoxyCodeLine{        .item\_desc = stats\_tcp\_item\_desc,}
\DoxyCodeLine{\}}

\end{DoxyCode}


Referenced by \textbf{ fill\+\_\+stats()}.

\mbox{\label{group__stats_gab878a9422fb01ee7b235142099604909}} 
\index{Statistics reporting@{Statistics reporting}!stats\_tcp\_entry\_cur@{stats\_tcp\_entry\_cur}}
\index{stats\_tcp\_entry\_cur@{stats\_tcp\_entry\_cur}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{stats\_tcp\_entry\_cur}
{\footnotesize\ttfamily struct \textbf{ stats\+\_\+tcp\+\_\+entry}$\ast$ stats\+\_\+tcp\+\_\+entry\+\_\+cur\hspace{0.3cm}{\ttfamily [static]}}



Referenced by \textbf{ \+\_\+\+\_\+attribute\+\_\+\+\_\+()}, \textbf{ next\+\_\+stats\+\_\+tcp\+\_\+entry()}, \textbf{ osmo\+\_\+stats\+\_\+tcp\+\_\+osmo\+\_\+fd\+\_\+unregister()}, and \textbf{ stats\+\_\+tcp\+\_\+poll\+\_\+timer\+\_\+cb()}.

\mbox{\label{group__stats_gaf778ecd273f6a9f053ce3fd2df33f542}} 
\index{Statistics reporting@{Statistics reporting}!stats\_tcp\_item\_desc@{stats\_tcp\_item\_desc}}
\index{stats\_tcp\_item\_desc@{stats\_tcp\_item\_desc}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{stats\_tcp\_item\_desc}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+desc} stats\+\_\+tcp\+\_\+item\+\_\+desc[$\,$]\hspace{0.3cm}{\ttfamily [static]}}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{}
\DoxyCodeLine{        [STATS\_TCP\_UNACKED] = \{ \textcolor{stringliteral}{"{}tcp:unacked"{}}, \textcolor{stringliteral}{"{}unacknowledged packets"{}}, \textcolor{stringliteral}{"{}"{}}, 60, 0 \},}
\DoxyCodeLine{        [STATS\_TCP\_LOST] = \{ \textcolor{stringliteral}{"{}tcp:lost"{}}, \textcolor{stringliteral}{"{}lost packets"{}}, \textcolor{stringliteral}{"{}"{}}, 60, 0 \},}
\DoxyCodeLine{        [STATS\_TCP\_RETRANS] = \{ \textcolor{stringliteral}{"{}tcp:retrans"{}}, \textcolor{stringliteral}{"{}retransmitted packets"{}}, \textcolor{stringliteral}{"{}"{}}, 60, 0 \},}
\DoxyCodeLine{        [STATS\_TCP\_RTT] = \{ \textcolor{stringliteral}{"{}tcp:rtt"{}}, \textcolor{stringliteral}{"{}roundtrip-\/time"{}}, \textcolor{stringliteral}{"{}"{}}, 60, 0 \},}
\DoxyCodeLine{        [STATS\_TCP\_RCV\_RTT] = \{ \textcolor{stringliteral}{"{}tcp:rcv\_rtt"{}}, \textcolor{stringliteral}{"{}roundtrip-\/time (receive)"{}}, \textcolor{stringliteral}{"{}"{}}, 60, 0 \},}
\DoxyCodeLine{        [STATS\_TCP\_NOTSENT\_BYTES] = \{ \textcolor{stringliteral}{"{}tcp:notsent\_bytes"{}}, \textcolor{stringliteral}{"{}bytes not yet sent"{}}, \textcolor{stringliteral}{"{}"{}}, 60, 0 \},}
\DoxyCodeLine{        [STATS\_TCP\_RWND\_LIMITED] = \{ \textcolor{stringliteral}{"{}tcp:rwnd\_limited"{}}, \textcolor{stringliteral}{"{}time (usec) limited by receive window"{}}, \textcolor{stringliteral}{"{}"{}}, 60, 0 \},}
\DoxyCodeLine{        [STATS\_TCP\_SNDBUF\_LIMITED] = \{ \textcolor{stringliteral}{"{}tcp:sndbuf\_limited"{}}, \textcolor{stringliteral}{"{}Time (usec) limited by send buffer"{}}, \textcolor{stringliteral}{"{}"{}}, 60, 0 \},}
\DoxyCodeLine{        [STATS\_TCP\_REORD\_SEEN] = \{ \textcolor{stringliteral}{"{}tcp:reord\_seen"{}}, \textcolor{stringliteral}{"{}reordering events seen"{}}, \textcolor{stringliteral}{"{}"{}}, 60, 0 \},}
\DoxyCodeLine{\}}

\end{DoxyCode}
\mbox{\label{group__stats_ga09b2cee22eaffa25863f44ea4710f78f}} 
\index{Statistics reporting@{Statistics reporting}!stats\_tcp\_lock@{stats\_tcp\_lock}}
\index{stats\_tcp\_lock@{stats\_tcp\_lock}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{stats\_tcp\_lock}
{\footnotesize\ttfamily pthread\+\_\+mutex\+\_\+t stats\+\_\+tcp\+\_\+lock}



Referenced by \textbf{ \+\_\+\+\_\+attribute\+\_\+\+\_\+()}, \textbf{ osmo\+\_\+stats\+\_\+tcp\+\_\+osmo\+\_\+fd\+\_\+register()}, \textbf{ osmo\+\_\+stats\+\_\+tcp\+\_\+osmo\+\_\+fd\+\_\+unregister()}, and \textbf{ stats\+\_\+tcp\+\_\+poll\+\_\+timer\+\_\+cb()}.

\mbox{\label{group__stats_ga46f4c1281c86e8dc49e34711676263b0}} 
\index{Statistics reporting@{Statistics reporting}!stats\_tcp\_poll\_timer@{stats\_tcp\_poll\_timer}}
\index{stats\_tcp\_poll\_timer@{stats\_tcp\_poll\_timer}!Statistics reporting@{Statistics reporting}}
\doxysubsubsection{stats\_tcp\_poll\_timer}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+timer\+\_\+list} stats\+\_\+tcp\+\_\+poll\+\_\+timer\hspace{0.3cm}{\ttfamily [static]}}



Referenced by \textbf{ \+\_\+\+\_\+attribute\+\_\+\+\_\+()}, \textbf{ osmo\+\_\+stats\+\_\+tcp\+\_\+set\+\_\+interval()}, and \textbf{ stats\+\_\+tcp\+\_\+poll\+\_\+timer\+\_\+cb()}.

