\doxysection{src/sccp\+\_\+instance.c File Reference}
\label{sccp__instance_8c}\index{src/sccp\_instance.c@{src/sccp\_instance.c}}
{\ttfamily \#include $<$stdbool.\+h$>$}\newline
{\ttfamily \#include $<$string.\+h$>$}\newline
{\ttfamily \#include $<$limits.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/linuxlist.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/logging.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/sigtran/osmo\+\_\+ss7.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/sigtran/sccp\+\_\+sap.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/sigtran/mtp\+\_\+sap.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/sigtran/protocol/mtp.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/sigtran/sccp\+\_\+helpers.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/sccp/sccp\+\_\+types.\+h$>$}\newline
{\ttfamily \#include \char`\"{}sccp\+\_\+connection.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}sccp\+\_\+internal.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}sccp\+\_\+instance.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}sccp\+\_\+user.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}xua\+\_\+internal.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}ss7\+\_\+as.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}ss7\+\_\+asp.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}ss7\+\_\+route.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}ss7\+\_\+route\+\_\+table.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}ss7\+\_\+internal.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}ss7\+\_\+xua\+\_\+srv.\+h\char`\"{}}\newline
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ osmo\+\_\+static\+\_\+assert} (ARRAY\+\_\+\+SIZE(\textbf{ osmo\+\_\+sccp\+\_\+timer\+\_\+defaults})==(\textbf{ OSMO\+\_\+\+SCCP\+\_\+\+TIMERS\+\_\+\+LEN}) \&\&ARRAY\+\_\+\+SIZE(\textbf{ osmo\+\_\+sccp\+\_\+timer\+\_\+names})==(\textbf{ OSMO\+\_\+\+SCCP\+\_\+\+TIMERS\+\_\+\+LEN}), assert\+\_\+osmo\+\_\+sccp\+\_\+timers\+\_\+count)
\item 
struct \textbf{ osmo\+\_\+sccp\+\_\+user} $\ast$ \textbf{ sccp\+\_\+user\+\_\+find} (struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$inst, uint16\+\_\+t ssn, uint32\+\_\+t pc)
\begin{DoxyCompactList}\small\item\em Find a SCCP User registered for given PC+\+SSN or SSN only First search all users with a valid PC for a full PC+\+SSN match. \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+sccp\+\_\+user} $\ast$ \textbf{ osmo\+\_\+sccp\+\_\+user\+\_\+find} (struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$inst, uint16\+\_\+t ssn, uint32\+\_\+t pc)
\begin{DoxyCompactList}\small\item\em Find a SCCP User registered for given PC+\+SSN or SSN only. \end{DoxyCompactList}\item 
static struct \textbf{ osmo\+\_\+sccp\+\_\+user} $\ast$ \textbf{ sccp\+\_\+user\+\_\+bind\+\_\+pc} (struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$inst, const char $\ast$name, osmo\+\_\+prim\+\_\+cb prim\+\_\+cb, uint16\+\_\+t ssn, uint32\+\_\+t pc)
\begin{DoxyCompactList}\small\item\em Bind a SCCP User to a given Point Code. \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+sccp\+\_\+user} $\ast$ \textbf{ osmo\+\_\+sccp\+\_\+user\+\_\+bind\+\_\+pc} (struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$inst, const char $\ast$name, osmo\+\_\+prim\+\_\+cb prim\+\_\+cb, uint16\+\_\+t ssn, uint32\+\_\+t pc)
\begin{DoxyCompactList}\small\item\em Bind a given SCCP User to a given SSN+\+PC. \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+sccp\+\_\+user} $\ast$ \textbf{ osmo\+\_\+sccp\+\_\+user\+\_\+bind} (struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$inst, const char $\ast$name, osmo\+\_\+prim\+\_\+cb prim\+\_\+cb, uint16\+\_\+t ssn)
\begin{DoxyCompactList}\small\item\em Bind a given SCCP User to a given SSN (at any PC) \end{DoxyCompactList}\item 
static void \textbf{ rout\+\_\+fail\+\_\+pending\+\_\+cb} (void $\ast$\+\_\+inst)
\item 
void \textbf{ sccp\+\_\+rout\+\_\+fail\+\_\+enqueue} (struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$inst, const struct \textbf{ xua\+\_\+msg} $\ast$xua, uint32\+\_\+t cause, bool scoc)
\item 
static int \textbf{ mtp\+\_\+user\+\_\+prim\+\_\+cb} (struct osmo\+\_\+prim\+\_\+hdr $\ast$oph, void $\ast$ctx)
\item 
static \textbf{ LLIST\+\_\+\+HEAD} (sccp\+\_\+instances)
\item 
struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$ \textbf{ osmo\+\_\+sccp\+\_\+instance\+\_\+create} (struct \textbf{ osmo\+\_\+ss7\+\_\+instance} $\ast$ss7, void $\ast$priv)
\begin{DoxyCompactList}\small\item\em create a SCCP Instance and register it as user with SS7 inst \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+sccp\+\_\+instance\+\_\+destroy} (struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$inst)
\item 
void \textbf{ osmo\+\_\+sccp\+\_\+set\+\_\+priv} (struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$sccp, void $\ast$priv)
\item 
void $\ast$ \textbf{ osmo\+\_\+sccp\+\_\+get\+\_\+priv} (struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$sccp)
\item 
void \textbf{ osmo\+\_\+sccp\+\_\+local\+\_\+addr\+\_\+by\+\_\+instance} (struct \textbf{ osmo\+\_\+sccp\+\_\+addr} $\ast$dest\+\_\+addr, const struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$inst, uint32\+\_\+t ssn)
\begin{DoxyCompactList}\small\item\em derive a basic local SCCP-\/\+Address from a given SCCP instance. \end{DoxyCompactList}\item 
bool \textbf{ osmo\+\_\+sccp\+\_\+check\+\_\+addr} (struct \textbf{ osmo\+\_\+sccp\+\_\+addr} $\ast$addr, uint32\+\_\+t presence)
\begin{DoxyCompactList}\small\item\em check whether a given SCCP-\/\+Address is consistent. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+sccp\+\_\+gt\+\_\+cmp} (const struct \textbf{ osmo\+\_\+sccp\+\_\+gt} $\ast$a, const struct \textbf{ osmo\+\_\+sccp\+\_\+gt} $\ast$b)
\begin{DoxyCompactList}\small\item\em Compare two SCCP Global Titles. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+sccp\+\_\+addr\+\_\+cmp} (const struct \textbf{ osmo\+\_\+sccp\+\_\+addr} $\ast$a, const struct \textbf{ osmo\+\_\+sccp\+\_\+addr} $\ast$b, uint32\+\_\+t presence\+\_\+criteria)
\begin{DoxyCompactList}\small\item\em Compare two SCCP addresses by given presence criteria. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+sccp\+\_\+addr\+\_\+ri\+\_\+cmp} (const struct \textbf{ osmo\+\_\+sccp\+\_\+addr} $\ast$a, const struct \textbf{ osmo\+\_\+sccp\+\_\+addr} $\ast$b)
\begin{DoxyCompactList}\small\item\em Compare the routing information of two SCCP addresses. \end{DoxyCompactList}\item 
static bool \textbf{ asp\+\_\+serves\+\_\+some\+\_\+as} (const struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$asp)
\item 
struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$ \textbf{ osmo\+\_\+sccp\+\_\+simple\+\_\+client\+\_\+on\+\_\+ss7\+\_\+id} (void $\ast$ctx, uint32\+\_\+t ss7\+\_\+id, const char $\ast$name, uint32\+\_\+t default\+\_\+pc, enum \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+protocol} prot, int default\+\_\+local\+\_\+port, const char $\ast$default\+\_\+local\+\_\+ip, int default\+\_\+remote\+\_\+port, const char $\ast$default\+\_\+remote\+\_\+ip)
\begin{DoxyCompactList}\small\item\em request an sccp client instance \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$ \textbf{ osmo\+\_\+sccp\+\_\+simple\+\_\+client} (void $\ast$ctx, const char $\ast$name, uint32\+\_\+t default\+\_\+pc, enum \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+protocol} prot, int default\+\_\+local\+\_\+port, const char $\ast$default\+\_\+local\+\_\+ip, int default\+\_\+remote\+\_\+port, const char $\ast$default\+\_\+remote\+\_\+ip)
\begin{DoxyCompactList}\small\item\em request an sccp client instance \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$ \textbf{ osmo\+\_\+sccp\+\_\+simple\+\_\+server\+\_\+on\+\_\+ss7\+\_\+id} (void $\ast$ctx, uint32\+\_\+t ss7\+\_\+id, uint32\+\_\+t pc, enum \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+protocol} prot, int local\+\_\+port, const char $\ast$local\+\_\+ip)
\item 
struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$ \textbf{ osmo\+\_\+sccp\+\_\+simple\+\_\+server} (void $\ast$ctx, uint32\+\_\+t pc, enum \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+protocol} prot, int local\+\_\+port, const char $\ast$local\+\_\+ip)
\item 
struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$ \textbf{ osmo\+\_\+sccp\+\_\+simple\+\_\+server\+\_\+add\+\_\+clnt} (struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$inst, enum \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+protocol} prot, const char $\ast$name, uint32\+\_\+t pc, int local\+\_\+port, int remote\+\_\+port, const char $\ast$remote\+\_\+ip)
\item 
void \textbf{ osmo\+\_\+sccp\+\_\+set\+\_\+max\+\_\+optional\+\_\+data} (struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$inst, int val)
\begin{DoxyCompactList}\small\item\em Adjust the upper bound for the optional data length (the payload) for CR, CC, CREF and RLSD messages. \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+ss7\+\_\+instance} $\ast$ \textbf{ osmo\+\_\+sccp\+\_\+get\+\_\+ss7} (const struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$sccp)
\begin{DoxyCompactList}\small\item\em get the SS7 instance that is related to the given SCCP instance \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
const struct osmo\+\_\+tdef \textbf{ osmo\+\_\+sccp\+\_\+timer\+\_\+defaults} [\textbf{ OSMO\+\_\+\+SCCP\+\_\+\+TIMERS\+\_\+\+LEN}]
\item 
const struct value\+\_\+string \textbf{ osmo\+\_\+sccp\+\_\+timer\+\_\+names} [$\,$]
\end{DoxyCompactItemize}


