\doxysection{src/ss7\+\_\+user.c File Reference}
\label{ss7__user_8c}\index{src/ss7\_user.c@{src/ss7\_user.c}}
{\ttfamily \#include $<$errno.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/linuxlist.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/logging.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/talloc.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/prim.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/sigtran/osmo\+\_\+ss7.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/sigtran/mtp\+\_\+sap.\+h$>$}\newline
{\ttfamily \#include \char`\"{}ss7\+\_\+user.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}ss7\+\_\+internal.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}xua\+\_\+internal.\+h\char`\"{}}\newline
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$ \textbf{ osmo\+\_\+ss7\+\_\+user\+\_\+create} (struct \textbf{ osmo\+\_\+ss7\+\_\+instance} $\ast$inst, const char $\ast$name)
\item 
void \textbf{ osmo\+\_\+ss7\+\_\+user\+\_\+destroy} (struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$user)
\item 
struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$ \textbf{ osmo\+\_\+ss7\+\_\+user\+\_\+find\+\_\+by\+\_\+si} (const struct \textbf{ osmo\+\_\+ss7\+\_\+instance} $\ast$inst, uint8\+\_\+t service\+\_\+indicator)
\item 
struct \textbf{ osmo\+\_\+ss7\+\_\+instance} $\ast$ \textbf{ osmo\+\_\+ss7\+\_\+user\+\_\+get\+\_\+instance} (const struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$user)
\item 
void \textbf{ osmo\+\_\+ss7\+\_\+user\+\_\+set\+\_\+prim\+\_\+cb} (struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$user, osmo\+\_\+prim\+\_\+cb prim\+\_\+cb)
\item 
void \textbf{ osmo\+\_\+ss7\+\_\+user\+\_\+set\+\_\+priv} (struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$user, void $\ast$priv)
\item 
void $\ast$ \textbf{ osmo\+\_\+ss7\+\_\+user\+\_\+get\+\_\+priv} (const struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$user)
\item 
int \textbf{ osmo\+\_\+ss7\+\_\+user\+\_\+register} (struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$user, uint8\+\_\+t service\+\_\+ind)
\begin{DoxyCompactList}\small\item\em Register a MTP user for a given service indicator. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+ss7\+\_\+user\+\_\+unregister} (struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$user, uint8\+\_\+t service\+\_\+ind)
\begin{DoxyCompactList}\small\item\em Unregister a MTP user for a given service indicator. \end{DoxyCompactList}\item 
void \textbf{ ss7\+\_\+user\+\_\+unregister\+\_\+all} (struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$user)
\end{DoxyCompactItemize}


\doxysubsection{Function Documentation}
\mbox{\label{ss7__user_8c_a2968c7ca7f6e94ae42535e46a78d69e5}} 
\index{ss7\_user.c@{ss7\_user.c}!osmo\_ss7\_user\_create@{osmo\_ss7\_user\_create}}
\index{osmo\_ss7\_user\_create@{osmo\_ss7\_user\_create}!ss7\_user.c@{ss7\_user.c}}
\doxysubsubsection{osmo\_ss7\_user\_create()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$ osmo\+\_\+ss7\+\_\+user\+\_\+create (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+instance} $\ast$}]{inst,  }\item[{const char $\ast$}]{name }\end{DoxyParamCaption})}



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



Referenced by \textbf{ osmo\+\_\+sccp\+\_\+instance\+\_\+create()}.

\mbox{\label{ss7__user_8c_aac9a431536545dc750cc75385fb39c2b}} 
\index{ss7\_user.c@{ss7\_user.c}!osmo\_ss7\_user\_destroy@{osmo\_ss7\_user\_destroy}}
\index{osmo\_ss7\_user\_destroy@{osmo\_ss7\_user\_destroy}!ss7\_user.c@{ss7\_user.c}}
\doxysubsubsection{osmo\_ss7\_user\_destroy()}
{\footnotesize\ttfamily void osmo\+\_\+ss7\+\_\+user\+\_\+destroy (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$}]{user }\end{DoxyParamCaption})}



References \textbf{ ss7\+\_\+user\+\_\+unregister\+\_\+all()}.



Referenced by \textbf{ osmo\+\_\+sccp\+\_\+instance\+\_\+destroy()}.

\mbox{\label{ss7__user_8c_ae091f9d194bedae7a2c0a6aff61180dc}} 
\index{ss7\_user.c@{ss7\_user.c}!osmo\_ss7\_user\_find\_by\_si@{osmo\_ss7\_user\_find\_by\_si}}
\index{osmo\_ss7\_user\_find\_by\_si@{osmo\_ss7\_user\_find\_by\_si}!ss7\_user.c@{ss7\_user.c}}
\doxysubsubsection{osmo\_ss7\_user\_find\_by\_si()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$ osmo\+\_\+ss7\+\_\+user\+\_\+find\+\_\+by\+\_\+si (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+ss7\+\_\+instance} $\ast$}]{inst,  }\item[{uint8\+\_\+t}]{service\+\_\+indicator }\end{DoxyParamCaption})}



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



Referenced by \textbf{ mtp3\+\_\+hmdt\+\_\+message\+\_\+for\+\_\+distribution()}, and \textbf{ xua\+\_\+snm\+\_\+upu()}.

