\doxysection{src/xua\+\_\+as\+\_\+fsm.c File Reference}
\label{xua__as__fsm_8c}\index{src/xua\_as\_fsm.c@{src/xua\_as\_fsm.c}}
{\ttfamily \#include $<$string.\+h$>$}\newline
{\ttfamily \#include $<$arpa/inet.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/fsm.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/utils.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/timer.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/prim.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/logging.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/sigtran/osmo\+\_\+ss7.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/sigtran/sigtran\+\_\+sap.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/sigtran/xua\+\_\+msg.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/sigtran/protocol/sua.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/sigtran/protocol/m3ua.\+h$>$}\newline
{\ttfamily \#include \char`\"{}xua\+\_\+asp\+\_\+fsm.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}xua\+\_\+as\+\_\+fsm.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}xua\+\_\+internal.\+h\char`\"{}}\newline
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+priv}
\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ S}(x)~(1 $<$$<$ (x))
\item 
\#define \textbf{ MSEC\+\_\+\+TO\+\_\+\+S\+\_\+\+US}(x)~(x/1000), ((x\%1000)$\ast$10)
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static struct msgb $\ast$ \textbf{ encode\+\_\+notify} (const struct \textbf{ osmo\+\_\+xlm\+\_\+prim\+\_\+notify} $\ast$npar)
\item 
static int \textbf{ as\+\_\+notify\+\_\+all\+\_\+asp} (struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$as, struct \textbf{ osmo\+\_\+xlm\+\_\+prim\+\_\+notify} $\ast$npar)
\item 
static int \textbf{ get\+\_\+local\+\_\+role} (struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$as)
\item 
static struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$ \textbf{ xua\+\_\+as\+\_\+select\+\_\+asp\+\_\+override} (struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$as)
\item 
static struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$ \textbf{ xua\+\_\+as\+\_\+select\+\_\+asp\+\_\+roundrobin} (struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$as)
\item 
int \textbf{ xua\+\_\+as\+\_\+transmit\+\_\+msg\+\_\+broadcast} (struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$as, struct msgb $\ast$msg)
\item 
int \textbf{ xua\+\_\+as\+\_\+transmit\+\_\+msg} (struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$as, struct msgb $\ast$msg)
\item 
static bool \textbf{ is\+\_\+single\+\_\+ipa\+\_\+asp} (struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$as)
\item 
static void \textbf{ ipa\+\_\+add\+\_\+route} (struct osmo\+\_\+fsm\+\_\+inst $\ast$fi)
\item 
static void \textbf{ ipa\+\_\+del\+\_\+route} (struct osmo\+\_\+fsm\+\_\+inst $\ast$fi)
\item 
static bool \textbf{ check\+\_\+any\+\_\+other\+\_\+asp\+\_\+not\+\_\+down} (struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$as, struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$asp\+\_\+cmp)
\item 
static bool \textbf{ check\+\_\+any\+\_\+other\+\_\+asp\+\_\+in\+\_\+active} (struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$as, struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$asp\+\_\+cmp)
\item 
static void \textbf{ notify\+\_\+any\+\_\+other\+\_\+active\+\_\+asp\+\_\+as\+\_\+inactive} (struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$as, struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$asp\+\_\+cmp)
\item 
static void \textbf{ t\+\_\+r\+\_\+callback} (void $\ast$\+\_\+fi)
\item 
static void \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+down} (struct osmo\+\_\+fsm\+\_\+inst $\ast$fi, uint32\+\_\+t event, void $\ast$\textbf{ data})
\item 
static void \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+onenter} (struct osmo\+\_\+fsm\+\_\+inst $\ast$fi, uint32\+\_\+t old\+\_\+state)
\item 
static void \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+inactive} (struct osmo\+\_\+fsm\+\_\+inst $\ast$fi, uint32\+\_\+t event, void $\ast$\textbf{ data})
\item 
static void \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+active} (struct osmo\+\_\+fsm\+\_\+inst $\ast$fi, uint32\+\_\+t event, void $\ast$\textbf{ data})
\item 
static void \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+pending} (struct osmo\+\_\+fsm\+\_\+inst $\ast$fi, uint32\+\_\+t event, void $\ast$\textbf{ data})
\item 
static void \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+cleanup} (struct osmo\+\_\+fsm\+\_\+inst $\ast$fi, enum osmo\+\_\+fsm\+\_\+term\+\_\+cause cause)
\item 
struct osmo\+\_\+fsm\+\_\+inst $\ast$ \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+start} (struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$as, int log\+\_\+level)
\begin{DoxyCompactList}\small\item\em Start an AS FSM for a given Application Server. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
static const struct value\+\_\+string \textbf{ xua\+\_\+as\+\_\+event\+\_\+names} [$\,$]
\item 
static const struct osmo\+\_\+fsm\+\_\+state \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+states} [$\,$]
\item 
struct osmo\+\_\+fsm \textbf{ xua\+\_\+as\+\_\+fsm}
\end{DoxyCompactItemize}