\doxysubsection{Function Documentation}
\mbox{\label{sccp__instance_8c_aee318db01dff04ac49153a9d011fc157}} 
\index{sccp\_instance.c@{sccp\_instance.c}!asp\_serves\_some\_as@{asp\_serves\_some\_as}}
\index{asp\_serves\_some\_as@{asp\_serves\_some\_as}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{asp\_serves\_some\_as()}
{\footnotesize\ttfamily static bool asp\+\_\+serves\+\_\+some\+\_\+as (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$}]{asp }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+ss7\+\_\+instance\+::as\+\_\+list}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::inst}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::list}, and \textbf{ osmo\+\_\+ss7\+\_\+as\+\_\+has\+\_\+asp()}.



Referenced by \textbf{ osmo\+\_\+sccp\+\_\+simple\+\_\+client\+\_\+on\+\_\+ss7\+\_\+id()}.

\mbox{\label{sccp__instance_8c_a9159153a857fee3da7730a2c0f00b651}} 
\index{sccp\_instance.c@{sccp\_instance.c}!LLIST\_HEAD@{LLIST\_HEAD}}
\index{LLIST\_HEAD@{LLIST\_HEAD}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{LLIST\_HEAD()}
{\footnotesize\ttfamily static LLIST\+\_\+\+HEAD (\begin{DoxyParamCaption}\item[{sccp\+\_\+instances}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}

\mbox{\label{sccp__instance_8c_a601023d8501b59b9ec4bd9acc16d4020}} 
\index{sccp\_instance.c@{sccp\_instance.c}!mtp\_user\_prim\_cb@{mtp\_user\_prim\_cb}}
\index{mtp\_user\_prim\_cb@{mtp\_user\_prim\_cb}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{mtp\_user\_prim\_cb()}
{\footnotesize\ttfamily static int mtp\+\_\+user\+\_\+prim\+\_\+cb (\begin{DoxyParamCaption}\item[{struct osmo\+\_\+prim\+\_\+hdr $\ast$}]{oph,  }\item[{void $\ast$}]{ctx }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ LOGPSCI}, \textbf{ xua\+\_\+msg\+::mtp}, \textbf{ MTP\+\_\+\+SAP\+\_\+\+USER}, \textbf{ osmo\+\_\+mtp\+\_\+prim\+::oph}, \textbf{ OSMO\+\_\+\+MTP\+\_\+\+PRIM\+\_\+\+TRANSFER}, \textbf{ osmo\+\_\+sccp\+\_\+to\+\_\+xua()}, \textbf{ scrc\+\_\+rx\+\_\+mtp\+\_\+xfer\+\_\+ind\+\_\+xua()}, \textbf{ osmo\+\_\+mtp\+\_\+prim\+::transfer}, \textbf{ osmo\+\_\+mtp\+\_\+prim\+::u}, and \textbf{ xua\+\_\+msg\+\_\+free()}.



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

\mbox{\label{sccp__instance_8c_ad88f30b0068a27f1462dafd29a5809db}} 
\index{sccp\_instance.c@{sccp\_instance.c}!osmo\_sccp\_addr\_cmp@{osmo\_sccp\_addr\_cmp}}
\index{osmo\_sccp\_addr\_cmp@{osmo\_sccp\_addr\_cmp}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{osmo\_sccp\_addr\_cmp()}
{\footnotesize\ttfamily int osmo\+\_\+sccp\+\_\+addr\+\_\+cmp (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+sccp\+\_\+addr} $\ast$}]{a,  }\item[{const struct \textbf{ osmo\+\_\+sccp\+\_\+addr} $\ast$}]{b,  }\item[{uint32\+\_\+t}]{presence\+\_\+criteria }\end{DoxyParamCaption})}



Compare two SCCP addresses by given presence criteria. 

Any OSMO\+\_\+\+SCCP\+\_\+\+ADDR\+\_\+\+T\+\_\+$\ast$ type not set in presence\+\_\+criteria is ignored. In case all bits are set in presence\+\_\+criteria, the comparison is in the order of\+: OSMO\+\_\+\+SCCP\+\_\+\+ADDR\+\_\+\+T\+\_\+\+GT, OSMO\+\_\+\+SCCP\+\_\+\+ADDR\+\_\+\+T\+\_\+\+PC, OSMO\+\_\+\+SCCP\+\_\+\+ADDR\+\_\+\+T\+\_\+\+IPv4, OSMO\+\_\+\+SCCP\+\_\+\+ADDR\+\_\+\+T\+\_\+\+IPv6, OSMO\+\_\+\+SCCP\+\_\+\+ADDR\+\_\+\+T\+\_\+\+SSN. The SCCP addresses\textquotesingle{} Routing Indicator is not compared, see \doxyref{osmo\+\_\+sccp\+\_\+addr\+\_\+ri\+\_\+cmp()}{p.}{sccp__instance_8c_aff3c1c4bd54d70d478e318440708140d}. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em a} & left side. \\
\hline
\mbox{\texttt{ in}}  & {\em b} & right side. \\
\hline
\mbox{\texttt{ in}}  & {\em presence\+\_\+criteria} & A bitmask of OSMO\+\_\+\+SCCP\+\_\+\+ADDR\+\_\+\+T\+\_\+$\ast$ values, or OSMO\+\_\+\+SCCP\+\_\+\+ADDR\+\_\+\+T\+\_\+\+MASK to compare all parts, except the routing indicator. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
-\/1 if a $<$ b, 1 if a $>$ b, and 0 if all checked values match. 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+sccp\+\_\+addr\+::gt}, \textbf{ osmo\+\_\+sccp\+\_\+addr\+::ip}, \textbf{ OSMO\+\_\+\+SCCP\+\_\+\+ADDR\+\_\+\+T\+\_\+\+GT}, \textbf{ OSMO\+\_\+\+SCCP\+\_\+\+ADDR\+\_\+\+T\+\_\+\+IPv4}, \textbf{ OSMO\+\_\+\+SCCP\+\_\+\+ADDR\+\_\+\+T\+\_\+\+IPv6}, \textbf{ OSMO\+\_\+\+SCCP\+\_\+\+ADDR\+\_\+\+T\+\_\+\+PC}, \textbf{ OSMO\+\_\+\+SCCP\+\_\+\+ADDR\+\_\+\+T\+\_\+\+SSN}, \textbf{ osmo\+\_\+sccp\+\_\+gt\+\_\+cmp()}, \textbf{ osmo\+\_\+sccp\+\_\+addr\+::pc}, \textbf{ osmo\+\_\+sccp\+\_\+addr\+::presence}, \textbf{ osmo\+\_\+sccp\+\_\+addr\+::ssn}, \textbf{ osmo\+\_\+sccp\+\_\+addr\+::v4}, and \textbf{ osmo\+\_\+sccp\+\_\+addr\+::v6}.



Referenced by \textbf{ osmo\+\_\+sccp\+\_\+addr\+\_\+ri\+\_\+cmp()}.

\mbox{\label{sccp__instance_8c_aff3c1c4bd54d70d478e318440708140d}} 
\index{sccp\_instance.c@{sccp\_instance.c}!osmo\_sccp\_addr\_ri\_cmp@{osmo\_sccp\_addr\_ri\_cmp}}
\index{osmo\_sccp\_addr\_ri\_cmp@{osmo\_sccp\_addr\_ri\_cmp}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{osmo\_sccp\_addr\_ri\_cmp()}
{\footnotesize\ttfamily int osmo\+\_\+sccp\+\_\+addr\+\_\+ri\+\_\+cmp (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+sccp\+\_\+addr} $\ast$}]{a,  }\item[{const struct \textbf{ osmo\+\_\+sccp\+\_\+addr} $\ast$}]{b }\end{DoxyParamCaption})}



