\doxysection{osmo\+\_\+stats\+\_\+reporter Struct Reference}
\label{structosmo__stats__reporter}\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}}


One statistics reporter instance.  




{\ttfamily \#include $<$stats.\+h$>$}

\doxysubsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
enum \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+type} \textbf{ type}
\begin{DoxyCompactList}\small\item\em Type of the reporter (log, statsd) \end{DoxyCompactList}\item 
char $\ast$ \textbf{ name}
\begin{DoxyCompactList}\small\item\em Human-\/readable name of this reporter. \end{DoxyCompactList}\item 
unsigned int \textbf{ have\+\_\+net\+\_\+config}\+: 1
\item 
int \textbf{ enabled}
\begin{DoxyCompactList}\small\item\em is this reporter enabled \end{DoxyCompactList}\item 
char $\ast$ \textbf{ name\+\_\+prefix}
\begin{DoxyCompactList}\small\item\em prefix for counter names \end{DoxyCompactList}\item 
char $\ast$ \textbf{ dest\+\_\+addr\+\_\+str}
\begin{DoxyCompactList}\small\item\em destination IP address \end{DoxyCompactList}\item 
char $\ast$ \textbf{ bind\+\_\+addr\+\_\+str}
\begin{DoxyCompactList}\small\item\em local bind IP address \end{DoxyCompactList}\item 
int \textbf{ dest\+\_\+port}
\begin{DoxyCompactList}\small\item\em destination (UDP) port \end{DoxyCompactList}\item 
int \textbf{ mtu}
\begin{DoxyCompactList}\small\item\em Maximum Transmission Unit. \end{DoxyCompactList}\item 
unsigned int \textbf{ flush\+\_\+period}
\begin{DoxyCompactList}\small\item\em period between regular flushes \end{DoxyCompactList}\item 
enum \textbf{ osmo\+\_\+stats\+\_\+class} \textbf{ max\+\_\+class}
\begin{DoxyCompactList}\small\item\em Maximum class/index to report. \end{DoxyCompactList}\item 
int \textbf{ running}
\begin{DoxyCompactList}\small\item\em is this reporter running \end{DoxyCompactList}\item 
struct sockaddr \textbf{ dest\+\_\+addr}
\begin{DoxyCompactList}\small\item\em destination address of socket \end{DoxyCompactList}\item 
int \textbf{ dest\+\_\+addr\+\_\+len}
\begin{DoxyCompactList}\small\item\em length of {\itshape dest\+\_\+addr} in bytes \end{DoxyCompactList}\item 
struct sockaddr \textbf{ bind\+\_\+addr}
\begin{DoxyCompactList}\small\item\em local bind address of socket \end{DoxyCompactList}\item 
int \textbf{ bind\+\_\+addr\+\_\+len}
\begin{DoxyCompactList}\small\item\em length of {\itshape bind\+\_\+addr} in bytes \end{DoxyCompactList}\item 
int \textbf{ fd}
\begin{DoxyCompactList}\small\item\em file descriptor of socket \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ buffer}
\begin{DoxyCompactList}\small\item\em message buffer for log output \end{DoxyCompactList}\item 
int \textbf{ agg\+\_\+enabled}
\begin{DoxyCompactList}\small\item\em is aggregation enabled? \end{DoxyCompactList}\item 
int \textbf{ force\+\_\+single\+\_\+flush}
\begin{DoxyCompactList}\small\item\em set to 1 to force a flush (send even unchanged stats values) \end{DoxyCompactList}\item 
unsigned int \textbf{ flush\+\_\+period\+\_\+counter}
\begin{DoxyCompactList}\small\item\em count sends between forced flushes \end{DoxyCompactList}\item 
struct \textbf{ llist\+\_\+head} \textbf{ list}
\item 
int($\ast$ \textbf{ open} )(struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep)
\item 
int($\ast$ \textbf{ close} )(struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep)
\item 
int($\ast$ \textbf{ 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 
int($\ast$ \textbf{ 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)
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
One statistics reporter instance. 

\doxysubsection{Field Documentation}
\mbox{\label{structosmo__stats__reporter_a58d133ff97380412ca2cc71de2444357}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!agg\_enabled@{agg\_enabled}}
\index{agg\_enabled@{agg\_enabled}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{agg\_enabled}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+reporter\+::agg\+\_\+enabled}



is aggregation enabled? 



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

\mbox{\label{structosmo__stats__reporter_a1a72da4fb01012adaef3a16f4c5059cc}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!bind\_addr@{bind\_addr}}
\index{bind\_addr@{bind\_addr}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{bind\_addr}
{\footnotesize\ttfamily struct sockaddr osmo\+\_\+stats\+\_\+reporter\+::bind\+\_\+addr}



local bind address of socket 

\mbox{\label{structosmo__stats__reporter_a3df0ece59bf1abdbf097616a36b99590}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!bind\_addr\_len@{bind\_addr\_len}}
\index{bind\_addr\_len@{bind\_addr\_len}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{bind\_addr\_len}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+reporter\+::bind\+\_\+addr\+\_\+len}



length of {\itshape bind\+\_\+addr} in bytes 

\mbox{\label{structosmo__stats__reporter_ae23206164636d5bef4b658ab6c7844ca}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!bind\_addr\_str@{bind\_addr\_str}}
\index{bind\_addr\_str@{bind\_addr\_str}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{bind\_addr\_str}
{\footnotesize\ttfamily char$\ast$ osmo\+\_\+stats\+\_\+reporter\+::bind\+\_\+addr\+\_\+str}



local bind IP address 

\mbox{\label{structosmo__stats__reporter_a653f7f5cf8a638b91e7243e120027658}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!buffer@{buffer}}
\index{buffer@{buffer}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{buffer}
{\footnotesize\ttfamily struct \textbf{ msgb}$\ast$ osmo\+\_\+stats\+\_\+reporter\+::buffer}



message buffer for log output 



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

\mbox{\label{structosmo__stats__reporter_a3948799475fb4d97e391b9ed3cd6405a}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!close@{close}}
\index{close@{close}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{close}
{\footnotesize\ttfamily int($\ast$ osmo\+\_\+stats\+\_\+reporter\+::close) (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep)}



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

\mbox{\label{structosmo__stats__reporter_adcfe52eeb856c62516b02b78994ab44c}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!dest\_addr@{dest\_addr}}
\index{dest\_addr@{dest\_addr}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{dest\_addr}
{\footnotesize\ttfamily struct sockaddr osmo\+\_\+stats\+\_\+reporter\+::dest\+\_\+addr}



destination address of socket 

\mbox{\label{structosmo__stats__reporter_a0ddd34d35317f3b8dfb0655ef90fad68}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!dest\_addr\_len@{dest\_addr\_len}}
\index{dest\_addr\_len@{dest\_addr\_len}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{dest\_addr\_len}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+reporter\+::dest\+\_\+addr\+\_\+len}



length of {\itshape dest\+\_\+addr} in bytes 

\mbox{\label{structosmo__stats__reporter_a9eb34ce67848779736b8221120ac47fd}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!dest\_addr\_str@{dest\_addr\_str}}
\index{dest\_addr\_str@{dest\_addr\_str}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{dest\_addr\_str}
{\footnotesize\ttfamily char$\ast$ osmo\+\_\+stats\+\_\+reporter\+::dest\+\_\+addr\+\_\+str}



destination IP address 

\mbox{\label{structosmo__stats__reporter_a0bee35cb29668441b644101c16a63449}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!dest\_port@{dest\_port}}
\index{dest\_port@{dest\_port}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{dest\_port}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+reporter\+::dest\+\_\+port}



destination (UDP) port 

\mbox{\label{structosmo__stats__reporter_a31fa44606002010f79713ac4f1305d98}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!enabled@{enabled}}
\index{enabled@{enabled}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{enabled}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+reporter\+::enabled}



is this reporter enabled 



Referenced by \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+disable()}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+enable()}, and \textbf{ update\+\_\+srep\+\_\+config()}.

\mbox{\label{structosmo__stats__reporter_a2ee45eaf3adab87b10f9369d87ae690d}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!fd@{fd}}
\index{fd@{fd}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{fd}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+reporter\+::fd}



file descriptor of socket 



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

\mbox{\label{structosmo__stats__reporter_ac4988d5969e4e475b3df7deabb143596}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!flush\_period@{flush\_period}}
\index{flush\_period@{flush\_period}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{flush\_period}
{\footnotesize\ttfamily unsigned int osmo\+\_\+stats\+\_\+reporter\+::flush\+\_\+period}



period between regular flushes 



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

\mbox{\label{structosmo__stats__reporter_a03fa4cf50c3da7a7e7b0b0f58a9eb3c7}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!flush\_period\_counter@{flush\_period\_counter}}
\index{flush\_period\_counter@{flush\_period\_counter}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{flush\_period\_counter}
{\footnotesize\ttfamily unsigned int osmo\+\_\+stats\+\_\+reporter\+::flush\+\_\+period\+\_\+counter}



count sends between forced flushes 



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

\mbox{\label{structosmo__stats__reporter_a1f7b2ad103f1cf99cd756fecda11d851}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!force\_single\_flush@{force\_single\_flush}}
\index{force\_single\_flush@{force\_single\_flush}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{force\_single\_flush}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+reporter\+::force\+\_\+single\+\_\+flush}



set to 1 to force a flush (send even unchanged stats values) 



Referenced by \textbf{ flush\+\_\+all\+\_\+reporters()}, \textbf{ handle\+\_\+counter()}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+handler()}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+set\+\_\+flush\+\_\+period()}, \textbf{ rate\+\_\+ctr\+\_\+handler()}, and \textbf{ update\+\_\+srep\+\_\+config()}.

\mbox{\label{structosmo__stats__reporter_a2ced8e0ee026692419637d145824b2ac}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!have\_net\_config@{have\_net\_config}}
\index{have\_net\_config@{have\_net\_config}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{have\_net\_config}
{\footnotesize\ttfamily unsigned int osmo\+\_\+stats\+\_\+reporter\+::have\+\_\+net\+\_\+config}



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

\mbox{\label{structosmo__stats__reporter_ab2151a34d578ba8122c2d3bdade9ef54}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!list@{list}}
\index{list@{list}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{list}
{\footnotesize\ttfamily struct \textbf{ llist\+\_\+head} osmo\+\_\+stats\+\_\+reporter\+::list}



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

\mbox{\label{structosmo__stats__reporter_a48ff6dba2879e912e3e8dbd80c74109f}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!max\_class@{max\_class}}
\index{max\_class@{max\_class}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{max\_class}
{\footnotesize\ttfamily enum \textbf{ osmo\+\_\+stats\+\_\+class} osmo\+\_\+stats\+\_\+reporter\+::max\+\_\+class}



Maximum class/index to report. 

FIXME\+: More details! 

Referenced by \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+check\+\_\+config()}, and \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+set\+\_\+max\+\_\+class()}.

\mbox{\label{structosmo__stats__reporter_a3c4d885fad2f0a33c3e5c75f5cae8856}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!mtu@{mtu}}
\index{mtu@{mtu}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{mtu}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+reporter\+::mtu}



Maximum Transmission Unit. 

\mbox{\label{structosmo__stats__reporter_aba6f8ea71113b68e578b67ae40516a00}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!name@{name}}
\index{name@{name}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{name}
{\footnotesize\ttfamily char$\ast$ osmo\+\_\+stats\+\_\+reporter\+::name}



Human-\/readable name of this reporter. 



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

\mbox{\label{structosmo__stats__reporter_a8f788b2f3b9d3c56eefd3f350bae9640}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!name\_prefix@{name\_prefix}}
\index{name\_prefix@{name\_prefix}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{name\_prefix}
{\footnotesize\ttfamily char$\ast$ osmo\+\_\+stats\+\_\+reporter\+::name\+\_\+prefix}



prefix for counter names 



Referenced by \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+log\+\_\+send()}, \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+set\+\_\+name\+\_\+prefix()}, and \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+statsd\+\_\+send()}.

\mbox{\label{structosmo__stats__reporter_a8485e95c2d20e3458af5f9eca194906e}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!open@{open}}
\index{open@{open}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{open}
{\footnotesize\ttfamily int($\ast$ osmo\+\_\+stats\+\_\+reporter\+::open) (struct \textbf{ osmo\+\_\+stats\+\_\+reporter} $\ast$srep)}



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

\mbox{\label{structosmo__stats__reporter_a8b291900a0654f4d36c7d14882229e10}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!running@{running}}
\index{running@{running}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{running}
{\footnotesize\ttfamily int osmo\+\_\+stats\+\_\+reporter\+::running}



is this reporter running 



Referenced by \textbf{ flush\+\_\+all\+\_\+reporters()}, \textbf{ handle\+\_\+counter()}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+handler()}, \textbf{ rate\+\_\+ctr\+\_\+handler()}, and \textbf{ update\+\_\+srep\+\_\+config()}.

\mbox{\label{structosmo__stats__reporter_a26d44cf72ea52e2c5a169d7d2dce5ad6}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!send\_counter@{send\_counter}}
\index{send\_counter@{send\_counter}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{send\_counter}
{\footnotesize\ttfamily int($\ast$ 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)}



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

\mbox{\label{structosmo__stats__reporter_a47b45b8e087d5e41e338251355ff0203}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!send\_item@{send\_item}}
\index{send\_item@{send\_item}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{send\_item}
{\footnotesize\ttfamily int($\ast$ 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}, int64\+\_\+t value)}



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

\mbox{\label{structosmo__stats__reporter_a447e3a9c7485f6da35a42d11144d8830}} 
\index{osmo\_stats\_reporter@{osmo\_stats\_reporter}!type@{type}}
\index{type@{type}!osmo\_stats\_reporter@{osmo\_stats\_reporter}}
\doxysubsubsection{type}
{\footnotesize\ttfamily enum \textbf{ osmo\+\_\+stats\+\_\+reporter\+\_\+type} osmo\+\_\+stats\+\_\+reporter\+::type}



Type of the reporter (log, statsd) 



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



The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
include/osmocom/core/\textbf{ stats.\+h}\end{DoxyCompactItemize}
