\doxysection{src/ss7\+\_\+user.h File Reference}
\label{ss7__user_8h}\index{src/ss7\_user.h@{src/ss7\_user.h}}
{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$unistd.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/prim.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/sigtran/protocol/mtp.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/sigtran/mtp\+\_\+sap.\+h$>$}\newline
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ osmo\+\_\+ss7\+\_\+user}
\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ \+\_\+\+LOGPSS7U}(osu,  subsys,  level,  fmt,  args ...)~ \textbf{ \+\_\+\+LOGSS7}((osu)-\/$>$inst, subsys, level, \char`\"{}ss7\+\_\+user(\%s) \char`\"{} fmt, osu-\/$>$name, \#\# args)
\item 
\#define \textbf{ LOGPSS7U}(osu,  level,  fmt,  args ...)~ \textbf{ \+\_\+\+LOGPSS7U}(osu, DLSS7, level, fmt, \#\# args)
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \textbf{ ss7\+\_\+user\+\_\+unregister\+\_\+all} (struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$user)
\item 
int \textbf{ ss7\+\_\+user\+\_\+mtp\+\_\+sap\+\_\+prim\+\_\+up} (const struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$osu, struct \textbf{ osmo\+\_\+mtp\+\_\+prim} $\ast$omp)
\begin{DoxyCompactList}\small\item\em Send a MTP SAP Primitive up to the MTP User. \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+mtp\+\_\+prim} $\ast$ \textbf{ mtp\+\_\+prim\+\_\+xfer\+\_\+ind\+\_\+alloc} (const struct \textbf{ osmo\+\_\+mtp\+\_\+transfer\+\_\+param} $\ast$param, const uint8\+\_\+t $\ast$user\+\_\+data, size\+\_\+t user\+\_\+data\+\_\+len)
\item 
struct \textbf{ osmo\+\_\+mtp\+\_\+prim} $\ast$ \textbf{ mtp\+\_\+prim\+\_\+status\+\_\+ind\+\_\+alloc} (uint32\+\_\+t \textbf{ dpc}, enum \textbf{ mtp\+\_\+unavail\+\_\+cause} cause, bool cong\+\_\+level\+\_\+present, uint8\+\_\+t cong\+\_\+level)
\item 
void \textbf{ mtp\+\_\+resume\+\_\+ind\+\_\+up\+\_\+to\+\_\+all\+\_\+users} (struct \textbf{ osmo\+\_\+ss7\+\_\+instance} $\ast$s7i, uint32\+\_\+t \textbf{ pc})
\item 
void \textbf{ mtp\+\_\+pause\+\_\+ind\+\_\+up\+\_\+to\+\_\+all\+\_\+users} (struct \textbf{ osmo\+\_\+ss7\+\_\+instance} $\ast$s7i, uint32\+\_\+t \textbf{ pc})
\item 
void \textbf{ mtp\+\_\+status\+\_\+ind\+\_\+up\+\_\+to\+\_\+all\+\_\+users} (struct \textbf{ osmo\+\_\+ss7\+\_\+instance} $\ast$s7i, uint32\+\_\+t \textbf{ dpc}, enum \textbf{ mtp\+\_\+unavail\+\_\+cause} cause, bool cong\+\_\+level\+\_\+present, uint8\+\_\+t cong\+\_\+level)
\end{DoxyCompactItemize}


