\doxysection{include/osmocom/sigtran/mtp\+\_\+sap.h File Reference}
\label{mtp__sap_8h}\index{include/osmocom/sigtran/mtp\_sap.h@{include/osmocom/sigtran/mtp\_sap.h}}
{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/prim.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/sigtran/sigtran\+\_\+sap.\+h$>$}\newline
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ osmo\+\_\+mtp\+\_\+transfer\+\_\+param}
\item 
struct \textbf{ osmo\+\_\+mtp\+\_\+pause\+\_\+param}
\item 
struct \textbf{ osmo\+\_\+mtp\+\_\+resume\+\_\+param}
\item 
struct \textbf{ osmo\+\_\+mtp\+\_\+status\+\_\+param}
\item 
struct \textbf{ osmo\+\_\+mtp\+\_\+prim}
\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ MTP\+\_\+\+SIO}(service,  net\+\_\+ind)~((((net\+\_\+ind) \& 0x3) $<$$<$ 6) $\vert$ ((service) \& 0xF))
\item 
\#define \textbf{ msgb\+\_\+mtp\+\_\+prim}(msg)~((struct \textbf{ osmo\+\_\+mtp\+\_\+prim} $\ast$)(msg)-\/$>$l1h)
\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \textbf{ osmo\+\_\+mtp\+\_\+prim\+\_\+type} \{ \textbf{ OSMO\+\_\+\+MTP\+\_\+\+PRIM\+\_\+\+TRANSFER}
, \textbf{ OSMO\+\_\+\+MTP\+\_\+\+PRIM\+\_\+\+PAUSE}
, \textbf{ OSMO\+\_\+\+MTP\+\_\+\+PRIM\+\_\+\+RESUME}
, \textbf{ OSMO\+\_\+\+MTP\+\_\+\+PRIM\+\_\+\+STATUS}
 \}
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static const char $\ast$ \textbf{ osmo\+\_\+mtp\+\_\+prim\+\_\+type\+\_\+name} (enum \textbf{ osmo\+\_\+mtp\+\_\+prim\+\_\+type} val)
\item 
char $\ast$ \textbf{ osmo\+\_\+mtp\+\_\+prim\+\_\+name} (const struct osmo\+\_\+prim\+\_\+hdr $\ast$oph)
\item 
struct \textbf{ osmo\+\_\+mtp\+\_\+prim} $\ast$ \textbf{ osmo\+\_\+mtp\+\_\+prim\+\_\+xfer\+\_\+req\+\_\+prepend} (const struct \textbf{ osmo\+\_\+mtp\+\_\+transfer\+\_\+param} $\ast$param, struct msgb $\ast$msg)
\begin{DoxyCompactList}\small\item\em Wrap MTP payload into an MTP-\/\+TRANSFER.\+req primitive. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
const struct value\+\_\+string \textbf{ osmo\+\_\+mtp\+\_\+prim\+\_\+type\+\_\+names} [$\,$]
\end{DoxyCompactItemize}