\doxysubsection{Macro Definition Documentation}
\mbox{\label{xua__as__fsm_8c_a5f423b301845bef33386d5f889e279ba}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!MSEC\_TO\_S\_US@{MSEC\_TO\_S\_US}}
\index{MSEC\_TO\_S\_US@{MSEC\_TO\_S\_US}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{MSEC\_TO\_S\_US}
{\footnotesize\ttfamily \#define MSEC\+\_\+\+TO\+\_\+\+S\+\_\+\+US(\begin{DoxyParamCaption}\item[{}]{x }\end{DoxyParamCaption})~(x/1000), ((x\%1000)$\ast$10)}

\mbox{\label{xua__as__fsm_8c_ac4a3ed3432929804c708f7760fb79e28}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!S@{S}}
\index{S@{S}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{S}
{\footnotesize\ttfamily \#define S(\begin{DoxyParamCaption}\item[{}]{x }\end{DoxyParamCaption})~(1 $<$$<$ (x))}



\doxysubsection{Function Documentation}
\mbox{\label{xua__as__fsm_8c_a97104403abbba1543c90e718dd59bd69}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!as\_notify\_all\_asp@{as\_notify\_all\_asp}}
\index{as\_notify\_all\_asp@{as\_notify\_all\_asp}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{as\_notify\_all\_asp()}
{\footnotesize\ttfamily static int as\+\_\+notify\+\_\+all\+\_\+asp (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$}]{as,  }\item[{struct \textbf{ osmo\+\_\+xlm\+\_\+prim\+\_\+notify} $\ast$}]{npar }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+ss7\+\_\+asp\+::asp\+\_\+id}, \textbf{ osmo\+\_\+xlm\+\_\+prim\+\_\+notify\+::asp\+\_\+id}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::asp\+\_\+id\+\_\+present}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::asps}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::cfg}, \textbf{ encode\+\_\+notify()}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::fi}, \textbf{ NOTIFY\+\_\+\+PAR\+\_\+\+P\+\_\+\+ASP\+\_\+\+ID}, \textbf{ OSMO\+\_\+\+SS7\+\_\+\+ASP\+\_\+\+PROT\+\_\+\+IPA}, \textbf{ OSMO\+\_\+\+SS7\+\_\+\+ASP\+\_\+\+ROLE\+\_\+\+ASP}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+send()}, \textbf{ osmo\+\_\+xlm\+\_\+prim\+\_\+notify\+::presence}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::proto}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::role}, and \textbf{ XUA\+\_\+\+ASP\+\_\+\+S\+\_\+\+DOWN}.

\mbox{\label{xua__as__fsm_8c_a54316903eb0af8cb93fb8f7d1e380d6b}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!check\_any\_other\_asp\_in\_active@{check\_any\_other\_asp\_in\_active}}
\index{check\_any\_other\_asp\_in\_active@{check\_any\_other\_asp\_in\_active}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{check\_any\_other\_asp\_in\_active()}
{\footnotesize\ttfamily static bool check\+\_\+any\+\_\+other\+\_\+asp\+\_\+in\+\_\+active (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$}]{as,  }\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$}]{asp\+\_\+cmp }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+ss7\+\_\+as\+::asps}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::fi}, and \textbf{ XUA\+\_\+\+ASP\+\_\+\+S\+\_\+\+ACTIVE}.



