\doxysection{src/gb/gprs\+\_\+ns2\+\_\+message.c File Reference}
\label{gprs__ns2__message_8c}\index{src/gb/gprs\_ns2\_message.c@{src/gb/gprs\_ns2\_message.c}}


NS-\/over-\/\+FR-\/over-\/\+GRE implementation.  


{\ttfamily \#include $<$errno.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/byteswap.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/rate\+\_\+ctr.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/stat\+\_\+item.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/stats.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/tlv.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gprs/gprs\+\_\+msgb.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gprs/gprs\+\_\+ns2.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gprs/protocol/gsm\+\_\+08\+\_\+16.\+h$>$}\newline
{\ttfamily \#include \char`\"{}gprs\+\_\+ns2\+\_\+internal.\+h\char`\"{}}\newline
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ ERR\+\_\+\+IF\+\_\+\+NSVC\+\_\+\+USES\+\_\+\+SNS}(nsvc,  reason)
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static int \textbf{ ns2\+\_\+validate\+\_\+reset} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, struct \textbf{ msgb} $\ast$\textbf{ msg}, struct \textbf{ tlv\+\_\+parsed} $\ast$tp, uint8\+\_\+t $\ast$\textbf{ cause})
\item 
static int \textbf{ ns2\+\_\+validate\+\_\+reset\+\_\+ack} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, struct \textbf{ msgb} $\ast$\textbf{ msg}, struct \textbf{ tlv\+\_\+parsed} $\ast$tp, uint8\+\_\+t $\ast$\textbf{ cause})
\item 
static int \textbf{ ns2\+\_\+validate\+\_\+block} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, struct \textbf{ msgb} $\ast$\textbf{ msg}, struct \textbf{ tlv\+\_\+parsed} $\ast$tp, uint8\+\_\+t $\ast$\textbf{ cause})
\item 
static int \textbf{ ns2\+\_\+validate\+\_\+block\+\_\+ack} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, struct \textbf{ msgb} $\ast$\textbf{ msg}, struct \textbf{ tlv\+\_\+parsed} $\ast$tp, uint8\+\_\+t $\ast$\textbf{ cause})
\item 
static int \textbf{ ns2\+\_\+validate\+\_\+status} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, struct \textbf{ msgb} $\ast$\textbf{ msg}, struct \textbf{ tlv\+\_\+parsed} $\ast$tp, uint8\+\_\+t $\ast$\textbf{ cause})
\item 
int \textbf{ ns2\+\_\+validate} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, uint8\+\_\+t \textbf{ pdu\+\_\+type}, struct \textbf{ msgb} $\ast$\textbf{ msg}, struct \textbf{ tlv\+\_\+parsed} $\ast$tp, uint8\+\_\+t $\ast$\textbf{ cause})
\item 
static int \textbf{ ns\+\_\+vc\+\_\+tx} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, struct \textbf{ msgb} $\ast$\textbf{ msg})
\item 
static int \textbf{ ns2\+\_\+tx\+\_\+simple} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, uint8\+\_\+t \textbf{ pdu\+\_\+type})
\item 
int \textbf{ ns2\+\_\+tx\+\_\+block} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, uint8\+\_\+t \textbf{ cause}, uint16\+\_\+t $\ast$nsvci)
\begin{DoxyCompactList}\small\item\em Transmit a NS-\/\+BLOCK on a given NS-\/\+VC. \end{DoxyCompactList}\item 
int \textbf{ ns2\+\_\+tx\+\_\+block\+\_\+ack} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, uint16\+\_\+t $\ast$nsvci)
\begin{DoxyCompactList}\small\item\em Transmit a NS-\/\+BLOCK-\/\+ACK on a given NS-\/\+VC. \end{DoxyCompactList}\item 
int \textbf{ ns2\+\_\+tx\+\_\+reset} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, uint8\+\_\+t \textbf{ cause})
\begin{DoxyCompactList}\small\item\em Transmit a NS-\/\+RESET on a given NS-\/\+VC. \end{DoxyCompactList}\item 
int \textbf{ ns2\+\_\+tx\+\_\+reset\+\_\+ack} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc)
\begin{DoxyCompactList}\small\item\em Transmit a NS-\/\+RESET-\/\+ACK on a given NS-\/\+VC. \end{DoxyCompactList}\item 
int \textbf{ ns2\+\_\+tx\+\_\+unblock} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc)
\begin{DoxyCompactList}\small\item\em Transmit a NS-\/\+UNBLOCK on a given NS-\/\+VC. \end{DoxyCompactList}\item 
int \textbf{ ns2\+\_\+tx\+\_\+unblock\+\_\+ack} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc)
\begin{DoxyCompactList}\small\item\em Transmit a NS-\/\+UNBLOCK-\/\+ACK on a given NS-\/\+VC. \end{DoxyCompactList}\item 
int \textbf{ ns2\+\_\+tx\+\_\+alive} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc)
\begin{DoxyCompactList}\small\item\em Transmit a NS-\/\+ALIVE on a given NS-\/\+VC. \end{DoxyCompactList}\item 
int \textbf{ ns2\+\_\+tx\+\_\+alive\+\_\+ack} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc)
\begin{DoxyCompactList}\small\item\em Transmit a NS-\/\+ALIVE-\/\+ACK on a given NS-\/\+VC. \end{DoxyCompactList}\item 
int \textbf{ ns2\+\_\+tx\+\_\+unit\+\_\+data} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, uint16\+\_\+t \textbf{ bvci}, uint8\+\_\+t sducontrol, struct \textbf{ msgb} $\ast$\textbf{ msg})
\begin{DoxyCompactList}\small\item\em Transmit NS-\/\+UNITDATA on a given NS-\/\+VC. \end{DoxyCompactList}\item 
int \textbf{ ns2\+\_\+tx\+\_\+status} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, uint8\+\_\+t \textbf{ cause}, uint16\+\_\+t \textbf{ bvci}, struct \textbf{ msgb} $\ast$orig\+\_\+msg, uint16\+\_\+t $\ast$nsvci)
\begin{DoxyCompactList}\small\item\em Transmit a NS-\/\+STATUS on a given NS-\/\+VC. \end{DoxyCompactList}\item 
static int \textbf{ ns2\+\_\+tx\+\_\+sns\+\_\+procedure} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, enum \textbf{ ns\+\_\+pdu\+\_\+type} pdu, uint8\+\_\+t trans\+\_\+id, const struct \textbf{ gprs\+\_\+ns\+\_\+ie\+\_\+ip4\+\_\+elem} $\ast$ip4\+\_\+elems, unsigned int num\+\_\+ip4\+\_\+elems, const struct \textbf{ gprs\+\_\+ns\+\_\+ie\+\_\+ip6\+\_\+elem} $\ast$ip6\+\_\+elems, unsigned int num\+\_\+ip6\+\_\+elems)
\begin{DoxyCompactList}\small\item\em Encode + Transmit a SNS-\/\+ADD/\+SNS-\/\+CHANGE-\/\+WEIGHT as per Section 9.\+3.\+2/9.3.\+3. \end{DoxyCompactList}\item 
int \textbf{ ns2\+\_\+tx\+\_\+sns\+\_\+add} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, uint8\+\_\+t trans\+\_\+id, const struct \textbf{ gprs\+\_\+ns\+\_\+ie\+\_\+ip4\+\_\+elem} $\ast$ip4\+\_\+elems, unsigned int num\+\_\+ip4\+\_\+elems, const struct \textbf{ gprs\+\_\+ns\+\_\+ie\+\_\+ip6\+\_\+elem} $\ast$ip6\+\_\+elems, unsigned int num\+\_\+ip6\+\_\+elems)
\begin{DoxyCompactList}\small\item\em Encode + Transmit a SNS-\/\+ADD as per Section 9.\+3.\+2. \end{DoxyCompactList}\item 
int \textbf{ ns2\+\_\+tx\+\_\+sns\+\_\+change\+\_\+weight} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, uint8\+\_\+t trans\+\_\+id, const struct \textbf{ gprs\+\_\+ns\+\_\+ie\+\_\+ip4\+\_\+elem} $\ast$ip4\+\_\+elems, unsigned int num\+\_\+ip4\+\_\+elems, const struct \textbf{ gprs\+\_\+ns\+\_\+ie\+\_\+ip6\+\_\+elem} $\ast$ip6\+\_\+elems, unsigned int num\+\_\+ip6\+\_\+elems)
\begin{DoxyCompactList}\small\item\em Encode + Transmit a SNS-\/\+CHANGE-\/\+WEIGHT as per Section 9.\+3.\+3. \end{DoxyCompactList}\item 
int \textbf{ ns2\+\_\+tx\+\_\+sns\+\_\+del} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, uint8\+\_\+t trans\+\_\+id, const struct \textbf{ gprs\+\_\+ns\+\_\+ie\+\_\+ip4\+\_\+elem} $\ast$ip4\+\_\+elems, unsigned int num\+\_\+ip4\+\_\+elems, const struct \textbf{ gprs\+\_\+ns\+\_\+ie\+\_\+ip6\+\_\+elem} $\ast$ip6\+\_\+elems, unsigned int num\+\_\+ip6\+\_\+elems)
\begin{DoxyCompactList}\small\item\em Encode + Transmit a SNS-\/\+DEL as per Section 9.\+3.\+6. \end{DoxyCompactList}\item 
int \textbf{ ns2\+\_\+tx\+\_\+sns\+\_\+ack} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, uint8\+\_\+t trans\+\_\+id, uint8\+\_\+t $\ast$\textbf{ cause}, const struct \textbf{ gprs\+\_\+ns\+\_\+ie\+\_\+ip4\+\_\+elem} $\ast$ip4\+\_\+elems, unsigned int num\+\_\+ip4\+\_\+elems, const struct \textbf{ gprs\+\_\+ns\+\_\+ie\+\_\+ip6\+\_\+elem} $\ast$ip6\+\_\+elems, unsigned int num\+\_\+ip6\+\_\+elems)
\begin{DoxyCompactList}\small\item\em Encode + Transmit a SNS-\/\+ACK as per Section 9.\+3.\+1. \end{DoxyCompactList}\item 
int \textbf{ ns2\+\_\+tx\+\_\+sns\+\_\+config} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, bool end\+\_\+flag, const struct \textbf{ gprs\+\_\+ns\+\_\+ie\+\_\+ip4\+\_\+elem} $\ast$ip4\+\_\+elems, unsigned int num\+\_\+ip4\+\_\+elems, const struct \textbf{ gprs\+\_\+ns\+\_\+ie\+\_\+ip6\+\_\+elem} $\ast$ip6\+\_\+elems, unsigned int num\+\_\+ip6\+\_\+elems)
\begin{DoxyCompactList}\small\item\em Encode + Transmit a SNS-\/\+CONFIG as per Section 9.\+3.\+4. \end{DoxyCompactList}\item 
int \textbf{ ns2\+\_\+tx\+\_\+sns\+\_\+config\+\_\+ack} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, uint8\+\_\+t $\ast$\textbf{ cause})
\begin{DoxyCompactList}\small\item\em Encode + Transmit a SNS-\/\+CONFIG-\/\+ACK as per Section 9.\+3.\+5. \end{DoxyCompactList}\item 
int \textbf{ ns2\+\_\+tx\+\_\+sns\+\_\+size} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, bool reset\+\_\+flag, uint16\+\_\+t max\+\_\+nr\+\_\+nsvc, int ip4\+\_\+ep\+\_\+nr, int ip6\+\_\+ep\+\_\+nr)
\begin{DoxyCompactList}\small\item\em Encode + transmit a SNS-\/\+SIZE as per Section 9.\+3.\+7. \end{DoxyCompactList}\item 
int \textbf{ ns2\+\_\+tx\+\_\+sns\+\_\+size\+\_\+ack} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, uint8\+\_\+t $\ast$\textbf{ cause})
\begin{DoxyCompactList}\small\item\em Encode + Transmit a SNS-\/\+SIZE-\/\+ACK as per Section 9.\+3.\+8. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
NS-\/over-\/\+FR-\/over-\/\+GRE implementation. 

