\section{src/xua\+\_\+shared.c File Reference} \label{xua__shared_8c}\index{src/xua\+\_\+shared.\+c@{src/xua\+\_\+shared.\+c}} {\ttfamily \#include $<$stdint.\+h$>$}\newline {\ttfamily \#include $<$unistd.\+h$>$}\newline {\ttfamily \#include $<$string.\+h$>$}\newline {\ttfamily \#include $<$osmocom/core/utils.\+h$>$}\newline {\ttfamily \#include $<$osmocom/core/linuxlist.\+h$>$}\newline {\ttfamily \#include $<$osmocom/core/logging.\+h$>$}\newline {\ttfamily \#include $<$osmocom/sigtran/xua\+\_\+msg.\+h$>$}\newline {\ttfamily \#include $<$osmocom/sigtran/osmo\+\_\+ss7.\+h$>$}\newline {\ttfamily \#include $<$osmocom/sigtran/protocol/m3ua.\+h$>$}\newline {\ttfamily \#include $<$osmocom/sigtran/protocol/sua.\+h$>$}\newline {\ttfamily \#include \char`\"{}xua\+\_\+internal.\+h\char`\"{}}\newline \subsection*{Functions} \begin{DoxyCompactItemize} \item static struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$ \textbf{ find\+\_\+single\+\_\+as\+\_\+for\+\_\+asp} (const struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$asp) \item \textbf{ osmo\+\_\+static\+\_\+assert} (\textbf{ M3\+U\+A\+\_\+\+E\+R\+R\+\_\+\+I\+N\+V\+A\+L\+\_\+\+R\+O\+U\+T\+\_\+\+C\+TX}==\textbf{ S\+U\+A\+\_\+\+E\+R\+R\+\_\+\+I\+N\+V\+A\+L\+\_\+\+R\+O\+U\+T\+\_\+\+C\+TX}, \+\_\+err\+\_\+rctx) \item \textbf{ osmo\+\_\+static\+\_\+assert} (\textbf{ M3\+U\+A\+\_\+\+E\+R\+R\+\_\+\+N\+O\+\_\+\+C\+O\+N\+F\+G\+D\+\_\+\+A\+S\+\_\+\+F\+O\+R\+\_\+\+A\+SP}==\textbf{ S\+U\+A\+\_\+\+E\+R\+R\+\_\+\+N\+O\+\_\+\+C\+O\+N\+F\+G\+D\+\_\+\+A\+S\+\_\+\+F\+O\+R\+\_\+\+A\+SP}, \+\_\+err\+\_\+as\+\_\+for\+\_\+asp) \item int \textbf{ xua\+\_\+find\+\_\+as\+\_\+for\+\_\+asp} (struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$$\ast$as, const struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$asp, const struct \textbf{ xua\+\_\+msg\+\_\+part} $\ast$rctx\+\_\+ie) \begin{DoxyCompactList}\small\item\em Find the AS for given A\+SP + optional routing context IE. \end{DoxyCompactList}\end{DoxyCompactItemize} \subsection{Function Documentation} \mbox{\label{xua__shared_8c_ac8feca1fa18195914db6ed2daef48114}} \index{xua\+\_\+shared.\+c@{xua\+\_\+shared.\+c}!find\+\_\+single\+\_\+as\+\_\+for\+\_\+asp@{find\+\_\+single\+\_\+as\+\_\+for\+\_\+asp}} \index{find\+\_\+single\+\_\+as\+\_\+for\+\_\+asp@{find\+\_\+single\+\_\+as\+\_\+for\+\_\+asp}!xua\+\_\+shared.\+c@{xua\+\_\+shared.\+c}} \subsubsection{find\+\_\+single\+\_\+as\+\_\+for\+\_\+asp()} {\footnotesize\ttfamily static struct \textbf{ osmo\+\_\+ss7\+\_\+as}$\ast$ find\+\_\+single\+\_\+as\+\_\+for\+\_\+asp (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$}]{asp }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}} References osmo\+\_\+ss7\+\_\+instance\+::as\+\_\+list, osmo\+\_\+ss7\+\_\+asp\+::inst, osmo\+\_\+ss7\+\_\+as\+::list, M3\+U\+A\+\_\+\+E\+R\+R\+\_\+\+I\+N\+V\+A\+L\+\_\+\+R\+O\+U\+T\+\_\+\+C\+TX, M3\+U\+A\+\_\+\+E\+R\+R\+\_\+\+N\+O\+\_\+\+C\+O\+N\+F\+G\+D\+\_\+\+A\+S\+\_\+\+F\+O\+R\+\_\+\+A\+SP, osmo\+\_\+ss7\+\_\+as\+\_\+has\+\_\+asp(), osmo\+\_\+static\+\_\+assert(), S\+U\+A\+\_\+\+E\+R\+R\+\_\+\+I\+N\+V\+A\+L\+\_\+\+R\+O\+U\+T\+\_\+\+C\+TX, and S\+U\+A\+\_\+\+E\+R\+R\+\_\+\+N\+O\+\_\+\+C\+O\+N\+F\+G\+D\+\_\+\+A\+S\+\_\+\+F\+O\+R\+\_\+\+A\+SP. Referenced by xua\+\_\+find\+\_\+as\+\_\+for\+\_\+asp(). \mbox{\label{xua__shared_8c_aeddb692309141061f61857ca8ac3580a}} \index{xua\+\_\+shared.\+c@{xua\+\_\+shared.\+c}!osmo\+\_\+static\+\_\+assert@{osmo\+\_\+static\+\_\+assert}} \index{osmo\+\_\+static\+\_\+assert@{osmo\+\_\+static\+\_\+assert}!xua\+\_\+shared.\+c@{xua\+\_\+shared.\+c}} \subsubsection{osmo\+\_\+static\+\_\+assert()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} {\footnotesize\ttfamily osmo\+\_\+static\+\_\+assert (\begin{DoxyParamCaption}\item[{\textbf{ M3\+U\+A\+\_\+\+E\+R\+R\+\_\+\+I\+N\+V\+A\+L\+\_\+\+R\+O\+U\+T\+\_\+\+C\+TX}}]{ = {\ttfamily =\textbf{ S\+U\+A\+\_\+\+E\+R\+R\+\_\+\+I\+N\+V\+A\+L\+\_\+\+R\+O\+U\+T\+\_\+\+C\+TX}}, }\item[{\+\_\+err\+\_\+rctx}]{ }\end{DoxyParamCaption})} Referenced by find\+\_\+single\+\_\+as\+\_\+for\+\_\+asp(). \mbox{\label{xua__shared_8c_a55fcf4f40c115757780730933195cdcd}} \index{xua\+\_\+shared.\+c@{xua\+\_\+shared.\+c}!osmo\+\_\+static\+\_\+assert@{osmo\+\_\+static\+\_\+assert}} \index{osmo\+\_\+static\+\_\+assert@{osmo\+\_\+static\+\_\+assert}!xua\+\_\+shared.\+c@{xua\+\_\+shared.\+c}} \subsubsection{osmo\+\_\+static\+\_\+assert()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} {\footnotesize\ttfamily osmo\+\_\+static\+\_\+assert (\begin{DoxyParamCaption}\item[{\textbf{ M3\+U\+A\+\_\+\+E\+R\+R\+\_\+\+N\+O\+\_\+\+C\+O\+N\+F\+G\+D\+\_\+\+A\+S\+\_\+\+F\+O\+R\+\_\+\+A\+SP}}]{ = {\ttfamily =\textbf{ S\+U\+A\+\_\+\+E\+R\+R\+\_\+\+N\+O\+\_\+\+C\+O\+N\+F\+G\+D\+\_\+\+A\+S\+\_\+\+F\+O\+R\+\_\+\+A\+SP}}, }\item[{\+\_\+err\+\_\+as\+\_\+for\+\_\+asp}]{ }\end{DoxyParamCaption})} \mbox{\label{xua__shared_8c_a1c94e3d373d31d7d27cd9e6784f25619}} \index{xua\+\_\+shared.\+c@{xua\+\_\+shared.\+c}!xua\+\_\+find\+\_\+as\+\_\+for\+\_\+asp@{xua\+\_\+find\+\_\+as\+\_\+for\+\_\+asp}} \index{xua\+\_\+find\+\_\+as\+\_\+for\+\_\+asp@{xua\+\_\+find\+\_\+as\+\_\+for\+\_\+asp}!xua\+\_\+shared.\+c@{xua\+\_\+shared.\+c}} \subsubsection{xua\+\_\+find\+\_\+as\+\_\+for\+\_\+asp()} {\footnotesize\ttfamily int xua\+\_\+find\+\_\+as\+\_\+for\+\_\+asp (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+as} $\ast$$\ast$}]{as, }\item[{const struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$}]{asp, }\item[{const struct \textbf{ xua\+\_\+msg\+\_\+part} $\ast$}]{rctx\+\_\+ie }\end{DoxyParamCaption})} Find the AS for given A\+SP + optional routing context IE. if rctx\+\_\+ie == N\+U\+LL, we assume that this A\+SP is only part of a single AS; if rctx\+\_\+ie is given, then we look-\/up the A\+SP based on the routing context, and verify that this A\+SP is part of it. \begin{DoxyParams}[1]{Parameters} \mbox{\tt out} & {\em as} & caller-\/provided address-\/of-\/pointer to store the found AS \\ \hline \mbox{\tt in} & {\em asp} & A\+SP for which we want to look-\/up the AS \\ \hline \mbox{\tt in} & {\em rctx\+\_\+ie} & routing context IE (may be N\+U\+LL) to use for look-\/up \\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} 0 in case of success; \{M3\+UA,S\+UA\}\+\_\+\+E\+R\+R\+\_\+$\ast$ code in case of error. \end{DoxyReturn} References osmo\+\_\+ss7\+\_\+asp\+::cfg, find\+\_\+single\+\_\+as\+\_\+for\+\_\+asp(), osmo\+\_\+ss7\+\_\+asp\+::inst, L\+O\+G\+P\+A\+SP, M3\+U\+A\+\_\+\+E\+R\+R\+\_\+\+I\+N\+V\+A\+L\+\_\+\+R\+O\+U\+T\+\_\+\+C\+TX, M3\+U\+A\+\_\+\+E\+R\+R\+\_\+\+N\+O\+\_\+\+C\+O\+N\+F\+G\+D\+\_\+\+A\+S\+\_\+\+F\+O\+R\+\_\+\+A\+SP, osmo\+\_\+ss7\+\_\+asp\+::name, osmo\+\_\+ss7\+\_\+as\+\_\+find\+\_\+by\+\_\+rctx(), osmo\+\_\+ss7\+\_\+as\+\_\+has\+\_\+asp(), osmo\+\_\+ss7\+\_\+asp\+\_\+get\+\_\+log\+\_\+subsys(), and xua\+\_\+msg\+\_\+part\+\_\+get\+\_\+u32(). Referenced by m3ua\+\_\+rx\+\_\+snm\+\_\+asp(), m3ua\+\_\+rx\+\_\+xfer(), sua\+\_\+rx\+\_\+cl(), sua\+\_\+rx\+\_\+co(), and sua\+\_\+rx\+\_\+snm\+\_\+asp().