Referenced by \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+active()}.

\mbox{\label{xua__as__fsm_8c_a07a8376c2bacba0552b59ac979960412}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!check\_any\_other\_asp\_not\_down@{check\_any\_other\_asp\_not\_down}}
\index{check\_any\_other\_asp\_not\_down@{check\_any\_other\_asp\_not\_down}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{check\_any\_other\_asp\_not\_down()}
{\footnotesize\ttfamily static bool check\+\_\+any\+\_\+other\+\_\+asp\+\_\+not\+\_\+down (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$}]{as,  }\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$}]{asp\+\_\+cmp }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+priv\+::as}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::asps}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::fi}, and \textbf{ XUA\+\_\+\+ASP\+\_\+\+S\+\_\+\+DOWN}.



Referenced by \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+inactive()}, and \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+pending()}.

\mbox{\label{xua__as__fsm_8c_a013ec4a744c97a2961173d3bb4df503f}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!encode\_notify@{encode\_notify}}
\index{encode\_notify@{encode\_notify}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{encode\_notify()}
{\footnotesize\ttfamily static struct msgb $\ast$ encode\+\_\+notify (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+xlm\+\_\+prim\+\_\+notify} $\ast$}]{npar }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ m3ua\+\_\+encode\+\_\+notify()}, \textbf{ M3\+UA\+\_\+\+VERSION}, \textbf{ xua\+\_\+msg\+\_\+free()}, and \textbf{ xua\+\_\+to\+\_\+msg()}.



Referenced by \textbf{ as\+\_\+notify\+\_\+all\+\_\+asp()}, and \textbf{ notify\+\_\+any\+\_\+other\+\_\+active\+\_\+asp\+\_\+as\+\_\+inactive()}.

\mbox{\label{xua__as__fsm_8c_acec6571ac41737c2f0b15a981e15e9a0}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!get\_local\_role@{get\_local\_role}}
\index{get\_local\_role@{get\_local\_role}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{get\_local\_role()}
{\footnotesize\ttfamily static int get\+\_\+local\+\_\+role (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$}]{as }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+ss7\+\_\+as\+::asps}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::cfg}, and \textbf{ osmo\+\_\+ss7\+\_\+asp\+::role}.

\mbox{\label{xua__as__fsm_8c_a5969c8ebe41934d7da0297fedbccfe4e}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!ipa\_add\_route@{ipa\_add\_route}}
\index{ipa\_add\_route@{ipa\_add\_route}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{ipa\_add\_route()}
{\footnotesize\ttfamily static void ipa\+\_\+add\+\_\+route (\begin{DoxyParamCaption}\item[{struct osmo\+\_\+fsm\+\_\+inst $\ast$}]{fi }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+priv\+::as}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::inst}, \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+priv\+::ipa\+\_\+route\+\_\+created}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::name}, \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+create()}, \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+find\+\_\+dpc\+\_\+mask()}, \textbf{ osmo\+\_\+ss7\+\_\+routing\+\_\+key\+::pc}, and \textbf{ osmo\+\_\+ss7\+\_\+as\+::routing\+\_\+key}.

\mbox{\label{xua__as__fsm_8c_a9ad84983bf8cd04680f38cc539633165}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!ipa\_del\_route@{ipa\_del\_route}}
\index{ipa\_del\_route@{ipa\_del\_route}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{ipa\_del\_route()}
{\footnotesize\ttfamily static void ipa\+\_\+del\+\_\+route (\begin{DoxyParamCaption}\item[{struct osmo\+\_\+fsm\+\_\+inst $\ast$}]{fi }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+priv\+::as}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::inst}, \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+priv\+::ipa\+\_\+route\+\_\+created}, \textbf{ osmo\+\_\+ss7\+\_\+pointcode\+\_\+print()}, \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+destroy()}, \textbf{ osmo\+\_\+ss7\+\_\+route\+\_\+find\+\_\+dpc\+\_\+mask()}, \textbf{ osmo\+\_\+ss7\+\_\+routing\+\_\+key\+::pc}, and \textbf{ osmo\+\_\+ss7\+\_\+as\+::routing\+\_\+key}.