GPRS Networks Service (NS) messages on the Gb interface. 3GPP TS 08.\+16 version 8.\+0.\+1 Release 1999 / ETSI TS 101 299 V8.\+0.\+1 (2002-\/05) as well as its successor 3GPP TS 48.\+016 

\doxysubsection{Macro Definition Documentation}
\mbox{\label{gprs__ns2__message_8c_a82ed6e704b00af083bb3a9fa18b09e72}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ERR\_IF\_NSVC\_USES\_SNS@{ERR\_IF\_NSVC\_USES\_SNS}}
\index{ERR\_IF\_NSVC\_USES\_SNS@{ERR\_IF\_NSVC\_USES\_SNS}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ERR\_IF\_NSVC\_USES\_SNS}
{\footnotesize\ttfamily \#define ERR\+\_\+\+IF\+\_\+\+NSVC\+\_\+\+USES\+\_\+\+SNS(\begin{DoxyParamCaption}\item[{}]{nsvc,  }\item[{}]{reason }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{        \textcolor{keywordflow}{do} \{                                                                            \(\backslash\)}
\DoxyCodeLine{                if (!nsvc-\/>nse-\/>bss\_sns\_fi)                                             \(\backslash\)}
\DoxyCodeLine{                        break;                                                          \(\backslash\)}
\DoxyCodeLine{                LOGNSVC(nsvc, LOGL\_DEBUG, \textcolor{stringliteral}{"{}invalid packet \%s with SNS\(\backslash\)n"{}}, reason);      \(\backslash\)}
\DoxyCodeLine{        \} \textcolor{keywordflow}{while} (0)}

\end{DoxyCode}


\doxysubsection{Function Documentation}
\mbox{\label{gprs__ns2__message_8c_a4cb68b068f784c9bc04285ad54c4b970}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_tx\_alive@{ns2\_tx\_alive}}
\index{ns2\_tx\_alive@{ns2\_tx\_alive}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_tx\_alive()}
{\footnotesize\ttfamily int ns2\+\_\+tx\+\_\+alive (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc }\end{DoxyParamCaption})}



Transmit a NS-\/\+ALIVE on a given NS-\/\+VC. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsvc} & NS-\/\+VC on which the NS-\/\+ALIVE is to be transmitted \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 in case of success 
\end{DoxyReturn}


References \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSE}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSVC}, \textbf{ log\+\_\+set\+\_\+context()}, \textbf{ ns2\+\_\+tx\+\_\+simple()}, \textbf{ NS\+\_\+\+PDUT\+\_\+\+ALIVE}, and \textbf{ gprs\+\_\+ns2\+\_\+vc\+::nse}.



Referenced by \textbf{ alive\+\_\+timeout\+\_\+handler()}, and \textbf{ start\+\_\+test\+\_\+procedure()}.

\mbox{\label{gprs__ns2__message_8c_a5277a226f04cef71158e341d1c188215}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_tx\_alive\_ack@{ns2\_tx\_alive\_ack}}
\index{ns2\_tx\_alive\_ack@{ns2\_tx\_alive\_ack}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_tx\_alive\_ack()}
{\footnotesize\ttfamily int ns2\+\_\+tx\+\_\+alive\+\_\+ack (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc }\end{DoxyParamCaption})}



Transmit a NS-\/\+ALIVE-\/\+ACK on a given NS-\/\+VC. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsvc} & NS-\/\+VC on which the NS-\/\+ALIVE-\/\+ACK is to be transmitted \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 in case of success 
\end{DoxyReturn}


References \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSE}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSVC}, \textbf{ log\+\_\+set\+\_\+context()}, \textbf{ ns2\+\_\+tx\+\_\+simple()}, \textbf{ NS\+\_\+\+PDUT\+\_\+\+ALIVE\+\_\+\+ACK}, and \textbf{ gprs\+\_\+ns2\+\_\+vc\+::nse}.



Referenced by \textbf{ ns2\+\_\+vc\+\_\+fsm\+\_\+allstate\+\_\+action()}.

\mbox{\label{gprs__ns2__message_8c_ae4bb7409b68649f770771aecea8b7f89}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_tx\_block@{ns2\_tx\_block}}
\index{ns2\_tx\_block@{ns2\_tx\_block}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_tx\_block()}
{\footnotesize\ttfamily int ns2\+\_\+tx\+\_\+block (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc,  }\item[{uint8\+\_\+t}]{cause,  }\item[{uint16\+\_\+t $\ast$}]{nsvci }\end{DoxyParamCaption})}



Transmit a NS-\/\+BLOCK on a given NS-\/\+VC. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em vc} & NS-\/\+VC on which the NS-\/\+BLOCK is to be transmitted \\
\hline
\mbox{\texttt{ in}}  & {\em cause} & Numeric NS Cause value \\
\hline
\mbox{\texttt{ in}}  & {\em nsvci} & if given this NSVCI will be encoded. If NULL the nsvc-\/$>$nsvci will be used. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 in case of success 
\end{DoxyReturn}


References \textbf{ cause}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::ctrg}, \textbf{ ERR\+\_\+\+IF\+\_\+\+NSVC\+\_\+\+USES\+\_\+\+SNS}, \textbf{ gprs\+\_\+ns2\+\_\+cause\+\_\+str()}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSE}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSVC}, \textbf{ LOG\+\_\+\+NS\+\_\+\+SIGNAL}, \textbf{ log\+\_\+set\+\_\+context()}, \textbf{ LOGL\+\_\+\+INFO}, \textbf{ msg}, \textbf{ msgb\+\_\+put()}, \textbf{ msgb\+\_\+tvlv\+\_\+put()}, \textbf{ ns2\+\_\+msgb\+\_\+alloc()}, \textbf{ NS\+\_\+\+CTR\+\_\+\+BLOCKED}, \textbf{ NS\+\_\+\+IE\+\_\+\+CAUSE}, \textbf{ NS\+\_\+\+IE\+\_\+\+VCI}, \textbf{ NS\+\_\+\+PDUT\+\_\+\+BLOCK}, \textbf{ ns\+\_\+vc\+\_\+tx()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::nse}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::nsvci}, \textbf{ osmo\+\_\+htons}, \textbf{ gprs\+\_\+ns\+\_\+hdr\+::pdu\+\_\+type}, \textbf{ rate\+\_\+ctr\+\_\+group\+\_\+get\+\_\+ctr()}, and \textbf{ rate\+\_\+ctr\+\_\+inc()}.