Compare the routing information of two SCCP addresses. 

Compare the ri of a and b, and, if equal, return \doxyref{osmo\+\_\+sccp\+\_\+addr\+\_\+cmp()}{p.}{sccp__instance_8c_ad88f30b0068a27f1462dafd29a5809db} with presence criteria selected according to ri. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em a} & left side. \\
\hline
\mbox{\texttt{ in}}  & {\em b} & right side. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
-\/1 if a $<$ b, 1 if a $>$ b, and 0 if a == b. 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+sccp\+\_\+addr\+\_\+cmp()}, \textbf{ OSMO\+\_\+\+SCCP\+\_\+\+ADDR\+\_\+\+T\+\_\+\+GT}, \textbf{ OSMO\+\_\+\+SCCP\+\_\+\+ADDR\+\_\+\+T\+\_\+\+IPv4}, \textbf{ OSMO\+\_\+\+SCCP\+\_\+\+ADDR\+\_\+\+T\+\_\+\+IPv6}, \textbf{ OSMO\+\_\+\+SCCP\+\_\+\+ADDR\+\_\+\+T\+\_\+\+PC}, \textbf{ OSMO\+\_\+\+SCCP\+\_\+\+ADDR\+\_\+\+T\+\_\+\+SSN}, \textbf{ OSMO\+\_\+\+SCCP\+\_\+\+RI\+\_\+\+GT}, \textbf{ OSMO\+\_\+\+SCCP\+\_\+\+RI\+\_\+\+NONE}, \textbf{ OSMO\+\_\+\+SCCP\+\_\+\+RI\+\_\+\+SSN\+\_\+\+IP}, \textbf{ OSMO\+\_\+\+SCCP\+\_\+\+RI\+\_\+\+SSN\+\_\+\+PC}, \textbf{ osmo\+\_\+sccp\+\_\+addr\+::presence}, and \textbf{ osmo\+\_\+sccp\+\_\+addr\+::ri}.

\mbox{\label{sccp__instance_8c_a4384e35f0d7a832835621b6734a8240a}} 
\index{sccp\_instance.c@{sccp\_instance.c}!osmo\_sccp\_check\_addr@{osmo\_sccp\_check\_addr}}
\index{osmo\_sccp\_check\_addr@{osmo\_sccp\_check\_addr}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{osmo\_sccp\_check\_addr()}
{\footnotesize\ttfamily bool osmo\+\_\+sccp\+\_\+check\+\_\+addr (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+sccp\+\_\+addr} $\ast$}]{addr,  }\item[{uint32\+\_\+t}]{presence }\end{DoxyParamCaption})}



check whether a given SCCP-\/\+Address is consistent. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em addr} & SCCP address to check \\
\hline
\mbox{\texttt{ in}}  & {\em presence} & mask with minimum required address components \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true when address data seems plausible 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+sccp\+\_\+addr\+::gt}, \textbf{ osmo\+\_\+sccp\+\_\+gt\+::gti}, \textbf{ osmo\+\_\+sccp\+\_\+gt\+::nai}, \textbf{ osmo\+\_\+sccp\+\_\+gt\+::npi}, \textbf{ OSMO\+\_\+\+SCCP\+\_\+\+ADDR\+\_\+\+T\+\_\+\+GT}, \textbf{ OSMO\+\_\+\+SCCP\+\_\+\+ADDR\+\_\+\+T\+\_\+\+IPv4}, \textbf{ OSMO\+\_\+\+SCCP\+\_\+\+ADDR\+\_\+\+T\+\_\+\+IPv6}, \textbf{ OSMO\+\_\+\+SCCP\+\_\+\+ADDR\+\_\+\+T\+\_\+\+PC}, \textbf{ OSMO\+\_\+\+SCCP\+\_\+\+ADDR\+\_\+\+T\+\_\+\+SSN}, \textbf{ OSMO\+\_\+\+SCCP\+\_\+\+RI\+\_\+\+GT}, \textbf{ OSMO\+\_\+\+SCCP\+\_\+\+RI\+\_\+\+SSN\+\_\+\+IP}, \textbf{ OSMO\+\_\+\+SCCP\+\_\+\+RI\+\_\+\+SSN\+\_\+\+PC}, \textbf{ osmo\+\_\+sccp\+\_\+addr\+::presence}, and \textbf{ osmo\+\_\+sccp\+\_\+addr\+::ri}.

\mbox{\label{sccp__instance_8c_a5c813c818a361fb7381c843efb5577e3}} 
\index{sccp\_instance.c@{sccp\_instance.c}!osmo\_sccp\_get\_priv@{osmo\_sccp\_get\_priv}}
\index{osmo\_sccp\_get\_priv@{osmo\_sccp\_get\_priv}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{osmo\_sccp\_get\_priv()}
{\footnotesize\ttfamily void $\ast$ osmo\+\_\+sccp\+\_\+get\+\_\+priv (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$}]{sccp }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+sccp\+\_\+instance\+::priv}.

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



get the SS7 instance that is related to the given SCCP instance 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em sccp} & SCCP instance \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
SS7 instance; NULL if sccp was NULL 
\end{DoxyReturn}


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

\mbox{\label{sccp__instance_8c_a4cc1b98cb117cc04627d55df97123f0b}} 
\index{sccp\_instance.c@{sccp\_instance.c}!osmo\_sccp\_gt\_cmp@{osmo\_sccp\_gt\_cmp}}
\index{osmo\_sccp\_gt\_cmp@{osmo\_sccp\_gt\_cmp}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{osmo\_sccp\_gt\_cmp()}
{\footnotesize\ttfamily int osmo\+\_\+sccp\+\_\+gt\+\_\+cmp (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+sccp\+\_\+gt} $\ast$}]{a,  }\item[{const struct \textbf{ osmo\+\_\+sccp\+\_\+gt} $\ast$}]{b }\end{DoxyParamCaption})}



Compare two SCCP Global Titles. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em a} & left side. \\
\hline
\mbox{\texttt{ in}}  & {\em b} & right side. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
-\/1 if a $<$ b, 1 if a $>$ b, and 0 if a == b. 
\end{DoxyReturn}


Referenced by \textbf{ osmo\+\_\+sccp\+\_\+addr\+\_\+cmp()}.

\mbox{\label{sccp__instance_8c_a91f367a691757d5d683a1ce3bde02e0c}} 
\index{sccp\_instance.c@{sccp\_instance.c}!osmo\_sccp\_instance\_create@{osmo\_sccp\_instance\_create}}
\index{osmo\_sccp\_instance\_create@{osmo\_sccp\_instance\_create}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{osmo\_sccp\_instance\_create()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$ osmo\+\_\+sccp\+\_\+instance\+\_\+create (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+instance} $\ast$}]{ss7,  }\item[{void $\ast$}]{priv }\end{DoxyParamCaption})}