\mbox{\label{xua__as__fsm_8c_ac4576b53e0a669d76ec6117fcff95805}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!is\_single\_ipa\_asp@{is\_single\_ipa\_asp}}
\index{is\_single\_ipa\_asp@{is\_single\_ipa\_asp}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{is\_single\_ipa\_asp()}
{\footnotesize\ttfamily static bool is\+\_\+single\+\_\+ipa\+\_\+asp (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$}]{as }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+ss7\+\_\+as\+::asps}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::cfg}, \textbf{ OSMO\+\_\+\+SS7\+\_\+\+ASP\+\_\+\+PROT\+\_\+\+IPA}, and \textbf{ osmo\+\_\+ss7\+\_\+asp\+::proto}.

\mbox{\label{xua__as__fsm_8c_a5b8baeaee767042fc6e5248032950355}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!notify\_any\_other\_active\_asp\_as\_inactive@{notify\_any\_other\_active\_asp\_as\_inactive}}
\index{notify\_any\_other\_active\_asp\_as\_inactive@{notify\_any\_other\_active\_asp\_as\_inactive}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{notify\_any\_other\_active\_asp\_as\_inactive()}
{\footnotesize\ttfamily static void notify\+\_\+any\+\_\+other\+\_\+active\+\_\+asp\+\_\+as\+\_\+inactive (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$}]{as,  }\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$}]{asp\+\_\+cmp }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+ss7\+\_\+asp\+::asp\+\_\+id}, \textbf{ osmo\+\_\+xlm\+\_\+prim\+\_\+notify\+::asp\+\_\+id}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::asp\+\_\+id\+\_\+present}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::asps}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::cfg}, \textbf{ encode\+\_\+notify()}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::fi}, \textbf{ M3\+UA\+\_\+\+NOTIFY\+\_\+\+I\+\_\+\+OT\+\_\+\+ALT\+\_\+\+ASP\+\_\+\+ACT}, \textbf{ M3\+UA\+\_\+\+NOTIFY\+\_\+\+T\+\_\+\+OTHER}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+active()}, \textbf{ OSMO\+\_\+\+SS7\+\_\+\+ASP\+\_\+\+PROT\+\_\+\+IPA}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+send()}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::proto}, \textbf{ osmo\+\_\+xlm\+\_\+prim\+\_\+notify\+::status\+\_\+type}, and \textbf{ XUA\+\_\+\+ASP\+\_\+\+S\+\_\+\+INACTIVE}.



Referenced by \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+active()}.

\mbox{\label{xua__as__fsm_8c_adf70a84b85d00e2b36a7e12adcffa235}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!t\_r\_callback@{t\_r\_callback}}
\index{t\_r\_callback@{t\_r\_callback}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{t\_r\_callback()}
{\footnotesize\ttfamily static void t\+\_\+r\+\_\+callback (\begin{DoxyParamCaption}\item[{void $\ast$}]{\+\_\+fi }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ XUA\+\_\+\+AS\+\_\+\+E\+\_\+\+RECOVERY\+\_\+\+EXPD}.



Referenced by \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+start()}.

\mbox{\label{xua__as__fsm_8c_ab3c12f9923a54ef33c0f44c0c28f7a7c}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!xua\_as\_fsm\_active@{xua\_as\_fsm\_active}}
\index{xua\_as\_fsm\_active@{xua\_as\_fsm\_active}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{xua\_as\_fsm\_active()}
{\footnotesize\ttfamily static void xua\+\_\+as\+\_\+fsm\+\_\+active (\begin{DoxyParamCaption}\item[{struct osmo\+\_\+fsm\+\_\+inst $\ast$}]{fi,  }\item[{uint32\+\_\+t}]{event,  }\item[{void $\ast$}]{data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+priv\+::as}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::cfg}, \textbf{ check\+\_\+any\+\_\+other\+\_\+asp\+\_\+in\+\_\+active()}, \textbf{ data}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::mode}, \textbf{ MSEC\+\_\+\+TO\+\_\+\+S\+\_\+\+US}, \textbf{ notify\+\_\+any\+\_\+other\+\_\+active\+\_\+asp\+\_\+as\+\_\+inactive()}, \textbf{ OSMO\+\_\+\+SS7\+\_\+\+AS\+\_\+\+TMOD\+\_\+\+OVERRIDE}, \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+priv\+::recovery}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::recovery\+\_\+timeout\+\_\+msec}, \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+priv\+::t\+\_\+r}, \textbf{ XUA\+\_\+\+AS\+\_\+\+E\+\_\+\+TRANSFER\+\_\+\+REQ}, \textbf{ XUA\+\_\+\+AS\+\_\+\+S\+\_\+\+PENDING}, \textbf{ xua\+\_\+as\+\_\+transmit\+\_\+msg()}, \textbf{ XUA\+\_\+\+ASPAS\+\_\+\+ASP\+\_\+\+ACTIVE\+\_\+\+IND}, \textbf{ XUA\+\_\+\+ASPAS\+\_\+\+ASP\+\_\+\+DOWN\+\_\+\+IND}, and \textbf{ XUA\+\_\+\+ASPAS\+\_\+\+ASP\+\_\+\+INACTIVE\+\_\+\+IND}.