\doxysubsection{Macro Definition Documentation}
\mbox{\label{ss7__user_8h_af60420e77c744e2b8189f30f3d91b3fc}} 
\index{ss7\_user.h@{ss7\_user.h}!\_LOGPSS7U@{\_LOGPSS7U}}
\index{\_LOGPSS7U@{\_LOGPSS7U}!ss7\_user.h@{ss7\_user.h}}
\doxysubsubsection{\_LOGPSS7U}
{\footnotesize\ttfamily \#define \+\_\+\+LOGPSS7U(\begin{DoxyParamCaption}\item[{}]{osu,  }\item[{}]{subsys,  }\item[{}]{level,  }\item[{}]{fmt,  }\item[{}]{args ... }\end{DoxyParamCaption})~ \textbf{ \+\_\+\+LOGSS7}((osu)-\/$>$inst, subsys, level, \char`\"{}ss7\+\_\+user(\%s) \char`\"{} fmt, osu-\/$>$name, \#\# args)}

\mbox{\label{ss7__user_8h_a15d105cb9dff80402ab5c059c72a7092}} 
\index{ss7\_user.h@{ss7\_user.h}!LOGPSS7U@{LOGPSS7U}}
\index{LOGPSS7U@{LOGPSS7U}!ss7\_user.h@{ss7\_user.h}}
\doxysubsubsection{LOGPSS7U}
{\footnotesize\ttfamily \#define LOGPSS7U(\begin{DoxyParamCaption}\item[{}]{osu,  }\item[{}]{level,  }\item[{}]{fmt,  }\item[{}]{args ... }\end{DoxyParamCaption})~ \textbf{ \+\_\+\+LOGPSS7U}(osu, DLSS7, level, fmt, \#\# args)}



\doxysubsection{Function Documentation}
\mbox{\label{ss7__user_8h_aa4bd57b5b9fcb889e4866120acad515b}} 
\index{ss7\_user.h@{ss7\_user.h}!mtp\_pause\_ind\_up\_to\_all\_users@{mtp\_pause\_ind\_up\_to\_all\_users}}
\index{mtp\_pause\_ind\_up\_to\_all\_users@{mtp\_pause\_ind\_up\_to\_all\_users}!ss7\_user.h@{ss7\_user.h}}
\doxysubsubsection{mtp\_pause\_ind\_up\_to\_all\_users()}
{\footnotesize\ttfamily void mtp\+\_\+pause\+\_\+ind\+\_\+up\+\_\+to\+\_\+all\+\_\+users (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+instance} $\ast$}]{s7i,  }\item[{uint32\+\_\+t}]{pc }\end{DoxyParamCaption})}



References \textbf{ mtp\+\_\+prim\+\_\+pause\+\_\+ind\+\_\+alloc()}, \textbf{ pc}, \textbf{ ss7\+\_\+user\+\_\+mtp\+\_\+sap\+\_\+prim\+\_\+up()}, and \textbf{ osmo\+\_\+ss7\+\_\+instance\+::user}.



Referenced by \textbf{ xua\+\_\+snm\+\_\+pc\+\_\+available\+\_\+to\+\_\+mtp\+\_\+users()}.

\mbox{\label{ss7__user_8h_a3f823236965b1626fcec73815287d095}} 
\index{ss7\_user.h@{ss7\_user.h}!mtp\_prim\_status\_ind\_alloc@{mtp\_prim\_status\_ind\_alloc}}
\index{mtp\_prim\_status\_ind\_alloc@{mtp\_prim\_status\_ind\_alloc}!ss7\_user.h@{ss7\_user.h}}
\doxysubsubsection{mtp\_prim\_status\_ind\_alloc()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+mtp\+\_\+prim} $\ast$ mtp\+\_\+prim\+\_\+status\+\_\+ind\+\_\+alloc (\begin{DoxyParamCaption}\item[{uint32\+\_\+t}]{dpc,  }\item[{enum \textbf{ mtp\+\_\+unavail\+\_\+cause}}]{cause,  }\item[{bool}]{cong\+\_\+level\+\_\+present,  }\item[{uint8\+\_\+t}]{cong\+\_\+level }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+mtp\+\_\+status\+\_\+param\+::affected\+\_\+dpc}, \textbf{ osmo\+\_\+mtp\+\_\+status\+\_\+param\+::cause}, \textbf{ osmo\+\_\+mtp\+\_\+status\+\_\+param\+::congestion\+\_\+level}, \textbf{ osmo\+\_\+mtp\+\_\+status\+\_\+param\+::congestion\+\_\+level\+\_\+present}, \textbf{ dpc}, \textbf{ mtp\+\_\+prim\+\_\+msgb\+\_\+alloc()}, \textbf{ MTP\+\_\+\+SAP\+\_\+\+USER}, \textbf{ osmo\+\_\+mtp\+\_\+prim\+::oph}, \textbf{ OSMO\+\_\+\+MTP\+\_\+\+PRIM\+\_\+\+STATUS}, \textbf{ osmo\+\_\+mtp\+\_\+prim\+::status}, and \textbf{ osmo\+\_\+mtp\+\_\+prim\+::u}.



