\doxysection{ss7\+\_\+asp\+\_\+peer.\+h}
\label{ss7__asp__peer_8h_source}\index{src/ss7\_asp\_peer.h@{src/ss7\_asp\_peer.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}}
\DoxyCodeLine{00002\ }
\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ <stdint.h>}}
\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ <stdbool.h>}}
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ <unistd.h>}}
\DoxyCodeLine{00006\ }
\DoxyCodeLine{00007\ \textcolor{comment}{/***********************************************************************}}
\DoxyCodeLine{00008\ \textcolor{comment}{\ *\ SS7\ ASP\ Peer}}
\DoxyCodeLine{00009\ \textcolor{comment}{\ ***********************************************************************/}}
\DoxyCodeLine{00010\ }
\DoxyCodeLine{00011\ \textcolor{keyword}{struct\ }osmo\_ss7\_asp\_peer\ \{}
\DoxyCodeLine{00012\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{char}\ *host[OSMO\_SOCK\_MAX\_ADDRS];}
\DoxyCodeLine{00013\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{size\_t}\ host\_cnt;}
\DoxyCodeLine{00014\ \ \ \ \ \ \ \ \ uint16\_t\ port;}
\DoxyCodeLine{00015\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ index\ in\ "{}hosts"{}\ array\ marking\ the\ SCTP\ Primary\ Address,\ -\/1\ if\ no\ explicit\ Primary\ Address\ set\ */}}
\DoxyCodeLine{00016\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ idx\_primary;}
\DoxyCodeLine{00017\ \};}
\DoxyCodeLine{00018\ }
\DoxyCodeLine{00019\ \textcolor{keywordtype}{int}\ ss7\_asp\_peer\_snprintf(\textcolor{keywordtype}{char}\ *buf,\ \textcolor{keywordtype}{size\_t}\ buf\_len,\ \textcolor{keyword}{struct}\ osmo\_ss7\_asp\_peer\ *peer);}
\DoxyCodeLine{00020\ \textcolor{keywordtype}{void}\ ss7\_asp\_peer\_init(\textcolor{keyword}{struct}\ osmo\_ss7\_asp\_peer\ *peer);}
\DoxyCodeLine{00021\ \textcolor{keywordtype}{int}\ ss7\_asp\_peer\_set\_hosts(\textcolor{keyword}{struct}\ osmo\_ss7\_asp\_peer\ *peer,\ \textcolor{keywordtype}{void}\ *talloc\_ctx,}
\DoxyCodeLine{00022\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *\textcolor{keyword}{const}*hosts,\ \textcolor{keywordtype}{size\_t}\ host\_cnt);}
\DoxyCodeLine{00023\ \textcolor{keywordtype}{int}\ ss7\_asp\_peer\_set\_hosts2(\textcolor{keyword}{struct}\ osmo\_ss7\_asp\_peer\ *peer,\ \textcolor{keywordtype}{void}\ *talloc\_ctx,}
\DoxyCodeLine{00024\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *\textcolor{keyword}{const}*hosts,\ \textcolor{keywordtype}{size\_t}\ host\_cnt,\ \textcolor{keywordtype}{int}\ idx\_primary);}
\DoxyCodeLine{00025\ \textcolor{keywordtype}{int}\ ss7\_asp\_peer\_add\_host(\textcolor{keyword}{struct}\ osmo\_ss7\_asp\_peer\ *peer,\ \textcolor{keywordtype}{void}\ *talloc\_ctx,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *host);}
\DoxyCodeLine{00026\ \textcolor{keywordtype}{int}\ ss7\_asp\_peer\_add\_host2(\textcolor{keyword}{struct}\ osmo\_ss7\_asp\_peer\ *peer,\ \textcolor{keywordtype}{void}\ *talloc\_ctx,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *host,\ \textcolor{keywordtype}{bool}\ is\_primary\_addr);}
\DoxyCodeLine{00027\ \textcolor{keywordtype}{int}\ ss7\_asp\_peer\_del\_host(\textcolor{keyword}{struct}\ osmo\_ss7\_asp\_peer\ *peer,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *host);}
\DoxyCodeLine{00028\ }
\DoxyCodeLine{00029\ \textcolor{keywordtype}{bool}\ ss7\_asp\_peer\_match\_host(\textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_asp\_peer\ *peer,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *host,\ \textcolor{keywordtype}{bool}\ host\_is\_v6);}
\DoxyCodeLine{00030\ \textcolor{keywordtype}{int}\ ss7\_asp\_peer\_find\_host(\textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_asp\_peer\ *peer,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *host);}

\end{DoxyCode}