\mbox{\label{ss7__user_8c_a53cb3237d6c1be408c2a08838d59dc5d}} 
\index{ss7\_user.c@{ss7\_user.c}!osmo\_ss7\_user\_get\_instance@{osmo\_ss7\_user\_get\_instance}}
\index{osmo\_ss7\_user\_get\_instance@{osmo\_ss7\_user\_get\_instance}!ss7\_user.c@{ss7\_user.c}}
\doxysubsubsection{osmo\_ss7\_user\_get\_instance()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+ss7\+\_\+instance} $\ast$ osmo\+\_\+ss7\+\_\+user\+\_\+get\+\_\+instance (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$}]{user }\end{DoxyParamCaption})}



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

\mbox{\label{ss7__user_8c_a1be6f23b811716e5a094f462bda907d0}} 
\index{ss7\_user.c@{ss7\_user.c}!osmo\_ss7\_user\_get\_priv@{osmo\_ss7\_user\_get\_priv}}
\index{osmo\_ss7\_user\_get\_priv@{osmo\_ss7\_user\_get\_priv}!ss7\_user.c@{ss7\_user.c}}
\doxysubsubsection{osmo\_ss7\_user\_get\_priv()}
{\footnotesize\ttfamily void $\ast$ osmo\+\_\+ss7\+\_\+user\+\_\+get\+\_\+priv (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$}]{user }\end{DoxyParamCaption})}



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

\mbox{\label{ss7__user_8c_a3e89b705c7139fac5d72a5c534884a60}} 
\index{ss7\_user.c@{ss7\_user.c}!osmo\_ss7\_user\_register@{osmo\_ss7\_user\_register}}
\index{osmo\_ss7\_user\_register@{osmo\_ss7\_user\_register}!ss7\_user.c@{ss7\_user.c}}
\doxysubsubsection{osmo\_ss7\_user\_register()}
{\footnotesize\ttfamily int osmo\+\_\+ss7\+\_\+user\+\_\+register (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$}]{user,  }\item[{uint8\+\_\+t}]{service\+\_\+ind }\end{DoxyParamCaption})}



Register a MTP user for a given service indicator. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em user} & SS7 user to register (including primitive call-\/back) \\
\hline
\mbox{\texttt{ in}}  & {\em service\+\_\+ind} & Service (ISUP, SCCP, ...) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative on error 
\end{DoxyReturn}


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



Referenced by \textbf{ osmo\+\_\+sccp\+\_\+instance\+\_\+create()}.

\mbox{\label{ss7__user_8c_aa938a1497ddfdede32b5acb47eb4c421}} 
\index{ss7\_user.c@{ss7\_user.c}!osmo\_ss7\_user\_set\_prim\_cb@{osmo\_ss7\_user\_set\_prim\_cb}}
\index{osmo\_ss7\_user\_set\_prim\_cb@{osmo\_ss7\_user\_set\_prim\_cb}!ss7\_user.c@{ss7\_user.c}}
\doxysubsubsection{osmo\_ss7\_user\_set\_prim\_cb()}
{\footnotesize\ttfamily void osmo\+\_\+ss7\+\_\+user\+\_\+set\+\_\+prim\+\_\+cb (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$}]{user,  }\item[{osmo\+\_\+prim\+\_\+cb}]{prim\+\_\+cb }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+ss7\+\_\+user\+::prim\+\_\+cb}, and \textbf{ osmo\+\_\+ss7\+\_\+instance\+::user}.



Referenced by \textbf{ osmo\+\_\+sccp\+\_\+instance\+\_\+create()}.

\mbox{\label{ss7__user_8c_a58fdbcf80f9ec4e78337ee9ffbe64094}} 
\index{ss7\_user.c@{ss7\_user.c}!osmo\_ss7\_user\_set\_priv@{osmo\_ss7\_user\_set\_priv}}
\index{osmo\_ss7\_user\_set\_priv@{osmo\_ss7\_user\_set\_priv}!ss7\_user.c@{ss7\_user.c}}
\doxysubsubsection{osmo\_ss7\_user\_set\_priv()}
{\footnotesize\ttfamily void osmo\+\_\+ss7\+\_\+user\+\_\+set\+\_\+priv (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$}]{user,  }\item[{void $\ast$}]{priv }\end{DoxyParamCaption})}



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



Referenced by \textbf{ osmo\+\_\+sccp\+\_\+instance\+\_\+create()}.

\mbox{\label{ss7__user_8c_a884a8c4737e2d019e519774c1cd28bd2}} 
\index{ss7\_user.c@{ss7\_user.c}!osmo\_ss7\_user\_unregister@{osmo\_ss7\_user\_unregister}}
\index{osmo\_ss7\_user\_unregister@{osmo\_ss7\_user\_unregister}!ss7\_user.c@{ss7\_user.c}}
\doxysubsubsection{osmo\_ss7\_user\_unregister()}
{\footnotesize\ttfamily int osmo\+\_\+ss7\+\_\+user\+\_\+unregister (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$}]{user,  }\item[{uint8\+\_\+t}]{service\+\_\+ind }\end{DoxyParamCaption})}



Unregister a MTP user for a given service indicator. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em user} & SS7 user to unregister. \\
\hline
\mbox{\texttt{ in}}  & {\em service\+\_\+ind} & Service (ISUP, SCCP, ...) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative on error 
\end{DoxyReturn}


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



Referenced by \textbf{ osmo\+\_\+sccp\+\_\+instance\+\_\+destroy()}.

\mbox{\label{ss7__user_8c_a9f60655b565bb31c720ffe15fb88b23e}} 
\index{ss7\_user.c@{ss7\_user.c}!ss7\_user\_unregister\_all@{ss7\_user\_unregister\_all}}
\index{ss7\_user\_unregister\_all@{ss7\_user\_unregister\_all}!ss7\_user.c@{ss7\_user.c}}
\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()}.