\doxysubsection{Macro Definition Documentation}
\mbox{\label{mtp__sap_8h_a463c0a286464fef0cdeb0e29b3c1cf18}} 
\index{mtp\_sap.h@{mtp\_sap.h}!msgb\_mtp\_prim@{msgb\_mtp\_prim}}
\index{msgb\_mtp\_prim@{msgb\_mtp\_prim}!mtp\_sap.h@{mtp\_sap.h}}
\doxysubsubsection{msgb\_mtp\_prim}
{\footnotesize\ttfamily \#define msgb\+\_\+mtp\+\_\+prim(\begin{DoxyParamCaption}\item[{}]{msg }\end{DoxyParamCaption})~((struct \textbf{ osmo\+\_\+mtp\+\_\+prim} $\ast$)(msg)-\/$>$l1h)}

\mbox{\label{mtp__sap_8h_a955b021ad7245dc7ada3779bfd1c6d62}} 
\index{mtp\_sap.h@{mtp\_sap.h}!MTP\_SIO@{MTP\_SIO}}
\index{MTP\_SIO@{MTP\_SIO}!mtp\_sap.h@{mtp\_sap.h}}
\doxysubsubsection{MTP\_SIO}
{\footnotesize\ttfamily \#define MTP\+\_\+\+SIO(\begin{DoxyParamCaption}\item[{}]{service,  }\item[{}]{net\+\_\+ind }\end{DoxyParamCaption})~((((net\+\_\+ind) \& 0x3) $<$$<$ 6) $\vert$ ((service) \& 0xF))}



\doxysubsection{Enumeration Type Documentation}
\mbox{\label{mtp__sap_8h_ac292c93d961c40235b9771772a327f80}} 
\index{mtp\_sap.h@{mtp\_sap.h}!osmo\_mtp\_prim\_type@{osmo\_mtp\_prim\_type}}
\index{osmo\_mtp\_prim\_type@{osmo\_mtp\_prim\_type}!mtp\_sap.h@{mtp\_sap.h}}
\doxysubsubsection{osmo\_mtp\_prim\_type}
{\footnotesize\ttfamily enum \textbf{ osmo\+\_\+mtp\+\_\+prim\+\_\+type}}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_MTP\_PRIM\_TRANSFER@{OSMO\_MTP\_PRIM\_TRANSFER}!mtp\_sap.h@{mtp\_sap.h}}\index{mtp\_sap.h@{mtp\_sap.h}!OSMO\_MTP\_PRIM\_TRANSFER@{OSMO\_MTP\_PRIM\_TRANSFER}}}\mbox{\label{mtp__sap_8h_ac292c93d961c40235b9771772a327f80a85539b3d6cb98c30acb29daf4d5e1acc}} 
OSMO\+\_\+\+MTP\+\_\+\+PRIM\+\_\+\+TRANSFER&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_MTP\_PRIM\_PAUSE@{OSMO\_MTP\_PRIM\_PAUSE}!mtp\_sap.h@{mtp\_sap.h}}\index{mtp\_sap.h@{mtp\_sap.h}!OSMO\_MTP\_PRIM\_PAUSE@{OSMO\_MTP\_PRIM\_PAUSE}}}\mbox{\label{mtp__sap_8h_ac292c93d961c40235b9771772a327f80a93bb547c492a35dac5a47396a920cd65}} 
OSMO\+\_\+\+MTP\+\_\+\+PRIM\+\_\+\+PAUSE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_MTP\_PRIM\_RESUME@{OSMO\_MTP\_PRIM\_RESUME}!mtp\_sap.h@{mtp\_sap.h}}\index{mtp\_sap.h@{mtp\_sap.h}!OSMO\_MTP\_PRIM\_RESUME@{OSMO\_MTP\_PRIM\_RESUME}}}\mbox{\label{mtp__sap_8h_ac292c93d961c40235b9771772a327f80a7ba9a90fbdc8edcf206aeae92e56ac1c}} 
OSMO\+\_\+\+MTP\+\_\+\+PRIM\+\_\+\+RESUME&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_MTP\_PRIM\_STATUS@{OSMO\_MTP\_PRIM\_STATUS}!mtp\_sap.h@{mtp\_sap.h}}\index{mtp\_sap.h@{mtp\_sap.h}!OSMO\_MTP\_PRIM\_STATUS@{OSMO\_MTP\_PRIM\_STATUS}}}\mbox{\label{mtp__sap_8h_ac292c93d961c40235b9771772a327f80af3c2b7a95643d9f6b408c2b305b88307}} 
OSMO\+\_\+\+MTP\+\_\+\+PRIM\+\_\+\+STATUS&\\
\hline

\end{DoxyEnumFields}


\doxysubsection{Function Documentation}
\mbox{\label{mtp__sap_8h_addd7861df51bb5d3e3ae90fafb258aff}} 
\index{mtp\_sap.h@{mtp\_sap.h}!osmo\_mtp\_prim\_name@{osmo\_mtp\_prim\_name}}
\index{osmo\_mtp\_prim\_name@{osmo\_mtp\_prim\_name}!mtp\_sap.h@{mtp\_sap.h}}
\doxysubsubsection{osmo\_mtp\_prim\_name()}
{\footnotesize\ttfamily char $\ast$ osmo\+\_\+mtp\+\_\+prim\+\_\+name (\begin{DoxyParamCaption}\item[{const struct osmo\+\_\+prim\+\_\+hdr $\ast$}]{oph }\end{DoxyParamCaption})}