create a SCCP Instance and register it as user with SS7 inst 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em ss7} & SS7 instance to which this SCCP instance belongs \\
\hline
\mbox{\texttt{ in}}  & {\em priv} & private data to be stored within SCCP instance \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
callee-\/allocated SCCP instance on success; NULL on error 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+sccp\+\_\+instance\+::list}, \textbf{ osmo\+\_\+sccp\+\_\+instance\+::max\+\_\+optional\+\_\+data}, \textbf{ MTP\+\_\+\+SI\+\_\+\+SCCP}, \textbf{ mtp\+\_\+user\+\_\+prim\+\_\+cb()}, \textbf{ NULL}, \textbf{ osmo\+\_\+sccp\+\_\+timer\+\_\+defaults}, \textbf{ osmo\+\_\+ss7\+\_\+user\+\_\+create()}, \textbf{ osmo\+\_\+ss7\+\_\+user\+\_\+register()}, \textbf{ osmo\+\_\+ss7\+\_\+user\+\_\+set\+\_\+prim\+\_\+cb()}, \textbf{ osmo\+\_\+ss7\+\_\+user\+\_\+set\+\_\+priv()}, \textbf{ osmo\+\_\+sccp\+\_\+instance\+::priv}, \textbf{ osmo\+\_\+sccp\+\_\+instance\+::queue}, \textbf{ osmo\+\_\+sccp\+\_\+instance\+::rout\+\_\+fail\+\_\+pending}, \textbf{ rout\+\_\+fail\+\_\+pending\+\_\+cb()}, \textbf{ sccp\+\_\+scmg\+\_\+init()}, \textbf{ osmo\+\_\+sccp\+\_\+instance\+::ss7}, \textbf{ osmo\+\_\+sccp\+\_\+instance\+::ss7\+\_\+user}, \textbf{ osmo\+\_\+sccp\+\_\+instance\+::tdefs}, \textbf{ osmo\+\_\+sccp\+\_\+instance\+::timer}, and \textbf{ osmo\+\_\+sccp\+\_\+instance\+::users}.



Referenced by \textbf{ osmo\+\_\+ss7\+\_\+ensure\+\_\+sccp()}.

\mbox{\label{sccp__instance_8c_a399c0860d3bba4c0a051d85ae52e488b}} 
\index{sccp\_instance.c@{sccp\_instance.c}!osmo\_sccp\_instance\_destroy@{osmo\_sccp\_instance\_destroy}}
\index{osmo\_sccp\_instance\_destroy@{osmo\_sccp\_instance\_destroy}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{osmo\_sccp\_instance\_destroy()}
{\footnotesize\ttfamily void osmo\+\_\+sccp\+\_\+instance\+\_\+destroy (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$}]{inst }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+sccp\+\_\+instance\+::connections}, \textbf{ osmo\+\_\+sccp\+\_\+user\+::inst}, \textbf{ osmo\+\_\+sccp\+\_\+instance\+::list}, \textbf{ osmo\+\_\+sccp\+\_\+user\+::list}, \textbf{ MTP\+\_\+\+SI\+\_\+\+SCCP}, \textbf{ NULL}, \textbf{ osmo\+\_\+sccp\+\_\+user\+\_\+unbind()}, \textbf{ osmo\+\_\+ss7\+\_\+user\+\_\+destroy()}, \textbf{ osmo\+\_\+ss7\+\_\+user\+\_\+unregister()}, \textbf{ osmo\+\_\+sccp\+\_\+instance\+::rout\+\_\+fail\+\_\+pending}, \textbf{ osmo\+\_\+ss7\+\_\+instance\+::sccp}, \textbf{ osmo\+\_\+sccp\+\_\+instance\+::ss7}, \textbf{ osmo\+\_\+sccp\+\_\+instance\+::ss7\+\_\+user}, \textbf{ osmo\+\_\+sccp\+\_\+instance\+::timer}, and \textbf{ osmo\+\_\+sccp\+\_\+instance\+::users}.

\mbox{\label{sccp__instance_8c_ac75660cfa2a1056de1586ceac3717b93}} 
\index{sccp\_instance.c@{sccp\_instance.c}!osmo\_sccp\_local\_addr\_by\_instance@{osmo\_sccp\_local\_addr\_by\_instance}}
\index{osmo\_sccp\_local\_addr\_by\_instance@{osmo\_sccp\_local\_addr\_by\_instance}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{osmo\_sccp\_local\_addr\_by\_instance()}
{\footnotesize\ttfamily void osmo\+\_\+sccp\+\_\+local\+\_\+addr\+\_\+by\+\_\+instance (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+sccp\+\_\+addr} $\ast$}]{dest\+\_\+addr,  }\item[{const struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$}]{inst,  }\item[{uint32\+\_\+t}]{ssn }\end{DoxyParamCaption})}



derive a basic local SCCP-\/\+Address from a given SCCP instance. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em dest\+\_\+addr} & pointer to output address memory \\
\hline
\mbox{\texttt{ in}}  & {\em inst} & SCCP instance \\
\hline
\mbox{\texttt{ in}}  & {\em ssn} & Subsystem Number \\
\hline
\end{DoxyParams}


References \textbf{ osmo\+\_\+ss7\+\_\+instance\+::cfg}, \textbf{ osmo\+\_\+sccp\+\_\+make\+\_\+addr\+\_\+pc\+\_\+ssn()}, \textbf{ osmo\+\_\+ss7\+\_\+instance\+::primary\+\_\+pc}, and \textbf{ osmo\+\_\+sccp\+\_\+instance\+::ss7}.

\mbox{\label{sccp__instance_8c_a0aea811fcc44f9212f24e857b0f8fff7}} 
\index{sccp\_instance.c@{sccp\_instance.c}!osmo\_sccp\_set\_max\_optional\_data@{osmo\_sccp\_set\_max\_optional\_data}}
\index{osmo\_sccp\_set\_max\_optional\_data@{osmo\_sccp\_set\_max\_optional\_data}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{osmo\_sccp\_set\_max\_optional\_data()}
{\footnotesize\ttfamily void osmo\+\_\+sccp\+\_\+set\+\_\+max\+\_\+optional\+\_\+data (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$}]{inst,  }\item[{int}]{val }\end{DoxyParamCaption})}



Adjust the upper bound for the optional data length (the payload) for CR, CC, CREF and RLSD messages. 

For any Optional Data part larger than this value in octets, send CR, CC, CREF and RLSD messages without any payload, and send the data payload in a separate Data Form 1 message. ITU-\/T Q.\+713 sections 4.\+2 thru 4.\+5 define a limit of 130 bytes for the \textquotesingle{}Data\textquotesingle{} parameter. This limit can be adjusted here. May be useful for interop with nonstandard SCCP peers. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em sccp} & SCCP instance to reconfigure. \\
\hline
\mbox{\texttt{ in}}  & {\em val} & Number of bytes to set as upper bound for the optional data length, or pass a negative value to set the standard value of SCCP\+\_\+\+MAX\+\_\+\+OPTIONAL\+\_\+\+DATA == 130, which conforms to ITU-\/T Q.\+713. \\
\hline
\end{DoxyParams}


References \textbf{ osmo\+\_\+xua\+\_\+server\+::inst}.



Referenced by \textbf{ DEFUN\+\_\+\+ATTR()}.

\mbox{\label{sccp__instance_8c_a887c5a0200931e2b890ce2a098b859f2}} 
\index{sccp\_instance.c@{sccp\_instance.c}!osmo\_sccp\_set\_priv@{osmo\_sccp\_set\_priv}}
\index{osmo\_sccp\_set\_priv@{osmo\_sccp\_set\_priv}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{osmo\_sccp\_set\_priv()}
{\footnotesize\ttfamily void osmo\+\_\+sccp\+\_\+set\+\_\+priv (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$}]{sccp,  }\item[{void $\ast$}]{priv }\end{DoxyParamCaption})}



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

\mbox{\label{sccp__instance_8c_abdb0d3f6399b0f790fc2cb907845d504}} 
\index{sccp\_instance.c@{sccp\_instance.c}!osmo\_sccp\_simple\_client@{osmo\_sccp\_simple\_client}}
\index{osmo\_sccp\_simple\_client@{osmo\_sccp\_simple\_client}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{osmo\_sccp\_simple\_client()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$ osmo\+\_\+sccp\+\_\+simple\+\_\+client (\begin{DoxyParamCaption}\item[{void $\ast$}]{ctx,  }\item[{const char $\ast$}]{name,  }\item[{uint32\+\_\+t}]{default\+\_\+pc,  }\item[{enum \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+protocol}}]{prot,  }\item[{int}]{default\+\_\+local\+\_\+port,  }\item[{const char $\ast$}]{default\+\_\+local\+\_\+ip,  }\item[{int}]{default\+\_\+remote\+\_\+port,  }\item[{const char $\ast$}]{default\+\_\+remote\+\_\+ip }\end{DoxyParamCaption})}



