\doxysection{ss7\+\_\+user.\+h}
\label{ss7__user_8h_source}\index{src/ss7\_user.h@{src/ss7\_user.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 <stdint.h>}}
\DoxyCodeLine{4 \textcolor{preprocessor}{\#include <unistd.h>}}
\DoxyCodeLine{5 \textcolor{preprocessor}{\#include <osmocom/core/prim.h>}}
\DoxyCodeLine{6 \textcolor{preprocessor}{\#include <osmocom/sigtran/protocol/mtp.h>}}
\DoxyCodeLine{7 \textcolor{preprocessor}{\#include <osmocom/sigtran/mtp\_sap.h>}}
\DoxyCodeLine{8 }
\DoxyCodeLine{9 \textcolor{comment}{/***********************************************************************}}
\DoxyCodeLine{10 \textcolor{comment}{ * SS7 User (MTP SAP)}}
\DoxyCodeLine{11 \textcolor{comment}{ ***********************************************************************/}}
\DoxyCodeLine{12 }
\DoxyCodeLine{13 \textcolor{keyword}{struct }osmo\_ss7\_instance;}
\DoxyCodeLine{14 }
\DoxyCodeLine{15 \textcolor{keyword}{struct }osmo\_ss7\_user \{}
\DoxyCodeLine{16         \textcolor{comment}{/* pointer back to SS7 instance */}}
\DoxyCodeLine{17         \textcolor{keyword}{struct }osmo\_ss7\_instance *inst;}
\DoxyCodeLine{18         \textcolor{comment}{/* name of the user */}}
\DoxyCodeLine{19         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name;}
\DoxyCodeLine{20         \textcolor{comment}{/* primitive call-\/back for incoming MTP primitives */}}
\DoxyCodeLine{21         osmo\_prim\_cb prim\_cb;}
\DoxyCodeLine{22         \textcolor{comment}{/* private data */}}
\DoxyCodeLine{23         \textcolor{keywordtype}{void} *priv;}
\DoxyCodeLine{24 \};}
\DoxyCodeLine{25 }
\DoxyCodeLine{26 \textcolor{keywordtype}{void} ss7\_user\_unregister\_all(\textcolor{keyword}{struct} osmo\_ss7\_user *user);}
\DoxyCodeLine{27 \textcolor{keywordtype}{int} ss7\_user\_mtp\_sap\_prim\_up(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_user *osu, \textcolor{keyword}{struct} osmo\_mtp\_prim *omp);}
\DoxyCodeLine{28 }
\DoxyCodeLine{29 \textcolor{keyword}{struct }osmo\_mtp\_prim *mtp\_prim\_xfer\_ind\_alloc(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_mtp\_transfer\_param *param,}
\DoxyCodeLine{30                                               \textcolor{keyword}{const} uint8\_t *user\_data, \textcolor{keywordtype}{size\_t} user\_data\_len);}
\DoxyCodeLine{31 }
\DoxyCodeLine{32 \textcolor{keyword}{struct }osmo\_mtp\_prim *mtp\_prim\_status\_ind\_alloc(uint32\_t dpc,}
\DoxyCodeLine{33                                                 \textcolor{keyword}{enum} mtp\_unavail\_cause cause,}
\DoxyCodeLine{34                                                 \textcolor{keywordtype}{bool} cong\_level\_present,}
\DoxyCodeLine{35                                                 uint8\_t cong\_level);}
\DoxyCodeLine{36 \textcolor{keywordtype}{void} mtp\_resume\_ind\_up\_to\_all\_users(\textcolor{keyword}{struct} osmo\_ss7\_instance *s7i, uint32\_t pc);}
\DoxyCodeLine{37 \textcolor{keywordtype}{void} mtp\_pause\_ind\_up\_to\_all\_users(\textcolor{keyword}{struct} osmo\_ss7\_instance *s7i, uint32\_t pc);}
\DoxyCodeLine{38 \textcolor{keywordtype}{void} mtp\_status\_ind\_up\_to\_all\_users(\textcolor{keyword}{struct} osmo\_ss7\_instance *s7i,}
\DoxyCodeLine{39                                     uint32\_t dpc, \textcolor{keyword}{enum} mtp\_unavail\_cause cause,}
\DoxyCodeLine{40                                     \textcolor{keywordtype}{bool} cong\_level\_present, uint8\_t cong\_level);}
\DoxyCodeLine{41 }
\DoxyCodeLine{42 }
\DoxyCodeLine{43 \textcolor{preprocessor}{\#define \_LOGPSS7U(osu, subsys, level, fmt, args ...) \(\backslash\)}}
\DoxyCodeLine{44 \textcolor{preprocessor}{        \_LOGSS7((osu)-\/>inst, subsys, level, "{}ss7\_user(\%s) "{}} fmt, osu-\/>name, \#\# args)}
\DoxyCodeLine{45 \textcolor{preprocessor}{\#define LOGPSS7U(osu, level, fmt, args ...) \(\backslash\)}}
\DoxyCodeLine{46 \textcolor{preprocessor}{        \_LOGPSS7U(osu, DLSS7, level, fmt, \#\# args)}}

\end{DoxyCode}