Referenced by \textbf{ mtp\+\_\+status\+\_\+ind\+\_\+up\+\_\+to\+\_\+all\+\_\+users()}, and \textbf{ xua\+\_\+snm\+\_\+upu()}.

\mbox{\label{ss7__user_8h_a27105728fd0796805c7c2d68e860e09f}} 
\index{ss7\_user.h@{ss7\_user.h}!mtp\_prim\_xfer\_ind\_alloc@{mtp\_prim\_xfer\_ind\_alloc}}
\index{mtp\_prim\_xfer\_ind\_alloc@{mtp\_prim\_xfer\_ind\_alloc}!ss7\_user.h@{ss7\_user.h}}
\doxysubsubsection{mtp\_prim\_xfer\_ind\_alloc()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+mtp\+\_\+prim} $\ast$ mtp\+\_\+prim\+\_\+xfer\+\_\+ind\+\_\+alloc (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+mtp\+\_\+transfer\+\_\+param} $\ast$}]{param,  }\item[{const uint8\+\_\+t $\ast$}]{user\+\_\+data,  }\item[{size\+\_\+t}]{user\+\_\+data\+\_\+len }\end{DoxyParamCaption})}



References \textbf{ m3ua\+\_\+msgb\+\_\+alloc()}, \textbf{ MTP\+\_\+\+SAP\+\_\+\+USER}, \textbf{ osmo\+\_\+mtp\+\_\+prim\+::oph}, \textbf{ OSMO\+\_\+\+MTP\+\_\+\+PRIM\+\_\+\+TRANSFER}, \textbf{ osmo\+\_\+mtp\+\_\+prim\+::transfer}, and \textbf{ osmo\+\_\+mtp\+\_\+prim\+::u}.



Referenced by \textbf{ m3ua\+\_\+to\+\_\+xfer\+\_\+ind()}.

\mbox{\label{ss7__user_8h_adffcf34f24d768119f65e14bb4a362a7}} 
\index{ss7\_user.h@{ss7\_user.h}!mtp\_resume\_ind\_up\_to\_all\_users@{mtp\_resume\_ind\_up\_to\_all\_users}}
\index{mtp\_resume\_ind\_up\_to\_all\_users@{mtp\_resume\_ind\_up\_to\_all\_users}!ss7\_user.h@{ss7\_user.h}}
\doxysubsubsection{mtp\_resume\_ind\_up\_to\_all\_users()}
{\footnotesize\ttfamily void mtp\+\_\+resume\+\_\+ind\+\_\+up\+\_\+to\+\_\+all\+\_\+users (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+instance} $\ast$}]{s7i,  }\item[{uint32\+\_\+t}]{pc }\end{DoxyParamCaption})}



References \textbf{ mtp\+\_\+prim\+\_\+resume\+\_\+ind\+\_\+alloc()}, \textbf{ pc}, \textbf{ ss7\+\_\+user\+\_\+mtp\+\_\+sap\+\_\+prim\+\_\+up()}, and \textbf{ osmo\+\_\+ss7\+\_\+instance\+::user}.



Referenced by \textbf{ xua\+\_\+snm\+\_\+pc\+\_\+available\+\_\+to\+\_\+mtp\+\_\+users()}.

\mbox{\label{ss7__user_8h_a1b70a5ab4973673ce5c948d99810c908}} 
\index{ss7\_user.h@{ss7\_user.h}!mtp\_status\_ind\_up\_to\_all\_users@{mtp\_status\_ind\_up\_to\_all\_users}}
\index{mtp\_status\_ind\_up\_to\_all\_users@{mtp\_status\_ind\_up\_to\_all\_users}!ss7\_user.h@{ss7\_user.h}}
\doxysubsubsection{mtp\_status\_ind\_up\_to\_all\_users()}
{\footnotesize\ttfamily void mtp\+\_\+status\+\_\+ind\+\_\+up\+\_\+to\+\_\+all\+\_\+users (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+instance} $\ast$}]{s7i,  }\item[{uint32\+\_\+t}]{dpc,  }\item[{enum \textbf{ mtp\+\_\+unavail\+\_\+cause}}]{cause,  }\item[{bool}]{cong\+\_\+level\+\_\+present,  }\item[{uint8\+\_\+t}]{cong\+\_\+level }\end{DoxyParamCaption})}