\mbox{\label{xua__as__fsm_8c_a1e9a4dc4b1fb0e295c0063ff3d970fe5}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!xua\_as\_fsm\_cleanup@{xua\_as\_fsm\_cleanup}}
\index{xua\_as\_fsm\_cleanup@{xua\_as\_fsm\_cleanup}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{xua\_as\_fsm\_cleanup()}
{\footnotesize\ttfamily static void xua\+\_\+as\+\_\+fsm\+\_\+cleanup (\begin{DoxyParamCaption}\item[{struct osmo\+\_\+fsm\+\_\+inst $\ast$}]{fi,  }\item[{enum osmo\+\_\+fsm\+\_\+term\+\_\+cause}]{cause }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+priv\+::recovery}, and \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+priv\+::t\+\_\+r}.

\mbox{\label{xua__as__fsm_8c_a6d1cf31b1ae7406db45fa44cabe7c848}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!xua\_as\_fsm\_down@{xua\_as\_fsm\_down}}
\index{xua\_as\_fsm\_down@{xua\_as\_fsm\_down}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{xua\_as\_fsm\_down()}
{\footnotesize\ttfamily static void xua\+\_\+as\+\_\+fsm\+\_\+down (\begin{DoxyParamCaption}\item[{struct osmo\+\_\+fsm\+\_\+inst $\ast$}]{fi,  }\item[{uint32\+\_\+t}]{event,  }\item[{void $\ast$}]{data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ XUA\+\_\+\+AS\+\_\+\+S\+\_\+\+INACTIVE}, \textbf{ XUA\+\_\+\+ASPAS\+\_\+\+ASP\+\_\+\+DOWN\+\_\+\+IND}, and \textbf{ XUA\+\_\+\+ASPAS\+\_\+\+ASP\+\_\+\+INACTIVE\+\_\+\+IND}.

\mbox{\label{xua__as__fsm_8c_ab8a4beaf8bffacb63e6a06ed6aa3e578}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!xua\_as\_fsm\_inactive@{xua\_as\_fsm\_inactive}}
\index{xua\_as\_fsm\_inactive@{xua\_as\_fsm\_inactive}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{xua\_as\_fsm\_inactive()}
{\footnotesize\ttfamily static void xua\+\_\+as\+\_\+fsm\+\_\+inactive (\begin{DoxyParamCaption}\item[{struct osmo\+\_\+fsm\+\_\+inst $\ast$}]{fi,  }\item[{uint32\+\_\+t}]{event,  }\item[{void $\ast$}]{data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+priv\+::as}, \textbf{ check\+\_\+any\+\_\+other\+\_\+asp\+\_\+not\+\_\+down()}, \textbf{ data}, \textbf{ XUA\+\_\+\+AS\+\_\+\+S\+\_\+\+ACTIVE}, \textbf{ XUA\+\_\+\+AS\+\_\+\+S\+\_\+\+DOWN}, \textbf{ XUA\+\_\+\+ASPAS\+\_\+\+ASP\+\_\+\+ACTIVE\+\_\+\+IND}, \textbf{ XUA\+\_\+\+ASPAS\+\_\+\+ASP\+\_\+\+DOWN\+\_\+\+IND}, and \textbf{ XUA\+\_\+\+ASPAS\+\_\+\+ASP\+\_\+\+INACTIVE\+\_\+\+IND}.

\mbox{\label{xua__as__fsm_8c_a7906db4fee58fca749e45fa687ba750a}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!xua\_as\_fsm\_onenter@{xua\_as\_fsm\_onenter}}
\index{xua\_as\_fsm\_onenter@{xua\_as\_fsm\_onenter}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{xua\_as\_fsm\_onenter()}
{\footnotesize\ttfamily static void xua\+\_\+as\+\_\+fsm\+\_\+onenter (\begin{DoxyParamCaption}\item[{struct osmo\+\_\+fsm\+\_\+inst $\ast$}]{fi,  }\item[{uint32\+\_\+t}]{old\+\_\+state }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+priv\+::as}, \textbf{ M3\+UA\+\_\+\+NOTIFY\+\_\+\+T\+\_\+\+STATCHG}, and \textbf{ osmo\+\_\+xlm\+\_\+prim\+\_\+notify\+::status\+\_\+type}.

\mbox{\label{xua__as__fsm_8c_a20344c0f2735db91f2aca9522e9f0762}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!xua\_as\_fsm\_pending@{xua\_as\_fsm\_pending}}
\index{xua\_as\_fsm\_pending@{xua\_as\_fsm\_pending}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{xua\_as\_fsm\_pending()}
{\footnotesize\ttfamily static void xua\+\_\+as\+\_\+fsm\+\_\+pending (\begin{DoxyParamCaption}\item[{struct osmo\+\_\+fsm\+\_\+inst $\ast$}]{fi,  }\item[{uint32\+\_\+t}]{event,  }\item[{void $\ast$}]{data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+priv\+::as}, \textbf{ check\+\_\+any\+\_\+other\+\_\+asp\+\_\+not\+\_\+down()}, \textbf{ data}, \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+priv\+::queued\+\_\+msgs}, \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+priv\+::recovery}, \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+priv\+::t\+\_\+r}, \textbf{ XUA\+\_\+\+AS\+\_\+\+E\+\_\+\+RECOVERY\+\_\+\+EXPD}, \textbf{ XUA\+\_\+\+AS\+\_\+\+E\+\_\+\+TRANSFER\+\_\+\+REQ}, \textbf{ XUA\+\_\+\+AS\+\_\+\+S\+\_\+\+ACTIVE}, \textbf{ XUA\+\_\+\+AS\+\_\+\+S\+\_\+\+DOWN}, \textbf{ XUA\+\_\+\+AS\+\_\+\+S\+\_\+\+INACTIVE}, \textbf{ xua\+\_\+as\+\_\+transmit\+\_\+msg()}, \textbf{ XUA\+\_\+\+ASPAS\+\_\+\+ASP\+\_\+\+ACTIVE\+\_\+\+IND}, \textbf{ XUA\+\_\+\+ASPAS\+\_\+\+ASP\+\_\+\+DOWN\+\_\+\+IND}, and \textbf{ XUA\+\_\+\+ASPAS\+\_\+\+ASP\+\_\+\+INACTIVE\+\_\+\+IND}.

\mbox{\label{xua__as__fsm_8c_a698eae7c397ecc5ced8f4d9b7410387b}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!xua\_as\_fsm\_start@{xua\_as\_fsm\_start}}
\index{xua\_as\_fsm\_start@{xua\_as\_fsm\_start}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{xua\_as\_fsm\_start()}
{\footnotesize\ttfamily struct osmo\+\_\+fsm\+\_\+inst $\ast$ xua\+\_\+as\+\_\+fsm\+\_\+start (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$}]{as,  }\item[{int}]{log\+\_\+level }\end{DoxyParamCaption})}



Start an AS FSM for a given Application Server. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em as} & Application Server for which to start the AS FSM \\
\hline
\mbox{\texttt{ in}}  & {\em log\+\_\+level} & Logging level for logging of this FSM \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
FSM instance in case of success; NULL in case of error 
\end{DoxyReturn}


References \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+priv\+::as}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::name}, \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+priv\+::queued\+\_\+msgs}, \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+priv\+::recovery}, \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+priv\+::t\+\_\+r}, \textbf{ t\+\_\+r\+\_\+callback()}, and \textbf{ xua\+\_\+as\+\_\+fsm}.



Referenced by \textbf{ ss7\+\_\+as\+\_\+alloc()}.

\mbox{\label{xua__as__fsm_8c_a388cfc438c65c30000dd87420f31f923}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!xua\_as\_select\_asp\_override@{xua\_as\_select\_asp\_override}}
\index{xua\_as\_select\_asp\_override@{xua\_as\_select\_asp\_override}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{xua\_as\_select\_asp\_override()}
{\footnotesize\ttfamily static struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$ xua\+\_\+as\+\_\+select\+\_\+asp\+\_\+override (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$}]{as }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+ss7\+\_\+as\+::asps}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::cfg}, and \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+active()}.



