\doxysection{src/osmo\+\_\+ss7\+\_\+as.c File Reference} \label{osmo__ss7__as_8c}\index{src/osmo\_ss7\_as.c@{src/osmo\_ss7\_as.c}} {\ttfamily \#include $<$string.\+h$>$}\newline {\ttfamily \#include $<$errno.\+h$>$}\newline {\ttfamily \#include $<$unistd.\+h$>$}\newline {\ttfamily \#include $<$inttypes.\+h$>$}\newline {\ttfamily \#include $<$osmocom/core/linuxlist.\+h$>$}\newline {\ttfamily \#include $<$osmocom/core/utils.\+h$>$}\newline {\ttfamily \#include $<$osmocom/core/talloc.\+h$>$}\newline {\ttfamily \#include $<$osmocom/core/logging.\+h$>$}\newline {\ttfamily \#include $<$osmocom/sigtran/osmo\+\_\+ss7.\+h$>$}\newline {\ttfamily \#include $<$osmocom/sigtran/protocol/m3ua.\+h$>$}\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`\"{}xua\+\_\+as\+\_\+fsm.\+h\char`\"{}}\newline {\ttfamily \#include \char`\"{}xua\+\_\+asp\+\_\+fsm.\+h\char`\"{}}\newline \doxysubsection*{Functions} \begin{DoxyCompactItemize} \item struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$ \textbf{ ss7\+\_\+as\+\_\+alloc} (struct \textbf{ osmo\+\_\+ss7\+\_\+instance} $\ast$inst, const char $\ast$name, enum \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+protocol} proto) \begin{DoxyCompactList}\small\item\em Allocate an Application Server. \end{DoxyCompactList}\item enum \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+protocol} \textbf{ osmo\+\_\+ss7\+\_\+as\+\_\+get\+\_\+asp\+\_\+protocol} (const struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$as) \begin{DoxyCompactList}\small\item\em Get asp\+\_\+protocol configuration of a given AS. \end{DoxyCompactList}\item int \textbf{ osmo\+\_\+ss7\+\_\+as\+\_\+add\+\_\+asp} (struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$as, const char $\ast$asp\+\_\+name) \begin{DoxyCompactList}\small\item\em Add given ASP to given AS. \end{DoxyCompactList}\item int \textbf{ osmo\+\_\+ss7\+\_\+as\+\_\+del\+\_\+asp} (struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$as, const char $\ast$asp\+\_\+name) \begin{DoxyCompactList}\small\item\em Delete given ASP from given AS. \end{DoxyCompactList}\item void \textbf{ osmo\+\_\+ss7\+\_\+as\+\_\+destroy} (struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$as) \begin{DoxyCompactList}\small\item\em Destroy given Application Server. \end{DoxyCompactList}\item bool \textbf{ osmo\+\_\+ss7\+\_\+as\+\_\+has\+\_\+asp} (const struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$as, const struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$asp) \begin{DoxyCompactList}\small\item\em Determine if given AS contains ASP. \end{DoxyCompactList}\item bool \textbf{ osmo\+\_\+ss7\+\_\+as\+\_\+active} (const struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$as) \begin{DoxyCompactList}\small\item\em Determine if given AS is in the active state. \end{DoxyCompactList}\item bool \textbf{ osmo\+\_\+ss7\+\_\+as\+\_\+down} (const struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$as) \begin{DoxyCompactList}\small\item\em Determine if given AS is in the down state. \end{DoxyCompactList}\item static struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$ \textbf{ ss7\+\_\+as\+\_\+select\+\_\+asp\+\_\+override} (struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$as) \item static struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$ \textbf{ ss7\+\_\+as\+\_\+select\+\_\+asp\+\_\+roundrobin} (struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$as) \item static struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$ \textbf{ ss7\+\_\+as\+\_\+select\+\_\+asp\+\_\+broadcast} (struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$as) \item struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$ \textbf{ osmo\+\_\+ss7\+\_\+as\+\_\+select\+\_\+asp} (struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$as) \begin{DoxyCompactList}\small\item\em Select an AS to transmit a message, according to AS configuration and ASP availability. \end{DoxyCompactList}\item bool \textbf{ osmo\+\_\+ss7\+\_\+as\+\_\+tmode\+\_\+compatible\+\_\+xua} (struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$as, uint32\+\_\+t m3ua\+\_\+tmt) \end{DoxyCompactItemize} \doxysubsection*{Variables} \begin{DoxyCompactItemize} \item struct value\+\_\+string \textbf{ osmo\+\_\+ss7\+\_\+as\+\_\+traffic\+\_\+mode\+\_\+vals} [$\,$] \item static const struct rate\+\_\+ctr\+\_\+desc \textbf{ ss7\+\_\+as\+\_\+rcd} [$\,$] \item static const struct rate\+\_\+ctr\+\_\+group\+\_\+desc \textbf{ ss7\+\_\+as\+\_\+rcgd} \item static unsigned int \textbf{ g\+\_\+ss7\+\_\+as\+\_\+rcg\+\_\+idx} \end{DoxyCompactItemize} \doxysubsection{Function Documentation} \mbox{\label{osmo__ss7__as_8c_a6eb76a8a7db795844115a5b6feb5e426}} \index{osmo\_ss7\_as.c@{osmo\_ss7\_as.c}!osmo\_ss7\_as\_active@{osmo\_ss7\_as\_active}} \index{osmo\_ss7\_as\_active@{osmo\_ss7\_as\_active}!osmo\_ss7\_as.c@{osmo\_ss7\_as.c}} \doxysubsubsection{osmo\_ss7\_as\_active()} {\footnotesize\ttfamily bool osmo\+\_\+ss7\+\_\+as\+\_\+active (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$}]{as }\end{DoxyParamCaption})} Determine if given AS is in the active state. \begin{DoxyParams}[1]{Parameters} \mbox{\texttt{ in}} & {\em as} & Application Server. \\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} true in case as is active; false otherwise. \end{DoxyReturn} References \textbf{ osmo\+\_\+ss7\+\_\+as\+::fi}, and \textbf{ XUA\+\_\+\+AS\+\_\+\+S\+\_\+\+ACTIVE}. Referenced by \textbf{ DEFUN()}. \mbox{\label{osmo__ss7__as_8c_a01392ccbfd2fd93d962dcd7bd8037526}} \index{osmo\_ss7\_as.c@{osmo\_ss7\_as.c}!osmo\_ss7\_as\_add\_asp@{osmo\_ss7\_as\_add\_asp}} \index{osmo\_ss7\_as\_add\_asp@{osmo\_ss7\_as\_add\_asp}!osmo\_ss7\_as.c@{osmo\_ss7\_as.c}} \doxysubsubsection{osmo\_ss7\_as\_add\_asp()} {\footnotesize\ttfamily int osmo\+\_\+ss7\+\_\+as\+\_\+add\+\_\+asp (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$}]{as, }\item[{const char $\ast$}]{asp\+\_\+name }\end{DoxyParamCaption})} Add given ASP to given AS. \begin{DoxyParams}[1]{Parameters} \mbox{\texttt{ in}} & {\em as} & Application Server to which asp is added \\ \hline \mbox{\texttt{ in}} & {\em asp} & Application Server Process to be added to as \\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} 0 on success; negative in case of error \end{DoxyReturn} References \textbf{ osmo\+\_\+ss7\+\_\+as\+::asps}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::fi}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::inst}, \textbf{ LOGPAS}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::name}, \textbf{ osmo\+\_\+ss7\+\_\+as\+\_\+has\+\_\+asp()}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+find\+\_\+by\+\_\+name()}, \textbf{ ss7\+\_\+initialized}, and \textbf{ XUA\+\_\+\+ASP\+\_\+\+E\+\_\+\+AS\+\_\+\+ASSIGNED}. Referenced by \textbf{ DEFUN\+\_\+\+ATTR()}, \textbf{ handle\+\_\+rkey\+\_\+reg()}, \textbf{ ipa\+\_\+asp\+\_\+fsm\+\_\+wait\+\_\+id\+\_\+resp()}, \textbf{ osmo\+\_\+sccp\+\_\+simple\+\_\+client\+\_\+on\+\_\+ss7\+\_\+id()}, and \textbf{ osmo\+\_\+sccp\+\_\+simple\+\_\+server\+\_\+add\+\_\+clnt()}. \mbox{\label{osmo__ss7__as_8c_aca9bfa652d15609a904653398e17c5e9}} \index{osmo\_ss7\_as.c@{osmo\_ss7\_as.c}!osmo\_ss7\_as\_del\_asp@{osmo\_ss7\_as\_del\_asp}} \index{osmo\_ss7\_as\_del\_asp@{osmo\_ss7\_as\_del\_asp}!osmo\_ss7\_as.c@{osmo\_ss7\_as.c}} \doxysubsubsection{osmo\_ss7\_as\_del\_asp()} {\footnotesize\ttfamily int osmo\+\_\+ss7\+\_\+as\+\_\+del\+\_\+asp (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$}]{as, }\item[{const char $\ast$}]{asp\+\_\+name }\end{DoxyParamCaption})} Delete given ASP from given AS. \begin{DoxyParams}[1]{Parameters} \mbox{\texttt{ in}} & {\em as} & Application Server from which asp is deleted \\ \hline \mbox{\texttt{ in}} & {\em asp} & Application Server Process to delete from as \\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} 0 on success; negative in case of error \end{DoxyReturn} References \textbf{ osmo\+\_\+ss7\+\_\+as\+::asps}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::inst}, \textbf{ LOGPAS}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::name}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+find\+\_\+by\+\_\+name()}, and \textbf{ ss7\+\_\+initialized}. Referenced by \textbf{ DEFUN\+\_\+\+ATTR()}, and \textbf{ handle\+\_\+rkey\+\_\+dereg()}. \mbox{\label{osmo__ss7__as_8c_afe830a3d827c8c9ff36bf04e0428ad79}} \index{osmo\_ss7\_as.c@{osmo\_ss7\_as.c}!osmo\_ss7\_as\_destroy@{osmo\_ss7\_as\_destroy}} \index{osmo\_ss7\_as\_destroy@{osmo\_ss7\_as\_destroy}!osmo\_ss7\_as.c@{osmo\_ss7\_as.c}} \doxysubsubsection{osmo\_ss7\_as\_destroy()} {\footnotesize\ttfamily void osmo\+\_\+ss7\+\_\+as\+\_\+destroy (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$}]{as }\end{DoxyParamCaption})} Destroy given Application Server. \begin{DoxyParams}[1]{Parameters} \mbox{\texttt{ in}} & {\em as} & Application Server to destroy \\ \hline \end{DoxyParams} References \textbf{ osmo\+\_\+ss7\+\_\+as\+::ctrg}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::fi}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::inst}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::list}, \textbf{ LOGPAS}, \textbf{ osmo\+\_\+ss7\+\_\+instance\+::rtable\+\_\+system}, \textbf{ ss7\+\_\+initialized}, and \textbf{ ss7\+\_\+route\+\_\+table\+\_\+del\+\_\+routes\+\_\+by\+\_\+as()}. Referenced by \textbf{ DEFUN\+\_\+\+ATTR()}, \textbf{ handle\+\_\+rkey\+\_\+dereg()}, \textbf{ handle\+\_\+rkey\+\_\+reg()}, \textbf{ osmo\+\_\+sccp\+\_\+simple\+\_\+client\+\_\+on\+\_\+ss7\+\_\+id()}, \textbf{ osmo\+\_\+sccp\+\_\+simple\+\_\+server\+\_\+add\+\_\+clnt()}, \textbf{ osmo\+\_\+ss7\+\_\+instance\+\_\+destroy()}, and \textbf{ xua\+\_\+rkm\+\_\+cleanup\+\_\+dyn\+\_\+as\+\_\+for\+\_\+asp()}. \mbox{\label{osmo__ss7__as_8c_a73e6d3f8129ec492e6c59b7bc4ac7fe3}} \index{osmo\_ss7\_as.c@{osmo\_ss7\_as.c}!osmo\_ss7\_as\_down@{osmo\_ss7\_as\_down}} \index{osmo\_ss7\_as\_down@{osmo\_ss7\_as\_down}!osmo\_ss7\_as.c@{osmo\_ss7\_as.c}} \doxysubsubsection{osmo\_ss7\_as\_down()} {\footnotesize\ttfamily bool osmo\+\_\+ss7\+\_\+as\+\_\+down (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$}]{as }\end{DoxyParamCaption})} Determine if given AS is in the down state. \begin{DoxyParams}[1]{Parameters} \mbox{\texttt{ in}} & {\em as} & Application Server. \\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} true in case as is down; false otherwise. \end{DoxyReturn} References \textbf{ osmo\+\_\+ss7\+\_\+as\+::fi}, and \textbf{ XUA\+\_\+\+AS\+\_\+\+S\+\_\+\+DOWN}. Referenced by \textbf{ hmrt\+\_\+message\+\_\+for\+\_\+routing()}. \mbox{\label{osmo__ss7__as_8c_ab5ce9a09100b1085fd10f7495056f4c9}} \index{osmo\_ss7\_as.c@{osmo\_ss7\_as.c}!osmo\_ss7\_as\_get\_asp\_protocol@{osmo\_ss7\_as\_get\_asp\_protocol}} \index{osmo\_ss7\_as\_get\_asp\_protocol@{osmo\_ss7\_as\_get\_asp\_protocol}!osmo\_ss7\_as.c@{osmo\_ss7\_as.c}} \doxysubsubsection{osmo\_ss7\_as\_get\_asp\_protocol()} {\footnotesize\ttfamily enum \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+protocol} osmo\+\_\+ss7\+\_\+as\+\_\+get\+\_\+asp\+\_\+protocol (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$}]{as }\end{DoxyParamCaption})} Get asp\+\_\+protocol configuration of a given AS. \begin{DoxyParams}[1]{Parameters} \mbox{\texttt{ in}} & {\em as} & Application Server in which to look for asp\+\_\+protocol \\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} The asp\+\_\+protocol this AS is configured with \end{DoxyReturn} References \textbf{ osmo\+\_\+ss7\+\_\+as\+::cfg}, and \textbf{ osmo\+\_\+ss7\+\_\+as\+::proto}. \mbox{\label{osmo__ss7__as_8c_abffb76cffe93aa6421b2e41dcce2fe7f}} \index{osmo\_ss7\_as.c@{osmo\_ss7\_as.c}!osmo\_ss7\_as\_has\_asp@{osmo\_ss7\_as\_has\_asp}} \index{osmo\_ss7\_as\_has\_asp@{osmo\_ss7\_as\_has\_asp}!osmo\_ss7\_as.c@{osmo\_ss7\_as.c}} \doxysubsubsection{osmo\_ss7\_as\_has\_asp()} {\footnotesize\ttfamily bool osmo\+\_\+ss7\+\_\+as\+\_\+has\+\_\+asp (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$}]{as, }\item[{const struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$}]{asp }\end{DoxyParamCaption})} Determine if given AS contains ASP. \begin{DoxyParams}[1]{Parameters} \mbox{\texttt{ in}} & {\em as} & Application Server in which to look for asp \\ \hline \mbox{\texttt{ in}} & {\em asp} & Application Server Process to look for in as \\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} true in case asp is part of as; false otherwise \end{DoxyReturn} References \textbf{ osmo\+\_\+ss7\+\_\+as\+::asps}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::cfg}, and \textbf{ ss7\+\_\+initialized}. Referenced by \textbf{ as\+\_\+list\+\_\+for\+\_\+asp()}, \textbf{ determine\+\_\+traf\+\_\+mode()}, \textbf{ dispatch\+\_\+to\+\_\+all\+\_\+as()}, \textbf{ find\+\_\+single\+\_\+as\+\_\+for\+\_\+asp()}, \textbf{ get\+\_\+all\+\_\+rctx\+\_\+for\+\_\+asp()}, \textbf{ handle\+\_\+rkey\+\_\+dereg()}, \textbf{ ipa\+\_\+find\+\_\+as\+\_\+for\+\_\+asp()}, \textbf{ osmo\+\_\+sccp\+\_\+simple\+\_\+client\+\_\+on\+\_\+ss7\+\_\+id()}, \textbf{ osmo\+\_\+ss7\+\_\+as\+\_\+add\+\_\+asp()}, \textbf{ xua\+\_\+asp\+\_\+fsm\+\_\+inactive()}, \textbf{ xua\+\_\+find\+\_\+as\+\_\+for\+\_\+asp()}, \textbf{ xua\+\_\+msg\+\_\+add\+\_\+asp\+\_\+rctx()}, and \textbf{ xua\+\_\+rkm\+\_\+cleanup\+\_\+dyn\+\_\+as\+\_\+for\+\_\+asp()}. \mbox{\label{osmo__ss7__as_8c_a45c297537854bcf084a1be70ef780069}} \index{osmo\_ss7\_as.c@{osmo\_ss7\_as.c}!osmo\_ss7\_as\_select\_asp@{osmo\_ss7\_as\_select\_asp}} \index{osmo\_ss7\_as\_select\_asp@{osmo\_ss7\_as\_select\_asp}!osmo\_ss7\_as.c@{osmo\_ss7\_as.c}} \doxysubsubsection{osmo\_ss7\_as\_select\_asp()} {\footnotesize\ttfamily struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$ osmo\+\_\+ss7\+\_\+as\+\_\+select\+\_\+asp (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$}]{as }\end{DoxyParamCaption})} Select an AS to transmit a message, according to AS configuration and ASP availability. \begin{DoxyParams}[1]{Parameters} \mbox{\texttt{ in}} & {\em as} & Application Server. \\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} asp to send the message to, NULL if no possible asp found \end{DoxyReturn} This function returns NULL too if multiple ASPs would be selected, ie. AS is configured in broadcast mode and more than one ASP is configured. 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{ ss7\+\_\+as\+\_\+select\+\_\+asp\+\_\+broadcast()}, \textbf{ ss7\+\_\+as\+\_\+select\+\_\+asp\+\_\+override()}, and \textbf{ ss7\+\_\+as\+\_\+select\+\_\+asp\+\_\+roundrobin()}. Referenced by \textbf{ xua\+\_\+as\+\_\+transmit\+\_\+msg()}. \mbox{\label{osmo__ss7__as_8c_ae1ce394b6ad89efe1d723f0eda142333}} \index{osmo\_ss7\_as.c@{osmo\_ss7\_as.c}!osmo\_ss7\_as\_tmode\_compatible\_xua@{osmo\_ss7\_as\_tmode\_compatible\_xua}} \index{osmo\_ss7\_as\_tmode\_compatible\_xua@{osmo\_ss7\_as\_tmode\_compatible\_xua}!osmo\_ss7\_as.c@{osmo\_ss7\_as.c}} \doxysubsubsection{osmo\_ss7\_as\_tmode\_compatible\_xua()} {\footnotesize\ttfamily bool osmo\+\_\+ss7\+\_\+as\+\_\+tmode\+\_\+compatible\+\_\+xua (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$}]{as, }\item[{uint32\+\_\+t}]{m3ua\+\_\+tmt }\end{DoxyParamCaption})} References \textbf{ osmo\+\_\+ss7\+\_\+as\+::cfg}, \textbf{ M3\+UA\+\_\+\+TMOD\+\_\+\+BCAST}, \textbf{ M3\+UA\+\_\+\+TMOD\+\_\+\+LOADSHARE}, \textbf{ M3\+UA\+\_\+\+TMOD\+\_\+\+OVERRIDE}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::mode}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::mode\+\_\+set\+\_\+by\+\_\+peer}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::mode\+\_\+set\+\_\+by\+\_\+vty}, \textbf{ OSMO\+\_\+\+SS7\+\_\+\+AS\+\_\+\+TMOD\+\_\+\+BCAST}, \textbf{ OSMO\+\_\+\+SS7\+\_\+\+AS\+\_\+\+TMOD\+\_\+\+LOADSHARE}, \textbf{ OSMO\+\_\+\+SS7\+\_\+\+AS\+\_\+\+TMOD\+\_\+\+OVERRIDE}, and \textbf{ OSMO\+\_\+\+SS7\+\_\+\+AS\+\_\+\+TMOD\+\_\+\+ROUNDROBIN}. Referenced by \textbf{ handle\+\_\+rkey\+\_\+reg()}, and \textbf{ xua\+\_\+asp\+\_\+fsm\+\_\+inactive()}. \mbox{\label{osmo__ss7__as_8c_ab5cd3d471c6ef8678829cee97c60014c}} \index{osmo\_ss7\_as.c@{osmo\_ss7\_as.c}!ss7\_as\_alloc@{ss7\_as\_alloc}} \index{ss7\_as\_alloc@{ss7\_as\_alloc}!osmo\_ss7\_as.c@{osmo\_ss7\_as.c}} \doxysubsubsection{ss7\_as\_alloc()} {\footnotesize\ttfamily struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$ ss7\+\_\+as\+\_\+alloc (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+instance} $\ast$}]{inst, }\item[{const char $\ast$}]{name, }\item[{enum \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+protocol}}]{proto }\end{DoxyParamCaption})} Allocate an Application Server. \begin{DoxyParams}[1]{Parameters} \mbox{\texttt{ in}} & {\em inst} & SS7 Instance on which we operate \\ \hline \mbox{\texttt{ in}} & {\em name} & Name of Application Server \\ \hline \mbox{\texttt{ in}} & {\em proto} & Protocol of Application Server \\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} pointer to Application Server on success; NULL otherwise \end{DoxyReturn} References \textbf{ osmo\+\_\+ss7\+\_\+instance\+::as\+\_\+list}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::ctrg}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::fi}, \textbf{ g\+\_\+ss7\+\_\+as\+\_\+rcg\+\_\+idx}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::inst}, \textbf{ osmo\+\_\+ss7\+\_\+routing\+\_\+key\+::l\+\_\+rk\+\_\+id}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::list}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::mode}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::name}, \textbf{ OSMO\+\_\+\+SS7\+\_\+\+AS\+\_\+\+TMOD\+\_\+\+OVERRIDE}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::proto}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::recovery\+\_\+timeout\+\_\+msec}, \textbf{ osmo\+\_\+ss7\+\_\+as\+::routing\+\_\+key}, \textbf{ ss7\+\_\+as\+\_\+rcgd}, \textbf{ ss7\+\_\+find\+\_\+free\+\_\+l\+\_\+rk\+\_\+id()}, and \textbf{ xua\+\_\+as\+\_\+fsm\+\_\+start()}. Referenced by \textbf{ osmo\+\_\+ss7\+\_\+as\+\_\+find\+\_\+or\+\_\+create()}. \mbox{\label{osmo__ss7__as_8c_ae30f78be9c2ccd192581a3438ff12ac6}} \index{osmo\_ss7\_as.c@{osmo\_ss7\_as.c}!ss7\_as\_select\_asp\_broadcast@{ss7\_as\_select\_asp\_broadcast}} \index{ss7\_as\_select\_asp\_broadcast@{ss7\_as\_select\_asp\_broadcast}!osmo\_ss7\_as.c@{osmo\_ss7\_as.c}} \doxysubsubsection{ss7\_as\_select\_asp\_broadcast()} {\footnotesize\ttfamily static struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$ ss7\+\_\+as\+\_\+select\+\_\+asp\+\_\+broadcast (\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{ osmo\+\_\+ss7\+\_\+as\+\_\+select\+\_\+asp()}. \mbox{\label{osmo__ss7__as_8c_a1c47f4b1932408889db8a1587ed11aee}} \index{osmo\_ss7\_as.c@{osmo\_ss7\_as.c}!ss7\_as\_select\_asp\_override@{ss7\_as\_select\_asp\_override}} \index{ss7\_as\_select\_asp\_override@{ss7\_as\_select\_asp\_override}!osmo\_ss7\_as.c@{osmo\_ss7\_as.c}} \doxysubsubsection{ss7\_as\_select\_asp\_override()} {\footnotesize\ttfamily static struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$ ss7\+\_\+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{ osmo\+\_\+ss7\+\_\+as\+\_\+select\+\_\+asp()}. \mbox{\label{osmo__ss7__as_8c_a26482d10728032ad4192baafe7bdc2f7}} \index{osmo\_ss7\_as.c@{osmo\_ss7\_as.c}!ss7\_as\_select\_asp\_roundrobin@{ss7\_as\_select\_asp\_roundrobin}} \index{ss7\_as\_select\_asp\_roundrobin@{ss7\_as\_select\_asp\_roundrobin}!osmo\_ss7\_as.c@{osmo\_ss7\_as.c}} \doxysubsubsection{ss7\_as\_select\_asp\_roundrobin()} {\footnotesize\ttfamily static struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$ ss7\+\_\+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{ osmo\+\_\+ss7\+\_\+as\+\_\+select\+\_\+asp()}. \doxysubsection{Variable Documentation} \mbox{\label{osmo__ss7__as_8c_aaadda9e298649caf18805f9fcd3a2039}} \index{osmo\_ss7\_as.c@{osmo\_ss7\_as.c}!g\_ss7\_as\_rcg\_idx@{g\_ss7\_as\_rcg\_idx}} \index{g\_ss7\_as\_rcg\_idx@{g\_ss7\_as\_rcg\_idx}!osmo\_ss7\_as.c@{osmo\_ss7\_as.c}} \doxysubsubsection{g\_ss7\_as\_rcg\_idx} {\footnotesize\ttfamily unsigned int g\+\_\+ss7\+\_\+as\+\_\+rcg\+\_\+idx\hspace{0.3cm}{\ttfamily [static]}} Referenced by \textbf{ ss7\+\_\+as\+\_\+alloc()}. \mbox{\label{osmo__ss7__as_8c_a41be4c98feb2b819cbc41e9f378ef8e2}} \index{osmo\_ss7\_as.c@{osmo\_ss7\_as.c}!osmo\_ss7\_as\_traffic\_mode\_vals@{osmo\_ss7\_as\_traffic\_mode\_vals}} \index{osmo\_ss7\_as\_traffic\_mode\_vals@{osmo\_ss7\_as\_traffic\_mode\_vals}!osmo\_ss7\_as.c@{osmo\_ss7\_as.c}} \doxysubsubsection{osmo\_ss7\_as\_traffic\_mode\_vals} {\footnotesize\ttfamily struct value\+\_\+string osmo\+\_\+ss7\+\_\+as\+\_\+traffic\+\_\+mode\+\_\+vals[$\,$]} {\bfseries Initial value\+:} \begin{DoxyCode}{0} \DoxyCodeLine{= \{} \DoxyCodeLine{ \{ OSMO\_SS7\_AS\_TMOD\_BCAST, \textcolor{stringliteral}{"{}broadcast"{}} \},} \DoxyCodeLine{ \{ OSMO\_SS7\_AS\_TMOD\_LOADSHARE, \textcolor{stringliteral}{"{}loadshare"{}} \},} \DoxyCodeLine{ \{ OSMO\_SS7\_AS\_TMOD\_ROUNDROBIN, \textcolor{stringliteral}{"{}round-\/robin"{}} \},} \DoxyCodeLine{ \{ OSMO\_SS7\_AS\_TMOD\_OVERRIDE, \textcolor{stringliteral}{"{}override"{}} \},} \DoxyCodeLine{ \{ 0, NULL \}} \DoxyCodeLine{\}} \end{DoxyCode} Referenced by \textbf{ DEFUN\+\_\+\+USRATTR()}, and \textbf{ osmo\+\_\+ss7\+\_\+as\+\_\+traffic\+\_\+mode\+\_\+name()}. \mbox{\label{osmo__ss7__as_8c_a52bafadf47672f3cbe10f1fe54c47c0c}} \index{osmo\_ss7\_as.c@{osmo\_ss7\_as.c}!ss7\_as\_rcd@{ss7\_as\_rcd}} \index{ss7\_as\_rcd@{ss7\_as\_rcd}!osmo\_ss7\_as.c@{osmo\_ss7\_as.c}} \doxysubsubsection{ss7\_as\_rcd} {\footnotesize\ttfamily const struct rate\+\_\+ctr\+\_\+desc ss7\+\_\+as\+\_\+rcd[$\,$]\hspace{0.3cm}{\ttfamily [static]}} {\bfseries Initial value\+:} \begin{DoxyCode}{0} \DoxyCodeLine{= \{} \DoxyCodeLine{ [SS7\_AS\_CTR\_RX\_MSU\_TOTAL] = \{ \textcolor{stringliteral}{"{}rx:msu:total"{}}, \textcolor{stringliteral}{"{}Total number of MSU received"{}} \},} \DoxyCodeLine{ [SS7\_AS\_CTR\_TX\_MSU\_TOTAL] = \{ \textcolor{stringliteral}{"{}tx:msu:total"{}}, \textcolor{stringliteral}{"{}Total number of MSU transmitted"{}} \},} \DoxyCodeLine{\}} \end{DoxyCode} \mbox{\label{osmo__ss7__as_8c_a02583199ee14e9225a5d4086150bb8dd}} \index{osmo\_ss7\_as.c@{osmo\_ss7\_as.c}!ss7\_as\_rcgd@{ss7\_as\_rcgd}} \index{ss7\_as\_rcgd@{ss7\_as\_rcgd}!osmo\_ss7\_as.c@{osmo\_ss7\_as.c}} \doxysubsubsection{ss7\_as\_rcgd} {\footnotesize\ttfamily const struct rate\+\_\+ctr\+\_\+group\+\_\+desc ss7\+\_\+as\+\_\+rcgd\hspace{0.3cm}{\ttfamily [static]}} {\bfseries Initial value\+:} \begin{DoxyCode}{0} \DoxyCodeLine{= \{} \DoxyCodeLine{ .group\_name\_prefix = \textcolor{stringliteral}{"{}sigtran\_as"{}},} \DoxyCodeLine{ .group\_description = \textcolor{stringliteral}{"{}SIGTRAN Application Server"{}},} \DoxyCodeLine{ .num\_ctr = ARRAY\_SIZE(ss7\_as\_rcd),} \DoxyCodeLine{ .ctr\_desc = ss7\_as\_rcd,} \DoxyCodeLine{\}} \end{DoxyCode} Referenced by \textbf{ ss7\+\_\+as\+\_\+alloc()}.