request an sccp client instance 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em ctx} & talloc context \\
\hline
\mbox{\texttt{ in}}  & {\em name} & human readable name \\
\hline
\mbox{\texttt{ in}}  & {\em default\+\_\+pc} & pointcode to be used on missing VTY setting \\
\hline
\mbox{\texttt{ in}}  & {\em prot} & protocol to be used (e.\+g OSMO\+\_\+\+SS7\+\_\+\+ASP\+\_\+\+PROT\+\_\+\+M3\+UA) \\
\hline
\mbox{\texttt{ in}}  & {\em default\+\_\+local\+\_\+port} & local port to be used on missing VTY setting \\
\hline
\mbox{\texttt{ in}}  & {\em default\+\_\+local\+\_\+ip} & local IP-\/address to be used on missing VTY setting \\
\hline
\mbox{\texttt{ in}}  & {\em default\+\_\+remote\+\_\+port} & remote port to be used on missing VTY setting \\
\hline
\mbox{\texttt{ in}}  & {\em default\+\_\+remote\+\_\+ip} & remote IP-\/address to be used on missing VTY setting \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
callee-\/allocated SCCP instance on success; NULL on error 
\end{DoxyReturn}
This is simplified version of \doxyref{osmo\+\_\+sccp\+\_\+simple\+\_\+client\+\_\+on\+\_\+ss7\+\_\+id()}{p.}{sccp__instance_8c_a3494cf9f81c1463a55572e44366d5573}. the only difference is that the ID of the CS7 instance will be set to 0 statically

References \textbf{ osmo\+\_\+sccp\+\_\+simple\+\_\+client\+\_\+on\+\_\+ss7\+\_\+id()}.

\mbox{\label{sccp__instance_8c_a3494cf9f81c1463a55572e44366d5573}} 
\index{sccp\_instance.c@{sccp\_instance.c}!osmo\_sccp\_simple\_client\_on\_ss7\_id@{osmo\_sccp\_simple\_client\_on\_ss7\_id}}
\index{osmo\_sccp\_simple\_client\_on\_ss7\_id@{osmo\_sccp\_simple\_client\_on\_ss7\_id}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{osmo\_sccp\_simple\_client\_on\_ss7\_id()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$ osmo\+\_\+sccp\+\_\+simple\+\_\+client\+\_\+on\+\_\+ss7\+\_\+id (\begin{DoxyParamCaption}\item[{void $\ast$}]{ctx,  }\item[{uint32\+\_\+t}]{ss7\+\_\+id,  }\item[{const char $\ast$}]{name,  }\item[{uint32\+\_\+t}]{default\+\_\+pc,  }\item[{enum \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+protocol}}]{prot,  }\item[{int}]{default\+\_\+local\+\_\+port,  }\item[{const char $\ast$}]{default\+\_\+local\+\_\+ip,  }\item[{int}]{default\+\_\+remote\+\_\+port,  }\item[{const char $\ast$}]{default\+\_\+remote\+\_\+ip }\end{DoxyParamCaption})}



request an sccp client instance 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em ctx} & talloc context \\
\hline
\mbox{\texttt{ in}}  & {\em ss7\+\_\+id} & of the SS7/\+CS7 instance \\
\hline
\mbox{\texttt{ in}}  & {\em name} & human readable name \\
\hline
\mbox{\texttt{ in}}  & {\em default\+\_\+pc} & pointcode to be used on missing VTY setting \\
\hline
\mbox{\texttt{ in}}  & {\em prot} & protocol to be used (e.\+g OSMO\+\_\+\+SS7\+\_\+\+ASP\+\_\+\+PROT\+\_\+\+M3\+UA) \\
\hline
\mbox{\texttt{ in}}  & {\em default\+\_\+local\+\_\+port} & local port to be used on missing VTY setting \\
\hline
\mbox{\texttt{ in}}  & {\em default\+\_\+local\+\_\+ip} & local IP-\/address to be used on missing VTY setting (NULL\+: use library own defaults) \\
\hline
\mbox{\texttt{ in}}  & {\em default\+\_\+remote\+\_\+port} & remote port to be used on missing VTY setting \\
\hline
\mbox{\texttt{ in}}  & {\em default\+\_\+remote\+\_\+ip} & remote IP-\/address to be used on missing VTY setting (NULL\+: use library own defaults) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
callee-\/allocated SCCP instance on success; NULL on error 
\end{DoxyReturn}
The function will examine the given CS7 instance and its sub components (as, asp, etc.). If necessary it will allocate the missing components. If no CS7 instance can be detected under the caller supplied ID, a new instance will be created beforehand.

References \textbf{ osmo\+\_\+ss7\+\_\+instance\+::asp\+\_\+list}, \textbf{ asp\+\_\+serves\+\_\+some\+\_\+as()}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+instance\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+instance\+::id}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::is\+\_\+server}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::list}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::local}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::name}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::name}, \textbf{ NULL}, \textbf{ osmo\+\_\+ss7\+\_\+as\+\_\+destroy()}, \textbf{ osmo\+\_\+ss7\+\_\+as\+\_\+find\+\_\+by\+\_\+proto()}, \textbf{ osmo\+\_\+ss7\+\_\+as\+\_\+find\+\_\+or\+\_\+create()}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+destroy()}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+find\+\_\+by\+\_\+proto()}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+find\+\_\+or\+\_\+create2()}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+protocol\+\_\+name()}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+protocol\+\_\+port()}, \textbf{ OSMO\+\_\+\+SS7\+\_\+\+ASP\+\_\+\+ROLE\+\_\+\+ASP}, \textbf{ osmo\+\_\+ss7\+\_\+ensure\+\_\+sccp()}, \textbf{ osmo\+\_\+ss7\+\_\+instance\+\_\+destroy()}, \textbf{ osmo\+\_\+ss7\+\_\+instance\+\_\+find()}, \textbf{ osmo\+\_\+ss7\+\_\+instance\+\_\+find\+\_\+or\+\_\+create()}, \textbf{ osmo\+\_\+ss7\+\_\+pc\+\_\+is\+\_\+valid()}, \textbf{ osmo\+\_\+ss7\+\_\+pointcode\+\_\+print()}, \textbf{ osmo\+\_\+ss7\+\_\+routing\+\_\+key\+::pc}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+peer\+::port}, \textbf{ osmo\+\_\+ss7\+\_\+instance\+::primary\+\_\+pc}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::proto}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::remote}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::role}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::role\+\_\+set\+\_\+by\+\_\+vty}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::routing\+\_\+key}, \textbf{ osmo\+\_\+ss7\+\_\+instance\+::rtable\+\_\+system}, \textbf{ osmo\+\_\+ss7\+\_\+instance\+::sccp}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::simple\+\_\+client\+\_\+allocated}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::simple\+\_\+client\+\_\+allocated}, \textbf{ ss7\+\_\+as\+\_\+add\+\_\+asp()}, \textbf{ ss7\+\_\+asp\+\_\+peer\+\_\+set\+\_\+hosts()}, \textbf{ ss7\+\_\+asp\+\_\+restart\+\_\+after\+\_\+reconfigure()}, \textbf{ ss7\+\_\+default\+\_\+trans\+\_\+proto\+\_\+for\+\_\+asp\+\_\+proto()}, \textbf{ ss7\+\_\+route\+\_\+create()}, \textbf{ ss7\+\_\+route\+\_\+destroy()}, \textbf{ ss7\+\_\+route\+\_\+table\+\_\+find\+\_\+route\+\_\+by\+\_\+dpc\+\_\+mask()}, \textbf{ ss7\+\_\+xua\+\_\+server\+\_\+find2()}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::trans\+\_\+proto}, and \textbf{ osmo\+\_\+ss7\+\_\+asp\+::trans\+\_\+role\+\_\+set\+\_\+by\+\_\+vty}.



Referenced by \textbf{ osmo\+\_\+sccp\+\_\+simple\+\_\+client()}.

