\doxysection{src/sccp\+\_\+user.h File Reference}
\label{sccp__user_8h}\index{src/sccp\_user.h@{src/sccp\_user.h}}
{\ttfamily \#include $<$inttypes.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/fsm.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/prim.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/linuxlist.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/sigtran/sccp\+\_\+sap.\+h$>$}\newline
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ osmo\+\_\+sccp\+\_\+user}
\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ \+\_\+\+LOGPSCU}(scu,  subsys,  level,  fmt,  args ...)~ \textbf{ \+\_\+\+LOGPSCI}((scu)-\/$>$inst, subsys, level, \char`\"{}SCU(\%s) \char`\"{} fmt, \textbf{ osmo\+\_\+sccp\+\_\+user\+\_\+name}(scu), \#\# args)
\item 
\#define \textbf{ LOGPSCU}(scu,  level,  fmt,  args ...)~ \textbf{ \+\_\+\+LOGPSCU}(scu, DLSCCP, level, fmt, \#\# args)
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ osmo\+\_\+sccp\+\_\+user} $\ast$ \textbf{ sccp\+\_\+user\+\_\+alloc} (struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$inst, const char $\ast$name, osmo\+\_\+prim\+\_\+cb prim\+\_\+cb, uint16\+\_\+t \textbf{ ssn}, uint32\+\_\+t \textbf{ pc})
\item 
void \textbf{ sccp\+\_\+user\+\_\+free} (struct \textbf{ osmo\+\_\+sccp\+\_\+user} $\ast$scu)
\item 
int \textbf{ sccp\+\_\+user\+\_\+prim\+\_\+up} (struct \textbf{ osmo\+\_\+sccp\+\_\+user} $\ast$scut, struct \textbf{ osmo\+\_\+scu\+\_\+prim} $\ast$prim)
\begin{DoxyCompactList}\small\item\em Send a SCCP User SAP Primitive up to the User. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Macro Definition Documentation}
\mbox{\label{sccp__user_8h_a21c3b3735c6d8dea00d8a385c20a7824}} 
\index{sccp\_user.h@{sccp\_user.h}!\_LOGPSCU@{\_LOGPSCU}}
\index{\_LOGPSCU@{\_LOGPSCU}!sccp\_user.h@{sccp\_user.h}}
\doxysubsubsection{\_LOGPSCU}
{\footnotesize\ttfamily \#define \+\_\+\+LOGPSCU(\begin{DoxyParamCaption}\item[{}]{scu,  }\item[{}]{subsys,  }\item[{}]{level,  }\item[{}]{fmt,  }\item[{}]{args ... }\end{DoxyParamCaption})~ \textbf{ \+\_\+\+LOGPSCI}((scu)-\/$>$inst, subsys, level, \char`\"{}SCU(\%s) \char`\"{} fmt, \textbf{ osmo\+\_\+sccp\+\_\+user\+\_\+name}(scu), \#\# args)}

\mbox{\label{sccp__user_8h_a1cb5752c3dff62d05096156cea5d9874}} 
\index{sccp\_user.h@{sccp\_user.h}!LOGPSCU@{LOGPSCU}}
\index{LOGPSCU@{LOGPSCU}!sccp\_user.h@{sccp\_user.h}}
\doxysubsubsection{LOGPSCU}
{\footnotesize\ttfamily \#define LOGPSCU(\begin{DoxyParamCaption}\item[{}]{scu,  }\item[{}]{level,  }\item[{}]{fmt,  }\item[{}]{args ... }\end{DoxyParamCaption})~ \textbf{ \+\_\+\+LOGPSCU}(scu, DLSCCP, level, fmt, \#\# args)}



\doxysubsection{Function Documentation}
\mbox{\label{sccp__user_8h_afb4322f88ee265f1c791e51406dfad0b}} 
\index{sccp\_user.h@{sccp\_user.h}!sccp\_user\_alloc@{sccp\_user\_alloc}}
\index{sccp\_user\_alloc@{sccp\_user\_alloc}!sccp\_user.h@{sccp\_user.h}}
\doxysubsubsection{sccp\_user\_alloc()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+sccp\+\_\+user} $\ast$ sccp\+\_\+user\+\_\+alloc (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$}]{inst,  }\item[{const char $\ast$}]{name,  }\item[{osmo\+\_\+prim\+\_\+cb}]{prim\+\_\+cb,  }\item[{uint16\+\_\+t}]{ssn,  }\item[{uint32\+\_\+t}]{pc }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+sccp\+\_\+user\+::inst}, \textbf{ osmo\+\_\+sccp\+\_\+user\+::list}, \textbf{ osmo\+\_\+sccp\+\_\+user\+::name}, \textbf{ osmo\+\_\+sccp\+\_\+user\+::pc}, \textbf{ pc}, \textbf{ osmo\+\_\+sccp\+\_\+user\+::prim\+\_\+cb}, \textbf{ osmo\+\_\+sccp\+\_\+user\+::ssn}, \textbf{ ssn}, and \textbf{ osmo\+\_\+sccp\+\_\+instance\+::users}.