Referenced by \textbf{ xua\+\_\+as\+\_\+transmit\+\_\+msg()}.

\mbox{\label{xua__as__fsm_8c_a4a4582929d7eabcab375e121d440009f}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!xua\_as\_select\_asp\_roundrobin@{xua\_as\_select\_asp\_roundrobin}}
\index{xua\_as\_select\_asp\_roundrobin@{xua\_as\_select\_asp\_roundrobin}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{xua\_as\_select\_asp\_roundrobin()}
{\footnotesize\ttfamily static struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$ xua\+\_\+as\+\_\+select\+\_\+asp\+\_\+roundrobin (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$}]{as }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+ss7\+\_\+as\+::asps}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::last\+\_\+asp\+\_\+idx\+\_\+sent}, and \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+active()}.



Referenced by \textbf{ xua\+\_\+as\+\_\+transmit\+\_\+msg()}.

\mbox{\label{xua__as__fsm_8c_af79f59cb9478eaa7ef5b9801c5be2ef9}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!xua\_as\_transmit\_msg@{xua\_as\_transmit\_msg}}
\index{xua\_as\_transmit\_msg@{xua\_as\_transmit\_msg}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{xua\_as\_transmit\_msg()}
{\footnotesize\ttfamily int xua\+\_\+as\+\_\+transmit\+\_\+msg (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$}]{as,  }\item[{struct msgb $\ast$}]{msg }\end{DoxyParamCaption})}