Referenced by \textbf{ ns2\+\_\+st\+\_\+blocked()}, and \textbf{ ns2\+\_\+st\+\_\+blocked\+\_\+onenter()}.

\mbox{\label{gprs__ns2__message_8c_a2aeea899ea197e17c50b25a1984777c4}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_tx\_block\_ack@{ns2\_tx\_block\_ack}}
\index{ns2\_tx\_block\_ack@{ns2\_tx\_block\_ack}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_tx\_block\_ack()}
{\footnotesize\ttfamily int ns2\+\_\+tx\+\_\+block\+\_\+ack (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc,  }\item[{uint16\+\_\+t $\ast$}]{nsvci }\end{DoxyParamCaption})}



Transmit a NS-\/\+BLOCK-\/\+ACK on a given NS-\/\+VC. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsvc} & NS-\/\+VC on which the NS-\/\+BLOCK is to be transmitted \\
\hline
\mbox{\texttt{ in}}  & {\em nsvci} & if given this NSVCI will be encoded. If NULL the nsvc-\/$>$nsvci will be used. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 in case of success 
\end{DoxyReturn}


References \textbf{ ERR\+\_\+\+IF\+\_\+\+NSVC\+\_\+\+USES\+\_\+\+SNS}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSE}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSVC}, \textbf{ LOG\+\_\+\+NS\+\_\+\+TX\+\_\+\+SIGNAL}, \textbf{ log\+\_\+set\+\_\+context()}, \textbf{ msg}, \textbf{ msgb\+\_\+put()}, \textbf{ msgb\+\_\+tvlv\+\_\+put()}, \textbf{ ns2\+\_\+msgb\+\_\+alloc()}, \textbf{ NS\+\_\+\+IE\+\_\+\+VCI}, \textbf{ NS\+\_\+\+PDUT\+\_\+\+BLOCK\+\_\+\+ACK}, \textbf{ ns\+\_\+vc\+\_\+tx()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::nse}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::nsvci}, \textbf{ osmo\+\_\+htons}, and \textbf{ gprs\+\_\+ns\+\_\+hdr\+::pdu\+\_\+type}.



Referenced by \textbf{ ns2\+\_\+st\+\_\+blocked()}, \textbf{ ns2\+\_\+st\+\_\+unblocked()}, and \textbf{ ns2\+\_\+vc\+\_\+rx()}.

\mbox{\label{gprs__ns2__message_8c_a21fc801be73dece60dd7f9ce77b2657d}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_tx\_reset@{ns2\_tx\_reset}}
\index{ns2\_tx\_reset@{ns2\_tx\_reset}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_tx\_reset()}
{\footnotesize\ttfamily int ns2\+\_\+tx\+\_\+reset (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc,  }\item[{uint8\+\_\+t}]{cause }\end{DoxyParamCaption})}



Transmit a NS-\/\+RESET on a given NS-\/\+VC. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsvc} & NS-\/\+VC used for transmission \\
\hline
\mbox{\texttt{ in}}  & {\em cause} & Numeric NS cause value \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 in case of success 
\end{DoxyReturn}


References \textbf{ cause}, \textbf{ ERR\+\_\+\+IF\+\_\+\+NSVC\+\_\+\+USES\+\_\+\+SNS}, \textbf{ gprs\+\_\+ns2\+\_\+cause\+\_\+str()}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSE}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSVC}, \textbf{ LOG\+\_\+\+NS\+\_\+\+SIGNAL}, \textbf{ log\+\_\+set\+\_\+context()}, \textbf{ LOGL\+\_\+\+INFO}, \textbf{ msg}, \textbf{ msgb\+\_\+put()}, \textbf{ msgb\+\_\+tvlv\+\_\+put()}, \textbf{ ns2\+\_\+msgb\+\_\+alloc()}, \textbf{ NS\+\_\+\+IE\+\_\+\+CAUSE}, \textbf{ NS\+\_\+\+IE\+\_\+\+NSEI}, \textbf{ NS\+\_\+\+IE\+\_\+\+VCI}, \textbf{ NS\+\_\+\+PDUT\+\_\+\+RESET}, \textbf{ ns\+\_\+vc\+\_\+tx()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::nse}, \textbf{ nsei}, \textbf{ gprs\+\_\+ns2\+\_\+nse\+::nsei}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::nsvci}, \textbf{ osmo\+\_\+htons}, and \textbf{ gprs\+\_\+ns\+\_\+hdr\+::pdu\+\_\+type}.



Referenced by \textbf{ ns2\+\_\+st\+\_\+reset\+\_\+onenter()}.

\mbox{\label{gprs__ns2__message_8c_aab194245c1ecfd389541d16fe925daf4}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_tx\_reset\_ack@{ns2\_tx\_reset\_ack}}
\index{ns2\_tx\_reset\_ack@{ns2\_tx\_reset\_ack}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_tx\_reset\_ack()}
{\footnotesize\ttfamily int ns2\+\_\+tx\+\_\+reset\+\_\+ack (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc }\end{DoxyParamCaption})}



Transmit a NS-\/\+RESET-\/\+ACK on a given NS-\/\+VC. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsvc} & NS-\/\+VC used for transmission \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 in case of success 
\end{DoxyReturn}


References \textbf{ ERR\+\_\+\+IF\+\_\+\+NSVC\+\_\+\+USES\+\_\+\+SNS}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSE}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSVC}, \textbf{ LOG\+\_\+\+NS\+\_\+\+TX\+\_\+\+SIGNAL}, \textbf{ log\+\_\+set\+\_\+context()}, \textbf{ msg}, \textbf{ msgb\+\_\+put()}, \textbf{ msgb\+\_\+tvlv\+\_\+put()}, \textbf{ ns2\+\_\+msgb\+\_\+alloc()}, \textbf{ NS\+\_\+\+IE\+\_\+\+NSEI}, \textbf{ NS\+\_\+\+IE\+\_\+\+VCI}, \textbf{ NS\+\_\+\+PDUT\+\_\+\+RESET\+\_\+\+ACK}, \textbf{ ns\+\_\+vc\+\_\+tx()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::nse}, \textbf{ nsei}, \textbf{ gprs\+\_\+ns2\+\_\+nse\+::nsei}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::nsvci}, \textbf{ osmo\+\_\+htons}, and \textbf{ gprs\+\_\+ns\+\_\+hdr\+::pdu\+\_\+type}.



Referenced by \textbf{ ns2\+\_\+st\+\_\+reset()}, and \textbf{ ns2\+\_\+vc\+\_\+rx()}.

\mbox{\label{gprs__ns2__message_8c_a3025fbb1e59a8c5edbf6f5a26589c879}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_tx\_simple@{ns2\_tx\_simple}}
\index{ns2\_tx\_simple@{ns2\_tx\_simple}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_tx\_simple()}
{\footnotesize\ttfamily static int ns2\+\_\+tx\+\_\+simple (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc,  }\item[{uint8\+\_\+t}]{pdu\+\_\+type }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSE}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSVC}, \textbf{ LOG\+\_\+\+NS\+\_\+\+TX\+\_\+\+SIGNAL}, \textbf{ log\+\_\+set\+\_\+context()}, \textbf{ msg}, \textbf{ msgb\+\_\+put()}, \textbf{ ns2\+\_\+msgb\+\_\+alloc()}, \textbf{ ns\+\_\+vc\+\_\+tx()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::nse}, \textbf{ pdu\+\_\+type}, and \textbf{ gprs\+\_\+ns\+\_\+hdr\+::pdu\+\_\+type}.



Referenced by \textbf{ ns2\+\_\+tx\+\_\+alive()}, \textbf{ ns2\+\_\+tx\+\_\+alive\+\_\+ack()}, \textbf{ ns2\+\_\+tx\+\_\+unblock()}, and \textbf{ ns2\+\_\+tx\+\_\+unblock\+\_\+ack()}.

\mbox{\label{gprs__ns2__message_8c_a736dac1217712ea6a4623fb3573f8148}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_tx\_sns\_ack@{ns2\_tx\_sns\_ack}}
\index{ns2\_tx\_sns\_ack@{ns2\_tx\_sns\_ack}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_tx\_sns\_ack()}
{\footnotesize\ttfamily int ns2\+\_\+tx\+\_\+sns\+\_\+ack (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc,  }\item[{uint8\+\_\+t}]{trans\+\_\+id,  }\item[{uint8\+\_\+t $\ast$}]{cause,  }\item[{const struct \textbf{ gprs\+\_\+ns\+\_\+ie\+\_\+ip4\+\_\+elem} $\ast$}]{ip4\+\_\+elems,  }\item[{unsigned int}]{num\+\_\+ip4\+\_\+elems,  }\item[{const struct \textbf{ gprs\+\_\+ns\+\_\+ie\+\_\+ip6\+\_\+elem} $\ast$}]{ip6\+\_\+elems,  }\item[{unsigned int}]{num\+\_\+ip6\+\_\+elems }\end{DoxyParamCaption})}