\mbox{\label{sccp__instance_8c_abd73600ded430275951687aa5d58d23b}} 
\index{sccp\_instance.c@{sccp\_instance.c}!osmo\_sccp\_simple\_server@{osmo\_sccp\_simple\_server}}
\index{osmo\_sccp\_simple\_server@{osmo\_sccp\_simple\_server}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{osmo\_sccp\_simple\_server()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$ osmo\+\_\+sccp\+\_\+simple\+\_\+server (\begin{DoxyParamCaption}\item[{void $\ast$}]{ctx,  }\item[{uint32\+\_\+t}]{pc,  }\item[{enum \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+protocol}}]{prot,  }\item[{int}]{local\+\_\+port,  }\item[{const char $\ast$}]{local\+\_\+ip }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+sccp\+\_\+simple\+\_\+server\+\_\+on\+\_\+ss7\+\_\+id()}.

\mbox{\label{sccp__instance_8c_a850d23232fe30f4162cb47a5c9b6965d}} 
\index{sccp\_instance.c@{sccp\_instance.c}!osmo\_sccp\_simple\_server\_add\_clnt@{osmo\_sccp\_simple\_server\_add\_clnt}}
\index{osmo\_sccp\_simple\_server\_add\_clnt@{osmo\_sccp\_simple\_server\_add\_clnt}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{osmo\_sccp\_simple\_server\_add\_clnt()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$ osmo\+\_\+sccp\+\_\+simple\+\_\+server\+\_\+add\+\_\+clnt (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$}]{inst,  }\item[{enum \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+protocol}}]{prot,  }\item[{const char $\ast$}]{name,  }\item[{uint32\+\_\+t}]{pc,  }\item[{int}]{local\+\_\+port,  }\item[{int}]{remote\+\_\+port,  }\item[{const char $\ast$}]{remote\+\_\+ip }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+ss7\+\_\+asp\+::cfg}, \textbf{ osmo\+\_\+xua\+\_\+server\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+peer\+::host}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+peer\+::host\+\_\+cnt}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::is\+\_\+server}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::local}, \textbf{ osmo\+\_\+xua\+\_\+server\+::local}, \textbf{ NULL}, \textbf{ osmo\+\_\+ss7\+\_\+as\+\_\+destroy()}, \textbf{ osmo\+\_\+ss7\+\_\+as\+\_\+find\+\_\+or\+\_\+create()}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+destroy()}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+find\+\_\+or\+\_\+create2()}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+protocol\+\_\+port()}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+restart()}, \textbf{ OSMO\+\_\+\+SS7\+\_\+\+ASP\+\_\+\+ROLE\+\_\+\+SG}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::remote}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::role}, \textbf{ osmo\+\_\+ss7\+\_\+instance\+::rtable\+\_\+system}, \textbf{ osmo\+\_\+ss7\+\_\+instance\+::sccp}, \textbf{ osmo\+\_\+sccp\+\_\+instance\+::ss7}, \textbf{ ss7\+\_\+as\+\_\+add\+\_\+asp()}, \textbf{ ss7\+\_\+asp\+\_\+peer\+\_\+add\+\_\+host()}, \textbf{ ss7\+\_\+asp\+\_\+peer\+\_\+set\+\_\+hosts()}, \textbf{ ss7\+\_\+default\+\_\+trans\+\_\+proto\+\_\+for\+\_\+asp\+\_\+proto()}, \textbf{ ss7\+\_\+route\+\_\+create()}, \textbf{ ss7\+\_\+route\+\_\+destroy()}, \textbf{ ss7\+\_\+xua\+\_\+server\+\_\+find2()}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::trans\+\_\+proto}, and \textbf{ osmo\+\_\+xua\+\_\+server\+::trans\+\_\+proto}.

\mbox{\label{sccp__instance_8c_a5c3a83227ac8684617fc3e08b65ebc1a}} 
\index{sccp\_instance.c@{sccp\_instance.c}!osmo\_sccp\_simple\_server\_on\_ss7\_id@{osmo\_sccp\_simple\_server\_on\_ss7\_id}}
\index{osmo\_sccp\_simple\_server\_on\_ss7\_id@{osmo\_sccp\_simple\_server\_on\_ss7\_id}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{osmo\_sccp\_simple\_server\_on\_ss7\_id()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$ osmo\+\_\+sccp\+\_\+simple\+\_\+server\+\_\+on\+\_\+ss7\+\_\+id (\begin{DoxyParamCaption}\item[{void $\ast$}]{ctx,  }\item[{uint32\+\_\+t}]{ss7\+\_\+id,  }\item[{uint32\+\_\+t}]{pc,  }\item[{enum \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+protocol}}]{prot,  }\item[{int}]{local\+\_\+port,  }\item[{const char $\ast$}]{local\+\_\+ip }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+ss7\+\_\+instance\+::cfg}, \textbf{ NULL}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+protocol\+\_\+port()}, \textbf{ osmo\+\_\+ss7\+\_\+ensure\+\_\+sccp()}, \textbf{ osmo\+\_\+ss7\+\_\+instance\+\_\+destroy()}, \textbf{ osmo\+\_\+ss7\+\_\+instance\+\_\+find\+\_\+or\+\_\+create()}, \textbf{ osmo\+\_\+ss7\+\_\+instance\+::primary\+\_\+pc}, \textbf{ osmo\+\_\+ss7\+\_\+instance\+::sccp}, \textbf{ ss7\+\_\+default\+\_\+trans\+\_\+proto\+\_\+for\+\_\+asp\+\_\+proto()}, \textbf{ ss7\+\_\+xua\+\_\+server\+\_\+bind()}, \textbf{ ss7\+\_\+xua\+\_\+server\+\_\+create2()}, \textbf{ ss7\+\_\+xua\+\_\+server\+\_\+destroy()}, and \textbf{ osmo\+\_\+xua\+\_\+server\+::trans\+\_\+proto}.



Referenced by \textbf{ osmo\+\_\+sccp\+\_\+simple\+\_\+server()}.

\mbox{\label{sccp__instance_8c_aa6b837a8e560b41e6a0208af9d0b96d2}} 
\index{sccp\_instance.c@{sccp\_instance.c}!osmo\_sccp\_user\_bind@{osmo\_sccp\_user\_bind}}
\index{osmo\_sccp\_user\_bind@{osmo\_sccp\_user\_bind}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{osmo\_sccp\_user\_bind()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+sccp\+\_\+user} $\ast$ osmo\+\_\+sccp\+\_\+user\+\_\+bind (\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 }\end{DoxyParamCaption})}



Bind a given SCCP User to a given SSN (at any PC) 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em inst} & SCCP Instance \\
\hline
\mbox{\texttt{ in}}  & {\em name} & human-\/readable name \\
\hline
\mbox{\texttt{ in}}  & {\em prim\+\_\+cb} & User provided callback to pass a primitive/msg up the stack \\
\hline
\mbox{\texttt{ in}}  & {\em ssn} & Sub-\/\+System Number to bind to \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Callee-\/allocated SCCP User on success; negative otherwise
\end{DoxyReturn}
Ownership of oph-\/$>$msg in prim\+\_\+cb is transferred to the user of the registered callback when called. 

References \textbf{ osmo\+\_\+sccp\+\_\+user\+::inst}, \textbf{ osmo\+\_\+sccp\+\_\+user\+::name}, \textbf{ OSMO\+\_\+\+SS7\+\_\+\+PC\+\_\+\+INVALID}, \textbf{ osmo\+\_\+sccp\+\_\+user\+::prim\+\_\+cb}, \textbf{ sccp\+\_\+user\+\_\+bind\+\_\+pc()}, and \textbf{ osmo\+\_\+sccp\+\_\+user\+::ssn}.



Referenced by \textbf{ sccp\+\_\+scmg\+\_\+init()}.

\mbox{\label{sccp__instance_8c_a5ef27c4f387e597d75a96d9dc724ec72}} 
\index{sccp\_instance.c@{sccp\_instance.c}!osmo\_sccp\_user\_bind\_pc@{osmo\_sccp\_user\_bind\_pc}}
\index{osmo\_sccp\_user\_bind\_pc@{osmo\_sccp\_user\_bind\_pc}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{osmo\_sccp\_user\_bind\_pc()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+sccp\+\_\+user} $\ast$ osmo\+\_\+sccp\+\_\+user\+\_\+bind\+\_\+pc (\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})}



Bind a given SCCP User to a given SSN+\+PC. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em inst} & SCCP Instance \\
\hline
\mbox{\texttt{ in}}  & {\em name} & human-\/readable name \\
\hline
\mbox{\texttt{ in}}  & {\em prim\+\_\+cb} & User provided callback to pass a primitive/msg up the stack \\
\hline
\mbox{\texttt{ in}}  & {\em ssn} & Sub-\/\+System Number to bind to \\
\hline
\mbox{\texttt{ in}}  & {\em pc} & Point Code to bind to \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Callee-\/allocated SCCP User on success; negative otherwise
\end{DoxyReturn}
Ownership of oph-\/$>$msg in prim\+\_\+cb is transferred to the user of the registered callback when called. 

References \textbf{ osmo\+\_\+sccp\+\_\+user\+::inst}, \textbf{ osmo\+\_\+sccp\+\_\+user\+::name}, \textbf{ osmo\+\_\+sccp\+\_\+user\+::pc}, \textbf{ osmo\+\_\+sccp\+\_\+user\+::prim\+\_\+cb}, \textbf{ sccp\+\_\+user\+\_\+bind\+\_\+pc()}, and \textbf{ osmo\+\_\+sccp\+\_\+user\+::ssn}.

\mbox{\label{sccp__instance_8c_a3a84472a746578822a5cbc0dcbfece55}} 
\index{sccp\_instance.c@{sccp\_instance.c}!osmo\_sccp\_user\_find@{osmo\_sccp\_user\_find}}
\index{osmo\_sccp\_user\_find@{osmo\_sccp\_user\_find}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{osmo\_sccp\_user\_find()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+sccp\+\_\+user} $\ast$ osmo\+\_\+sccp\+\_\+user\+\_\+find (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$}]{inst,  }\item[{uint16\+\_\+t}]{ssn,  }\item[{uint32\+\_\+t}]{pc }\end{DoxyParamCaption})}