References \textbf{ \+\_\+\+NUM\+\_\+\+OSMO\+\_\+\+SS7\+\_\+\+ASP\+\_\+\+TMOD}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::fi}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::mode}, \textbf{ OSMO\+\_\+\+SS7\+\_\+\+AS\+\_\+\+TMOD\+\_\+\+BCAST}, \textbf{ OSMO\+\_\+\+SS7\+\_\+\+AS\+\_\+\+TMOD\+\_\+\+LOADSHARE}, \textbf{ OSMO\+\_\+\+SS7\+\_\+\+AS\+\_\+\+TMOD\+\_\+\+OVERRIDE}, \textbf{ OSMO\+\_\+\+SS7\+\_\+\+AS\+\_\+\+TMOD\+\_\+\+ROUNDROBIN}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+send()}, \textbf{ xua\+\_\+as\+\_\+select\+\_\+asp\+\_\+override()}, \textbf{ xua\+\_\+as\+\_\+select\+\_\+asp\+\_\+roundrobin()}, and \textbf{ xua\+\_\+as\+\_\+transmit\+\_\+msg\+\_\+broadcast()}.



Referenced by \textbf{ ipa\+\_\+tx\+\_\+xua\+\_\+as()}, \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+active()}, and \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+pending()}.

\mbox{\label{xua__as__fsm_8c_a77a6ca916ab14687da18757eaebb636d}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!xua\_as\_transmit\_msg\_broadcast@{xua\_as\_transmit\_msg\_broadcast}}
\index{xua\_as\_transmit\_msg\_broadcast@{xua\_as\_transmit\_msg\_broadcast}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{xua\_as\_transmit\_msg\_broadcast()}
{\footnotesize\ttfamily int xua\+\_\+as\+\_\+transmit\+\_\+msg\+\_\+broadcast (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$}]{as,  }\item[{struct msgb $\ast$}]{msg }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+ss7\+\_\+as\+::asps}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+active()}, and \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+send()}.