Encode + Transmit a SNS-\/\+ACK as per Section 9.\+3.\+1. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsvc} & NS-\/\+VC through which to transmit the ACK \\
\hline
\mbox{\texttt{ in}}  & {\em trans\+\_\+id} & Transaction ID which to acknowledge \\
\hline
\mbox{\texttt{ in}}  & {\em cause} & Pointer to cause value (NULL if no cause to be sent) \\
\hline
\mbox{\texttt{ in}}  & {\em ip4\+\_\+elems} & Array of IPv4 Elements \\
\hline
\mbox{\texttt{ in}}  & {\em num\+\_\+ip4\+\_\+elems} & number of ip4\+\_\+elems \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative in case of error 
\end{DoxyReturn}


References \textbf{ gprs\+\_\+ns2\+\_\+nse\+::bss\+\_\+sns\+\_\+fi}, \textbf{ cause}, \textbf{ gprs\+\_\+ns2\+\_\+cause\+\_\+str()}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSE}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSVC}, \textbf{ LOG\+\_\+\+NS\+\_\+\+SIGNAL}, \textbf{ log\+\_\+set\+\_\+context()}, \textbf{ LOGL\+\_\+\+ERROR}, \textbf{ LOGL\+\_\+\+INFO}, \textbf{ LOGNSVC}, \textbf{ msg}, \textbf{ msgb\+\_\+free()}, \textbf{ msgb\+\_\+put()}, \textbf{ msgb\+\_\+tvlv\+\_\+put()}, \textbf{ msgb\+\_\+v\+\_\+put()}, \textbf{ ns2\+\_\+msgb\+\_\+alloc()}, \textbf{ NS\+\_\+\+IE\+\_\+\+CAUSE}, \textbf{ NS\+\_\+\+IE\+\_\+\+IPv4\+\_\+\+LIST}, \textbf{ NS\+\_\+\+IE\+\_\+\+IPv6\+\_\+\+LIST}, \textbf{ NS\+\_\+\+IE\+\_\+\+NSEI}, \textbf{ ns\+\_\+vc\+\_\+tx()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::nse}, \textbf{ nsei}, \textbf{ gprs\+\_\+ns2\+\_\+nse\+::nsei}, \textbf{ osmo\+\_\+htons}, \textbf{ gprs\+\_\+ns\+\_\+hdr\+::pdu\+\_\+type}, and \textbf{ SNS\+\_\+\+PDUT\+\_\+\+ACK}.



Referenced by \textbf{ ns2\+\_\+sns\+\_\+st\+\_\+configured\+\_\+add()}, \textbf{ ns2\+\_\+sns\+\_\+st\+\_\+configured\+\_\+change()}, and \textbf{ ns2\+\_\+sns\+\_\+st\+\_\+configured\+\_\+delete()}.

\mbox{\label{gprs__ns2__message_8c_a484cc36dcc1751bd63ca1cf46372214c}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_tx\_sns\_add@{ns2\_tx\_sns\_add}}
\index{ns2\_tx\_sns\_add@{ns2\_tx\_sns\_add}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_tx\_sns\_add()}
{\footnotesize\ttfamily int ns2\+\_\+tx\+\_\+sns\+\_\+add (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc,  }\item[{uint8\+\_\+t}]{trans\+\_\+id,  }\item[{const struct \textbf{ gprs\+\_\+ns\+\_\+ie\+\_\+ip4\+\_\+elem} $\ast$}]{ip4\+\_\+elems,  }\item[{unsigned int}]{num\+\_\+ip4\+\_\+elems,  }\item[{const struct \textbf{ gprs\+\_\+ns\+\_\+ie\+\_\+ip6\+\_\+elem} $\ast$}]{ip6\+\_\+elems,  }\item[{unsigned int}]{num\+\_\+ip6\+\_\+elems }\end{DoxyParamCaption})}



Encode + Transmit a SNS-\/\+ADD as per Section 9.\+3.\+2. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsvc} & NS-\/\+VC through which to transmit the SNS-\/\+CONFIG \\
\hline
\mbox{\texttt{ in}}  & {\em trans\+\_\+id} & The transaction id \\
\hline
\mbox{\texttt{ in}}  & {\em ip4\+\_\+elems} & Array of IPv4 Elements \\
\hline
\mbox{\texttt{ in}}  & {\em num\+\_\+ip4\+\_\+elems} & number of ip4\+\_\+elems \\
\hline
\mbox{\texttt{ in}}  & {\em ip6\+\_\+elems} & Array of IPv6 Elements \\
\hline
\mbox{\texttt{ in}}  & {\em num\+\_\+ip6\+\_\+elems} & number of ip6\+\_\+elems \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative in case of error 
\end{DoxyReturn}


References \textbf{ ns2\+\_\+tx\+\_\+sns\+\_\+procedure()}, and \textbf{ SNS\+\_\+\+PDUT\+\_\+\+ADD}.



Referenced by \textbf{ ns2\+\_\+sns\+\_\+st\+\_\+local\+\_\+procedure\+\_\+onenter()}.

\mbox{\label{gprs__ns2__message_8c_a6ae52b82c59110ecf857ee1a91af12c2}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_tx\_sns\_change\_weight@{ns2\_tx\_sns\_change\_weight}}
\index{ns2\_tx\_sns\_change\_weight@{ns2\_tx\_sns\_change\_weight}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_tx\_sns\_change\_weight()}
{\footnotesize\ttfamily int ns2\+\_\+tx\+\_\+sns\+\_\+change\+\_\+weight (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc,  }\item[{uint8\+\_\+t}]{trans\+\_\+id,  }\item[{const struct \textbf{ gprs\+\_\+ns\+\_\+ie\+\_\+ip4\+\_\+elem} $\ast$}]{ip4\+\_\+elems,  }\item[{unsigned int}]{num\+\_\+ip4\+\_\+elems,  }\item[{const struct \textbf{ gprs\+\_\+ns\+\_\+ie\+\_\+ip6\+\_\+elem} $\ast$}]{ip6\+\_\+elems,  }\item[{unsigned int}]{num\+\_\+ip6\+\_\+elems }\end{DoxyParamCaption})}



Encode + Transmit a SNS-\/\+CHANGE-\/\+WEIGHT as per Section 9.\+3.\+3. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsvc} & NS-\/\+VC through which to transmit the SNS-\/\+CONFIG \\
\hline
\mbox{\texttt{ in}}  & {\em trans\+\_\+id} & The transaction id \\
\hline
\mbox{\texttt{ in}}  & {\em ip4\+\_\+elems} & Array of IPv4 Elements \\
\hline
\mbox{\texttt{ in}}  & {\em num\+\_\+ip4\+\_\+elems} & number of ip4\+\_\+elems \\
\hline
\mbox{\texttt{ in}}  & {\em ip6\+\_\+elems} & Array of IPv6 Elements \\
\hline
\mbox{\texttt{ in}}  & {\em num\+\_\+ip6\+\_\+elems} & number of ip6\+\_\+elems \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative in case of error 
\end{DoxyReturn}


References \textbf{ ns2\+\_\+tx\+\_\+sns\+\_\+procedure()}, and \textbf{ SNS\+\_\+\+PDUT\+\_\+\+CHANGE\+\_\+\+WEIGHT}.



Referenced by \textbf{ ns2\+\_\+sns\+\_\+st\+\_\+local\+\_\+procedure\+\_\+onenter()}.

\mbox{\label{gprs__ns2__message_8c_a007abf66ae6853224c53878e9d089c8a}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_tx\_sns\_config@{ns2\_tx\_sns\_config}}
\index{ns2\_tx\_sns\_config@{ns2\_tx\_sns\_config}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_tx\_sns\_config()}
{\footnotesize\ttfamily int ns2\+\_\+tx\+\_\+sns\+\_\+config (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc,  }\item[{bool}]{end\+\_\+flag,  }\item[{const struct \textbf{ gprs\+\_\+ns\+\_\+ie\+\_\+ip4\+\_\+elem} $\ast$}]{ip4\+\_\+elems,  }\item[{unsigned int}]{num\+\_\+ip4\+\_\+elems,  }\item[{const struct \textbf{ gprs\+\_\+ns\+\_\+ie\+\_\+ip6\+\_\+elem} $\ast$}]{ip6\+\_\+elems,  }\item[{unsigned int}]{num\+\_\+ip6\+\_\+elems }\end{DoxyParamCaption})}



Encode + Transmit a SNS-\/\+CONFIG as per Section 9.\+3.\+4. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsvc} & NS-\/\+VC through which to transmit the SNS-\/\+CONFIG \\
\hline
\mbox{\texttt{ in}}  & {\em end\+\_\+flag} & Whether or not this is the last SNS-\/\+CONFIG \\
\hline
\mbox{\texttt{ in}}  & {\em ip4\+\_\+elems} & Array of IPv4 Elements \\
\hline
\mbox{\texttt{ in}}  & {\em num\+\_\+ip4\+\_\+elems} & number of ip4\+\_\+elems \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative in case of error 
\end{DoxyReturn}