References \textbf{ dpc}, \textbf{ mtp\+\_\+prim\+\_\+status\+\_\+ind\+\_\+alloc()}, \textbf{ ss7\+\_\+user\+\_\+mtp\+\_\+sap\+\_\+prim\+\_\+up()}, and \textbf{ osmo\+\_\+ss7\+\_\+instance\+::user}.



Referenced by \textbf{ xua\+\_\+snm\+\_\+scon\+\_\+to\+\_\+mtp\+\_\+users()}.

\mbox{\label{ss7__user_8h_a3f81d5e8bc8053c75d651ce79b95cc21}} 
\index{ss7\_user.h@{ss7\_user.h}!ss7\_user\_mtp\_sap\_prim\_up@{ss7\_user\_mtp\_sap\_prim\_up}}
\index{ss7\_user\_mtp\_sap\_prim\_up@{ss7\_user\_mtp\_sap\_prim\_up}!ss7\_user.h@{ss7\_user.h}}
\doxysubsubsection{ss7\_user\_mtp\_sap\_prim\_up()}
{\footnotesize\ttfamily int ss7\+\_\+user\+\_\+mtp\+\_\+sap\+\_\+prim\+\_\+up (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$}]{osu,  }\item[{struct \textbf{ osmo\+\_\+mtp\+\_\+prim} $\ast$}]{omp }\end{DoxyParamCaption})}



Send a MTP SAP Primitive up to the MTP User. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em osu} & MTP User to whom to send the primitive \\
\hline
\mbox{\texttt{ in}}  & {\em prim} & Primitive to send to the user \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
return value of the MTP User\textquotesingle{}s prim\+\_\+cb() function
\end{DoxyReturn}
Ownership of prim-\/$>$oph-\/$>$msg is passed to the user of the registered callback 

References \textbf{ LOGPSS7U}, \textbf{ osmo\+\_\+mtp\+\_\+prim\+::oph}, \textbf{ osmo\+\_\+mtp\+\_\+prim\+\_\+name()}, \textbf{ osmo\+\_\+ss7\+\_\+user\+::prim\+\_\+cb}, and \textbf{ osmo\+\_\+ss7\+\_\+user\+::priv}.



Referenced by \textbf{ deliver\+\_\+to\+\_\+mtp\+\_\+user()}, \textbf{ mtp\+\_\+pause\+\_\+ind\+\_\+up\+\_\+to\+\_\+all\+\_\+users()}, \textbf{ mtp\+\_\+resume\+\_\+ind\+\_\+up\+\_\+to\+\_\+all\+\_\+users()}, \textbf{ mtp\+\_\+status\+\_\+ind\+\_\+up\+\_\+to\+\_\+all\+\_\+users()}, and \textbf{ xua\+\_\+snm\+\_\+upu()}.

\mbox{\label{ss7__user_8h_a9f60655b565bb31c720ffe15fb88b23e}} 
\index{ss7\_user.h@{ss7\_user.h}!ss7\_user\_unregister\_all@{ss7\_user\_unregister\_all}}
\index{ss7\_user\_unregister\_all@{ss7\_user\_unregister\_all}!ss7\_user.h@{ss7\_user.h}}
\doxysubsubsection{ss7\_user\_unregister\_all()}
{\footnotesize\ttfamily void ss7\+\_\+user\+\_\+unregister\+\_\+all (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$}]{user }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+ss7\+\_\+user\+::inst}, \textbf{ NULL}, and \textbf{ osmo\+\_\+ss7\+\_\+instance\+::user}.



Referenced by \textbf{ osmo\+\_\+ss7\+\_\+user\+\_\+destroy()}.