Referenced by \textbf{ xua\+\_\+as\+\_\+transmit\+\_\+msg()}.



\doxysubsection{Variable Documentation}
\mbox{\label{xua__as__fsm_8c_a307e97238e981dbc91bf5f16aa4398c5}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!xua\_as\_event\_names@{xua\_as\_event\_names}}
\index{xua\_as\_event\_names@{xua\_as\_event\_names}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{xua\_as\_event\_names}
{\footnotesize\ttfamily const struct value\+\_\+string xua\+\_\+as\+\_\+event\+\_\+names[$\,$]\hspace{0.3cm}{\ttfamily [static]}}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{}
\DoxyCodeLine{        \{ XUA\_ASPAS\_ASP\_INACTIVE\_IND,         \textcolor{stringliteral}{"{}ASPAS-\/ASP\_INACTIVE.ind"{}} \},}
\DoxyCodeLine{        \{ XUA\_ASPAS\_ASP\_DOWN\_IND, \textcolor{stringliteral}{"{}ASPAS-\/ASP\_DOWN.ind"{}} \},}
\DoxyCodeLine{        \{ XUA\_ASPAS\_ASP\_ACTIVE\_IND,     \textcolor{stringliteral}{"{}ASPAS-\/ASP\_ACTIVE.ind"{}} \},}
\DoxyCodeLine{        \{ XUA\_AS\_E\_RECOVERY\_EXPD, \textcolor{stringliteral}{"{}AS-\/T\_REC\_EXPD.ind"{}} \},}
\DoxyCodeLine{        \{ XUA\_AS\_E\_TRANSFER\_REQ,   \textcolor{stringliteral}{"{}AS-\/TRANSFER.req"{}} \},}
\DoxyCodeLine{        \{ 0, NULL \}}
\DoxyCodeLine{\}}

\end{DoxyCode}
\mbox{\label{xua__as__fsm_8c_a4dda03cd65066f53f8b4b31af8fb24b6}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!xua\_as\_fsm@{xua\_as\_fsm}}
\index{xua\_as\_fsm@{xua\_as\_fsm}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{xua\_as\_fsm}
{\footnotesize\ttfamily struct osmo\+\_\+fsm xua\+\_\+as\+\_\+fsm}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{}
\DoxyCodeLine{        .name = \textcolor{stringliteral}{"{}XUA\_AS"{}},}
\DoxyCodeLine{        .states = xua\_as\_fsm\_states,}
\DoxyCodeLine{        .num\_states = ARRAY\_SIZE(xua\_as\_fsm\_states),}
\DoxyCodeLine{        .log\_subsys = DLSS7,}
\DoxyCodeLine{        .event\_names = xua\_as\_event\_names,}
\DoxyCodeLine{        .cleanup = xua\_as\_fsm\_cleanup,}
\DoxyCodeLine{\}}

\end{DoxyCode}


Referenced by \textbf{ osmo\+\_\+ss7\+\_\+init()}, and \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+start()}.

\mbox{\label{xua__as__fsm_8c_abb8a55676973be3e55228de3069f0e80}} 
\index{xua\_as\_fsm.c@{xua\_as\_fsm.c}!xua\_as\_fsm\_states@{xua\_as\_fsm\_states}}
\index{xua\_as\_fsm\_states@{xua\_as\_fsm\_states}!xua\_as\_fsm.c@{xua\_as\_fsm.c}}
\doxysubsubsection{xua\_as\_fsm\_states}
{\footnotesize\ttfamily const struct osmo\+\_\+fsm\+\_\+state xua\+\_\+as\+\_\+fsm\+\_\+states[$\,$]\hspace{0.3cm}{\ttfamily [static]}}