References \textbf{ gprs\+\_\+ns2\+\_\+nse\+::bss\+\_\+sns\+\_\+fi}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSE}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSVC}, \textbf{ LOG\+\_\+\+NS\+\_\+\+SIGNAL}, \textbf{ log\+\_\+set\+\_\+context()}, \textbf{ LOGL\+\_\+\+ERROR}, \textbf{ LOGL\+\_\+\+INFO}, \textbf{ LOGNSVC}, \textbf{ msg}, \textbf{ msgb\+\_\+free()}, \textbf{ msgb\+\_\+put()}, \textbf{ msgb\+\_\+tvlv\+\_\+put()}, \textbf{ msgb\+\_\+v\+\_\+put()}, \textbf{ ns2\+\_\+msgb\+\_\+alloc()}, \textbf{ NS\+\_\+\+IE\+\_\+\+IPv4\+\_\+\+LIST}, \textbf{ NS\+\_\+\+IE\+\_\+\+IPv6\+\_\+\+LIST}, \textbf{ NS\+\_\+\+IE\+\_\+\+NSEI}, \textbf{ ns\+\_\+vc\+\_\+tx()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::nse}, \textbf{ nsei}, \textbf{ gprs\+\_\+ns2\+\_\+nse\+::nsei}, \textbf{ osmo\+\_\+htons}, \textbf{ gprs\+\_\+ns\+\_\+hdr\+::pdu\+\_\+type}, and \textbf{ SNS\+\_\+\+PDUT\+\_\+\+CONFIG}.



Referenced by \textbf{ ns2\+\_\+sns\+\_\+st\+\_\+bss\+\_\+config\+\_\+bss\+\_\+onenter()}, and \textbf{ ns2\+\_\+sns\+\_\+st\+\_\+sgsn\+\_\+wait\+\_\+config\+\_\+ack\+\_\+onenter()}.

\mbox{\label{gprs__ns2__message_8c_a348bf9d5913c312bc7a248bc7b918b84}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_tx\_sns\_config\_ack@{ns2\_tx\_sns\_config\_ack}}
\index{ns2\_tx\_sns\_config\_ack@{ns2\_tx\_sns\_config\_ack}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_tx\_sns\_config\_ack()}
{\footnotesize\ttfamily int ns2\+\_\+tx\+\_\+sns\+\_\+config\+\_\+ack (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc,  }\item[{uint8\+\_\+t $\ast$}]{cause }\end{DoxyParamCaption})}



Encode + Transmit a SNS-\/\+CONFIG-\/\+ACK as per Section 9.\+3.\+5. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsvc} & NS-\/\+VC through which to transmit the SNS-\/\+CONFIG-\/\+ACK \\
\hline
\mbox{\texttt{ in}}  & {\em cause} & Pointer to cause value (NULL if no cause to be sent) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative in case of error 
\end{DoxyReturn}


References \textbf{ gprs\+\_\+ns2\+\_\+nse\+::bss\+\_\+sns\+\_\+fi}, \textbf{ cause}, \textbf{ gprs\+\_\+ns2\+\_\+cause\+\_\+str()}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSE}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSVC}, \textbf{ LOG\+\_\+\+NS\+\_\+\+TX\+\_\+\+SIGNAL}, \textbf{ log\+\_\+set\+\_\+context()}, \textbf{ LOGL\+\_\+\+ERROR}, \textbf{ LOGL\+\_\+\+INFO}, \textbf{ LOGNSVC}, \textbf{ msg}, \textbf{ msgb\+\_\+free()}, \textbf{ msgb\+\_\+put()}, \textbf{ msgb\+\_\+tvlv\+\_\+put()}, \textbf{ ns2\+\_\+msgb\+\_\+alloc()}, \textbf{ NS\+\_\+\+IE\+\_\+\+CAUSE}, \textbf{ NS\+\_\+\+IE\+\_\+\+NSEI}, \textbf{ ns\+\_\+vc\+\_\+tx()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::nse}, \textbf{ nsei}, \textbf{ gprs\+\_\+ns2\+\_\+nse\+::nsei}, \textbf{ osmo\+\_\+htons}, \textbf{ gprs\+\_\+ns\+\_\+hdr\+::pdu\+\_\+type}, and \textbf{ SNS\+\_\+\+PDUT\+\_\+\+CONFIG\+\_\+\+ACK}.



Referenced by \textbf{ ns2\+\_\+sns\+\_\+st\+\_\+bss\+\_\+config\+\_\+sgsn()}, and \textbf{ ns2\+\_\+sns\+\_\+st\+\_\+sgsn\+\_\+wait\+\_\+config()}.

\mbox{\label{gprs__ns2__message_8c_a07c10c2f7b982cee616be45695deb2be}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_tx\_sns\_del@{ns2\_tx\_sns\_del}}
\index{ns2\_tx\_sns\_del@{ns2\_tx\_sns\_del}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_tx\_sns\_del()}
{\footnotesize\ttfamily int ns2\+\_\+tx\+\_\+sns\+\_\+del (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc,  }\item[{uint8\+\_\+t}]{trans\+\_\+id,  }\item[{const struct \textbf{ gprs\+\_\+ns\+\_\+ie\+\_\+ip4\+\_\+elem} $\ast$}]{ip4\+\_\+elems,  }\item[{unsigned int}]{num\+\_\+ip4\+\_\+elems,  }\item[{const struct \textbf{ gprs\+\_\+ns\+\_\+ie\+\_\+ip6\+\_\+elem} $\ast$}]{ip6\+\_\+elems,  }\item[{unsigned int}]{num\+\_\+ip6\+\_\+elems }\end{DoxyParamCaption})}



Encode + Transmit a SNS-\/\+DEL as per Section 9.\+3.\+6. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsvc} & NS-\/\+VC through which to transmit the SNS-\/\+CONFIG \\
\hline
\mbox{\texttt{ in}}  & {\em trans\+\_\+id} & The transaction id \\
\hline
\mbox{\texttt{ in}}  & {\em ip4\+\_\+elems} & Array of IPv4 Elements \\
\hline
\mbox{\texttt{ in}}  & {\em num\+\_\+ip4\+\_\+elems} & number of ip4\+\_\+elems \\
\hline
\mbox{\texttt{ in}}  & {\em ip6\+\_\+elems} & Array of IPv6 Elements \\
\hline
\mbox{\texttt{ in}}  & {\em num\+\_\+ip6\+\_\+elems} & number of ip6\+\_\+elems \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative in case of error 
\end{DoxyReturn}


References \textbf{ ns2\+\_\+tx\+\_\+sns\+\_\+procedure()}, and \textbf{ SNS\+\_\+\+PDUT\+\_\+\+DELETE}.



Referenced by \textbf{ ns2\+\_\+sns\+\_\+st\+\_\+local\+\_\+procedure\+\_\+onenter()}.

\mbox{\label{gprs__ns2__message_8c_aead0c0987564748ba420825f0c707089}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_tx\_sns\_procedure@{ns2\_tx\_sns\_procedure}}
\index{ns2\_tx\_sns\_procedure@{ns2\_tx\_sns\_procedure}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_tx\_sns\_procedure()}
{\footnotesize\ttfamily static int ns2\+\_\+tx\+\_\+sns\+\_\+procedure (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc,  }\item[{enum \textbf{ ns\+\_\+pdu\+\_\+type}}]{pdu,  }\item[{uint8\+\_\+t}]{trans\+\_\+id,  }\item[{const struct \textbf{ gprs\+\_\+ns\+\_\+ie\+\_\+ip4\+\_\+elem} $\ast$}]{ip4\+\_\+elems,  }\item[{unsigned int}]{num\+\_\+ip4\+\_\+elems,  }\item[{const struct \textbf{ gprs\+\_\+ns\+\_\+ie\+\_\+ip6\+\_\+elem} $\ast$}]{ip6\+\_\+elems,  }\item[{unsigned int}]{num\+\_\+ip6\+\_\+elems }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Encode + Transmit a SNS-\/\+ADD/\+SNS-\/\+CHANGE-\/\+WEIGHT as per Section 9.\+3.\+2/9.3.\+3. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsvc} & NS-\/\+VC through which to transmit the SNS-\/\+CONFIG \\
\hline
\mbox{\texttt{ in}}  & {\em pdu} & The PDU type to send out \\
\hline
\mbox{\texttt{ in}}  & {\em trans\+\_\+id} & The transaction id \\
\hline
\mbox{\texttt{ in}}  & {\em ip4\+\_\+elems} & Array of IPv4 Elements \\
\hline
\mbox{\texttt{ in}}  & {\em num\+\_\+ip4\+\_\+elems} & number of ip4\+\_\+elems \\
\hline
\mbox{\texttt{ in}}  & {\em ip6\+\_\+elems} & Array of IPv6 Elements \\
\hline
\mbox{\texttt{ in}}  & {\em num\+\_\+ip6\+\_\+elems} & number of ip6\+\_\+elems \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative in case of error 
\end{DoxyReturn}


