\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 "{}ss7\+\_\+user.\+h"{}}\newline
{\ttfamily \#include "{}ss7\+\_\+internal.\+h"{}}\newline
\doxysubsubsection*{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\+\_\+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\+\_\+instance} $\ast$inst, uint8\+\_\+t service\+\_\+ind, struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$user)
\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\+\_\+instance} $\ast$inst, uint8\+\_\+t service\+\_\+ind, struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$user)
\begin{DoxyCompactList}\small\item\em Unregister a MTP user for a given service indicator. \end{DoxyCompactList}\item 
int \textbf{ ss7\+\_\+mtp\+\_\+to\+\_\+user} (struct \textbf{ osmo\+\_\+ss7\+\_\+instance} $\ast$inst, struct \textbf{ osmo\+\_\+mtp\+\_\+prim} $\ast$omp)
\end{DoxyCompactItemize}


\doxysubsection{Function Documentation}
\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()}.

\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})}



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

\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}.

\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}.

\label{ss7__user_8c_a22d4d3245ada246e0d50da10c9281d28} 
\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\+\_\+instance} $\ast$}]{inst,  }\item[{uint8\+\_\+t}]{service\+\_\+ind,  }\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$}]{user }\end{DoxyParamCaption})}



Register a MTP user for a given service indicator. 


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


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



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

\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()}.

\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()}.

\label{ss7__user_8c_a47b75b30c8c07818f2c67a28a3dc74c9} 
\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\+\_\+instance} $\ast$}]{inst,  }\item[{uint8\+\_\+t}]{service\+\_\+ind,  }\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+user} $\ast$}]{user }\end{DoxyParamCaption})}



Unregister a MTP user for a given service indicator. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em inst} & SS7 instance for which we register the user \\
\hline
\mbox{\texttt{ in}}  & {\em service\+\_\+ind} & Service (ISUP, SCCP, ...) \\
\hline
\mbox{\texttt{ in}}  & {\em user} & (optional) SS7 user. If present, we will not unregister other users \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative on error 
\end{DoxyReturn}


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



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

\label{ss7__user_8c_a9ce92ef2d517a371e0139d3348a5b1c1} 
\index{ss7\_user.c@{ss7\_user.c}!ss7\_mtp\_to\_user@{ss7\_mtp\_to\_user}}
\index{ss7\_mtp\_to\_user@{ss7\_mtp\_to\_user}!ss7\_user.c@{ss7\_user.c}}
\doxysubsubsection{ss7\_mtp\_to\_user()}
{\footnotesize\ttfamily int ss7\+\_\+mtp\+\_\+to\+\_\+user (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+instance} $\ast$}]{inst,  }\item[{struct \textbf{ osmo\+\_\+mtp\+\_\+prim} $\ast$}]{omp }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+ss7\+\_\+instance\+::id}, \textbf{ osmo\+\_\+ss7\+\_\+user\+::inst}, \textbf{ MTP\+\_\+\+SAP\+\_\+\+USER}, \textbf{ osmo\+\_\+ss7\+\_\+user\+::name}, \textbf{ osmo\+\_\+mtp\+\_\+prim\+::oph}, \textbf{ OSMO\+\_\+\+MTP\+\_\+\+PRIM\+\_\+\+TRANSFER}, \textbf{ osmo\+\_\+ss7\+\_\+user\+::prim\+\_\+cb}, \textbf{ osmo\+\_\+ss7\+\_\+user\+::priv}, \textbf{ osmo\+\_\+mtp\+\_\+transfer\+\_\+param\+::sio}, \textbf{ osmo\+\_\+mtp\+\_\+prim\+::transfer}, \textbf{ osmo\+\_\+mtp\+\_\+prim\+::u}, and \textbf{ osmo\+\_\+ss7\+\_\+instance\+::user}.

