\doxysection{src/ss7\+\_\+asp.h File Reference} \label{ss7__asp_8h}\index{src/ss7\_asp.h@{src/ss7\_asp.h}} {\ttfamily \#include $<$stdint.\+h$>$}\newline {\ttfamily \#include $<$osmocom/core/linuxlist.\+h$>$}\newline {\ttfamily \#include $<$osmocom/core/fsm.\+h$>$}\newline {\ttfamily \#include $<$osmocom/core/msgb.\+h$>$}\newline {\ttfamily \#include $<$osmocom/core/tdef.\+h$>$}\newline {\ttfamily \#include $<$osmocom/netif/stream.\+h$>$}\newline {\ttfamily \#include $<$osmocom/sigtran/osmo\+\_\+ss7.\+h$>$}\newline {\ttfamily \#include \char`\"{}ss7\+\_\+asp\+\_\+peer.\+h\char`\"{}}\newline {\ttfamily \#include \char`\"{}ss7\+\_\+internal.\+h\char`\"{}}\newline \doxysubsection*{Data Structures} \begin{DoxyCompactItemize} \item struct \textbf{ osmo\+\_\+ss7\+\_\+asp} \end{DoxyCompactItemize} \doxysubsection*{Macros} \begin{DoxyCompactItemize} \item \#define \textbf{ LOGPASP}(asp, subsys, level, fmt, args ...)~ \textbf{ \+\_\+\+LOGSS7}((asp)-\/$>$inst, subsys, level, \char`\"{}asp-\/\%s\+: \char`\"{} fmt, (asp)-\/$>$cfg.\+name, \#\# args) \end{DoxyCompactItemize} \doxysubsection*{Enumerations} \begin{DoxyCompactItemize} \item enum \textbf{ ss7\+\_\+asp\+\_\+ctr} \{ \textbf{ SS7\+\_\+\+ASP\+\_\+\+CTR\+\_\+\+PKT\+\_\+\+RX\+\_\+\+TOTAL} , \textbf{ SS7\+\_\+\+ASP\+\_\+\+CTR\+\_\+\+PKT\+\_\+\+RX\+\_\+\+UNKNOWN} , \textbf{ SS7\+\_\+\+ASP\+\_\+\+CTR\+\_\+\+PKT\+\_\+\+TX\+\_\+\+TOTAL} \} \end{DoxyCompactItemize} \doxysubsection*{Functions} \begin{DoxyCompactItemize} \item struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$ \textbf{ ss7\+\_\+asp\+\_\+alloc} (struct \textbf{ osmo\+\_\+ss7\+\_\+instance} $\ast$inst, const char $\ast$name, uint16\+\_\+t remote\+\_\+port, uint16\+\_\+t local\+\_\+port, int trans\+\_\+proto, enum \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+protocol} proto) \item bool \textbf{ ss7\+\_\+asp\+\_\+set\+\_\+default\+\_\+peer\+\_\+hosts} (struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$asp) \item bool \textbf{ ss7\+\_\+asp\+\_\+is\+\_\+started} (const struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$asp) \item int \textbf{ ss7\+\_\+asp\+\_\+get\+\_\+fd} (const struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$asp) \begin{DoxyCompactList}\small\item\em Get the fd of a given ASP. \end{DoxyCompactList}\item int \textbf{ ss7\+\_\+asp\+\_\+apply\+\_\+peer\+\_\+primary\+\_\+address} (const struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$asp) \item int \textbf{ ss7\+\_\+asp\+\_\+apply\+\_\+primary\+\_\+address} (const struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$asp) \item int \textbf{ ss7\+\_\+asp\+\_\+apply\+\_\+new\+\_\+local\+\_\+address} (const struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$asp, unsigned int loc\+\_\+idx) \item int \textbf{ ss7\+\_\+asp\+\_\+apply\+\_\+drop\+\_\+local\+\_\+address} (const struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$asp, unsigned int loc\+\_\+idx) \end{DoxyCompactItemize} \doxysubsection{Macro Definition Documentation} \mbox{\label{ss7__asp_8h_a730407c0c9a8ac0cc119aa0c56a87a24}} \index{ss7\_asp.h@{ss7\_asp.h}!LOGPASP@{LOGPASP}} \index{LOGPASP@{LOGPASP}!ss7\_asp.h@{ss7\_asp.h}} \doxysubsubsection{LOGPASP} {\footnotesize\ttfamily \#define LOGPASP(\begin{DoxyParamCaption}\item[{}]{asp, }\item[{}]{subsys, }\item[{}]{level, }\item[{}]{fmt, }\item[{}]{args ... }\end{DoxyParamCaption})~ \textbf{ \+\_\+\+LOGSS7}((asp)-\/$>$inst, subsys, level, \char`\"{}asp-\/\%s\+: \char`\"{} fmt, (asp)-\/$>$cfg.\+name, \#\# args)} \doxysubsection{Enumeration Type Documentation} \mbox{\label{ss7__asp_8h_a3f27d61521740d6db49dad4f1723740f}} \index{ss7\_asp.h@{ss7\_asp.h}!ss7\_asp\_ctr@{ss7\_asp\_ctr}} \index{ss7\_asp\_ctr@{ss7\_asp\_ctr}!ss7\_asp.h@{ss7\_asp.h}} \doxysubsubsection{ss7\_asp\_ctr} {\footnotesize\ttfamily enum \textbf{ ss7\+\_\+asp\+\_\+ctr}} \begin{DoxyEnumFields}{Enumerator} \raisebox{\heightof{T}}[0pt][0pt]{\index{SS7\_ASP\_CTR\_PKT\_RX\_TOTAL@{SS7\_ASP\_CTR\_PKT\_RX\_TOTAL}!ss7\_asp.h@{ss7\_asp.h}}\index{ss7\_asp.h@{ss7\_asp.h}!SS7\_ASP\_CTR\_PKT\_RX\_TOTAL@{SS7\_ASP\_CTR\_PKT\_RX\_TOTAL}}}\mbox{\label{ss7__asp_8h_a3f27d61521740d6db49dad4f1723740faf196f9f652648a657fbb71ea85ee9a6e}} SS7\+\_\+\+ASP\+\_\+\+CTR\+\_\+\+PKT\+\_\+\+RX\+\_\+\+TOTAL&\\ \hline \raisebox{\heightof{T}}[0pt][0pt]{\index{SS7\_ASP\_CTR\_PKT\_RX\_UNKNOWN@{SS7\_ASP\_CTR\_PKT\_RX\_UNKNOWN}!ss7\_asp.h@{ss7\_asp.h}}\index{ss7\_asp.h@{ss7\_asp.h}!SS7\_ASP\_CTR\_PKT\_RX\_UNKNOWN@{SS7\_ASP\_CTR\_PKT\_RX\_UNKNOWN}}}\mbox{\label{ss7__asp_8h_a3f27d61521740d6db49dad4f1723740fa941a58a77a392291cbb1da5401e5e592}} SS7\+\_\+\+ASP\+\_\+\+CTR\+\_\+\+PKT\+\_\+\+RX\+\_\+\+UNKNOWN&\\ \hline \raisebox{\heightof{T}}[0pt][0pt]{\index{SS7\_ASP\_CTR\_PKT\_TX\_TOTAL@{SS7\_ASP\_CTR\_PKT\_TX\_TOTAL}!ss7\_asp.h@{ss7\_asp.h}}\index{ss7\_asp.h@{ss7\_asp.h}!SS7\_ASP\_CTR\_PKT\_TX\_TOTAL@{SS7\_ASP\_CTR\_PKT\_TX\_TOTAL}}}\mbox{\label{ss7__asp_8h_a3f27d61521740d6db49dad4f1723740fa11e1cda31329c0e91aaa306e53cf1328}} SS7\+\_\+\+ASP\+\_\+\+CTR\+\_\+\+PKT\+\_\+\+TX\+\_\+\+TOTAL&\\ \hline \end{DoxyEnumFields} \doxysubsection{Function Documentation} \mbox{\label{ss7__asp_8h_ac3d6291887a658d39aa55ec3b229acc2}} \index{ss7\_asp.h@{ss7\_asp.h}!ss7\_asp\_alloc@{ss7\_asp\_alloc}} \index{ss7\_asp\_alloc@{ss7\_asp\_alloc}!ss7\_asp.h@{ss7\_asp.h}} \doxysubsubsection{ss7\_asp\_alloc()} {\footnotesize\ttfamily struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$ ss7\+\_\+asp\+\_\+alloc (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+instance} $\ast$}]{inst, }\item[{const char $\ast$}]{name, }\item[{uint16\+\_\+t}]{remote\+\_\+port, }\item[{uint16\+\_\+t}]{local\+\_\+port, }\item[{int}]{trans\+\_\+proto, }\item[{enum \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+protocol}}]{proto }\end{DoxyParamCaption})} References \textbf{ osmo\+\_\+ss7\+\_\+instance\+::asp\+\_\+list}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::ctrg}, \textbf{ g\+\_\+ss7\+\_\+asp\+\_\+rcg\+\_\+idx}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::inst}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::list}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::local}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::name}, \textbf{ OSMO\+\_\+\+SS7\+\_\+\+ASP\+\_\+\+PROT\+\_\+\+SUA}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+protocol\+\_\+name()}, \textbf{ osmo\+\_\+ss7\+\_\+ensure\+\_\+sccp()}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+peer\+::port}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::proto}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::remote}, \textbf{ ss7\+\_\+asp\+\_\+lm\+\_\+timer\+\_\+defaults}, \textbf{ ss7\+\_\+asp\+\_\+peer\+\_\+init()}, \textbf{ ss7\+\_\+asp\+\_\+protocol\+\_\+check\+\_\+trans\+\_\+proto()}, \textbf{ ss7\+\_\+asp\+\_\+rcgd}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::\+T\+\_\+defs\+\_\+lm}, and \textbf{ osmo\+\_\+ss7\+\_\+asp\+::trans\+\_\+proto}. Referenced by \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+find\+\_\+or\+\_\+create2()}. \mbox{\label{ss7__asp_8h_ab2e3375ff5198011e7ceefbee4437d8f}} \index{ss7\_asp.h@{ss7\_asp.h}!ss7\_asp\_apply\_drop\_local\_address@{ss7\_asp\_apply\_drop\_local\_address}} \index{ss7\_asp\_apply\_drop\_local\_address@{ss7\_asp\_apply\_drop\_local\_address}!ss7\_asp.h@{ss7\_asp.h}} \doxysubsubsection{ss7\_asp\_apply\_drop\_local\_address()} {\footnotesize\ttfamily int ss7\+\_\+asp\+\_\+apply\+\_\+drop\+\_\+local\+\_\+address (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$}]{asp, }\item[{unsigned int}]{loc\+\_\+idx }\end{DoxyParamCaption})} References \textbf{ osmo\+\_\+ss7\+\_\+asp\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::client}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+peer\+::host}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::is\+\_\+server}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::local}, \textbf{ LOGPASP}, and \textbf{ osmo\+\_\+ss7\+\_\+asp\+::server}. Referenced by \textbf{ DEFUN\+\_\+\+ATTR()}. \mbox{\label{ss7__asp_8h_a9082d03ccf3139e50b5d7b2fc3fa568b}} \index{ss7\_asp.h@{ss7\_asp.h}!ss7\_asp\_apply\_new\_local\_address@{ss7\_asp\_apply\_new\_local\_address}} \index{ss7\_asp\_apply\_new\_local\_address@{ss7\_asp\_apply\_new\_local\_address}!ss7\_asp.h@{ss7\_asp.h}} \doxysubsubsection{ss7\_asp\_apply\_new\_local\_address()} {\footnotesize\ttfamily int ss7\+\_\+asp\+\_\+apply\+\_\+new\+\_\+local\+\_\+address (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$}]{asp, }\item[{unsigned int}]{loc\+\_\+idx }\end{DoxyParamCaption})} References \textbf{ osmo\+\_\+ss7\+\_\+asp\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::client}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+peer\+::host}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::is\+\_\+server}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::local}, \textbf{ LOGPASP}, and \textbf{ osmo\+\_\+ss7\+\_\+asp\+::server}. Referenced by \textbf{ DEFUN\+\_\+\+ATTR()}. \mbox{\label{ss7__asp_8h_a52c416a02307b3f013953bcd6b61bee0}} \index{ss7\_asp.h@{ss7\_asp.h}!ss7\_asp\_apply\_peer\_primary\_address@{ss7\_asp\_apply\_peer\_primary\_address}} \index{ss7\_asp\_apply\_peer\_primary\_address@{ss7\_asp\_apply\_peer\_primary\_address}!ss7\_asp.h@{ss7\_asp.h}} \doxysubsubsection{ss7\_asp\_apply\_peer\_primary\_address()} {\footnotesize\ttfamily int ss7\+\_\+asp\+\_\+apply\+\_\+peer\+\_\+primary\+\_\+address (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$}]{asp }\end{DoxyParamCaption})} References \textbf{ \+\_\+setsockopt\+\_\+peer\+\_\+primary\+\_\+addr()}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::client}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+peer\+::host}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+peer\+::host\+\_\+cnt}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+peer\+::idx\+\_\+primary}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::is\+\_\+server}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::local}, \textbf{ LOGPASP}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+peer\+::port}, and \textbf{ osmo\+\_\+ss7\+\_\+asp\+::server}. Referenced by \textbf{ DEFUN\+\_\+\+ATTR()}, \textbf{ xua\+\_\+accept\+\_\+cb()}, and \textbf{ xua\+\_\+cli\+\_\+connect\+\_\+cb()}. \mbox{\label{ss7__asp_8h_a1c6f3d525c04eb8553784c922f9c1d03}} \index{ss7\_asp.h@{ss7\_asp.h}!ss7\_asp\_apply\_primary\_address@{ss7\_asp\_apply\_primary\_address}} \index{ss7\_asp\_apply\_primary\_address@{ss7\_asp\_apply\_primary\_address}!ss7\_asp.h@{ss7\_asp.h}} \doxysubsubsection{ss7\_asp\_apply\_primary\_address()} {\footnotesize\ttfamily int ss7\+\_\+asp\+\_\+apply\+\_\+primary\+\_\+address (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$}]{asp }\end{DoxyParamCaption})} References \textbf{ \+\_\+setsockopt\+\_\+primary\+\_\+addr()}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::client}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+peer\+::host}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+peer\+::host\+\_\+cnt}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+peer\+::idx\+\_\+primary}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::is\+\_\+server}, \textbf{ LOGPASP}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+peer\+::port}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::remote}, and \textbf{ osmo\+\_\+ss7\+\_\+asp\+::server}. Referenced by \textbf{ asp\+\_\+handle\+\_\+sctp\+\_\+notif\+\_\+monitor\+\_\+primary\+\_\+address()}, \textbf{ DEFUN\+\_\+\+ATTR()}, \textbf{ xua\+\_\+accept\+\_\+cb()}, and \textbf{ xua\+\_\+cli\+\_\+connect\+\_\+cb()}. \mbox{\label{ss7__asp_8h_a5de79890dc6ede1c9e7ace712c931d25}} \index{ss7\_asp.h@{ss7\_asp.h}!ss7\_asp\_get\_fd@{ss7\_asp\_get\_fd}} \index{ss7\_asp\_get\_fd@{ss7\_asp\_get\_fd}!ss7\_asp.h@{ss7\_asp.h}} \doxysubsubsection{ss7\_asp\_get\_fd()} {\footnotesize\ttfamily int ss7\+\_\+asp\+\_\+get\+\_\+fd (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$}]{asp }\end{DoxyParamCaption})} Get the fd of a given ASP. \begin{DoxyParams}[1]{Parameters} \mbox{\texttt{ in}} & {\em asp} & The ASP for which the fd is requested \\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} The fd of the ASP if acailable, negative otherwise \end{DoxyReturn} References \textbf{ osmo\+\_\+ss7\+\_\+asp\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::client}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::is\+\_\+server}, and \textbf{ osmo\+\_\+ss7\+\_\+asp\+::server}. Referenced by \textbf{ show\+\_\+one\+\_\+asp()}, \textbf{ show\+\_\+one\+\_\+asp\+\_\+assoc\+\_\+status\+\_\+tcp()}, and \textbf{ show\+\_\+one\+\_\+asp\+\_\+remaddr\+\_\+tcp()}. \mbox{\label{ss7__asp_8h_a07c4798f0de92e03f7cc41966d8f764b}} \index{ss7\_asp.h@{ss7\_asp.h}!ss7\_asp\_is\_started@{ss7\_asp\_is\_started}} \index{ss7\_asp\_is\_started@{ss7\_asp\_is\_started}!ss7\_asp.h@{ss7\_asp.h}} \doxysubsubsection{ss7\_asp\_is\_started()} {\footnotesize\ttfamily bool ss7\+\_\+asp\+\_\+is\+\_\+started (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$}]{asp }\end{DoxyParamCaption})} References \textbf{ osmo\+\_\+ss7\+\_\+asp\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::client}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::is\+\_\+server}, and \textbf{ osmo\+\_\+ss7\+\_\+asp\+::server}. Referenced by \textbf{ DEFUN\+\_\+\+ATTR()}. \mbox{\label{ss7__asp_8h_afa91ee594ac4b3408e12e0533dc89e9f}} \index{ss7\_asp.h@{ss7\_asp.h}!ss7\_asp\_set\_default\_peer\_hosts@{ss7\_asp\_set\_default\_peer\_hosts}} \index{ss7\_asp\_set\_default\_peer\_hosts@{ss7\_asp\_set\_default\_peer\_hosts}!ss7\_asp.h@{ss7\_asp.h}} \doxysubsubsection{ss7\_asp\_set\_default\_peer\_hosts()} {\footnotesize\ttfamily bool ss7\+\_\+asp\+\_\+set\+\_\+default\+\_\+peer\+\_\+hosts (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+ss7\+\_\+asp} $\ast$}]{asp }\end{DoxyParamCaption})} References \textbf{ osmo\+\_\+ss7\+\_\+asp\+::cfg}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+peer\+::host}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+\_\+peer\+::host\+\_\+cnt}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::local}, \textbf{ osmo\+\_\+ss7\+\_\+asp\+::remote}, \textbf{ ss7\+\_\+asp\+\_\+peer\+\_\+add\+\_\+host()}, and \textbf{ ss7\+\_\+ipv6\+\_\+sctp\+\_\+supported()}. Referenced by \textbf{ osmo\+\_\+sccp\+\_\+simple\+\_\+client\+\_\+on\+\_\+ss7\+\_\+id()}, and \textbf{ osmo\+\_\+ss7\+\_\+vty\+\_\+go\+\_\+parent()}.