References \textbf{ gprs\+\_\+ns2\+\_\+nse\+::bss\+\_\+sns\+\_\+fi}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSE}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSVC}, \textbf{ log\+\_\+set\+\_\+context()}, \textbf{ LOGL\+\_\+\+ERROR}, \textbf{ LOGNSVC}, \textbf{ msg}, \textbf{ msgb\+\_\+free()}, \textbf{ msgb\+\_\+put()}, \textbf{ msgb\+\_\+tvlv\+\_\+put()}, \textbf{ msgb\+\_\+v\+\_\+put()}, \textbf{ ns2\+\_\+msgb\+\_\+alloc()}, \textbf{ NS\+\_\+\+IE\+\_\+\+IPv4\+\_\+\+LIST}, \textbf{ NS\+\_\+\+IE\+\_\+\+IPv6\+\_\+\+LIST}, \textbf{ NS\+\_\+\+IE\+\_\+\+NSEI}, \textbf{ ns\+\_\+vc\+\_\+tx()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::nse}, \textbf{ nsei}, \textbf{ gprs\+\_\+ns2\+\_\+nse\+::nsei}, \textbf{ osmo\+\_\+htons}, and \textbf{ gprs\+\_\+ns\+\_\+hdr\+::pdu\+\_\+type}.



Referenced by \textbf{ ns2\+\_\+tx\+\_\+sns\+\_\+add()}, \textbf{ ns2\+\_\+tx\+\_\+sns\+\_\+change\+\_\+weight()}, and \textbf{ ns2\+\_\+tx\+\_\+sns\+\_\+del()}.

\mbox{\label{gprs__ns2__message_8c_a6f260734d563e80c92a771525dd02a1e}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_tx\_sns\_size@{ns2\_tx\_sns\_size}}
\index{ns2\_tx\_sns\_size@{ns2\_tx\_sns\_size}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_tx\_sns\_size()}
{\footnotesize\ttfamily int ns2\+\_\+tx\+\_\+sns\+\_\+size (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc,  }\item[{bool}]{reset\+\_\+flag,  }\item[{uint16\+\_\+t}]{max\+\_\+nr\+\_\+nsvc,  }\item[{int}]{ip4\+\_\+ep\+\_\+nr,  }\item[{int}]{ip6\+\_\+ep\+\_\+nr }\end{DoxyParamCaption})}



Encode + transmit a SNS-\/\+SIZE as per Section 9.\+3.\+7. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsvc} & NS-\/\+VC through which to transmit the SNS-\/\+SIZE \\
\hline
\mbox{\texttt{ in}}  & {\em reset\+\_\+flag} & Whether or not to add a RESET flag \\
\hline
\mbox{\texttt{ in}}  & {\em max\+\_\+nr\+\_\+nsvc} & Maximum number of NS-\/\+VCs \\
\hline
\mbox{\texttt{ in}}  & {\em ip4\+\_\+ep\+\_\+nr} & Number of IPv4 endpoints ($<$ 0 will omit the TLV) \\
\hline
\mbox{\texttt{ in}}  & {\em ip6\+\_\+ep\+\_\+nr} & Number of IPv6 endpoints ($<$ 0 will omit the TLV) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative in case of error 
\end{DoxyReturn}


References \textbf{ gprs\+\_\+ns2\+\_\+nse\+::bss\+\_\+sns\+\_\+fi}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSE}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSVC}, \textbf{ LOG\+\_\+\+NS\+\_\+\+SIGNAL}, \textbf{ log\+\_\+set\+\_\+context()}, \textbf{ LOGL\+\_\+\+ERROR}, \textbf{ LOGL\+\_\+\+INFO}, \textbf{ LOGNSVC}, \textbf{ msg}, \textbf{ msgb\+\_\+free()}, \textbf{ msgb\+\_\+put()}, \textbf{ msgb\+\_\+tv16\+\_\+put()}, \textbf{ msgb\+\_\+tv\+\_\+put()}, \textbf{ msgb\+\_\+tvlv\+\_\+put()}, \textbf{ ns2\+\_\+msgb\+\_\+alloc()}, \textbf{ NS\+\_\+\+IE\+\_\+\+IPv4\+\_\+\+EP\+\_\+\+NR}, \textbf{ NS\+\_\+\+IE\+\_\+\+IPv6\+\_\+\+EP\+\_\+\+NR}, \textbf{ NS\+\_\+\+IE\+\_\+\+MAX\+\_\+\+NR\+\_\+\+NSVC}, \textbf{ NS\+\_\+\+IE\+\_\+\+NSEI}, \textbf{ NS\+\_\+\+IE\+\_\+\+RESET\+\_\+\+FLAG}, \textbf{ ns\+\_\+vc\+\_\+tx()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::nse}, \textbf{ nsei}, \textbf{ gprs\+\_\+ns2\+\_\+nse\+::nsei}, \textbf{ osmo\+\_\+htons}, \textbf{ gprs\+\_\+ns\+\_\+hdr\+::pdu\+\_\+type}, and \textbf{ SNS\+\_\+\+PDUT\+\_\+\+SIZE}.



Referenced by \textbf{ ns2\+\_\+sns\+\_\+st\+\_\+bss\+\_\+size\+\_\+onenter()}.

\mbox{\label{gprs__ns2__message_8c_a72b95357595d7a14fd98fabaa98a025f}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_tx\_sns\_size\_ack@{ns2\_tx\_sns\_size\_ack}}
\index{ns2\_tx\_sns\_size\_ack@{ns2\_tx\_sns\_size\_ack}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_tx\_sns\_size\_ack()}
{\footnotesize\ttfamily int ns2\+\_\+tx\+\_\+sns\+\_\+size\+\_\+ack (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc,  }\item[{uint8\+\_\+t $\ast$}]{cause }\end{DoxyParamCaption})}



Encode + Transmit a SNS-\/\+SIZE-\/\+ACK as per Section 9.\+3.\+8. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsvc} & NS-\/\+VC through which to transmit the SNS-\/\+SIZE-\/\+ACK \\
\hline
\mbox{\texttt{ in}}  & {\em cause} & Pointer to cause value (NULL if no cause to be sent) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative in case of error 
\end{DoxyReturn}


References \textbf{ gprs\+\_\+ns2\+\_\+nse\+::bss\+\_\+sns\+\_\+fi}, \textbf{ cause}, \textbf{ gprs\+\_\+ns2\+\_\+cause\+\_\+str()}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSE}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSVC}, \textbf{ LOG\+\_\+\+NS\+\_\+\+SIGNAL}, \textbf{ log\+\_\+set\+\_\+context()}, \textbf{ LOGL\+\_\+\+ERROR}, \textbf{ LOGL\+\_\+\+INFO}, \textbf{ LOGNSVC}, \textbf{ msg}, \textbf{ msgb\+\_\+free()}, \textbf{ msgb\+\_\+put()}, \textbf{ msgb\+\_\+tvlv\+\_\+put()}, \textbf{ ns2\+\_\+msgb\+\_\+alloc()}, \textbf{ NS\+\_\+\+IE\+\_\+\+CAUSE}, \textbf{ NS\+\_\+\+IE\+\_\+\+NSEI}, \textbf{ ns\+\_\+vc\+\_\+tx()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::nse}, \textbf{ nsei}, \textbf{ gprs\+\_\+ns2\+\_\+nse\+::nsei}, \textbf{ osmo\+\_\+htons}, \textbf{ gprs\+\_\+ns\+\_\+hdr\+::pdu\+\_\+type}, and \textbf{ SNS\+\_\+\+PDUT\+\_\+\+SIZE\+\_\+\+ACK}.



Referenced by \textbf{ ns2\+\_\+sns\+\_\+st\+\_\+all\+\_\+action\+\_\+sgsn()}.

\mbox{\label{gprs__ns2__message_8c_ad56f996a8fc07656840ea8b1f2962c02}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_tx\_status@{ns2\_tx\_status}}
\index{ns2\_tx\_status@{ns2\_tx\_status}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_tx\_status()}
{\footnotesize\ttfamily int ns2\+\_\+tx\+\_\+status (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc,  }\item[{uint8\+\_\+t}]{cause,  }\item[{uint16\+\_\+t}]{bvci,  }\item[{struct \textbf{ msgb} $\ast$}]{orig\+\_\+msg,  }\item[{uint16\+\_\+t $\ast$}]{nsvci }\end{DoxyParamCaption})}



Transmit a NS-\/\+STATUS on a given NS-\/\+VC. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsvc} & NS-\/\+VC to be used for transmission \\
\hline
\mbox{\texttt{ in}}  & {\em cause} & Numeric NS cause value \\
\hline
\mbox{\texttt{ in}}  & {\em bvci} & BVCI to be reset within NSVC \\
\hline
\mbox{\texttt{ in}}  & {\em orig\+\_\+msg} & message causing the STATUS \\
\hline
\mbox{\texttt{ in}}  & {\em nsvci} & if given this NSVCI will be encoded. If NULL the nsvc-\/$>$nsvci will be used. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 in case of success 
\end{DoxyReturn}