Referenced by \textbf{ sccp\+\_\+user\+\_\+bind\+\_\+pc()}.

\mbox{\label{sccp__user_8h_a804c5c2daea1c5377605bb77498c5358}} 
\index{sccp\_user.h@{sccp\_user.h}!sccp\_user\_free@{sccp\_user\_free}}
\index{sccp\_user\_free@{sccp\_user\_free}!sccp\_user.h@{sccp\_user.h}}
\doxysubsubsection{sccp\_user\_free()}
{\footnotesize\ttfamily void sccp\+\_\+user\+\_\+free (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+sccp\+\_\+user} $\ast$}]{scu }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+sccp\+\_\+user\+::list}, and \textbf{ sccp\+\_\+user\+\_\+flush\+\_\+connections()}.



Referenced by \textbf{ osmo\+\_\+sccp\+\_\+user\+\_\+unbind()}.

\mbox{\label{sccp__user_8h_acac4bf761e73af753df023703e6faf83}} 
\index{sccp\_user.h@{sccp\_user.h}!sccp\_user\_prim\_up@{sccp\_user\_prim\_up}}
\index{sccp\_user\_prim\_up@{sccp\_user\_prim\_up}!sccp\_user.h@{sccp\_user.h}}
\doxysubsubsection{sccp\_user\_prim\_up()}
{\footnotesize\ttfamily int sccp\+\_\+user\+\_\+prim\+\_\+up (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+sccp\+\_\+user} $\ast$}]{scu,  }\item[{struct \textbf{ osmo\+\_\+scu\+\_\+prim} $\ast$}]{prim }\end{DoxyParamCaption})}



Send a SCCP User SAP Primitive up to the User. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em scu} & SCCP 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 SCCP User\textquotesingle{}s prim\+\_\+cb() function
\end{DoxyReturn}
Ownership of prim-\/$>$oph-\/$>$msg is passed to the user of the registered callback 

References \textbf{ LOGPSCU}, \textbf{ osmo\+\_\+scu\+\_\+prim\+::oph}, \textbf{ osmo\+\_\+scu\+\_\+prim\+\_\+name()}, and \textbf{ osmo\+\_\+sccp\+\_\+user\+::prim\+\_\+cb}.



Referenced by \textbf{ sccp\+\_\+conn\+\_\+scu\+\_\+gen\+\_\+encode\+\_\+and\+\_\+send()}, \textbf{ sccp\+\_\+lbcs\+\_\+local\+\_\+bcast\+\_\+pcstate()}, \textbf{ sccp\+\_\+lbcs\+\_\+local\+\_\+bcast\+\_\+state()}, \textbf{ sclc\+\_\+rx\+\_\+cldr()}, and \textbf{ sclc\+\_\+rx\+\_\+cldt()}.

