\doxysection{sccp\+\_\+helpers.\+h}
\label{sccp__helpers_8h_source}\index{include/osmocom/sigtran/sccp\_helpers.h@{include/osmocom/sigtran/sccp\_helpers.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\ <unistd.h>}}
\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ <osmocom/core/msgb.h>}}
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ <osmocom/sigtran/sccp\_sap.h>}}
\DoxyCodeLine{00006\ }
\DoxyCodeLine{00007\ \textcolor{keywordtype}{int}\ osmo\_sccp\_tx\_unitdata(\textcolor{keyword}{struct}\ osmo\_sccp\_user\ *scu,}
\DoxyCodeLine{00008\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *calling\_addr,}
\DoxyCodeLine{00009\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *called\_addr,}
\DoxyCodeLine{00010\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ uint8\_t\ *data,\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ len);}
\DoxyCodeLine{00011\ }
\DoxyCodeLine{00012\ \textcolor{keywordtype}{int}\ osmo\_sccp\_tx\_unitdata\_msg(\textcolor{keyword}{struct}\ osmo\_sccp\_user\ *scu,}
\DoxyCodeLine{00013\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *calling\_addr,}
\DoxyCodeLine{00014\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *called\_addr,}
\DoxyCodeLine{00015\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}\ msgb\ *msg);}
\DoxyCodeLine{00016\ }
\DoxyCodeLine{00017\ \textcolor{keywordtype}{void}\ osmo\_sccp\_make\_addr\_pc\_ssn(\textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *addr,}
\DoxyCodeLine{00018\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ pc,\ uint32\_t\ ssn);}
\DoxyCodeLine{00019\ }
\DoxyCodeLine{00020\ \textcolor{keywordtype}{void}\ osmo\_sccp\_addr\_set\_ssn(\textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *addr,\ uint32\_t\ ssn);}
\DoxyCodeLine{00021\ }
\DoxyCodeLine{00022\ \textcolor{keywordtype}{int}\ osmo\_sccp\_tx\_unitdata\_ranap(\textcolor{keyword}{struct}\ osmo\_sccp\_user\ *scu,}
\DoxyCodeLine{00023\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ src\_point\_code,}
\DoxyCodeLine{00024\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ dst\_point\_code,}
\DoxyCodeLine{00025\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ uint8\_t\ *data,\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ len);}
\DoxyCodeLine{00026\ }
\DoxyCodeLine{00027\ \textcolor{keywordtype}{int}\ osmo\_sccp\_tx\_conn\_req(\textcolor{keyword}{struct}\ osmo\_sccp\_user\ *scu,\ uint32\_t\ conn\_id,}
\DoxyCodeLine{00028\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *calling\_addr,}
\DoxyCodeLine{00029\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *called\_addr,}
\DoxyCodeLine{00030\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ uint8\_t\ *data,\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ len);}
\DoxyCodeLine{00031\ }
\DoxyCodeLine{00032\ \textcolor{keywordtype}{int}\ osmo\_sccp\_tx\_conn\_req\_msg(\textcolor{keyword}{struct}\ osmo\_sccp\_user\ *scu,\ uint32\_t\ conn\_id,}
\DoxyCodeLine{00033\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *calling\_addr,}
\DoxyCodeLine{00034\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *called\_addr,}
\DoxyCodeLine{00035\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}\ msgb\ *msg);}
\DoxyCodeLine{00036\ }
\DoxyCodeLine{00037\ \textcolor{keywordtype}{int}\ osmo\_sccp\_tx\_data(\textcolor{keyword}{struct}\ osmo\_sccp\_user\ *scu,\ uint32\_t\ conn\_id,}
\DoxyCodeLine{00038\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ uint8\_t\ *data,\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ len);}
\DoxyCodeLine{00039\ }
\DoxyCodeLine{00040\ \textcolor{keywordtype}{int}\ osmo\_sccp\_tx\_data\_msg(\textcolor{keyword}{struct}\ osmo\_sccp\_user\ *scu,\ uint32\_t\ conn\_id,}
\DoxyCodeLine{00041\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}\ msgb\ *msg);}
\DoxyCodeLine{00042\ }
\DoxyCodeLine{00043\ \textcolor{keywordtype}{int}\ osmo\_sccp\_tx\_disconn(\textcolor{keyword}{struct}\ osmo\_sccp\_user\ *scu,\ uint32\_t\ conn\_id,}
\DoxyCodeLine{00044\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *resp\_addr,}
\DoxyCodeLine{00045\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ cause);}
\DoxyCodeLine{00046\ }
\DoxyCodeLine{00047\ \textcolor{keywordtype}{int}\ osmo\_sccp\_tx\_disconn\_data(\textcolor{keyword}{struct}\ osmo\_sccp\_user\ *scu,\ uint32\_t\ conn\_id,}
\DoxyCodeLine{00048\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *resp\_addr,}
\DoxyCodeLine{00049\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ cause,\ \textcolor{keyword}{const}\ uint8\_t\ *data,\ \textcolor{keywordtype}{size\_t}\ len);}
\DoxyCodeLine{00050\ }
\DoxyCodeLine{00051\ \textcolor{keywordtype}{int}\ osmo\_sccp\_tx\_conn\_resp\_msg(\textcolor{keyword}{struct}\ osmo\_sccp\_user\ *scu,\ uint32\_t\ conn\_id,}
\DoxyCodeLine{00052\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *resp\_addr,}
\DoxyCodeLine{00053\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}\ msgb\ *msg);}
\DoxyCodeLine{00054\ }
\DoxyCodeLine{00055\ \textcolor{keywordtype}{int}\ osmo\_sccp\_tx\_conn\_resp(\textcolor{keyword}{struct}\ osmo\_sccp\_user\ *scu,\ uint32\_t\ conn\_id,}
\DoxyCodeLine{00056\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *resp\_addr,}
\DoxyCodeLine{00057\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ uint8\_t\ *data,\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ len);}
\DoxyCodeLine{00058\ }
\DoxyCodeLine{00059\ \textcolor{keywordtype}{char}\ *osmo\_sccp\_gt\_dump(\textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_gt\ *gt);}
\DoxyCodeLine{00060\ \textcolor{keywordtype}{char}\ *osmo\_sccp\_addr\_dump(\textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *addr);}
\DoxyCodeLine{00061\ }
\DoxyCodeLine{00062\ \textcolor{keywordtype}{int}\ osmo\_sccp\_inst\_addr\_to\_str\_buf(\textcolor{keywordtype}{char}\ *buf,\ \textcolor{keywordtype}{size\_t}\ buf\_len,\ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_instance\ *sccp,}
\DoxyCodeLine{00063\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *addr);}
\DoxyCodeLine{00064\ \textcolor{keywordtype}{char}\ *osmo\_sccp\_inst\_addr\_to\_str\_c(\textcolor{keywordtype}{void}\ *ctx,\ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_instance\ *sccp,}
\DoxyCodeLine{00065\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *addr);}
\DoxyCodeLine{00066\ \textcolor{keywordtype}{int}\ osmo\_sccp\_addr\_to\_str\_buf(\textcolor{keywordtype}{char}\ *buf,\ \textcolor{keywordtype}{size\_t}\ buf\_len,\ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_instance\ *ss7,}
\DoxyCodeLine{00067\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *addr);}
\DoxyCodeLine{00068\ \textcolor{keywordtype}{char}\ *osmo\_sccp\_addr\_to\_str\_c(\textcolor{keywordtype}{void}\ *ctx,\ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_instance\ *ss7,\ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *addr);}
\DoxyCodeLine{00069\ }
\DoxyCodeLine{00070\ \textcolor{keywordtype}{int}\ osmo\_sccp\_addr\_to\_id\_buf(\textcolor{keywordtype}{char}\ *buf,\ \textcolor{keywordtype}{size\_t}\ buf\_len,\ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_instance\ *ss7,}
\DoxyCodeLine{00071\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *addr);}
\DoxyCodeLine{00072\ \textcolor{keywordtype}{char}\ *osmo\_sccp\_addr\_to\_id\_c(\textcolor{keywordtype}{void}\ *ctx,\ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_instance\ *ss7,\ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *addr);}
\DoxyCodeLine{00073\ }
\DoxyCodeLine{00074\ \textcolor{keywordtype}{bool}\ osmo\_sccp\_conn\_id\_exists(\textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_instance\ *inst,\ uint32\_t\ \textcolor{keywordtype}{id});}
\DoxyCodeLine{00075\ }
\DoxyCodeLine{00076\ \textcolor{keywordtype}{char}\ *osmo\_sccp\_addr\_name(\textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_instance\ *ss7,\ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *addr);}
\DoxyCodeLine{00077\ \textcolor{keywordtype}{char}\ *osmo\_sccp\_inst\_addr\_name(\textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_instance\ *sccp,\ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *addr);}

\end{DoxyCode}