References \textbf{ gprs\+\_\+ns2\+\_\+vc\+::bind}, \textbf{ bvci}, \textbf{ cause}, \textbf{ gprs\+\_\+ns2\+\_\+cause\+\_\+str()}, \textbf{ msgb\+::l2h}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSE}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSVC}, \textbf{ LOG\+\_\+\+NS\+\_\+\+SIGNAL}, \textbf{ log\+\_\+set\+\_\+context()}, \textbf{ LOGL\+\_\+\+INFO}, \textbf{ msg}, \textbf{ msgb\+\_\+l2len()}, \textbf{ msgb\+\_\+length()}, \textbf{ msgb\+\_\+put()}, \textbf{ msgb\+\_\+tvlv\+\_\+put()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::mtu}, \textbf{ ns2\+\_\+msgb\+\_\+alloc()}, \textbf{ NS\+\_\+\+CAUSE\+\_\+\+BVCI\+\_\+\+UNKNOWN}, \textbf{ NS\+\_\+\+CAUSE\+\_\+\+INVAL\+\_\+\+ESSENT\+\_\+\+IE}, \textbf{ NS\+\_\+\+CAUSE\+\_\+\+MISSING\+\_\+\+ESSENT\+\_\+\+IE}, \textbf{ NS\+\_\+\+CAUSE\+\_\+\+NSVC\+\_\+\+BLOCKED}, \textbf{ NS\+\_\+\+CAUSE\+\_\+\+NSVC\+\_\+\+UNKNOWN}, \textbf{ NS\+\_\+\+CAUSE\+\_\+\+PDU\+\_\+\+INCOMP\+\_\+\+PSTATE}, \textbf{ NS\+\_\+\+CAUSE\+\_\+\+PROTO\+\_\+\+ERR\+\_\+\+UNSPEC}, \textbf{ NS\+\_\+\+CAUSE\+\_\+\+SEM\+\_\+\+INCORR\+\_\+\+PDU}, \textbf{ NS\+\_\+\+IE\+\_\+\+CAUSE}, \textbf{ NS\+\_\+\+IE\+\_\+\+PDU}, \textbf{ NS\+\_\+\+IE\+\_\+\+VCI}, \textbf{ NS\+\_\+\+PDUT\+\_\+\+STATUS}, \textbf{ ns\+\_\+vc\+\_\+tx()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::nse}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::nsvci}, \textbf{ osmo\+\_\+htons}, \textbf{ gprs\+\_\+ns\+\_\+hdr\+::pdu\+\_\+type}, and \textbf{ TVLV\+\_\+\+GROSS\+\_\+\+LEN()}.



Referenced by \textbf{ ns2\+\_\+vc\+\_\+fsm\+\_\+allstate\+\_\+action()}, and \textbf{ ns2\+\_\+vc\+\_\+rx()}.

\mbox{\label{gprs__ns2__message_8c_aa43653f3496a22b23aae04860ed19736}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_tx\_unblock@{ns2\_tx\_unblock}}
\index{ns2\_tx\_unblock@{ns2\_tx\_unblock}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_tx\_unblock()}
{\footnotesize\ttfamily int ns2\+\_\+tx\+\_\+unblock (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc }\end{DoxyParamCaption})}



Transmit a NS-\/\+UNBLOCK on a given NS-\/\+VC. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsvc} & NS-\/\+VC on which the NS-\/\+UNBLOCK is to be transmitted \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 in case of success 
\end{DoxyReturn}


References \textbf{ ERR\+\_\+\+IF\+\_\+\+NSVC\+\_\+\+USES\+\_\+\+SNS}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSE}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSVC}, \textbf{ log\+\_\+set\+\_\+context()}, \textbf{ ns2\+\_\+tx\+\_\+simple()}, \textbf{ NS\+\_\+\+PDUT\+\_\+\+UNBLOCK}, and \textbf{ gprs\+\_\+ns2\+\_\+vc\+::nse}.



Referenced by \textbf{ ns2\+\_\+st\+\_\+blocked\+\_\+onenter()}.

\mbox{\label{gprs__ns2__message_8c_a4dc992a745fc6fc153f54bba97c3921c}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_tx\_unblock\_ack@{ns2\_tx\_unblock\_ack}}
\index{ns2\_tx\_unblock\_ack@{ns2\_tx\_unblock\_ack}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_tx\_unblock\_ack()}
{\footnotesize\ttfamily int ns2\+\_\+tx\+\_\+unblock\+\_\+ack (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc }\end{DoxyParamCaption})}



Transmit a NS-\/\+UNBLOCK-\/\+ACK on a given NS-\/\+VC. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsvc} & NS-\/\+VC on which the NS-\/\+UNBLOCK-\/\+ACK is to be transmitted \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 in case of success 
\end{DoxyReturn}


References \textbf{ ERR\+\_\+\+IF\+\_\+\+NSVC\+\_\+\+USES\+\_\+\+SNS}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSE}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSVC}, \textbf{ log\+\_\+set\+\_\+context()}, \textbf{ ns2\+\_\+tx\+\_\+simple()}, \textbf{ NS\+\_\+\+PDUT\+\_\+\+UNBLOCK\+\_\+\+ACK}, and \textbf{ gprs\+\_\+ns2\+\_\+vc\+::nse}.



Referenced by \textbf{ ns2\+\_\+st\+\_\+blocked()}, and \textbf{ ns2\+\_\+st\+\_\+unblocked()}.

\mbox{\label{gprs__ns2__message_8c_aeae1ac28e0f5b8c717db52e013719564}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_tx\_unit\_data@{ns2\_tx\_unit\_data}}
\index{ns2\_tx\_unit\_data@{ns2\_tx\_unit\_data}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_tx\_unit\_data()}
{\footnotesize\ttfamily int ns2\+\_\+tx\+\_\+unit\+\_\+data (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc,  }\item[{uint16\+\_\+t}]{bvci,  }\item[{uint8\+\_\+t}]{sducontrol,  }\item[{struct \textbf{ msgb} $\ast$}]{msg }\end{DoxyParamCaption})}



Transmit NS-\/\+UNITDATA on a given NS-\/\+VC. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsvc} & NS-\/\+VC on which the NS-\/\+UNITDATA is to be transmitted \\
\hline
\mbox{\texttt{ in}}  & {\em bvci} & BVCI to encode in NS-\/\+UNITDATA header \\
\hline
\mbox{\texttt{ in}}  & {\em sducontrol} & SDU control octet of NS header \\
\hline
\mbox{\texttt{ in}}  & {\em msg} & message buffer containing payload \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 in case of success 
\end{DoxyReturn}


References \textbf{ bvci}, \textbf{ gprs\+\_\+ns\+\_\+hdr\+::data}, \textbf{ if()}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSE}, \textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSVC}, \textbf{ LOG\+\_\+\+NS\+\_\+\+DATA}, \textbf{ log\+\_\+set\+\_\+context()}, \textbf{ LOGL\+\_\+\+ERROR}, \textbf{ LOGL\+\_\+\+INFO}, \textbf{ LOGNSVC}, \textbf{ msg}, \textbf{ msgb\+\_\+free()}, \textbf{ msgb\+\_\+push()}, \textbf{ NS\+\_\+\+PDUT\+\_\+\+UNITDATA}, \textbf{ ns\+\_\+vc\+\_\+tx()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::nse}, and \textbf{ gprs\+\_\+ns\+\_\+hdr\+::pdu\+\_\+type}.



Referenced by \textbf{ gprs\+\_\+ns2\+\_\+recv\+\_\+prim()}.

\mbox{\label{gprs__ns2__message_8c_a9c65ce2043db24730bbef93bc95531fc}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_validate@{ns2\_validate}}
\index{ns2\_validate@{ns2\_validate}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_validate()}
{\footnotesize\ttfamily int ns2\+\_\+validate (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc,  }\item[{uint8\+\_\+t}]{pdu\+\_\+type,  }\item[{struct \textbf{ msgb} $\ast$}]{msg,  }\item[{struct \textbf{ tlv\+\_\+parsed} $\ast$}]{tp,  }\item[{uint8\+\_\+t $\ast$}]{cause }\end{DoxyParamCaption})}



References \textbf{ cause}, \textbf{ msg}, \textbf{ msgb\+\_\+l2len()}, \textbf{ ns2\+\_\+validate\+\_\+block()}, \textbf{ ns2\+\_\+validate\+\_\+block\+\_\+ack()}, \textbf{ ns2\+\_\+validate\+\_\+reset()}, \textbf{ ns2\+\_\+validate\+\_\+reset\+\_\+ack()}, \textbf{ ns2\+\_\+validate\+\_\+status()}, \textbf{ NS\+\_\+\+CAUSE\+\_\+\+PROTO\+\_\+\+ERR\+\_\+\+UNSPEC}, \textbf{ NS\+\_\+\+PDUT\+\_\+\+ALIVE}, \textbf{ NS\+\_\+\+PDUT\+\_\+\+ALIVE\+\_\+\+ACK}, \textbf{ NS\+\_\+\+PDUT\+\_\+\+BLOCK}, \textbf{ NS\+\_\+\+PDUT\+\_\+\+BLOCK\+\_\+\+ACK}, \textbf{ NS\+\_\+\+PDUT\+\_\+\+RESET}, \textbf{ NS\+\_\+\+PDUT\+\_\+\+RESET\+\_\+\+ACK}, \textbf{ NS\+\_\+\+PDUT\+\_\+\+STATUS}, \textbf{ NS\+\_\+\+PDUT\+\_\+\+UNBLOCK}, \textbf{ NS\+\_\+\+PDUT\+\_\+\+UNBLOCK\+\_\+\+ACK}, and \textbf{ pdu\+\_\+type}.