References \textbf{ mtp\+\_\+prim\+\_\+hdr\+\_\+name\+\_\+buf()}, and \textbf{ prim\+\_\+name\+\_\+buf}.



Referenced by \textbf{ ss7\+\_\+user\+\_\+mtp\+\_\+sap\+\_\+prim\+\_\+up()}.

\mbox{\label{mtp__sap_8h_a59744a828f915a9ffcd6cda2e77d5e0b}} 
\index{mtp\_sap.h@{mtp\_sap.h}!osmo\_mtp\_prim\_type\_name@{osmo\_mtp\_prim\_type\_name}}
\index{osmo\_mtp\_prim\_type\_name@{osmo\_mtp\_prim\_type\_name}!mtp\_sap.h@{mtp\_sap.h}}
\doxysubsubsection{osmo\_mtp\_prim\_type\_name()}
{\footnotesize\ttfamily static const char $\ast$ osmo\+\_\+mtp\+\_\+prim\+\_\+type\+\_\+name (\begin{DoxyParamCaption}\item[{enum \textbf{ osmo\+\_\+mtp\+\_\+prim\+\_\+type}}]{val }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



References \textbf{ osmo\+\_\+mtp\+\_\+prim\+\_\+type\+\_\+names}.



Referenced by \textbf{ mtp\+\_\+prim\+\_\+hdr\+\_\+name\+\_\+buf()}.

\mbox{\label{mtp__sap_8h_a184037c3586c341cab191f6759ac9ebe}} 
\index{mtp\_sap.h@{mtp\_sap.h}!osmo\_mtp\_prim\_xfer\_req\_prepend@{osmo\_mtp\_prim\_xfer\_req\_prepend}}
\index{osmo\_mtp\_prim\_xfer\_req\_prepend@{osmo\_mtp\_prim\_xfer\_req\_prepend}!mtp\_sap.h@{mtp\_sap.h}}
\doxysubsubsection{osmo\_mtp\_prim\_xfer\_req\_prepend()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+mtp\+\_\+prim} $\ast$ osmo\+\_\+mtp\+\_\+prim\+\_\+xfer\+\_\+req\+\_\+prepend (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+mtp\+\_\+transfer\+\_\+param} $\ast$}]{param,  }\item[{struct msgb $\ast$}]{msg }\end{DoxyParamCaption})}



Wrap MTP payload into an MTP-\/\+TRANSFER.\+req primitive. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em param} & MTP-\/\+TRANSFER.\+req params to copy to the primitive (Optional, can be NULL) \\
\hline
\mbox{\texttt{ in}}  & {\em msg} & msgb containing MTP payload and where primitive will be prepended \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
return MTP-\/\+TRANSFER.\+req prepended to msgb 
\end{DoxyReturn}


References \textbf{ MTP\+\_\+\+SAP\+\_\+\+USER}, \textbf{ osmo\+\_\+mtp\+\_\+prim\+::oph}, \textbf{ OSMO\+\_\+\+MTP\+\_\+\+PRIM\+\_\+\+TRANSFER}, \textbf{ osmo\+\_\+mtp\+\_\+prim\+::transfer}, and \textbf{ osmo\+\_\+mtp\+\_\+prim\+::u}.



Referenced by \textbf{ sua2sccp\+\_\+tx\+\_\+m3ua()}.



\doxysubsection{Variable Documentation}
\mbox{\label{mtp__sap_8h_a0df77e6fe70d2f7b17efdbcbf2de2c54}} 
\index{mtp\_sap.h@{mtp\_sap.h}!osmo\_mtp\_prim\_type\_names@{osmo\_mtp\_prim\_type\_names}}
\index{osmo\_mtp\_prim\_type\_names@{osmo\_mtp\_prim\_type\_names}!mtp\_sap.h@{mtp\_sap.h}}
\doxysubsubsection{osmo\_mtp\_prim\_type\_names}
{\footnotesize\ttfamily const struct value\+\_\+string osmo\+\_\+mtp\+\_\+prim\+\_\+type\+\_\+names[$\,$]\hspace{0.3cm}{\ttfamily [extern]}}



Referenced by \textbf{ osmo\+\_\+mtp\+\_\+prim\+\_\+type\+\_\+name()}.