Find a SCCP User registered for given PC+\+SSN or SSN only. 

First search all users with a valid PC for a full PC+\+SSN match. If no match was found, search all users with an invalid PC for an SSN-\/only match. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em inst} & SCCP Instance in which to search. \\
\hline
\mbox{\texttt{ in}}  & {\em ssn} & Sub-\/\+System Number to search for. \\
\hline
\mbox{\texttt{ in}}  & {\em pc} & Point Code to search for. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Matching SCCP User; NULL if none found. 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+sccp\+\_\+user\+::inst}, \textbf{ osmo\+\_\+sccp\+\_\+user\+::pc}, \textbf{ sccp\+\_\+user\+\_\+find()}, and \textbf{ osmo\+\_\+sccp\+\_\+user\+::ssn}.

\mbox{\label{sccp__instance_8c_acc77ad920c0636946484d58bdb7f3cd9}} 
\index{sccp\_instance.c@{sccp\_instance.c}!osmo\_static\_assert@{osmo\_static\_assert}}
\index{osmo\_static\_assert@{osmo\_static\_assert}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{osmo\_static\_assert()}
{\footnotesize\ttfamily osmo\+\_\+static\+\_\+assert (\begin{DoxyParamCaption}\item[{ARRAY\+\_\+\+SIZE(\textbf{ osmo\+\_\+sccp\+\_\+timer\+\_\+defaults})}]{ = {\ttfamily =(\textbf{ OSMO\+\_\+\+SCCP\+\_\+\+TIMERS\+\_\+\+LEN})~\&\&ARRAY\+\_\+SIZE(\textbf{ osmo\+\_\+sccp\+\_\+timer\+\_\+names})==(\textbf{ OSMO\+\_\+\+SCCP\+\_\+\+TIMERS\+\_\+\+LEN})},  }\item[{assert\+\_\+osmo\+\_\+sccp\+\_\+timers\+\_\+count}]{ }\end{DoxyParamCaption})}

\mbox{\label{sccp__instance_8c_aa509c68f47739a4376b8bc3d1be22d29}} 
\index{sccp\_instance.c@{sccp\_instance.c}!rout\_fail\_pending\_cb@{rout\_fail\_pending\_cb}}
\index{rout\_fail\_pending\_cb@{rout\_fail\_pending\_cb}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{rout\_fail\_pending\_cb()}
{\footnotesize\ttfamily static void rout\+\_\+fail\+\_\+pending\+\_\+cb (\begin{DoxyParamCaption}\item[{void $\ast$}]{\+\_\+inst }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ sccp\+\_\+pending\+\_\+rout\+\_\+fail\+::cause}, \textbf{ sccp\+\_\+pending\+\_\+rout\+\_\+fail\+::list}, \textbf{ osmo\+\_\+sccp\+\_\+instance\+::queue}, \textbf{ osmo\+\_\+sccp\+\_\+instance\+::rout\+\_\+fail\+\_\+pending}, \textbf{ sccp\+\_\+sclc\+\_\+rx\+\_\+scrc\+\_\+rout\+\_\+fail()}, \textbf{ sccp\+\_\+scoc\+\_\+rx\+\_\+scrc\+\_\+rout\+\_\+fail()}, \textbf{ sccp\+\_\+pending\+\_\+rout\+\_\+fail\+::scoc}, \textbf{ sccp\+\_\+pending\+\_\+rout\+\_\+fail\+::xua}, and \textbf{ xua\+\_\+msg\+\_\+free()}.



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

\mbox{\label{sccp__instance_8c_aff2a54492701d8b2e4ffcf6e14e17fb5}} 
\index{sccp\_instance.c@{sccp\_instance.c}!sccp\_rout\_fail\_enqueue@{sccp\_rout\_fail\_enqueue}}
\index{sccp\_rout\_fail\_enqueue@{sccp\_rout\_fail\_enqueue}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{sccp\_rout\_fail\_enqueue()}
{\footnotesize\ttfamily void sccp\+\_\+rout\+\_\+fail\+\_\+enqueue (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$}]{inst,  }\item[{const struct \textbf{ xua\+\_\+msg} $\ast$}]{xua,  }\item[{uint32\+\_\+t}]{cause,  }\item[{bool}]{scoc }\end{DoxyParamCaption})}



References \textbf{ sccp\+\_\+pending\+\_\+rout\+\_\+fail\+::cause}, \textbf{ sccp\+\_\+pending\+\_\+rout\+\_\+fail\+::list}, \textbf{ LOGPSCI}, \textbf{ osmo\+\_\+sccp\+\_\+instance\+::queue}, \textbf{ osmo\+\_\+sccp\+\_\+instance\+::rout\+\_\+fail\+\_\+pending}, \textbf{ sccp\+\_\+pending\+\_\+rout\+\_\+fail\+::scoc}, \textbf{ osmo\+\_\+sccp\+\_\+instance\+::timer}, \textbf{ sccp\+\_\+pending\+\_\+rout\+\_\+fail\+::xua}, \textbf{ xua\+\_\+dialect\+\_\+sua}, \textbf{ xua\+\_\+hdr\+\_\+dump()}, and \textbf{ xua\+\_\+msg\+\_\+copy()}.



Referenced by \textbf{ gen\+\_\+mtp\+\_\+transfer\+\_\+req\+\_\+xua()}, \textbf{ scrc\+\_\+node\+\_\+2()}, \textbf{ scrc\+\_\+node\+\_\+4()}, \textbf{ scrc\+\_\+node\+\_\+6()}, and \textbf{ scrc\+\_\+translate\+\_\+node\+\_\+9()}.

\mbox{\label{sccp__instance_8c_abf899848c0ca9ac5ea58db970d9994e8}} 
\index{sccp\_instance.c@{sccp\_instance.c}!sccp\_user\_bind\_pc@{sccp\_user\_bind\_pc}}
\index{sccp\_user\_bind\_pc@{sccp\_user\_bind\_pc}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{sccp\_user\_bind\_pc()}
{\footnotesize\ttfamily static struct \textbf{ osmo\+\_\+sccp\+\_\+user} $\ast$ sccp\+\_\+user\+\_\+bind\+\_\+pc (\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})\hspace{0.3cm}{\ttfamily [static]}}



Bind a SCCP User to a given Point Code. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em inst} & SCCP Instance \\
\hline
\mbox{\texttt{ in}}  & {\em name} & human-\/readable name \\
\hline
\mbox{\texttt{ in}}  & {\em prim\+\_\+cb} & User provided callback to pass a primitive/msg up the stack \\
\hline
\mbox{\texttt{ in}}  & {\em ssn} & Sub-\/\+System Number to bind to \\
\hline
\mbox{\texttt{ in}}  & {\em pc} & Point Code to bind to, or OSMO\+\_\+\+SS7\+\_\+\+PC\+\_\+\+INVALID if none. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Callee-\/allocated SCCP User on success; negative otherwise
\end{DoxyReturn}
Ownership of oph-\/$>$msg in prim\+\_\+cb is transferred to the user of the registered callback when called. 

References \textbf{ osmo\+\_\+sccp\+\_\+user\+::inst}, \textbf{ LOGPSCI}, \textbf{ osmo\+\_\+sccp\+\_\+user\+::name}, \textbf{ NULL}, \textbf{ osmo\+\_\+ss7\+\_\+pointcode\+\_\+print()}, \textbf{ osmo\+\_\+sccp\+\_\+user\+::pc}, \textbf{ osmo\+\_\+sccp\+\_\+user\+::prim\+\_\+cb}, \textbf{ sccp\+\_\+user\+\_\+alloc()}, \textbf{ sccp\+\_\+user\+\_\+find()}, \textbf{ osmo\+\_\+sccp\+\_\+instance\+::ss7}, and \textbf{ osmo\+\_\+sccp\+\_\+user\+::ssn}.



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

\mbox{\label{sccp__instance_8c_a5e91462e8e3dd81c8e1255b872c1b941}} 
\index{sccp\_instance.c@{sccp\_instance.c}!sccp\_user\_find@{sccp\_user\_find}}
\index{sccp\_user\_find@{sccp\_user\_find}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{sccp\_user\_find()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+sccp\+\_\+user} $\ast$ sccp\+\_\+user\+\_\+find (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+sccp\+\_\+instance} $\ast$}]{inst,  }\item[{uint16\+\_\+t}]{ssn,  }\item[{uint32\+\_\+t}]{pc }\end{DoxyParamCaption})}