Referenced by \textbf{ ns2\+\_\+vc\+\_\+rx()}.

\mbox{\label{gprs__ns2__message_8c_a2ddc3aca921a14285a909e254068cb9c}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_validate\_block@{ns2\_validate\_block}}
\index{ns2\_validate\_block@{ns2\_validate\_block}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_validate\_block()}
{\footnotesize\ttfamily static int ns2\+\_\+validate\+\_\+block (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc,  }\item[{struct \textbf{ msgb} $\ast$}]{msg,  }\item[{struct \textbf{ tlv\+\_\+parsed} $\ast$}]{tp,  }\item[{uint8\+\_\+t $\ast$}]{cause }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ cause}, \textbf{ NS\+\_\+\+CAUSE\+\_\+\+MISSING\+\_\+\+ESSENT\+\_\+\+IE}, \textbf{ NS\+\_\+\+IE\+\_\+\+CAUSE}, \textbf{ NS\+\_\+\+IE\+\_\+\+VCI}, and \textbf{ TLVP\+\_\+\+PRES\+\_\+\+LEN}.



Referenced by \textbf{ ns2\+\_\+validate()}.

\mbox{\label{gprs__ns2__message_8c_a89b61456c8f9272f6efc07848c1ec4bb}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_validate\_block\_ack@{ns2\_validate\_block\_ack}}
\index{ns2\_validate\_block\_ack@{ns2\_validate\_block\_ack}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_validate\_block\_ack()}
{\footnotesize\ttfamily static int ns2\+\_\+validate\+\_\+block\+\_\+ack (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc,  }\item[{struct \textbf{ msgb} $\ast$}]{msg,  }\item[{struct \textbf{ tlv\+\_\+parsed} $\ast$}]{tp,  }\item[{uint8\+\_\+t $\ast$}]{cause }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ cause}, \textbf{ NS\+\_\+\+CAUSE\+\_\+\+MISSING\+\_\+\+ESSENT\+\_\+\+IE}, \textbf{ NS\+\_\+\+IE\+\_\+\+VCI}, and \textbf{ TLVP\+\_\+\+PRES\+\_\+\+LEN}.



Referenced by \textbf{ ns2\+\_\+validate()}.

\mbox{\label{gprs__ns2__message_8c_a66e91e19dbd8be29592fafb6b5847b5c}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_validate\_reset@{ns2\_validate\_reset}}
\index{ns2\_validate\_reset@{ns2\_validate\_reset}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_validate\_reset()}
{\footnotesize\ttfamily static int ns2\+\_\+validate\+\_\+reset (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc,  }\item[{struct \textbf{ msgb} $\ast$}]{msg,  }\item[{struct \textbf{ tlv\+\_\+parsed} $\ast$}]{tp,  }\item[{uint8\+\_\+t $\ast$}]{cause }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ cause}, \textbf{ NS\+\_\+\+CAUSE\+\_\+\+MISSING\+\_\+\+ESSENT\+\_\+\+IE}, \textbf{ NS\+\_\+\+IE\+\_\+\+CAUSE}, \textbf{ NS\+\_\+\+IE\+\_\+\+NSEI}, \textbf{ NS\+\_\+\+IE\+\_\+\+VCI}, and \textbf{ TLVP\+\_\+\+PRES\+\_\+\+LEN}.



Referenced by \textbf{ ns2\+\_\+validate()}.

\mbox{\label{gprs__ns2__message_8c_a0c39f79991bdb1b996398c64c70c3eab}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_validate\_reset\_ack@{ns2\_validate\_reset\_ack}}
\index{ns2\_validate\_reset\_ack@{ns2\_validate\_reset\_ack}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_validate\_reset\_ack()}
{\footnotesize\ttfamily static int ns2\+\_\+validate\+\_\+reset\+\_\+ack (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc,  }\item[{struct \textbf{ msgb} $\ast$}]{msg,  }\item[{struct \textbf{ tlv\+\_\+parsed} $\ast$}]{tp,  }\item[{uint8\+\_\+t $\ast$}]{cause }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ cause}, \textbf{ NS\+\_\+\+CAUSE\+\_\+\+MISSING\+\_\+\+ESSENT\+\_\+\+IE}, \textbf{ NS\+\_\+\+IE\+\_\+\+NSEI}, \textbf{ NS\+\_\+\+IE\+\_\+\+VCI}, and \textbf{ TLVP\+\_\+\+PRES\+\_\+\+LEN}.



Referenced by \textbf{ ns2\+\_\+validate()}.

\mbox{\label{gprs__ns2__message_8c_a2f68fdc297ee74878fb7352114df357e}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns2\_validate\_status@{ns2\_validate\_status}}
\index{ns2\_validate\_status@{ns2\_validate\_status}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns2\_validate\_status()}
{\footnotesize\ttfamily static int ns2\+\_\+validate\+\_\+status (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc,  }\item[{struct \textbf{ msgb} $\ast$}]{msg,  }\item[{struct \textbf{ tlv\+\_\+parsed} $\ast$}]{tp,  }\item[{uint8\+\_\+t $\ast$}]{cause }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ cause}, \textbf{ GPRS\+\_\+\+NS2\+\_\+\+VC\+\_\+\+MODE\+\_\+\+BLOCKRESET}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::mode}, \textbf{ NS\+\_\+\+CAUSE\+\_\+\+BVCI\+\_\+\+UNKNOWN}, \textbf{ NS\+\_\+\+CAUSE\+\_\+\+INVAL\+\_\+\+ESSENT\+\_\+\+IE}, \textbf{ NS\+\_\+\+CAUSE\+\_\+\+MISSING\+\_\+\+ESSENT\+\_\+\+IE}, \textbf{ NS\+\_\+\+CAUSE\+\_\+\+NSVC\+\_\+\+BLOCKED}, \textbf{ NS\+\_\+\+CAUSE\+\_\+\+NSVC\+\_\+\+UNKNOWN}, \textbf{ NS\+\_\+\+CAUSE\+\_\+\+PDU\+\_\+\+INCOMP\+\_\+\+PSTATE}, \textbf{ NS\+\_\+\+CAUSE\+\_\+\+PROTO\+\_\+\+ERR\+\_\+\+UNSPEC}, \textbf{ NS\+\_\+\+CAUSE\+\_\+\+SEM\+\_\+\+INCORR\+\_\+\+PDU}, \textbf{ NS\+\_\+\+CAUSE\+\_\+\+UNKN\+\_\+\+IP\+\_\+\+TEST\+\_\+\+FAILED}, \textbf{ NS\+\_\+\+IE\+\_\+\+BVCI}, \textbf{ NS\+\_\+\+IE\+\_\+\+CAUSE}, \textbf{ NS\+\_\+\+IE\+\_\+\+IPv4\+\_\+\+LIST}, \textbf{ NS\+\_\+\+IE\+\_\+\+IPv6\+\_\+\+LIST}, \textbf{ NS\+\_\+\+IE\+\_\+\+PDU}, \textbf{ NS\+\_\+\+IE\+\_\+\+VCI}, \textbf{ TLVP\+\_\+\+PRES\+\_\+\+LEN}, \textbf{ TLVP\+\_\+\+PRESENT}, and \textbf{ tlvp\+\_\+val8()}.



Referenced by \textbf{ ns2\+\_\+validate()}.

\mbox{\label{gprs__ns2__message_8c_a59b8a45b7a2d15cddeab4127cafbe968}} 
\index{gprs\_ns2\_message.c@{gprs\_ns2\_message.c}!ns\_vc\_tx@{ns\_vc\_tx}}
\index{ns\_vc\_tx@{ns\_vc\_tx}!gprs\_ns2\_message.c@{gprs\_ns2\_message.c}}
\doxysubsubsection{ns\_vc\_tx()}
{\footnotesize\ttfamily static int ns\+\_\+vc\+\_\+tx (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc,  }\item[{struct \textbf{ msgb} $\ast$}]{msg }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ gprs\+\_\+ns2\+\_\+vc\+::bind}, \textbf{ msg}, and \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::send\+\_\+vc}.



Referenced by \textbf{ ns2\+\_\+tx\+\_\+block()}, \textbf{ ns2\+\_\+tx\+\_\+block\+\_\+ack()}, \textbf{ ns2\+\_\+tx\+\_\+reset()}, \textbf{ ns2\+\_\+tx\+\_\+reset\+\_\+ack()}, \textbf{ ns2\+\_\+tx\+\_\+simple()}, \textbf{ ns2\+\_\+tx\+\_\+sns\+\_\+ack()}, \textbf{ ns2\+\_\+tx\+\_\+sns\+\_\+config()}, \textbf{ ns2\+\_\+tx\+\_\+sns\+\_\+config\+\_\+ack()}, \textbf{ ns2\+\_\+tx\+\_\+sns\+\_\+procedure()}, \textbf{ ns2\+\_\+tx\+\_\+sns\+\_\+size()}, \textbf{ ns2\+\_\+tx\+\_\+sns\+\_\+size\+\_\+ack()}, \textbf{ ns2\+\_\+tx\+\_\+status()}, and \textbf{ ns2\+\_\+tx\+\_\+unit\+\_\+data()}.

