\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{1 \textcolor{preprocessor}{\#pragma once}}
\DoxyCodeLine{2 }
\DoxyCodeLine{3 \textcolor{preprocessor}{\#include <unistd.h>}}
\DoxyCodeLine{4 \textcolor{preprocessor}{\#include <osmocom/core/msgb.h>}}
\DoxyCodeLine{5 \textcolor{preprocessor}{\#include <osmocom/sigtran/sccp\_sap.h>}}
\DoxyCodeLine{6 }
\DoxyCodeLine{7 \textcolor{keywordtype}{int} osmo\_sccp\_tx\_unitdata(\textcolor{keyword}{struct} osmo\_sccp\_user *scu,}
\DoxyCodeLine{8                           \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *calling\_addr,}
\DoxyCodeLine{9                           \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *called\_addr,}
\DoxyCodeLine{10                           \textcolor{keyword}{const} uint8\_t *data, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} len);}
\DoxyCodeLine{11 }
\DoxyCodeLine{12 \textcolor{keywordtype}{int} osmo\_sccp\_tx\_unitdata\_msg(\textcolor{keyword}{struct} osmo\_sccp\_user *scu,}
\DoxyCodeLine{13                               \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *calling\_addr,}
\DoxyCodeLine{14                               \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *called\_addr,}
\DoxyCodeLine{15                               \textcolor{keyword}{struct} msgb *msg);}
\DoxyCodeLine{16 }
\DoxyCodeLine{17 \textcolor{keywordtype}{void} osmo\_sccp\_make\_addr\_pc\_ssn(\textcolor{keyword}{struct} osmo\_sccp\_addr *addr,}
\DoxyCodeLine{18                                 uint32\_t pc, uint32\_t ssn);}
\DoxyCodeLine{19 }
\DoxyCodeLine{20 \textcolor{keywordtype}{void} osmo\_sccp\_addr\_set\_ssn(\textcolor{keyword}{struct} osmo\_sccp\_addr *addr, uint32\_t ssn);}
\DoxyCodeLine{21 }
\DoxyCodeLine{22 \textcolor{keywordtype}{int} osmo\_sccp\_tx\_unitdata\_ranap(\textcolor{keyword}{struct} osmo\_sccp\_user *scu,}
\DoxyCodeLine{23                                 uint32\_t src\_point\_code,}
\DoxyCodeLine{24                                 uint32\_t dst\_point\_code,}
\DoxyCodeLine{25                                 \textcolor{keyword}{const} uint8\_t *data, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} len);}
\DoxyCodeLine{26 }
\DoxyCodeLine{27 \textcolor{keywordtype}{int} osmo\_sccp\_tx\_conn\_req(\textcolor{keyword}{struct} osmo\_sccp\_user *scu, uint32\_t conn\_id,}
\DoxyCodeLine{28                           \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *calling\_addr,}
\DoxyCodeLine{29                           \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *called\_addr,}
\DoxyCodeLine{30                           \textcolor{keyword}{const} uint8\_t *data, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} len);}
\DoxyCodeLine{31 }
\DoxyCodeLine{32 \textcolor{keywordtype}{int} osmo\_sccp\_tx\_conn\_req\_msg(\textcolor{keyword}{struct} osmo\_sccp\_user *scu, uint32\_t conn\_id,}
\DoxyCodeLine{33                               \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *calling\_addr,}
\DoxyCodeLine{34                               \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *called\_addr,}
\DoxyCodeLine{35                               \textcolor{keyword}{struct} msgb *msg);}
\DoxyCodeLine{36 }
\DoxyCodeLine{37 \textcolor{keywordtype}{int} osmo\_sccp\_tx\_data(\textcolor{keyword}{struct} osmo\_sccp\_user *scu, uint32\_t conn\_id,}
\DoxyCodeLine{38                       \textcolor{keyword}{const} uint8\_t *data, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} len);}
\DoxyCodeLine{39 }
\DoxyCodeLine{40 \textcolor{keywordtype}{int} osmo\_sccp\_tx\_data\_msg(\textcolor{keyword}{struct} osmo\_sccp\_user *scu, uint32\_t conn\_id,}
\DoxyCodeLine{41                           \textcolor{keyword}{struct} msgb *msg);}
\DoxyCodeLine{42 }
\DoxyCodeLine{43 \textcolor{keywordtype}{int} osmo\_sccp\_tx\_disconn(\textcolor{keyword}{struct} osmo\_sccp\_user *scu, uint32\_t conn\_id,}
\DoxyCodeLine{44                          \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *resp\_addr,}
\DoxyCodeLine{45                          uint32\_t cause);}
\DoxyCodeLine{46 }
\DoxyCodeLine{47 \textcolor{keywordtype}{int} osmo\_sccp\_tx\_disconn\_data(\textcolor{keyword}{struct} osmo\_sccp\_user *scu, uint32\_t conn\_id,}
\DoxyCodeLine{48                                 \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *resp\_addr,}
\DoxyCodeLine{49                                 uint32\_t cause, \textcolor{keyword}{const} uint8\_t *data, \textcolor{keywordtype}{size\_t} len);}
\DoxyCodeLine{50 }
\DoxyCodeLine{51 \textcolor{keywordtype}{int} osmo\_sccp\_tx\_conn\_resp\_msg(\textcolor{keyword}{struct} osmo\_sccp\_user *scu, uint32\_t conn\_id,}
\DoxyCodeLine{52                                 \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *resp\_addr,}
\DoxyCodeLine{53                                 \textcolor{keyword}{struct} msgb *msg);}
\DoxyCodeLine{54 }
\DoxyCodeLine{55 \textcolor{keywordtype}{int} osmo\_sccp\_tx\_conn\_resp(\textcolor{keyword}{struct} osmo\_sccp\_user *scu, uint32\_t conn\_id,}
\DoxyCodeLine{56                            \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *resp\_addr,}
\DoxyCodeLine{57                            \textcolor{keyword}{const} uint8\_t *data, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} len);}
\DoxyCodeLine{58 }
\DoxyCodeLine{59 \textcolor{keywordtype}{char} *osmo\_sccp\_gt\_dump(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_gt *gt);}
\DoxyCodeLine{60 \textcolor{keywordtype}{char} *osmo\_sccp\_addr\_dump(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *addr);}
\DoxyCodeLine{61 }
\DoxyCodeLine{62 \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{63                                    \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *addr);}
\DoxyCodeLine{64 \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{65                                    \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *addr);}
\DoxyCodeLine{66 \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{67                               \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *addr);}
\DoxyCodeLine{68 \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{69 }
\DoxyCodeLine{70 \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{71                               \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *addr);}
\DoxyCodeLine{72 \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{73 }
\DoxyCodeLine{74 \textcolor{keywordtype}{bool} osmo\_sccp\_conn\_id\_exists(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_instance *inst, uint32\_t \textcolor{keywordtype}{id});}
\DoxyCodeLine{75 }
\DoxyCodeLine{76 \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{77 \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}