Find a SCCP User registered for given PC+\+SSN or SSN only First search all users with a valid PC for a full PC+\+SSN match. 

If no such match was found, search all users with an invalid PC for an SSN-\/only match. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em inst} & SCCP Instance in which to search \\
\hline
\mbox{\texttt{ in}}  & {\em ssn} & Sub-\/\+System Number to search for \\
\hline
\mbox{\texttt{ in}}  & {\em pc} & Point Code to search for \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Matching SCCP User; NULL if none found 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+sccp\+\_\+user\+::inst}, \textbf{ osmo\+\_\+sccp\+\_\+user\+::list}, \textbf{ NULL}, \textbf{ osmo\+\_\+ss7\+\_\+pc\+\_\+is\+\_\+valid()}, \textbf{ osmo\+\_\+sccp\+\_\+user\+::pc}, \textbf{ osmo\+\_\+sccp\+\_\+user\+::ssn}, and \textbf{ osmo\+\_\+sccp\+\_\+instance\+::users}.



Referenced by \textbf{ DEFUN()}, \textbf{ osmo\+\_\+sccp\+\_\+user\+\_\+find()}, \textbf{ sccp\+\_\+find\+\_\+user()}, \textbf{ sccp\+\_\+user\+\_\+bind\+\_\+pc()}, \textbf{ sclc\+\_\+rx\+\_\+cldr()}, \textbf{ sclc\+\_\+rx\+\_\+cldt()}, \textbf{ scmg\+\_\+rx\+\_\+sst()}, and \textbf{ scrc\+\_\+node\+\_\+6()}.



\doxysubsection{Variable Documentation}
\mbox{\label{sccp__instance_8c_ae4f0f4b8faf5d7ba93d5d5ead401c2b3}} 
\index{sccp\_instance.c@{sccp\_instance.c}!osmo\_sccp\_timer\_defaults@{osmo\_sccp\_timer\_defaults}}
\index{osmo\_sccp\_timer\_defaults@{osmo\_sccp\_timer\_defaults}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{osmo\_sccp\_timer\_defaults}
{\footnotesize\ttfamily const struct osmo\+\_\+tdef osmo\+\_\+sccp\+\_\+timer\+\_\+defaults[\textbf{ OSMO\+\_\+\+SCCP\+\_\+\+TIMERS\+\_\+\+LEN}]}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{}
\DoxyCodeLine{        \{ .T = OSMO\_SCCP\_TIMER\_CONN\_EST,        .default\_val = 1*60,    .unit = OSMO\_TDEF\_S,}
\DoxyCodeLine{          .desc = \textcolor{stringliteral}{"{}Waiting for connection confirm message, 1 to 2 minutes"{}} \},}
\DoxyCodeLine{        \{ .T = OSMO\_SCCP\_TIMER\_IAS,          .default\_val = 7*60,    .unit = OSMO\_TDEF\_S,}
\DoxyCodeLine{          .desc = \textcolor{stringliteral}{"{}Send keep-\/alive: on an idle connection, delay before sending an Idle Timer message, 5 to 10 minutes"{}} \}, }
\DoxyCodeLine{        \{ .T = OSMO\_SCCP\_TIMER\_IAR,          .default\_val = 15*60,   .unit = OSMO\_TDEF\_S,}
\DoxyCodeLine{          .desc = \textcolor{stringliteral}{"{}Receive keep-\/alive: on an idle connection, delay until considering a connection as stale, 11 to 21 minutes"{}} \}, }
\DoxyCodeLine{        \{ .T = OSMO\_SCCP\_TIMER\_REL,          .default\_val = 10,      .unit = OSMO\_TDEF\_S,}
\DoxyCodeLine{          .desc = \textcolor{stringliteral}{"{}Waiting for release complete message, 10 to 20 seconds"{}} \},}
\DoxyCodeLine{        \{ .T = OSMO\_SCCP\_TIMER\_REPEAT\_REL,    .default\_val = 10,      .unit = OSMO\_TDEF\_S,}
\DoxyCodeLine{          .desc = \textcolor{stringliteral}{"{}Waiting for release complete message; or to repeat sending released message after the initial expiry, 10 to 20 seconds"{}} \},}
\DoxyCodeLine{        \{ .T = OSMO\_SCCP\_TIMER\_INT,          .default\_val = 1*60,    .unit = OSMO\_TDEF\_S,}
\DoxyCodeLine{          .desc = \textcolor{stringliteral}{"{}Waiting for release complete message; or to release connection resources, freeze the LRN and "{}}}
\DoxyCodeLine{                  \textcolor{stringliteral}{"{}alert a maintenance function after the initial expiry, extending to 1 minute"{}} \},}
\DoxyCodeLine{        \{ .T = OSMO\_SCCP\_TIMER\_GUARD,              .default\_val = 23*60,   .unit = OSMO\_TDEF\_S,}
\DoxyCodeLine{          .desc = \textcolor{stringliteral}{"{}Waiting to resume normal procedure for temporary connection sections during the restart procedure, 23 to 25 minutes"{}} \},}
\DoxyCodeLine{        \{ .T = OSMO\_SCCP\_TIMER\_RESET,              .default\_val = 10,      .unit = OSMO\_TDEF\_S,}
\DoxyCodeLine{          .desc = \textcolor{stringliteral}{"{}Waiting to release temporary connection section or alert maintenance function after reset request message is sent, 10 to 20 seconds"{}} \},}
\DoxyCodeLine{        \{ .T = OSMO\_SCCP\_TIMER\_REASSEMBLY,    .default\_val = 10,      .unit = OSMO\_TDEF\_S,}
\DoxyCodeLine{          .desc = \textcolor{stringliteral}{"{}Waiting to receive all the segments of the remaining segments, single segmented message after receiving the first segment, 10 to 20 seconds"{}} \},}
\DoxyCodeLine{        \{\}}
\DoxyCodeLine{\}}

\end{DoxyCode}


Referenced by \textbf{ gen\+\_\+sccp\+\_\+timer\+\_\+cmd\+\_\+strs()}, and \textbf{ osmo\+\_\+sccp\+\_\+instance\+\_\+create()}.

\mbox{\label{sccp__instance_8c_adb142ce6fd39a4884c7fa9144ff15c3f}} 
\index{sccp\_instance.c@{sccp\_instance.c}!osmo\_sccp\_timer\_names@{osmo\_sccp\_timer\_names}}
\index{osmo\_sccp\_timer\_names@{osmo\_sccp\_timer\_names}!sccp\_instance.c@{sccp\_instance.c}}
\doxysubsubsection{osmo\_sccp\_timer\_names}
{\footnotesize\ttfamily const struct value\+\_\+string osmo\+\_\+sccp\+\_\+timer\+\_\+names[$\,$]}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{}
\DoxyCodeLine{        \{ OSMO\_SCCP\_TIMER\_CONN\_EST, \textcolor{stringliteral}{"{}conn\_est"{}} \},}
\DoxyCodeLine{        \{ OSMO\_SCCP\_TIMER\_IAS, \textcolor{stringliteral}{"{}ias"{}} \},}
\DoxyCodeLine{        \{ OSMO\_SCCP\_TIMER\_IAR, \textcolor{stringliteral}{"{}iar"{}} \},}
\DoxyCodeLine{        \{ OSMO\_SCCP\_TIMER\_REL, \textcolor{stringliteral}{"{}rel"{}} \},}
\DoxyCodeLine{        \{ OSMO\_SCCP\_TIMER\_REPEAT\_REL, \textcolor{stringliteral}{"{}repeat\_rel"{}} \},}
\DoxyCodeLine{        \{ OSMO\_SCCP\_TIMER\_INT, \textcolor{stringliteral}{"{}int"{}} \},}
\DoxyCodeLine{        \{ OSMO\_SCCP\_TIMER\_GUARD, \textcolor{stringliteral}{"{}guard"{}} \},}
\DoxyCodeLine{        \{ OSMO\_SCCP\_TIMER\_RESET, \textcolor{stringliteral}{"{}reset"{}} \},}
\DoxyCodeLine{        \{ OSMO\_SCCP\_TIMER\_REASSEMBLY, \textcolor{stringliteral}{"{}reassembly"{}} \},}
\DoxyCodeLine{        \{\}}
\DoxyCodeLine{\}}

\end{DoxyCode}


Referenced by \textbf{ DEFUN\+\_\+\+ATTR()}, \textbf{ gen\+\_\+sccp\+\_\+timer\+\_\+cmd\+\_\+strs()}, \textbf{ osmo\+\_\+sccp\+\_\+timer\+\_\+name()}, and \textbf{ write\+\_\+sccp\+\_\+timers()}.

