\doxysection{include/osmocom/gprs/gprs\+\_\+ns2.h File Reference}
\label{gprs__ns2_8h}\index{include/osmocom/gprs/gprs\_ns2.h@{include/osmocom/gprs/gprs\_ns2.h}}
{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$netinet/in.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/prim.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gprs/protocol/gsm\+\_\+08\+\_\+16.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gprs/frame\+\_\+relay.\+h$>$}\newline
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ osmo\+\_\+gprs\+\_\+ns2\+\_\+prim}
\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef int($\ast$ \textbf{ gprs\+\_\+ns2\+\_\+foreach\+\_\+nsvc\+\_\+cb}) (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, void $\ast$ctx)
\begin{DoxyCompactList}\small\item\em a callback to iterate over all NSVC \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+mode} \{ \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+VC\+\_\+\+MODE\+\_\+\+BLOCKRESET}
, \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+VC\+\_\+\+MODE\+\_\+\+ALIVE}
 \}
\item 
enum \textbf{ gprs\+\_\+ns2\+\_\+dialect} \{ \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+DIALECT\+\_\+\+UNDEF}
, \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+DIALECT\+\_\+\+STATIC\+\_\+\+ALIVE}
, \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+DIALECT\+\_\+\+STATIC\+\_\+\+RESETBLOCK}
, \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+DIALECT\+\_\+\+IPACCESS}
, \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+DIALECT\+\_\+\+SNS}
 \}
\item 
enum \textbf{ gprs\+\_\+ns2\+\_\+ll} \{ \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+LL\+\_\+\+UNDEF}
, \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+LL\+\_\+\+UDP}
, \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+LL\+\_\+\+FR}
, \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+LL\+\_\+\+FR\+\_\+\+GRE}
 \}
\begin{DoxyCompactList}\small\item\em Osmocom NS link layer types. \end{DoxyCompactList}\item 
enum \textbf{ gprs\+\_\+ns2\+\_\+prim} \{ \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+PRIM\+\_\+\+UNIT\+\_\+\+DATA}
, \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+PRIM\+\_\+\+CONGESTION}
, \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+PRIM\+\_\+\+STATUS}
 \}
\begin{DoxyCompactList}\small\item\em Osmocom NS primitives according to 48.\+016 5.\+2 Service primitives. \end{DoxyCompactList}\item 
enum \textbf{ gprs\+\_\+ns2\+\_\+congestion\+\_\+cause} \{ \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+CONG\+\_\+\+CAUSE\+\_\+\+BACKWARD\+\_\+\+BEGIN}
, \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+CONG\+\_\+\+CAUSE\+\_\+\+BACKWARD\+\_\+\+END}
, \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+CONG\+\_\+\+CAUSE\+\_\+\+FORWARD\+\_\+\+BEGIN}
, \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+CONG\+\_\+\+CAUSE\+\_\+\+FORWARD\+\_\+\+END}
 \}
\begin{DoxyCompactList}\small\item\em Osmocom NS primitives according to 48.\+016 5.\+2.\+2.\+4 Service primitives. \end{DoxyCompactList}\item 
enum \textbf{ gprs\+\_\+ns2\+\_\+affecting\+\_\+cause} \{ \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+AFF\+\_\+\+CAUSE\+\_\+\+VC\+\_\+\+FAILURE}
, \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+AFF\+\_\+\+CAUSE\+\_\+\+VC\+\_\+\+RECOVERY}
, \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+AFF\+\_\+\+CAUSE\+\_\+\+FAILURE}
, \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+AFF\+\_\+\+CAUSE\+\_\+\+RECOVERY}
, \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+AFF\+\_\+\+CAUSE\+\_\+\+SNS\+\_\+\+CONFIGURED}
, \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+AFF\+\_\+\+CAUSE\+\_\+\+SNS\+\_\+\+FAILURE}
, \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+AFF\+\_\+\+CAUSE\+\_\+\+SNS\+\_\+\+NO\+\_\+\+ENDPOINTS}
, \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+AFF\+\_\+\+CAUSE\+\_\+\+MTU\+\_\+\+CHANGE}
 \}
\begin{DoxyCompactList}\small\item\em Osmocom NS primitives according to 48.\+016 5.\+2.\+2.\+6 Service primitives. \end{DoxyCompactList}\item 
enum \textbf{ gprs\+\_\+ns2\+\_\+change\+\_\+ip\+\_\+endpoint} \{ \newline
\textbf{ GRPS\+\_\+\+NS2\+\_\+\+ENDPOINT\+\_\+\+NO\+\_\+\+CHANGE}
, \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+ENDPOINT\+\_\+\+REQUEST\+\_\+\+CHANGE}
, \newline
\textbf{ GPRS\+\_\+\+NS2\+\_\+\+ENDPOINT\+\_\+\+CONFIRM\+\_\+\+CHANGE}
 \}
\begin{DoxyCompactList}\small\item\em Osmocom NS primitives according to 48.\+016 5.\+2.\+2.\+7 Service primitives. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static const char $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+prim\+\_\+str} (enum \textbf{ gprs\+\_\+ns2\+\_\+prim} val)
\begin{DoxyCompactList}\small\item\em Obtain a human-\/readable string for NS primitives. \end{DoxyCompactList}\item 
static const char $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+lltype\+\_\+str} (enum \textbf{ gprs\+\_\+ns2\+\_\+ll} val)
\begin{DoxyCompactList}\small\item\em Obtain a human-\/readable string for NS link-\/layer type. \end{DoxyCompactList}\item 
static const char $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+aff\+\_\+cause\+\_\+prim\+\_\+str} (enum \textbf{ gprs\+\_\+ns2\+\_\+affecting\+\_\+cause} val)
\begin{DoxyCompactList}\small\item\em Obtain a human-\/readable string for NS affecting cause in primitives. \end{DoxyCompactList}\item 
static const char $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+cause\+\_\+str} (enum \textbf{ ns\+\_\+cause} val)
\begin{DoxyCompactList}\small\item\em Obtain a human-\/readable string for NS primitives. \end{DoxyCompactList}\item 
struct \textbf{ gprs\+\_\+ns2\+\_\+inst} $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+instantiate} (void $\ast$ctx, \textbf{ osmo\+\_\+prim\+\_\+cb} cb, void $\ast$cb\+\_\+data)
\begin{DoxyCompactList}\small\item\em Create a new GPRS NS instance. \end{DoxyCompactList}\item 
void \textbf{ gprs\+\_\+ns2\+\_\+free} (struct \textbf{ gprs\+\_\+ns2\+\_\+inst} $\ast$inst)
\begin{DoxyCompactList}\small\item\em Destroy a NS Instance (including all its NSEs, binds, ...). \end{DoxyCompactList}\item 
int \textbf{ gprs\+\_\+ns2\+\_\+recv\+\_\+prim} (struct \textbf{ gprs\+\_\+ns2\+\_\+inst} $\ast$nsi, struct \textbf{ osmo\+\_\+prim\+\_\+hdr} $\ast$oph)
\begin{DoxyCompactList}\small\item\em Receive a primitive from the NS User (Gb). \end{DoxyCompactList}\item 
int \textbf{ gprs\+\_\+ns2\+\_\+nse\+\_\+foreach\+\_\+nsvc} (struct \textbf{ gprs\+\_\+ns2\+\_\+nse} $\ast$nse, \textbf{ gprs\+\_\+ns2\+\_\+foreach\+\_\+nsvc\+\_\+cb} cb, void $\ast$cb\+\_\+data)
\begin{DoxyCompactList}\small\item\em Iterate over all nsvc of a NS Entity and call the callback. \end{DoxyCompactList}\item 
struct \textbf{ gprs\+\_\+ns2\+\_\+nse} $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+nse\+\_\+by\+\_\+nsei} (struct \textbf{ gprs\+\_\+ns2\+\_\+inst} $\ast$nsi, uint16\+\_\+t \textbf{ nsei})
\begin{DoxyCompactList}\small\item\em Resolve a NS Entity based on its NSEI. \end{DoxyCompactList}\item 
struct \textbf{ gprs\+\_\+ns2\+\_\+nse} $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+create\+\_\+nse} (struct \textbf{ gprs\+\_\+ns2\+\_\+inst} $\ast$nsi, uint16\+\_\+t \textbf{ nsei}, enum \textbf{ gprs\+\_\+ns2\+\_\+ll} linklayer, enum \textbf{ gprs\+\_\+ns2\+\_\+dialect} dialect)
\begin{DoxyCompactList}\small\item\em Create a NS Entity within given NS instance. \end{DoxyCompactList}\item 
struct \textbf{ gprs\+\_\+ns2\+\_\+nse} $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+create\+\_\+nse2} (struct \textbf{ gprs\+\_\+ns2\+\_\+inst} $\ast$nsi, uint16\+\_\+t \textbf{ nsei}, enum \textbf{ gprs\+\_\+ns2\+\_\+ll} linklayer, enum \textbf{ gprs\+\_\+ns2\+\_\+dialect} dialect, bool local\+\_\+sgsn\+\_\+role)
\begin{DoxyCompactList}\small\item\em Create a NS Entity within given NS instance. \end{DoxyCompactList}\item 
uint16\+\_\+t \textbf{ gprs\+\_\+ns2\+\_\+nse\+\_\+nsei} (struct \textbf{ gprs\+\_\+ns2\+\_\+nse} $\ast$nse)
\begin{DoxyCompactList}\small\item\em Return the NSEI. \end{DoxyCompactList}\item 
void \textbf{ gprs\+\_\+ns2\+\_\+free\+\_\+nse} (struct \textbf{ gprs\+\_\+ns2\+\_\+nse} $\ast$nse)
\begin{DoxyCompactList}\small\item\em Destroy given NS Entity. \end{DoxyCompactList}\item 
void \textbf{ gprs\+\_\+ns2\+\_\+free\+\_\+nses} (struct \textbf{ gprs\+\_\+ns2\+\_\+inst} $\ast$nsi)
\item 
void \textbf{ gprs\+\_\+ns2\+\_\+free\+\_\+nsvc} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc)
\begin{DoxyCompactList}\small\item\em Destroy/release given NS-\/\+VC. \end{DoxyCompactList}\item 
void \textbf{ gprs\+\_\+ns2\+\_\+free\+\_\+nsvcs} (struct \textbf{ gprs\+\_\+ns2\+\_\+nse} $\ast$nse)
\begin{DoxyCompactList}\small\item\em Destroy/release all NS-\/\+VC of given NSE. \end{DoxyCompactList}\item 
struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+nsvc\+\_\+by\+\_\+nsvci} (struct \textbf{ gprs\+\_\+ns2\+\_\+inst} $\ast$nsi, uint16\+\_\+t nsvci)
\begin{DoxyCompactList}\small\item\em Resolve a NS-\/\+VC Entity based on its NS-\/\+VCI. \end{DoxyCompactList}\item 
struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+bind\+\_\+by\+\_\+name} (struct \textbf{ gprs\+\_\+ns2\+\_\+inst} $\ast$nsi, const char $\ast$\textbf{ name})
\begin{DoxyCompactList}\small\item\em Search for a bind with a unique name. \end{DoxyCompactList}\item 
int \textbf{ gprs\+\_\+ns2\+\_\+ip\+\_\+bind} (struct \textbf{ gprs\+\_\+ns2\+\_\+inst} $\ast$nsi, const char $\ast$\textbf{ name}, const struct \textbf{ osmo\+\_\+sockaddr} $\ast$local, int dscp, struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$$\ast$result)
\begin{DoxyCompactList}\small\item\em Bind to an IPv4/\+IPv6 address. \end{DoxyCompactList}\item 
struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+ip\+\_\+bind\+\_\+by\+\_\+sockaddr} (struct \textbf{ gprs\+\_\+ns2\+\_\+inst} $\ast$nsi, const struct \textbf{ osmo\+\_\+sockaddr} $\ast$sockaddr)
\begin{DoxyCompactList}\small\item\em Find NS bind for a given socket address. \end{DoxyCompactList}\item 
struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+bind\+\_\+by\+\_\+netif} (struct \textbf{ gprs\+\_\+ns2\+\_\+inst} $\ast$nsi, const char $\ast$netif)
\begin{DoxyCompactList}\small\item\em Find NS bind for a given network interface. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+bind\+\_\+netif} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind)
\begin{DoxyCompactList}\small\item\em Return the network interface of the bind. \end{DoxyCompactList}\item 
enum \textbf{ osmo\+\_\+fr\+\_\+role} \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+bind\+\_\+role} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind)
\begin{DoxyCompactList}\small\item\em Return the frame relay role of a bind. \end{DoxyCompactList}\item 
int \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+bind} (struct \textbf{ gprs\+\_\+ns2\+\_\+inst} $\ast$nsi, const char $\ast$\textbf{ name}, const char $\ast$netif, struct \textbf{ osmo\+\_\+fr\+\_\+network} $\ast$fr\+\_\+network, enum \textbf{ osmo\+\_\+fr\+\_\+role} fr\+\_\+role, struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$$\ast$result)
\begin{DoxyCompactList}\small\item\em Create a new bind for NS over FR. \end{DoxyCompactList}\item 
int \textbf{ gprs\+\_\+ns2\+\_\+is\+\_\+fr\+\_\+bind} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind)
\begin{DoxyCompactList}\small\item\em determine if given bind is for FR-\/\+GRE encapsulation. \end{DoxyCompactList}\item 
struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+nsvc\+\_\+by\+\_\+dlci} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind, uint16\+\_\+t dlci)
\begin{DoxyCompactList}\small\item\em Return the nsvc by dlci. \end{DoxyCompactList}\item 
struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+connect} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind, struct \textbf{ gprs\+\_\+ns2\+\_\+nse} $\ast$nse, uint16\+\_\+t nsvci, uint16\+\_\+t dlci)
\begin{DoxyCompactList}\small\item\em Create, connect and activate a new FR-\/based NS-\/\+VC. \end{DoxyCompactList}\item 
struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+connect2} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind, uint16\+\_\+t \textbf{ nsei}, uint16\+\_\+t nsvci, uint16\+\_\+t dlci)
\begin{DoxyCompactList}\small\item\em Create, connect and activate a new FR-\/based NS-\/\+VC. \end{DoxyCompactList}\item 
struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+ip\+\_\+connect} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind, const struct \textbf{ osmo\+\_\+sockaddr} $\ast$remote, struct \textbf{ gprs\+\_\+ns2\+\_\+nse} $\ast$nse, uint16\+\_\+t nsvci)
\begin{DoxyCompactList}\small\item\em Create, connect and activate a new IP-\/based NS-\/\+VC. \end{DoxyCompactList}\item 
struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+ip\+\_\+connect2} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind, const struct \textbf{ osmo\+\_\+sockaddr} $\ast$remote, uint16\+\_\+t \textbf{ nsei}, uint16\+\_\+t nsvci, enum \textbf{ gprs\+\_\+ns2\+\_\+dialect} dialect)
\begin{DoxyCompactList}\small\item\em Create, connect and activate a new IP-\/based NS-\/\+VC. \end{DoxyCompactList}\item 
struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+ip\+\_\+connect\+\_\+inactive} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind, const struct \textbf{ osmo\+\_\+sockaddr} $\ast$remote, struct \textbf{ gprs\+\_\+ns2\+\_\+nse} $\ast$nse, uint16\+\_\+t nsvci)
\begin{DoxyCompactList}\small\item\em Create, and connect an inactive, new IP-\/based NS-\/\+VC. \end{DoxyCompactList}\item 
void \textbf{ gprs\+\_\+ns2\+\_\+ip\+\_\+bind\+\_\+set\+\_\+sns\+\_\+weight} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind, uint8\+\_\+t signalling, uint8\+\_\+t \textbf{ data})
\begin{DoxyCompactList}\small\item\em set the signalling and data weight for this bind \end{DoxyCompactList}\item 
void \textbf{ gprs\+\_\+ns2\+\_\+free\+\_\+bind} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind)
\begin{DoxyCompactList}\small\item\em Destroy a given bind. \end{DoxyCompactList}\item 
void \textbf{ gprs\+\_\+ns2\+\_\+free\+\_\+binds} (struct \textbf{ gprs\+\_\+ns2\+\_\+inst} $\ast$nsi)
\item 
int \textbf{ gprs\+\_\+ns2\+\_\+sns\+\_\+count} (struct \textbf{ gprs\+\_\+ns2\+\_\+nse} $\ast$nse)
\begin{DoxyCompactList}\small\item\em gprs\+\_\+ns2\+\_\+sns\+\_\+count \end{DoxyCompactList}\item 
int \textbf{ gprs\+\_\+ns2\+\_\+sns\+\_\+add\+\_\+endpoint} (struct \textbf{ gprs\+\_\+ns2\+\_\+nse} $\ast$nse, const struct \textbf{ osmo\+\_\+sockaddr} $\ast$saddr)
\begin{DoxyCompactList}\small\item\em gprs\+\_\+ns2\+\_\+sns\+\_\+add\+\_\+endpoint \end{DoxyCompactList}\item 
int \textbf{ gprs\+\_\+ns2\+\_\+sns\+\_\+del\+\_\+endpoint} (struct \textbf{ gprs\+\_\+ns2\+\_\+nse} $\ast$nse, const struct \textbf{ osmo\+\_\+sockaddr} $\ast$saddr)
\begin{DoxyCompactList}\small\item\em gprs\+\_\+ns2\+\_\+sns\+\_\+del\+\_\+endpoint \end{DoxyCompactList}\item 
int \textbf{ gprs\+\_\+ns2\+\_\+sns\+\_\+add\+\_\+bind} (struct \textbf{ gprs\+\_\+ns2\+\_\+nse} $\ast$nse, struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind)
\item 
int \textbf{ gprs\+\_\+ns2\+\_\+sns\+\_\+del\+\_\+bind} (struct \textbf{ gprs\+\_\+ns2\+\_\+nse} $\ast$nse, struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind)
\item 
const struct \textbf{ osmo\+\_\+sockaddr} $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+nse\+\_\+sns\+\_\+remote} (struct \textbf{ gprs\+\_\+ns2\+\_\+nse} $\ast$nse)
\begin{DoxyCompactList}\small\item\em Return the initial SNS remote socket address. \end{DoxyCompactList}\item 
const struct \textbf{ osmo\+\_\+sockaddr} $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+ip\+\_\+vc\+\_\+remote} (const struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc)
\begin{DoxyCompactList}\small\item\em Return the socket address of the remote peer of a NS-\/\+VC. \end{DoxyCompactList}\item 
const struct \textbf{ osmo\+\_\+sockaddr} $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+ip\+\_\+vc\+\_\+local} (const struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc)
\begin{DoxyCompactList}\small\item\em Return the socket address of the local peer of a NS-\/\+VC. \end{DoxyCompactList}\item 
bool \textbf{ gprs\+\_\+ns2\+\_\+ip\+\_\+vc\+\_\+equal} (const struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, const struct \textbf{ osmo\+\_\+sockaddr} $\ast$local, const struct \textbf{ osmo\+\_\+sockaddr} $\ast$remote, uint16\+\_\+t nsvci)
\begin{DoxyCompactList}\small\item\em Compare the NS-\/\+VC with the given parameter. \end{DoxyCompactList}\item 
const struct \textbf{ osmo\+\_\+sockaddr} $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+ip\+\_\+bind\+\_\+sockaddr} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind)
\begin{DoxyCompactList}\small\item\em Return the locally bound socket address of the bind. \end{DoxyCompactList}\item 
int \textbf{ gprs\+\_\+ns2\+\_\+is\+\_\+ip\+\_\+bind} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind)
\begin{DoxyCompactList}\small\item\em Is the given bind an IP bind? \end{DoxyCompactList}\item 
int \textbf{ gprs\+\_\+ns2\+\_\+ip\+\_\+bind\+\_\+set\+\_\+dscp} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind, int dscp)
\begin{DoxyCompactList}\small\item\em Set the DSCP (TOS) bit value of the given bind. \end{DoxyCompactList}\item 
int \textbf{ gprs\+\_\+ns2\+\_\+ip\+\_\+bind\+\_\+set\+\_\+priority} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind, uint8\+\_\+t \textbf{ priority})
\begin{DoxyCompactList}\small\item\em Set the socket priority of the given bind. \end{DoxyCompactList}\item 
struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+nsvc\+\_\+by\+\_\+sockaddr\+\_\+bind} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind, const struct \textbf{ osmo\+\_\+sockaddr} $\ast$rem\+\_\+addr)
\begin{DoxyCompactList}\small\item\em Find a NS-\/\+VC by its remote socket address. \end{DoxyCompactList}\item 
int \textbf{ gprs\+\_\+ns2\+\_\+frgre\+\_\+bind} (struct \textbf{ gprs\+\_\+ns2\+\_\+inst} $\ast$nsi, const char $\ast$\textbf{ name}, const struct \textbf{ osmo\+\_\+sockaddr} $\ast$local, int dscp, struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$$\ast$result)
\begin{DoxyCompactList}\small\item\em Create a new bind for NS over FR-\/\+GRE. \end{DoxyCompactList}\item 
int \textbf{ gprs\+\_\+ns2\+\_\+is\+\_\+frgre\+\_\+bind} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind)
\begin{DoxyCompactList}\small\item\em determine if given bind is for FR-\/\+GRE encapsulation. \end{DoxyCompactList}\item 
uint16\+\_\+t \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+nsvc\+\_\+dlci} (const struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc)
\begin{DoxyCompactList}\small\item\em Return the dlci of the nsvc. \end{DoxyCompactList}\item 
struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+nsvc\+\_\+by\+\_\+sockaddr\+\_\+nse} (struct \textbf{ gprs\+\_\+ns2\+\_\+nse} $\ast$nse, const struct \textbf{ osmo\+\_\+sockaddr} $\ast$sockaddr)
\begin{DoxyCompactList}\small\item\em Find NS-\/\+VC for given socket address. \end{DoxyCompactList}\item 
void \textbf{ gprs\+\_\+ns2\+\_\+start\+\_\+alive\+\_\+all\+\_\+nsvcs} (struct \textbf{ gprs\+\_\+ns2\+\_\+nse} $\ast$nse)
\begin{DoxyCompactList}\small\item\em Start the NS-\/\+ALIVE FSM in all NS-\/\+VCs of given NSE. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+ll\+\_\+str} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc)
\begin{DoxyCompactList}\small\item\em string-\/format a given NS-\/\+VC to a thread-\/local static buffer. \end{DoxyCompactList}\item 
char $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+ll\+\_\+str\+\_\+buf} (char $\ast$buf, size\+\_\+t buf\+\_\+len, struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc)
\begin{DoxyCompactList}\small\item\em string-\/format a given NS-\/\+VC into a user-\/supplied buffer. \end{DoxyCompactList}\item 
char $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+ll\+\_\+str\+\_\+c} (const void $\ast$ctx, struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc)
\begin{DoxyCompactList}\small\item\em string-\/format a given NS-\/\+VC to a dynamically allocated string. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ gprs\+\_\+ns2\+\_\+nsvc\+\_\+state\+\_\+name} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc)
\begin{DoxyCompactList}\small\item\em Return the current state name of a given NS-\/\+VC to a thread-\/local static buffer. \end{DoxyCompactList}\item 
int \textbf{ gprs\+\_\+ns2\+\_\+vty\+\_\+init} (struct \textbf{ gprs\+\_\+ns2\+\_\+inst} $\ast$nsi)
\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
const struct \textbf{ value\+\_\+string} \textbf{ gprs\+\_\+ns2\+\_\+prim\+\_\+strs} [$\,$]
\item 
const struct \textbf{ value\+\_\+string} \textbf{ gprs\+\_\+ns2\+\_\+lltype\+\_\+strs} [$\,$]
\item 
const struct \textbf{ value\+\_\+string} \textbf{ gprs\+\_\+ns2\+\_\+aff\+\_\+cause\+\_\+prim\+\_\+strs} [$\,$]
\item 
const struct \textbf{ value\+\_\+string} \textbf{ gprs\+\_\+ns2\+\_\+cause\+\_\+strs} [$\,$]
\end{DoxyCompactItemize}


\doxysubsection{Typedef Documentation}
\mbox{\label{gprs__ns2_8h_a5eb602bb00119e008da47c0a36013fa9}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_foreach\_nsvc\_cb@{gprs\_ns2\_foreach\_nsvc\_cb}}
\index{gprs\_ns2\_foreach\_nsvc\_cb@{gprs\_ns2\_foreach\_nsvc\_cb}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_foreach\_nsvc\_cb}
{\footnotesize\ttfamily typedef int($\ast$ gprs\+\_\+ns2\+\_\+foreach\+\_\+nsvc\+\_\+cb) (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, void $\ast$ctx)}



a callback to iterate over all NSVC 



\doxysubsection{Enumeration Type Documentation}
\mbox{\label{gprs__ns2_8h_aa9f2b27e8d728dddfc1ba4d34ae6517b}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_affecting\_cause@{gprs\_ns2\_affecting\_cause}}
\index{gprs\_ns2\_affecting\_cause@{gprs\_ns2\_affecting\_cause}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_affecting\_cause}
{\footnotesize\ttfamily enum \textbf{ gprs\+\_\+ns2\+\_\+affecting\+\_\+cause}}



Osmocom NS primitives according to 48.\+016 5.\+2.\+2.\+6 Service primitives. 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_AFF\_CAUSE\_VC\_FAILURE@{GPRS\_NS2\_AFF\_CAUSE\_VC\_FAILURE}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_AFF\_CAUSE\_VC\_FAILURE@{GPRS\_NS2\_AFF\_CAUSE\_VC\_FAILURE}}}\mbox{\label{gprs__ns2_8h_aa9f2b27e8d728dddfc1ba4d34ae6517ba0c4db131cd20cfd65ff46f46e23ad04f}} 
GPRS\+\_\+\+NS2\+\_\+\+AFF\+\_\+\+CAUSE\+\_\+\+VC\+\_\+\+FAILURE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_AFF\_CAUSE\_VC\_RECOVERY@{GPRS\_NS2\_AFF\_CAUSE\_VC\_RECOVERY}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_AFF\_CAUSE\_VC\_RECOVERY@{GPRS\_NS2\_AFF\_CAUSE\_VC\_RECOVERY}}}\mbox{\label{gprs__ns2_8h_aa9f2b27e8d728dddfc1ba4d34ae6517ba6797cd956a29e1fca48cae41001f2213}} 
GPRS\+\_\+\+NS2\+\_\+\+AFF\+\_\+\+CAUSE\+\_\+\+VC\+\_\+\+RECOVERY&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_AFF\_CAUSE\_FAILURE@{GPRS\_NS2\_AFF\_CAUSE\_FAILURE}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_AFF\_CAUSE\_FAILURE@{GPRS\_NS2\_AFF\_CAUSE\_FAILURE}}}\mbox{\label{gprs__ns2_8h_aa9f2b27e8d728dddfc1ba4d34ae6517ba076f5e568eff117dd53c7fa82b5d73af}} 
GPRS\+\_\+\+NS2\+\_\+\+AFF\+\_\+\+CAUSE\+\_\+\+FAILURE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_AFF\_CAUSE\_RECOVERY@{GPRS\_NS2\_AFF\_CAUSE\_RECOVERY}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_AFF\_CAUSE\_RECOVERY@{GPRS\_NS2\_AFF\_CAUSE\_RECOVERY}}}\mbox{\label{gprs__ns2_8h_aa9f2b27e8d728dddfc1ba4d34ae6517ba91e00200fb079615a2ceb142218062f8}} 
GPRS\+\_\+\+NS2\+\_\+\+AFF\+\_\+\+CAUSE\+\_\+\+RECOVERY&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_AFF\_CAUSE\_SNS\_CONFIGURED@{GPRS\_NS2\_AFF\_CAUSE\_SNS\_CONFIGURED}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_AFF\_CAUSE\_SNS\_CONFIGURED@{GPRS\_NS2\_AFF\_CAUSE\_SNS\_CONFIGURED}}}\mbox{\label{gprs__ns2_8h_aa9f2b27e8d728dddfc1ba4d34ae6517baaba47bc1151c97331e9aa39824e468f9}} 
GPRS\+\_\+\+NS2\+\_\+\+AFF\+\_\+\+CAUSE\+\_\+\+SNS\+\_\+\+CONFIGURED&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_AFF\_CAUSE\_SNS\_FAILURE@{GPRS\_NS2\_AFF\_CAUSE\_SNS\_FAILURE}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_AFF\_CAUSE\_SNS\_FAILURE@{GPRS\_NS2\_AFF\_CAUSE\_SNS\_FAILURE}}}\mbox{\label{gprs__ns2_8h_aa9f2b27e8d728dddfc1ba4d34ae6517baa230383513ff26eacace964ad9f88606}} 
GPRS\+\_\+\+NS2\+\_\+\+AFF\+\_\+\+CAUSE\+\_\+\+SNS\+\_\+\+FAILURE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_AFF\_CAUSE\_SNS\_NO\_ENDPOINTS@{GPRS\_NS2\_AFF\_CAUSE\_SNS\_NO\_ENDPOINTS}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_AFF\_CAUSE\_SNS\_NO\_ENDPOINTS@{GPRS\_NS2\_AFF\_CAUSE\_SNS\_NO\_ENDPOINTS}}}\mbox{\label{gprs__ns2_8h_aa9f2b27e8d728dddfc1ba4d34ae6517bafe3780b5dc9de93d080013bb2ee76d73}} 
GPRS\+\_\+\+NS2\+\_\+\+AFF\+\_\+\+CAUSE\+\_\+\+SNS\+\_\+\+NO\+\_\+\+ENDPOINTS&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_AFF\_CAUSE\_MTU\_CHANGE@{GPRS\_NS2\_AFF\_CAUSE\_MTU\_CHANGE}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_AFF\_CAUSE\_MTU\_CHANGE@{GPRS\_NS2\_AFF\_CAUSE\_MTU\_CHANGE}}}\mbox{\label{gprs__ns2_8h_aa9f2b27e8d728dddfc1ba4d34ae6517ba377fad8e49f5a34cf8f4948a07f01f8b}} 
GPRS\+\_\+\+NS2\+\_\+\+AFF\+\_\+\+CAUSE\+\_\+\+MTU\+\_\+\+CHANGE&\\
\hline

\end{DoxyEnumFields}
\mbox{\label{gprs__ns2_8h_ac1f6141054865095ae1d8cac6b65c46c}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_change\_ip\_endpoint@{gprs\_ns2\_change\_ip\_endpoint}}
\index{gprs\_ns2\_change\_ip\_endpoint@{gprs\_ns2\_change\_ip\_endpoint}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_change\_ip\_endpoint}
{\footnotesize\ttfamily enum \textbf{ gprs\+\_\+ns2\+\_\+change\+\_\+ip\+\_\+endpoint}}



Osmocom NS primitives according to 48.\+016 5.\+2.\+2.\+7 Service primitives. 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{GRPS\_NS2\_ENDPOINT\_NO\_CHANGE@{GRPS\_NS2\_ENDPOINT\_NO\_CHANGE}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GRPS\_NS2\_ENDPOINT\_NO\_CHANGE@{GRPS\_NS2\_ENDPOINT\_NO\_CHANGE}}}\mbox{\label{gprs__ns2_8h_ac1f6141054865095ae1d8cac6b65c46cab7c74c77478830b7c820c4e939e5e1ef}} 
GRPS\+\_\+\+NS2\+\_\+\+ENDPOINT\+\_\+\+NO\+\_\+\+CHANGE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_ENDPOINT\_REQUEST\_CHANGE@{GPRS\_NS2\_ENDPOINT\_REQUEST\_CHANGE}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_ENDPOINT\_REQUEST\_CHANGE@{GPRS\_NS2\_ENDPOINT\_REQUEST\_CHANGE}}}\mbox{\label{gprs__ns2_8h_ac1f6141054865095ae1d8cac6b65c46ca4afc467ed45095b13a79728dcf6958f3}} 
GPRS\+\_\+\+NS2\+\_\+\+ENDPOINT\+\_\+\+REQUEST\+\_\+\+CHANGE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_ENDPOINT\_CONFIRM\_CHANGE@{GPRS\_NS2\_ENDPOINT\_CONFIRM\_CHANGE}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_ENDPOINT\_CONFIRM\_CHANGE@{GPRS\_NS2\_ENDPOINT\_CONFIRM\_CHANGE}}}\mbox{\label{gprs__ns2_8h_ac1f6141054865095ae1d8cac6b65c46cabed0bddf40f90212af9491bf629052c1}} 
GPRS\+\_\+\+NS2\+\_\+\+ENDPOINT\+\_\+\+CONFIRM\+\_\+\+CHANGE&\\
\hline

\end{DoxyEnumFields}
\mbox{\label{gprs__ns2_8h_aa11215074e109ffc4e157d2c40834c50}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_congestion\_cause@{gprs\_ns2\_congestion\_cause}}
\index{gprs\_ns2\_congestion\_cause@{gprs\_ns2\_congestion\_cause}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_congestion\_cause}
{\footnotesize\ttfamily enum \textbf{ gprs\+\_\+ns2\+\_\+congestion\+\_\+cause}}



Osmocom NS primitives according to 48.\+016 5.\+2.\+2.\+4 Service primitives. 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_CONG\_CAUSE\_BACKWARD\_BEGIN@{GPRS\_NS2\_CONG\_CAUSE\_BACKWARD\_BEGIN}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_CONG\_CAUSE\_BACKWARD\_BEGIN@{GPRS\_NS2\_CONG\_CAUSE\_BACKWARD\_BEGIN}}}\mbox{\label{gprs__ns2_8h_aa11215074e109ffc4e157d2c40834c50a41ecf064c09a1db533e2bac1f5ee45b2}} 
GPRS\+\_\+\+NS2\+\_\+\+CONG\+\_\+\+CAUSE\+\_\+\+BACKWARD\+\_\+\+BEGIN&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_CONG\_CAUSE\_BACKWARD\_END@{GPRS\_NS2\_CONG\_CAUSE\_BACKWARD\_END}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_CONG\_CAUSE\_BACKWARD\_END@{GPRS\_NS2\_CONG\_CAUSE\_BACKWARD\_END}}}\mbox{\label{gprs__ns2_8h_aa11215074e109ffc4e157d2c40834c50a4abefbae962c72b7b81492bdb8da3f4b}} 
GPRS\+\_\+\+NS2\+\_\+\+CONG\+\_\+\+CAUSE\+\_\+\+BACKWARD\+\_\+\+END&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_CONG\_CAUSE\_FORWARD\_BEGIN@{GPRS\_NS2\_CONG\_CAUSE\_FORWARD\_BEGIN}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_CONG\_CAUSE\_FORWARD\_BEGIN@{GPRS\_NS2\_CONG\_CAUSE\_FORWARD\_BEGIN}}}\mbox{\label{gprs__ns2_8h_aa11215074e109ffc4e157d2c40834c50aa8d58af81c21fb059041e7a018914939}} 
GPRS\+\_\+\+NS2\+\_\+\+CONG\+\_\+\+CAUSE\+\_\+\+FORWARD\+\_\+\+BEGIN&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_CONG\_CAUSE\_FORWARD\_END@{GPRS\_NS2\_CONG\_CAUSE\_FORWARD\_END}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_CONG\_CAUSE\_FORWARD\_END@{GPRS\_NS2\_CONG\_CAUSE\_FORWARD\_END}}}\mbox{\label{gprs__ns2_8h_aa11215074e109ffc4e157d2c40834c50a99aaea87a9c15f2458b8d4fc73862afc}} 
GPRS\+\_\+\+NS2\+\_\+\+CONG\+\_\+\+CAUSE\+\_\+\+FORWARD\+\_\+\+END&\\
\hline

\end{DoxyEnumFields}
\mbox{\label{gprs__ns2_8h_ad919c6a8e8ead1f3f2cab01350c2b90d}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_dialect@{gprs\_ns2\_dialect}}
\index{gprs\_ns2\_dialect@{gprs\_ns2\_dialect}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_dialect}
{\footnotesize\ttfamily enum \textbf{ gprs\+\_\+ns2\+\_\+dialect}}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_DIALECT\_UNDEF@{GPRS\_NS2\_DIALECT\_UNDEF}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_DIALECT\_UNDEF@{GPRS\_NS2\_DIALECT\_UNDEF}}}\mbox{\label{gprs__ns2_8h_ad919c6a8e8ead1f3f2cab01350c2b90dad08d876f52db7e7fbc908b2c155959b8}} 
GPRS\+\_\+\+NS2\+\_\+\+DIALECT\+\_\+\+UNDEF&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_DIALECT\_STATIC\_ALIVE@{GPRS\_NS2\_DIALECT\_STATIC\_ALIVE}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_DIALECT\_STATIC\_ALIVE@{GPRS\_NS2\_DIALECT\_STATIC\_ALIVE}}}\mbox{\label{gprs__ns2_8h_ad919c6a8e8ead1f3f2cab01350c2b90dac8eb4f49190358200bf1d08c17afe92f}} 
GPRS\+\_\+\+NS2\+\_\+\+DIALECT\+\_\+\+STATIC\+\_\+\+ALIVE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_DIALECT\_STATIC\_RESETBLOCK@{GPRS\_NS2\_DIALECT\_STATIC\_RESETBLOCK}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_DIALECT\_STATIC\_RESETBLOCK@{GPRS\_NS2\_DIALECT\_STATIC\_RESETBLOCK}}}\mbox{\label{gprs__ns2_8h_ad919c6a8e8ead1f3f2cab01350c2b90dac64d21004a54db8c1ea0cf6a78239873}} 
GPRS\+\_\+\+NS2\+\_\+\+DIALECT\+\_\+\+STATIC\+\_\+\+RESETBLOCK&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_DIALECT\_IPACCESS@{GPRS\_NS2\_DIALECT\_IPACCESS}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_DIALECT\_IPACCESS@{GPRS\_NS2\_DIALECT\_IPACCESS}}}\mbox{\label{gprs__ns2_8h_ad919c6a8e8ead1f3f2cab01350c2b90da77835b3dc9ca69ffebd4e01cd0327337}} 
GPRS\+\_\+\+NS2\+\_\+\+DIALECT\+\_\+\+IPACCESS&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_DIALECT\_SNS@{GPRS\_NS2\_DIALECT\_SNS}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_DIALECT\_SNS@{GPRS\_NS2\_DIALECT\_SNS}}}\mbox{\label{gprs__ns2_8h_ad919c6a8e8ead1f3f2cab01350c2b90daef1146c61b793b4fcaf042e8a83b7455}} 
GPRS\+\_\+\+NS2\+\_\+\+DIALECT\+\_\+\+SNS&\\
\hline

\end{DoxyEnumFields}
\mbox{\label{gprs__ns2_8h_abdaf5ebe3bd4e807a61e7bead9749191}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_ll@{gprs\_ns2\_ll}}
\index{gprs\_ns2\_ll@{gprs\_ns2\_ll}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_ll}
{\footnotesize\ttfamily enum \textbf{ gprs\+\_\+ns2\+\_\+ll}}



Osmocom NS link layer types. 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_LL\_UNDEF@{GPRS\_NS2\_LL\_UNDEF}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_LL\_UNDEF@{GPRS\_NS2\_LL\_UNDEF}}}\mbox{\label{gprs__ns2_8h_abdaf5ebe3bd4e807a61e7bead9749191a5799c0537f3599029faec24844c104b1}} 
GPRS\+\_\+\+NS2\+\_\+\+LL\+\_\+\+UNDEF&undefined, used by vty \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_LL\_UDP@{GPRS\_NS2\_LL\_UDP}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_LL\_UDP@{GPRS\_NS2\_LL\_UDP}}}\mbox{\label{gprs__ns2_8h_abdaf5ebe3bd4e807a61e7bead9749191af227f9402efba2c8db5d0f33aa1fdbbf}} 
GPRS\+\_\+\+NS2\+\_\+\+LL\+\_\+\+UDP&NS/\+UDP/\+IP. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_LL\_FR@{GPRS\_NS2\_LL\_FR}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_LL\_FR@{GPRS\_NS2\_LL\_FR}}}\mbox{\label{gprs__ns2_8h_abdaf5ebe3bd4e807a61e7bead9749191a4af312b176fc4ea5b34ff7718a1bf93d}} 
GPRS\+\_\+\+NS2\+\_\+\+LL\+\_\+\+FR&NS/\+FR. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_LL\_FR\_GRE@{GPRS\_NS2\_LL\_FR\_GRE}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_LL\_FR\_GRE@{GPRS\_NS2\_LL\_FR\_GRE}}}\mbox{\label{gprs__ns2_8h_abdaf5ebe3bd4e807a61e7bead9749191ac61a1740cc9db1c86e9cc3fd311e751f}} 
GPRS\+\_\+\+NS2\+\_\+\+LL\+\_\+\+FR\+\_\+\+GRE&NS/\+FR/\+GRE/\+IP. \\
\hline

\end{DoxyEnumFields}
\mbox{\label{gprs__ns2_8h_a9ce0f8acb44426e485926dd3d51f2d82}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_prim@{gprs\_ns2\_prim}}
\index{gprs\_ns2\_prim@{gprs\_ns2\_prim}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_prim}
{\footnotesize\ttfamily enum \textbf{ gprs\+\_\+ns2\+\_\+prim}}



Osmocom NS primitives according to 48.\+016 5.\+2 Service primitives. 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_PRIM\_UNIT\_DATA@{GPRS\_NS2\_PRIM\_UNIT\_DATA}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_PRIM\_UNIT\_DATA@{GPRS\_NS2\_PRIM\_UNIT\_DATA}}}\mbox{\label{gprs__ns2_8h_a9ce0f8acb44426e485926dd3d51f2d82a5df1430f8c9c0f2d2993bf51e792f47a}} 
GPRS\+\_\+\+NS2\+\_\+\+PRIM\+\_\+\+UNIT\+\_\+\+DATA&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_PRIM\_CONGESTION@{GPRS\_NS2\_PRIM\_CONGESTION}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_PRIM\_CONGESTION@{GPRS\_NS2\_PRIM\_CONGESTION}}}\mbox{\label{gprs__ns2_8h_a9ce0f8acb44426e485926dd3d51f2d82a0078938a3a09d1c7e171e814f97bf526}} 
GPRS\+\_\+\+NS2\+\_\+\+PRIM\+\_\+\+CONGESTION&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_PRIM\_STATUS@{GPRS\_NS2\_PRIM\_STATUS}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_PRIM\_STATUS@{GPRS\_NS2\_PRIM\_STATUS}}}\mbox{\label{gprs__ns2_8h_a9ce0f8acb44426e485926dd3d51f2d82a26a82f50b3fdeaa456790074912d106d}} 
GPRS\+\_\+\+NS2\+\_\+\+PRIM\+\_\+\+STATUS&\\
\hline

\end{DoxyEnumFields}
\mbox{\label{gprs__ns2_8h_a5bec59a8d3f1e9b015771438d1862899}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_vc\_mode@{gprs\_ns2\_vc\_mode}}
\index{gprs\_ns2\_vc\_mode@{gprs\_ns2\_vc\_mode}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_vc\_mode}
{\footnotesize\ttfamily enum \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+mode}}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_VC\_MODE\_BLOCKRESET@{GPRS\_NS2\_VC\_MODE\_BLOCKRESET}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_VC\_MODE\_BLOCKRESET@{GPRS\_NS2\_VC\_MODE\_BLOCKRESET}}}\mbox{\label{gprs__ns2_8h_a5bec59a8d3f1e9b015771438d1862899a0c45d8e5be5a475f25a47e6b0e89ed43}} 
GPRS\+\_\+\+NS2\+\_\+\+VC\+\_\+\+MODE\+\_\+\+BLOCKRESET&The VC will use RESET/\+BLOCK/\+UNBLOCK to start the connection and do ALIVE/\+ACK. This is what is needed for Frame Relay transport, and if you use a R97/\+R99 Gb interface over an IP transport (never standardized by 3GPP) \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_NS2\_VC\_MODE\_ALIVE@{GPRS\_NS2\_VC\_MODE\_ALIVE}!gprs\_ns2.h@{gprs\_ns2.h}}\index{gprs\_ns2.h@{gprs\_ns2.h}!GPRS\_NS2\_VC\_MODE\_ALIVE@{GPRS\_NS2\_VC\_MODE\_ALIVE}}}\mbox{\label{gprs__ns2_8h_a5bec59a8d3f1e9b015771438d1862899afc6542be578a7f6699fd3f4df8758ae2}} 
GPRS\+\_\+\+NS2\+\_\+\+VC\+\_\+\+MODE\+\_\+\+ALIVE&The VC will only use ALIVE/\+ACK (no RESET/\+BLOCK/\+UNBLOCK), which is for Gb-\/\+IP interface compliant to 3GPP Rel=4 or later. \\
\hline

\end{DoxyEnumFields}


\doxysubsection{Function Documentation}
\mbox{\label{gprs__ns2_8h_a10730bf2f59033309f883d5c299de2e6}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_aff\_cause\_prim\_str@{gprs\_ns2\_aff\_cause\_prim\_str}}
\index{gprs\_ns2\_aff\_cause\_prim\_str@{gprs\_ns2\_aff\_cause\_prim\_str}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_aff\_cause\_prim\_str()}
{\footnotesize\ttfamily static const char $\ast$ gprs\+\_\+ns2\+\_\+aff\+\_\+cause\+\_\+prim\+\_\+str (\begin{DoxyParamCaption}\item[{enum \textbf{ gprs\+\_\+ns2\+\_\+affecting\+\_\+cause}}]{val }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Obtain a human-\/readable string for NS affecting cause in primitives. 



References \textbf{ get\+\_\+value\+\_\+string()}, and \textbf{ gprs\+\_\+ns2\+\_\+aff\+\_\+cause\+\_\+prim\+\_\+strs}.



Referenced by \textbf{ ns2\+\_\+prim\+\_\+status\+\_\+ind()}.

\mbox{\label{gprs__ns2_8h_a18ee180416667541e6d0656ac321168d}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_cause\_str@{gprs\_ns2\_cause\_str}}
\index{gprs\_ns2\_cause\_str@{gprs\_ns2\_cause\_str}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_cause\_str()}
{\footnotesize\ttfamily static const char $\ast$ gprs\+\_\+ns2\+\_\+cause\+\_\+str (\begin{DoxyParamCaption}\item[{enum \textbf{ ns\+\_\+cause}}]{val }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Obtain a human-\/readable string for NS primitives. 



References \textbf{ get\+\_\+value\+\_\+string()}, and \textbf{ gprs\+\_\+ns2\+\_\+cause\+\_\+strs}.



Referenced by \textbf{ ns2\+\_\+sns\+\_\+st\+\_\+bss\+\_\+config\+\_\+bss()}, \textbf{ ns2\+\_\+sns\+\_\+st\+\_\+bss\+\_\+size()}, \textbf{ ns2\+\_\+sns\+\_\+st\+\_\+sgsn\+\_\+wait\+\_\+config\+\_\+ack()}, \textbf{ ns2\+\_\+tx\+\_\+block()}, \textbf{ ns2\+\_\+tx\+\_\+reset()}, \textbf{ ns2\+\_\+tx\+\_\+sns\+\_\+ack()}, \textbf{ ns2\+\_\+tx\+\_\+sns\+\_\+config\+\_\+ack()}, \textbf{ ns2\+\_\+tx\+\_\+sns\+\_\+size\+\_\+ack()}, \textbf{ ns2\+\_\+tx\+\_\+status()}, and \textbf{ reject\+\_\+status\+\_\+msg()}.

\mbox{\label{gprs__ns2_8h_a673527be920647fde63ec0b7a8c9d5ed}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_fr\_bind@{gprs\_ns2\_fr\_bind}}
\index{gprs\_ns2\_fr\_bind@{gprs\_ns2\_fr\_bind}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_fr\_bind()}
{\footnotesize\ttfamily int gprs\+\_\+ns2\+\_\+fr\+\_\+bind (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+inst} $\ast$}]{nsi,  }\item[{const char $\ast$}]{name,  }\item[{const char $\ast$}]{netif,  }\item[{struct \textbf{ osmo\+\_\+fr\+\_\+network} $\ast$}]{fr\+\_\+network,  }\item[{enum \textbf{ osmo\+\_\+fr\+\_\+role}}]{fr\+\_\+role,  }\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$$\ast$}]{result }\end{DoxyParamCaption})}



Create a new bind for NS over FR. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsi} & NS instance in which to create the bind \\
\hline
\mbox{\texttt{ in}}  & {\em netif} & Network interface to bind to \\
\hline
\mbox{\texttt{ in}}  & {\em fr\+\_\+network} & \\
\hline
\mbox{\texttt{ in}}  & {\em fr\+\_\+role} & \\
\hline
\mbox{\texttt{ out}}  & {\em result} & pointer to the created bind or if a bind with the name exists return the bind. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative on error. -\/EALREADY returned in case a bind with the name exists 
\end{DoxyReturn}


References \textbf{ priv\+\_\+bind\+::backlog}, \textbf{ osmo\+\_\+fr\+\_\+link\+::cb\+\_\+data}, \textbf{ devname2ifindex()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::driver}, \textbf{ dump\+\_\+vty()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::dump\+\_\+vty}, \textbf{ osmo\+\_\+fd\+::fd}, \textbf{ fr\+\_\+backlog\+\_\+timer\+\_\+cb()}, \textbf{ fr\+\_\+netif\+\_\+ofd\+\_\+cb()}, \textbf{ fr\+\_\+tx\+\_\+cb()}, \textbf{ fr\+\_\+vc\+\_\+sendmsg()}, \textbf{ FRAME\+\_\+\+RELAY\+\_\+\+SDU}, \textbf{ free\+\_\+vc()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::free\+\_\+vc}, \textbf{ gprs\+\_\+n2\+\_\+fr\+\_\+ifupdown\+\_\+ind\+\_\+cb()}, \textbf{ gprs\+\_\+n2\+\_\+fr\+\_\+mtu\+\_\+chg\+\_\+cb()}, \textbf{ gprs\+\_\+ns2\+\_\+bind\+\_\+by\+\_\+name()}, \textbf{ gprs\+\_\+ns2\+\_\+free\+\_\+bind()}, \textbf{ GPRS\+\_\+\+NS2\+\_\+\+LL\+\_\+\+FR}, \textbf{ priv\+\_\+bind\+::ifindex}, \textbf{ INIT\+\_\+\+LLIST\+\_\+\+HEAD}, \textbf{ priv\+\_\+bind\+::link}, \textbf{ priv\+\_\+bind\+::list}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::ll}, \textbf{ LOGBIND}, \textbf{ LOGL\+\_\+\+ERROR}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::mtu}, \textbf{ name}, \textbf{ priv\+\_\+bind\+::netdev}, \textbf{ priv\+\_\+bind\+::netif}, \textbf{ ns2\+\_\+bind\+\_\+alloc()}, \textbf{ priv\+\_\+bind\+::ofd}, \textbf{ open\+\_\+socket()}, \textbf{ OSMO\+\_\+\+FD\+\_\+\+READ}, \textbf{ osmo\+\_\+fd\+\_\+register()}, \textbf{ osmo\+\_\+fd\+\_\+setup()}, \textbf{ osmo\+\_\+fr\+\_\+link\+\_\+alloc()}, \textbf{ osmo\+\_\+fr\+\_\+link\+\_\+free()}, \textbf{ osmo\+\_\+netdev\+\_\+alloc()}, \textbf{ osmo\+\_\+netdev\+\_\+free()}, \textbf{ osmo\+\_\+netdev\+\_\+register()}, \textbf{ osmo\+\_\+netdev\+\_\+set\+\_\+ifindex()}, \textbf{ osmo\+\_\+netdev\+\_\+set\+\_\+ifupdown\+\_\+ind\+\_\+cb()}, \textbf{ osmo\+\_\+netdev\+\_\+set\+\_\+mtu\+\_\+chg\+\_\+cb()}, \textbf{ osmo\+\_\+netdev\+\_\+set\+\_\+priv\+\_\+data()}, \textbf{ OSMO\+\_\+\+STRLCPY\+\_\+\+ARRAY}, \textbf{ osmo\+\_\+timer\+\_\+setup()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::priv}, \textbf{ priv\+\_\+bind\+::retry\+\_\+us}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::send\+\_\+vc}, \textbf{ setup\+\_\+device()}, \textbf{ priv\+\_\+bind\+::timer}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::transfer\+\_\+capability}, \textbf{ osmo\+\_\+fr\+\_\+link\+::tx\+\_\+cb}, and \textbf{ vc\+\_\+driver\+\_\+fr}.



Referenced by \textbf{ DEFUN()}.

\mbox{\label{gprs__ns2_8h_a086917d968c0f0e70c1d36dedf6c59e8}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_fr\_bind\_by\_netif@{gprs\_ns2\_fr\_bind\_by\_netif}}
\index{gprs\_ns2\_fr\_bind\_by\_netif@{gprs\_ns2\_fr\_bind\_by\_netif}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_fr\_bind\_by\_netif()}
{\footnotesize\ttfamily struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$ gprs\+\_\+ns2\+\_\+fr\+\_\+bind\+\_\+by\+\_\+netif (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+inst} $\ast$}]{nsi,  }\item[{const char $\ast$}]{netif }\end{DoxyParamCaption})}



Find NS bind for a given network interface. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsi} & NS instance \\
\hline
\mbox{\texttt{ in}}  & {\em netif} & the network interface to search for \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the bind or NULL if not found 
\end{DoxyReturn}


References \textbf{ gprs\+\_\+ns2\+\_\+inst\+::binding}, \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+bind\+\_\+netif()}, \textbf{ gprs\+\_\+ns2\+\_\+is\+\_\+fr\+\_\+bind()}, \textbf{ list}, \textbf{ llist\+\_\+for\+\_\+each\+\_\+entry}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::nsi}, and \textbf{ OSMO\+\_\+\+ASSERT}.



Referenced by \textbf{ DEFUN()}.

\mbox{\label{gprs__ns2_8h_a1ff9ad4b66b68a9981d3b722844c3038}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_fr\_bind\_netif@{gprs\_ns2\_fr\_bind\_netif}}
\index{gprs\_ns2\_fr\_bind\_netif@{gprs\_ns2\_fr\_bind\_netif}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_fr\_bind\_netif()}
{\footnotesize\ttfamily const char $\ast$ gprs\+\_\+ns2\+\_\+fr\+\_\+bind\+\_\+netif (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$}]{bind }\end{DoxyParamCaption})}



Return the network interface of the bind. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em bind} & The bind \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the network interface 
\end{DoxyReturn}


References \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::driver}, \textbf{ priv\+\_\+bind\+::netif}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::priv}, and \textbf{ vc\+\_\+driver\+\_\+fr}.



Referenced by \textbf{ config\+\_\+write\+\_\+nsvc()}, \textbf{ config\+\_\+write\+\_\+vbind()}, \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+bind\+\_\+by\+\_\+netif()}, and \textbf{ gprs\+\_\+ns2\+\_\+ll\+\_\+str\+\_\+buf()}.

\mbox{\label{gprs__ns2_8h_abbb2e4e7ae6f8288f03c4fcc10e2b329}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_fr\_bind\_role@{gprs\_ns2\_fr\_bind\_role}}
\index{gprs\_ns2\_fr\_bind\_role@{gprs\_ns2\_fr\_bind\_role}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_fr\_bind\_role()}
{\footnotesize\ttfamily enum \textbf{ osmo\+\_\+fr\+\_\+role} gprs\+\_\+ns2\+\_\+fr\+\_\+bind\+\_\+role (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$}]{bind }\end{DoxyParamCaption})}



Return the frame relay role of a bind. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em bind} & The bind \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the frame relay role or -\/EINVAL if bind is not frame relay 
\end{DoxyReturn}


References \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::driver}, \textbf{ priv\+\_\+bind\+::link}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::priv}, \textbf{ osmo\+\_\+fr\+\_\+link\+::role}, and \textbf{ vc\+\_\+driver\+\_\+fr}.



Referenced by \textbf{ config\+\_\+write\+\_\+vbind()}.

\mbox{\label{gprs__ns2_8h_a6f16fc129c2aec0d981dbcd2ce96ac9f}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_fr\_connect@{gprs\_ns2\_fr\_connect}}
\index{gprs\_ns2\_fr\_connect@{gprs\_ns2\_fr\_connect}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_fr\_connect()}
{\footnotesize\ttfamily struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$ gprs\+\_\+ns2\+\_\+fr\+\_\+connect (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$}]{bind,  }\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+nse} $\ast$}]{nse,  }\item[{uint16\+\_\+t}]{nsvci,  }\item[{uint16\+\_\+t}]{dlci }\end{DoxyParamCaption})}



Create, connect and activate a new FR-\/based NS-\/\+VC. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em bind} & bind in which the new NS-\/\+VC is to be created \\
\hline
\mbox{\texttt{ in}}  & {\em nsei} & NSEI of the NS Entity in which the NS-\/\+VC is to be created \\
\hline
\mbox{\texttt{ in}}  & {\em dlci} & Data Link connection identifier \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to newly-\/allocated, connected and activated NS-\/\+VC; NULL on error 
\end{DoxyReturn}


References \textbf{ priv\+\_\+bind\+::dlci}, \textbf{ fr\+\_\+alloc\+\_\+vc()}, \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+nsvc\+\_\+by\+\_\+dlci()}, \textbf{ gprs\+\_\+ns2\+\_\+free\+\_\+nsvc()}, \textbf{ gprs\+\_\+ns2\+\_\+is\+\_\+fr\+\_\+bind()}, \textbf{ gprs\+\_\+ns2\+\_\+lltype\+\_\+str()}, \textbf{ GPRS\+\_\+\+NS2\+\_\+\+VC\+\_\+\+MODE\+\_\+\+BLOCKRESET}, \textbf{ gprs\+\_\+ns2\+\_\+nse\+::ll}, \textbf{ priv\+\_\+bind\+::netif}, \textbf{ ns2\+\_\+vc\+\_\+alloc()}, \textbf{ gprs\+\_\+ns2\+\_\+nse\+::nsei}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::nsvci}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::nsvci\+\_\+is\+\_\+valid}, \textbf{ OSMO\+\_\+\+ASSERT}, \textbf{ osmo\+\_\+identifier\+\_\+sanitize\+\_\+buf()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::priv}, and \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::priv}.



Referenced by \textbf{ DEFUN()}, and \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+connect2()}.

\mbox{\label{gprs__ns2_8h_a29c5cfa0ba80ef074bc89044208c68b5}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_fr\_connect2@{gprs\_ns2\_fr\_connect2}}
\index{gprs\_ns2\_fr\_connect2@{gprs\_ns2\_fr\_connect2}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_fr\_connect2()}
{\footnotesize\ttfamily struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$ gprs\+\_\+ns2\+\_\+fr\+\_\+connect2 (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$}]{bind,  }\item[{uint16\+\_\+t}]{nsei,  }\item[{uint16\+\_\+t}]{nsvci,  }\item[{uint16\+\_\+t}]{dlci }\end{DoxyParamCaption})}



Create, connect and activate a new FR-\/based NS-\/\+VC. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em bind} & bind in which the new NS-\/\+VC is to be created \\
\hline
\mbox{\texttt{ in}}  & {\em nsei} & NSEI of the NS Entity in which the NS-\/\+VC is to be created \\
\hline
\mbox{\texttt{ in}}  & {\em dlci} & Data Link connection identifier \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to newly-\/allocated, connected and activated NS-\/\+VC; NULL on error 
\end{DoxyReturn}


References \textbf{ gprs\+\_\+ns2\+\_\+create\+\_\+nse()}, \textbf{ GPRS\+\_\+\+NS2\+\_\+\+DIALECT\+\_\+\+STATIC\+\_\+\+RESETBLOCK}, \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+connect()}, \textbf{ gprs\+\_\+ns2\+\_\+free\+\_\+nse()}, \textbf{ gprs\+\_\+ns2\+\_\+is\+\_\+fr\+\_\+bind()}, \textbf{ GPRS\+\_\+\+NS2\+\_\+\+LL\+\_\+\+FR}, \textbf{ gprs\+\_\+ns2\+\_\+nse\+\_\+by\+\_\+nsei()}, \textbf{ nsei}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::nsi}, \textbf{ gprs\+\_\+ns2\+\_\+nse\+::nsvc}, and \textbf{ OSMO\+\_\+\+ASSERT}.

\mbox{\label{gprs__ns2_8h_a5c88e59906893ba5ebd5bc79975ba87e}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_fr\_nsvc\_by\_dlci@{gprs\_ns2\_fr\_nsvc\_by\_dlci}}
\index{gprs\_ns2\_fr\_nsvc\_by\_dlci@{gprs\_ns2\_fr\_nsvc\_by\_dlci}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_fr\_nsvc\_by\_dlci()}
{\footnotesize\ttfamily struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$ gprs\+\_\+ns2\+\_\+fr\+\_\+nsvc\+\_\+by\+\_\+dlci (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$}]{bind,  }\item[{uint16\+\_\+t}]{dlci }\end{DoxyParamCaption})}



Return the nsvc by dlci. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em bind} & \\
\hline
\mbox{\texttt{ in}}  & {\em dlci} & Data Link connection identifier \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the nsvc or NULL if not found 
\end{DoxyReturn}


References \textbf{ priv\+\_\+vc\+::dlci}, \textbf{ gprs\+\_\+ns2\+\_\+is\+\_\+fr\+\_\+bind()}, \textbf{ llist\+\_\+for\+\_\+each\+\_\+entry}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::nsvc}, \textbf{ OSMO\+\_\+\+ASSERT}, and \textbf{ gprs\+\_\+ns2\+\_\+vc\+::priv}.



Referenced by \textbf{ DEFUN()}, and \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+connect()}.

\mbox{\label{gprs__ns2_8h_a6d880ef22bf47cbd86427f3b693a5899}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_fr\_nsvc\_dlci@{gprs\_ns2\_fr\_nsvc\_dlci}}
\index{gprs\_ns2\_fr\_nsvc\_dlci@{gprs\_ns2\_fr\_nsvc\_dlci}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_fr\_nsvc\_dlci()}
{\footnotesize\ttfamily uint16\+\_\+t gprs\+\_\+ns2\+\_\+fr\+\_\+nsvc\+\_\+dlci (\begin{DoxyParamCaption}\item[{const struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc }\end{DoxyParamCaption})}



Return the dlci of the nsvc. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsvc} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the dlci or 0 on error. 0 is not a valid dlci. 
\end{DoxyReturn}


References \textbf{ gprs\+\_\+ns2\+\_\+vc\+::bind}, \textbf{ priv\+\_\+vc\+::dlci}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::driver}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::priv}, and \textbf{ vc\+\_\+driver\+\_\+fr}.



Referenced by \textbf{ config\+\_\+write\+\_\+nsvc()}, and \textbf{ gprs\+\_\+ns2\+\_\+ll\+\_\+str\+\_\+buf()}.

\mbox{\label{gprs__ns2_8h_a84ca7c73ad1ba0823050a3a294bca51a}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_frgre\_bind@{gprs\_ns2\_frgre\_bind}}
\index{gprs\_ns2\_frgre\_bind@{gprs\_ns2\_frgre\_bind}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_frgre\_bind()}
{\footnotesize\ttfamily int gprs\+\_\+ns2\+\_\+frgre\+\_\+bind (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+inst} $\ast$}]{nsi,  }\item[{const char $\ast$}]{name,  }\item[{const struct \textbf{ osmo\+\_\+sockaddr} $\ast$}]{local,  }\item[{int}]{dscp,  }\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$$\ast$}]{result }\end{DoxyParamCaption})}



Create a new bind for NS over FR-\/\+GRE. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsi} & NS instance in which to create the bind \\
\hline
\mbox{\texttt{ in}}  & {\em local} & local address on which to bind \\
\hline
\mbox{\texttt{ in}}  & {\em dscp} & DSCP/\+TOS bits to use for transmitted data on this bind \\
\hline
\mbox{\texttt{ out}}  & {\em result} & pointer to the created bind or if a bind with the name exists return the bind. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative on error. -\/EALREADY returned in case a bind with the name exists 
\end{DoxyReturn}


References \textbf{ priv\+\_\+bind\+::addr}, \textbf{ osmo\+\_\+fd\+::cb}, \textbf{ osmo\+\_\+fd\+::data}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::driver}, \textbf{ priv\+\_\+bind\+::dscp}, \textbf{ priv\+\_\+bind\+::fd}, \textbf{ FRAME\+\_\+\+RELAY\+\_\+\+SDU}, \textbf{ free\+\_\+vc()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::free\+\_\+vc}, \textbf{ frgre\+\_\+fd\+\_\+cb()}, \textbf{ frgre\+\_\+vc\+\_\+sendmsg()}, \textbf{ gprs\+\_\+ns2\+\_\+bind\+\_\+by\+\_\+name()}, \textbf{ gprs\+\_\+ns2\+\_\+free\+\_\+bind()}, \textbf{ GPRS\+\_\+\+NS2\+\_\+\+LL\+\_\+\+FR\+\_\+\+GRE}, \textbf{ INIT\+\_\+\+LLIST\+\_\+\+HEAD}, \textbf{ IPPROTO\+\_\+\+GRE}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::ll}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::mtu}, \textbf{ name}, \textbf{ ns2\+\_\+bind\+\_\+alloc()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::nsi}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::nsvc}, \textbf{ OSMO\+\_\+\+SOCK\+\_\+\+F\+\_\+\+BIND}, \textbf{ OSMO\+\_\+\+SOCK\+\_\+\+F\+\_\+\+DSCP}, \textbf{ osmo\+\_\+sock\+\_\+init\+\_\+osa\+\_\+ofd()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::priv}, \textbf{ osmo\+\_\+sockaddr\+::sa}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::send\+\_\+vc}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::transfer\+\_\+capability}, \textbf{ osmo\+\_\+sockaddr\+::u}, and \textbf{ vc\+\_\+driver\+\_\+frgre}.

\mbox{\label{gprs__ns2_8h_ae777bdd223a7190ca183c0e0ebe0b26a}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_ip\_bind@{gprs\_ns2\_ip\_bind}}
\index{gprs\_ns2\_ip\_bind@{gprs\_ns2\_ip\_bind}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_ip\_bind()}
{\footnotesize\ttfamily int gprs\+\_\+ns2\+\_\+ip\+\_\+bind (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+inst} $\ast$}]{nsi,  }\item[{const char $\ast$}]{name,  }\item[{const struct \textbf{ osmo\+\_\+sockaddr} $\ast$}]{local,  }\item[{int}]{dscp,  }\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$$\ast$}]{result }\end{DoxyParamCaption})}



Bind to an IPv4/\+IPv6 address. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsi} & NS Instance in which to create the NSVC \\
\hline
\mbox{\texttt{ in}}  & {\em local} & the local address to bind to \\
\hline
\mbox{\texttt{ in}}  & {\em dscp} & the DSCP/\+TOS bits used for transmitted data \\
\hline
\mbox{\texttt{ out}}  & {\em result} & pointer to the created bind or if a bind with the name exists return the bind. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative on error. -\/EALREADY returned in case a bind with the name exists 
\end{DoxyReturn}


References \textbf{ priv\+\_\+bind\+::addr}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::driver}, \textbf{ priv\+\_\+bind\+::dscp}, \textbf{ dump\+\_\+vty()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::dump\+\_\+vty}, \textbf{ free\+\_\+vc()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::free\+\_\+vc}, \textbf{ gprs\+\_\+ns2\+\_\+free\+\_\+bind()}, \textbf{ gprs\+\_\+ns2\+\_\+ip\+\_\+bind\+\_\+by\+\_\+sockaddr()}, \textbf{ GPRS\+\_\+\+NS2\+\_\+\+LL\+\_\+\+UDP}, \textbf{ handle\+\_\+nsip\+\_\+recvfrom()}, \textbf{ handle\+\_\+nsip\+\_\+sendto()}, \textbf{ priv\+\_\+bind\+::iofd}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::ll}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::mtu}, \textbf{ name}, \textbf{ ns2\+\_\+bind\+\_\+alloc()}, \textbf{ nsip\+\_\+vc\+\_\+sendmsg()}, \textbf{ OSMO\+\_\+\+IO\+\_\+\+FD\+\_\+\+MODE\+\_\+\+RECVFROM\+\_\+\+SENDTO}, \textbf{ osmo\+\_\+iofd\+\_\+register()}, \textbf{ osmo\+\_\+iofd\+\_\+set\+\_\+alloc\+\_\+info()}, \textbf{ osmo\+\_\+iofd\+\_\+set\+\_\+txqueue\+\_\+max\+\_\+length()}, \textbf{ osmo\+\_\+iofd\+\_\+setup()}, \textbf{ OSMO\+\_\+\+SOCK\+\_\+\+F\+\_\+\+BIND}, \textbf{ OSMO\+\_\+\+SOCK\+\_\+\+F\+\_\+\+DSCP}, \textbf{ osmo\+\_\+sock\+\_\+init\+\_\+osa()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::priv}, \textbf{ osmo\+\_\+sockaddr\+::sa}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::send\+\_\+vc}, \textbf{ osmo\+\_\+io\+\_\+ops\+::sendto\+\_\+cb}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::transfer\+\_\+capability}, \textbf{ gprs\+\_\+ns2\+\_\+inst\+::txqueue\+\_\+max\+\_\+length}, \textbf{ osmo\+\_\+sockaddr\+::u}, and \textbf{ vc\+\_\+driver\+\_\+ip}.



Referenced by \textbf{ DEFUN()}.

\mbox{\label{gprs__ns2_8h_a1d48413fcc9331bb9d374ccf29a39d35}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_ip\_bind\_by\_sockaddr@{gprs\_ns2\_ip\_bind\_by\_sockaddr}}
\index{gprs\_ns2\_ip\_bind\_by\_sockaddr@{gprs\_ns2\_ip\_bind\_by\_sockaddr}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_ip\_bind\_by\_sockaddr()}
{\footnotesize\ttfamily struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$ gprs\+\_\+ns2\+\_\+ip\+\_\+bind\+\_\+by\+\_\+sockaddr (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+inst} $\ast$}]{nsi,  }\item[{const struct \textbf{ osmo\+\_\+sockaddr} $\ast$}]{sockaddr }\end{DoxyParamCaption})}



Find NS bind for a given socket address. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsi} & NS instance \\
\hline
\mbox{\texttt{ in}}  & {\em sockaddr} & socket address to search for \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\end{DoxyReturn}


References \textbf{ gprs\+\_\+ns2\+\_\+inst\+::binding}, \textbf{ gprs\+\_\+ns2\+\_\+ip\+\_\+bind\+\_\+sockaddr()}, \textbf{ gprs\+\_\+ns2\+\_\+is\+\_\+ip\+\_\+bind()}, \textbf{ list}, \textbf{ llist\+\_\+for\+\_\+each\+\_\+entry}, \textbf{ OSMO\+\_\+\+ASSERT}, and \textbf{ osmo\+\_\+sockaddr\+\_\+cmp()}.



Referenced by \textbf{ DEFUN()}, and \textbf{ gprs\+\_\+ns2\+\_\+ip\+\_\+bind()}.

\mbox{\label{gprs__ns2_8h_abc6c5168cd4db66baf60ca62a3609027}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_ip\_bind\_set\_dscp@{gprs\_ns2\_ip\_bind\_set\_dscp}}
\index{gprs\_ns2\_ip\_bind\_set\_dscp@{gprs\_ns2\_ip\_bind\_set\_dscp}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_ip\_bind\_set\_dscp()}
{\footnotesize\ttfamily int gprs\+\_\+ns2\+\_\+ip\+\_\+bind\+\_\+set\+\_\+dscp (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$}]{bind,  }\item[{int}]{dscp }\end{DoxyParamCaption})}



Set the DSCP (TOS) bit value of the given bind. 



References \textbf{ priv\+\_\+bind\+::dscp}, \textbf{ gprs\+\_\+ns2\+\_\+is\+\_\+ip\+\_\+bind()}, \textbf{ priv\+\_\+bind\+::iofd}, \textbf{ LOGBIND}, \textbf{ LOGL\+\_\+\+ERROR}, \textbf{ OSMO\+\_\+\+ASSERT}, \textbf{ osmo\+\_\+iofd\+\_\+get\+\_\+fd()}, \textbf{ osmo\+\_\+sock\+\_\+set\+\_\+dscp()}, and \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::priv}.



Referenced by \textbf{ DEFUN()}.

\mbox{\label{gprs__ns2_8h_a0db4579d0b0f86d9c5628bda3fa24f87}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_ip\_bind\_set\_priority@{gprs\_ns2\_ip\_bind\_set\_priority}}
\index{gprs\_ns2\_ip\_bind\_set\_priority@{gprs\_ns2\_ip\_bind\_set\_priority}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_ip\_bind\_set\_priority()}
{\footnotesize\ttfamily int gprs\+\_\+ns2\+\_\+ip\+\_\+bind\+\_\+set\+\_\+priority (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$}]{bind,  }\item[{uint8\+\_\+t}]{priority }\end{DoxyParamCaption})}



Set the socket priority of the given bind. 



References \textbf{ gprs\+\_\+ns2\+\_\+is\+\_\+ip\+\_\+bind()}, \textbf{ priv\+\_\+bind\+::iofd}, \textbf{ LOGBIND}, \textbf{ LOGL\+\_\+\+ERROR}, \textbf{ OSMO\+\_\+\+ASSERT}, \textbf{ osmo\+\_\+iofd\+\_\+get\+\_\+fd()}, \textbf{ osmo\+\_\+sock\+\_\+set\+\_\+priority()}, \textbf{ priority}, \textbf{ priv\+\_\+bind\+::priority}, and \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::priv}.



Referenced by \textbf{ DEFUN()}.

\mbox{\label{gprs__ns2_8h_a36472eed4f70e5a5952fbc07bdb76b7f}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_ip\_bind\_set\_sns\_weight@{gprs\_ns2\_ip\_bind\_set\_sns\_weight}}
\index{gprs\_ns2\_ip\_bind\_set\_sns\_weight@{gprs\_ns2\_ip\_bind\_set\_sns\_weight}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_ip\_bind\_set\_sns\_weight()}
{\footnotesize\ttfamily void gprs\+\_\+ns2\+\_\+ip\+\_\+bind\+\_\+set\+\_\+sns\+\_\+weight (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$}]{bind,  }\item[{uint8\+\_\+t}]{signalling,  }\item[{uint8\+\_\+t}]{data }\end{DoxyParamCaption})}



set the signalling and data weight for this bind 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em bind} & \\
\hline
\mbox{\texttt{ in}}  & {\em signalling} & the signalling weight \\
\hline
\mbox{\texttt{ in}}  & {\em data} & the data weight \\
\hline
\end{DoxyParams}


References \textbf{ data}, \textbf{ gprs\+\_\+ns2\+\_\+is\+\_\+ip\+\_\+bind()}, \textbf{ ns2\+\_\+sns\+\_\+update\+\_\+weights()}, \textbf{ OSMO\+\_\+\+ASSERT}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::sns\+\_\+data\+\_\+weight}, and \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::sns\+\_\+sig\+\_\+weight}.



Referenced by \textbf{ DEFUN()}.

\mbox{\label{gprs__ns2_8h_a1ce64188a0acad56a1d21d53a18d561b}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_ip\_bind\_sockaddr@{gprs\_ns2\_ip\_bind\_sockaddr}}
\index{gprs\_ns2\_ip\_bind\_sockaddr@{gprs\_ns2\_ip\_bind\_sockaddr}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_ip\_bind\_sockaddr()}
{\footnotesize\ttfamily const struct \textbf{ osmo\+\_\+sockaddr} $\ast$ gprs\+\_\+ns2\+\_\+ip\+\_\+bind\+\_\+sockaddr (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$}]{bind }\end{DoxyParamCaption})}



Return the locally bound socket address of the bind. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em bind} & The bind whose local address we want to know \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
address of the local bind 
\end{DoxyReturn}


References \textbf{ priv\+\_\+bind\+::addr}, \textbf{ gprs\+\_\+ns2\+\_\+is\+\_\+ip\+\_\+bind()}, \textbf{ OSMO\+\_\+\+ASSERT}, and \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::priv}.



Referenced by \textbf{ config\+\_\+write\+\_\+vbind()}, \textbf{ gprs\+\_\+ns2\+\_\+ip\+\_\+bind\+\_\+by\+\_\+sockaddr()}, \textbf{ gprs\+\_\+ns2\+\_\+ll\+\_\+str\+\_\+buf()}, \textbf{ ns2\+\_\+add\+\_\+procedure()}, \textbf{ ns2\+\_\+create\+\_\+vc()}, \textbf{ ns2\+\_\+get\+\_\+sbind\+\_\+ip4\+\_\+entry()}, \textbf{ ns2\+\_\+get\+\_\+sbind\+\_\+ip6\+\_\+entry()}, \textbf{ ns2\+\_\+ip\+\_\+bind\+\_\+connect()}, \textbf{ ns2\+\_\+ip\+\_\+count\+\_\+bind()}, \textbf{ ns2\+\_\+ip\+\_\+get\+\_\+bind\+\_\+by\+\_\+index()}, \textbf{ ns2\+\_\+sns\+\_\+add\+\_\+elements()}, \textbf{ ns2\+\_\+sns\+\_\+bss\+\_\+valid\+\_\+configuration()}, \textbf{ ns2\+\_\+sns\+\_\+compute\+\_\+local\+\_\+ep\+\_\+from\+\_\+binds()}, \textbf{ ns2\+\_\+sns\+\_\+count\+\_\+num\+\_\+local\+\_\+ep()}, \textbf{ ns2\+\_\+sns\+\_\+update\+\_\+weights()}, and \textbf{ remove\+\_\+bind\+\_\+elem()}.

\mbox{\label{gprs__ns2_8h_acea1beca99e787361064e11816c79b3a}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_ip\_vc\_equal@{gprs\_ns2\_ip\_vc\_equal}}
\index{gprs\_ns2\_ip\_vc\_equal@{gprs\_ns2\_ip\_vc\_equal}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_ip\_vc\_equal()}
{\footnotesize\ttfamily bool gprs\+\_\+ns2\+\_\+ip\+\_\+vc\+\_\+equal (\begin{DoxyParamCaption}\item[{const struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc,  }\item[{const struct \textbf{ osmo\+\_\+sockaddr} $\ast$}]{local,  }\item[{const struct \textbf{ osmo\+\_\+sockaddr} $\ast$}]{remote,  }\item[{uint16\+\_\+t}]{nsvci }\end{DoxyParamCaption})}



Compare the NS-\/\+VC with the given parameter. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsvc} & NS-\/\+VC to compare with \\
\hline
\mbox{\texttt{ in}}  & {\em local} & The local address \\
\hline
\mbox{\texttt{ in}}  & {\em remote} & The remote address \\
\hline
\mbox{\texttt{ in}}  & {\em nsvci} & NS-\/\+VCI will only be used if the NS-\/\+VC in BLOCKRESET mode otherwise NS-\/\+VCI isn\textquotesingle{}t applicable. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if the NS-\/\+VC has the same properties as given 
\end{DoxyReturn}


References \textbf{ priv\+\_\+bind\+::addr}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::bind}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::driver}, \textbf{ GPRS\+\_\+\+NS2\+\_\+\+VC\+\_\+\+MODE\+\_\+\+BLOCKRESET}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::mode}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::nsvci}, \textbf{ osmo\+\_\+sockaddr\+\_\+cmp()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::priv}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::priv}, \textbf{ priv\+\_\+vc\+::remote}, and \textbf{ vc\+\_\+driver\+\_\+ip}.

\mbox{\label{gprs__ns2_8h_aa78fe2cc00afbad05816b358a3276f17}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_ip\_vc\_local@{gprs\_ns2\_ip\_vc\_local}}
\index{gprs\_ns2\_ip\_vc\_local@{gprs\_ns2\_ip\_vc\_local}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_ip\_vc\_local()}
{\footnotesize\ttfamily const struct \textbf{ osmo\+\_\+sockaddr} $\ast$ gprs\+\_\+ns2\+\_\+ip\+\_\+vc\+\_\+local (\begin{DoxyParamCaption}\item[{const struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc }\end{DoxyParamCaption})}



Return the socket address of the local peer of a NS-\/\+VC. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsvc} & NS-\/\+VC whose local peer we want to know \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
address of the local peer; NULL in case of error 
\end{DoxyReturn}


References \textbf{ priv\+\_\+bind\+::addr}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::bind}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::driver}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::priv}, and \textbf{ vc\+\_\+driver\+\_\+ip}.

\mbox{\label{gprs__ns2_8h_a8fd3161ea605df85fffe870f40766ffb}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_ip\_vc\_remote@{gprs\_ns2\_ip\_vc\_remote}}
\index{gprs\_ns2\_ip\_vc\_remote@{gprs\_ns2\_ip\_vc\_remote}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_ip\_vc\_remote()}
{\footnotesize\ttfamily const struct \textbf{ osmo\+\_\+sockaddr} $\ast$ gprs\+\_\+ns2\+\_\+ip\+\_\+vc\+\_\+remote (\begin{DoxyParamCaption}\item[{const struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc }\end{DoxyParamCaption})}



Return the socket address of the remote peer of a NS-\/\+VC. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nsvc} & NS-\/\+VC whose remote peer we want to know \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
address of the remote peer; NULL in case of error 
\end{DoxyReturn}


References \textbf{ gprs\+\_\+ns2\+\_\+vc\+::bind}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::driver}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::priv}, \textbf{ priv\+\_\+vc\+::remote}, and \textbf{ vc\+\_\+driver\+\_\+ip}.



Referenced by \textbf{ config\+\_\+write\+\_\+nsvc()}, \textbf{ do\+\_\+sns\+\_\+change\+\_\+weight()}, \textbf{ do\+\_\+sns\+\_\+delete()}, \textbf{ gprs\+\_\+ns2\+\_\+ll\+\_\+str\+\_\+buf()}, \textbf{ gprs\+\_\+ns2\+\_\+nsvc\+\_\+by\+\_\+sockaddr\+\_\+nse()}, \textbf{ ns2\+\_\+sns\+\_\+compute\+\_\+local\+\_\+ep\+\_\+from\+\_\+binds()}, and \textbf{ nsvc\+\_\+for\+\_\+bind\+\_\+and\+\_\+remote()}.

\mbox{\label{gprs__ns2_8h_a80a485eb506916a6b971551d38e22ce2}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_is\_fr\_bind@{gprs\_ns2\_is\_fr\_bind}}
\index{gprs\_ns2\_is\_fr\_bind@{gprs\_ns2\_is\_fr\_bind}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_is\_fr\_bind()}
{\footnotesize\ttfamily int gprs\+\_\+ns2\+\_\+is\+\_\+fr\+\_\+bind (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$}]{bind }\end{DoxyParamCaption})}



determine if given bind is for FR-\/\+GRE encapsulation. 



References \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::driver}, and \textbf{ vc\+\_\+driver\+\_\+fr}.



Referenced by \textbf{ fr\+\_\+alloc\+\_\+vc()}, \textbf{ free\+\_\+bind()}, \textbf{ free\+\_\+vc()}, \textbf{ gprs\+\_\+ns2\+\_\+find\+\_\+vc\+\_\+by\+\_\+dlci()}, \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+bind\+\_\+by\+\_\+netif()}, \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+connect()}, \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+connect2()}, and \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+nsvc\+\_\+by\+\_\+dlci()}.

\mbox{\label{gprs__ns2_8h_a0454d2aa6998d2f7035bb65ae09f5338}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_is\_frgre\_bind@{gprs\_ns2\_is\_frgre\_bind}}
\index{gprs\_ns2\_is\_frgre\_bind@{gprs\_ns2\_is\_frgre\_bind}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_is\_frgre\_bind()}
{\footnotesize\ttfamily int gprs\+\_\+ns2\+\_\+is\+\_\+frgre\+\_\+bind (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$}]{bind }\end{DoxyParamCaption})}



determine if given bind is for FR-\/\+GRE encapsulation. 



References \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::driver}, and \textbf{ vc\+\_\+driver\+\_\+frgre}.

\mbox{\label{gprs__ns2_8h_a0a7277d548a97db61b0d693880b06924}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_is\_ip\_bind@{gprs\_ns2\_is\_ip\_bind}}
\index{gprs\_ns2\_is\_ip\_bind@{gprs\_ns2\_is\_ip\_bind}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_is\_ip\_bind()}
{\footnotesize\ttfamily int gprs\+\_\+ns2\+\_\+is\+\_\+ip\+\_\+bind (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$}]{bind }\end{DoxyParamCaption})}



Is the given bind an IP bind? 



References \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::driver}, and \textbf{ vc\+\_\+driver\+\_\+ip}.



Referenced by \textbf{ DEFUN()}, \textbf{ free\+\_\+bind()}, \textbf{ free\+\_\+vc()}, \textbf{ gprs\+\_\+ns2\+\_\+free\+\_\+bind()}, \textbf{ gprs\+\_\+ns2\+\_\+ip\+\_\+bind\+\_\+by\+\_\+sockaddr()}, \textbf{ gprs\+\_\+ns2\+\_\+ip\+\_\+bind\+\_\+set\+\_\+dscp()}, \textbf{ gprs\+\_\+ns2\+\_\+ip\+\_\+bind\+\_\+set\+\_\+priority()}, \textbf{ gprs\+\_\+ns2\+\_\+ip\+\_\+bind\+\_\+set\+\_\+sns\+\_\+weight()}, \textbf{ gprs\+\_\+ns2\+\_\+ip\+\_\+bind\+\_\+sockaddr()}, \textbf{ gprs\+\_\+ns2\+\_\+ll\+\_\+str\+\_\+buf()}, \textbf{ gprs\+\_\+ns2\+\_\+nsvc\+\_\+by\+\_\+sockaddr\+\_\+bind()}, \textbf{ gprs\+\_\+ns2\+\_\+sns\+\_\+add\+\_\+bind()}, \textbf{ ns2\+\_\+ip\+\_\+bind\+\_\+connect()}, \textbf{ ns2\+\_\+ip\+\_\+count\+\_\+bind()}, \textbf{ ns2\+\_\+ip\+\_\+get\+\_\+bind\+\_\+by\+\_\+index()}, and \textbf{ ns2\+\_\+ip\+\_\+set\+\_\+txqueue\+\_\+max\+\_\+length()}.

\mbox{\label{gprs__ns2_8h_adfb883a0926a3abbaf6ad8376ba60fc2}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_lltype\_str@{gprs\_ns2\_lltype\_str}}
\index{gprs\_ns2\_lltype\_str@{gprs\_ns2\_lltype\_str}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_lltype\_str()}
{\footnotesize\ttfamily static const char $\ast$ gprs\+\_\+ns2\+\_\+lltype\+\_\+str (\begin{DoxyParamCaption}\item[{enum \textbf{ gprs\+\_\+ns2\+\_\+ll}}]{val }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Obtain a human-\/readable string for NS link-\/layer type. 



References \textbf{ get\+\_\+value\+\_\+string()}, and \textbf{ gprs\+\_\+ns2\+\_\+lltype\+\_\+strs}.



Referenced by \textbf{ dump\+\_\+nse()}, \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+connect()}, \textbf{ ns2\+\_\+create\+\_\+vc()}, \textbf{ ns2\+\_\+create\+\_\+vc\+\_\+sns()}, and \textbf{ ns2\+\_\+ip\+\_\+bind\+\_\+connect()}.

\mbox{\label{gprs__ns2_8h_a7d15977f0b7abac1779dbbdc9fc475c5}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_nse\_sns\_remote@{gprs\_ns2\_nse\_sns\_remote}}
\index{gprs\_ns2\_nse\_sns\_remote@{gprs\_ns2\_nse\_sns\_remote}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_nse\_sns\_remote()}
{\footnotesize\ttfamily const struct \textbf{ osmo\+\_\+sockaddr} $\ast$ gprs\+\_\+ns2\+\_\+nse\+\_\+sns\+\_\+remote (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+nse} $\ast$}]{nse }\end{DoxyParamCaption})}



Return the initial SNS remote socket address. 


\begin{DoxyParams}{Parameters}
{\em nse} & NS Entity \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
address of the initial SNS connection; NULL in case of error 
\end{DoxyReturn}


References \textbf{ gprs\+\_\+ns2\+\_\+nse\+::bss\+\_\+sns\+\_\+fi}, \textbf{ ns2\+\_\+sns\+\_\+state\+::initial}, \textbf{ ns2\+\_\+sns\+\_\+state\+::nse}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+::priv}, and \textbf{ sns\+\_\+endpoint\+::saddr}.

\mbox{\label{gprs__ns2_8h_abdf1d19f4662c3264954a5513d223d47}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_nsvc\_by\_sockaddr\_bind@{gprs\_ns2\_nsvc\_by\_sockaddr\_bind}}
\index{gprs\_ns2\_nsvc\_by\_sockaddr\_bind@{gprs\_ns2\_nsvc\_by\_sockaddr\_bind}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_nsvc\_by\_sockaddr\_bind()}
{\footnotesize\ttfamily struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$ gprs\+\_\+ns2\+\_\+nsvc\+\_\+by\+\_\+sockaddr\+\_\+bind (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$}]{bind,  }\item[{const struct \textbf{ osmo\+\_\+sockaddr} $\ast$}]{rem\+\_\+addr }\end{DoxyParamCaption})}



Find a NS-\/\+VC by its remote socket address. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em bind} & in which to search \\
\hline
\mbox{\texttt{ in}}  & {\em rem\+\_\+addr} & remote peer socket address to search \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
NS-\/\+VC matching sockaddr; NULL if none found 
\end{DoxyReturn}


References \textbf{ gprs\+\_\+ns2\+\_\+is\+\_\+ip\+\_\+bind()}, \textbf{ llist\+\_\+for\+\_\+each\+\_\+entry}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::nsvc}, \textbf{ OSMO\+\_\+\+ASSERT}, \textbf{ osmo\+\_\+sockaddr\+\_\+cmp()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::priv}, \textbf{ priv\+\_\+vc\+::remote}, \textbf{ osmo\+\_\+sockaddr\+::sa}, and \textbf{ osmo\+\_\+sockaddr\+::u}.



Referenced by \textbf{ DEFUN()}, \textbf{ handle\+\_\+nsip\+\_\+recvfrom()}, \textbf{ handle\+\_\+nsip\+\_\+sendto()}, \textbf{ ns2\+\_\+create\+\_\+vc\+\_\+sns()}, \textbf{ ns2\+\_\+ip\+\_\+bind\+\_\+connect()}, and \textbf{ ns\+\_\+nse\+\_\+nsvc\+\_\+udp\+\_\+cmds()}.

\mbox{\label{gprs__ns2_8h_a2ca5d35dbd51cd510924e880674a5e96}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_prim\_str@{gprs\_ns2\_prim\_str}}
\index{gprs\_ns2\_prim\_str@{gprs\_ns2\_prim\_str}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_prim\_str()}
{\footnotesize\ttfamily static const char $\ast$ gprs\+\_\+ns2\+\_\+prim\+\_\+str (\begin{DoxyParamCaption}\item[{enum \textbf{ gprs\+\_\+ns2\+\_\+prim}}]{val }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Obtain a human-\/readable string for NS primitives. 



References \textbf{ get\+\_\+value\+\_\+string()}, and \textbf{ gprs\+\_\+ns2\+\_\+prim\+\_\+strs}.

\mbox{\label{gprs__ns2_8h_ac4e486186e2d10273538c27f48178fba}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_sns\_add\_bind@{gprs\_ns2\_sns\_add\_bind}}
\index{gprs\_ns2\_sns\_add\_bind@{gprs\_ns2\_sns\_add\_bind}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_sns\_add\_bind()}
{\footnotesize\ttfamily int gprs\+\_\+ns2\+\_\+sns\+\_\+add\+\_\+bind (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+nse} $\ast$}]{nse,  }\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$}]{bind }\end{DoxyParamCaption})}



References \textbf{ ns2\+\_\+sns\+\_\+bind\+::bind}, \textbf{ ns2\+\_\+sns\+\_\+state\+::binds}, \textbf{ gprs\+\_\+ns2\+\_\+nse\+::bss\+\_\+sns\+\_\+fi}, \textbf{ gprs\+\_\+ns2\+\_\+is\+\_\+ip\+\_\+bind()}, \textbf{ list}, \textbf{ ns2\+\_\+sns\+\_\+bind\+::list}, \textbf{ llist\+\_\+add\+\_\+tail()}, \textbf{ llist\+\_\+empty()}, \textbf{ llist\+\_\+for\+\_\+each\+\_\+entry}, \textbf{ NS2\+\_\+\+SNS\+\_\+\+EV\+\_\+\+REQ\+\_\+\+ADD\+\_\+\+BIND}, \textbf{ OSMO\+\_\+\+ASSERT}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+dispatch}, and \textbf{ osmo\+\_\+fsm\+\_\+inst\+::priv}.



Referenced by \textbf{ DEFUN()}, \textbf{ ns2\+\_\+create\+\_\+vc\+\_\+sns()}, and \textbf{ ns2\+\_\+sns\+\_\+add\+\_\+sns\+\_\+default\+\_\+binds()}.

\mbox{\label{gprs__ns2_8h_aa216819fe14309d37c671be36bc5262b}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_sns\_add\_endpoint@{gprs\_ns2\_sns\_add\_endpoint}}
\index{gprs\_ns2\_sns\_add\_endpoint@{gprs\_ns2\_sns\_add\_endpoint}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_sns\_add\_endpoint()}
{\footnotesize\ttfamily int gprs\+\_\+ns2\+\_\+sns\+\_\+add\+\_\+endpoint (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+nse} $\ast$}]{nse,  }\item[{const struct \textbf{ osmo\+\_\+sockaddr} $\ast$}]{saddr }\end{DoxyParamCaption})}



gprs\+\_\+ns2\+\_\+sns\+\_\+add\+\_\+endpoint 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nse} & \\
\hline
\mbox{\texttt{ in}}  & {\em sockaddr} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\end{DoxyReturn}


References \textbf{ gprs\+\_\+ns2\+\_\+nse\+::bss\+\_\+sns\+\_\+fi}, \textbf{ gprs\+\_\+ns2\+\_\+nse\+::dialect}, \textbf{ GPRS\+\_\+\+NS2\+\_\+\+DIALECT\+\_\+\+SNS}, \textbf{ GPRS\+\_\+\+NS2\+\_\+\+LL\+\_\+\+UDP}, \textbf{ sns\+\_\+endpoint\+::list}, \textbf{ gprs\+\_\+ns2\+\_\+nse\+::ll}, \textbf{ llist\+\_\+add\+\_\+tail()}, \textbf{ llist\+\_\+empty()}, \textbf{ ns2\+\_\+get\+\_\+sns\+\_\+endpoint()}, \textbf{ NS2\+\_\+\+SNS\+\_\+\+EV\+\_\+\+REQ\+\_\+\+SELECT\+\_\+\+ENDPOINT}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+dispatch}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+::priv}, \textbf{ sns\+\_\+endpoint\+::saddr}, and \textbf{ ns2\+\_\+sns\+\_\+state\+::sns\+\_\+endpoints}.



Referenced by \textbf{ DEFUN()}.

\mbox{\label{gprs__ns2_8h_ad5b987338009b124290109789c811840}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_sns\_count@{gprs\_ns2\_sns\_count}}
\index{gprs\_ns2\_sns\_count@{gprs\_ns2\_sns\_count}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_sns\_count()}
{\footnotesize\ttfamily int gprs\+\_\+ns2\+\_\+sns\+\_\+count (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+nse} $\ast$}]{nse }\end{DoxyParamCaption})}



gprs\+\_\+ns2\+\_\+sns\+\_\+count 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nse} & NS Entity whose IP-\/\+SNS endpoints shall be printed \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the count of endpoints or $<$ 0 if NSE doesn\textquotesingle{}t contain sns. 
\end{DoxyReturn}


References \textbf{ gprs\+\_\+ns2\+\_\+nse\+::bss\+\_\+sns\+\_\+fi}, \textbf{ gprs\+\_\+ns2\+\_\+nse\+::dialect}, \textbf{ GPRS\+\_\+\+NS2\+\_\+\+DIALECT\+\_\+\+SNS}, \textbf{ GPRS\+\_\+\+NS2\+\_\+\+LL\+\_\+\+UDP}, \textbf{ list}, \textbf{ gprs\+\_\+ns2\+\_\+nse\+::ll}, \textbf{ llist\+\_\+for\+\_\+each\+\_\+entry}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+::priv}, and \textbf{ ns2\+\_\+sns\+\_\+state\+::sns\+\_\+endpoints}.



Referenced by \textbf{ vty\+\_\+nse\+\_\+check\+\_\+sns()}.

\mbox{\label{gprs__ns2_8h_abe907a6b3594778c58291723a5ab7ca9}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_sns\_del\_bind@{gprs\_ns2\_sns\_del\_bind}}
\index{gprs\_ns2\_sns\_del\_bind@{gprs\_ns2\_sns\_del\_bind}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_sns\_del\_bind()}
{\footnotesize\ttfamily int gprs\+\_\+ns2\+\_\+sns\+\_\+del\+\_\+bind (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+nse} $\ast$}]{nse,  }\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$}]{bind }\end{DoxyParamCaption})}



References \textbf{ ns2\+\_\+sns\+\_\+bind\+::bind}, \textbf{ ns2\+\_\+sns\+\_\+state\+::binds}, \textbf{ gprs\+\_\+ns2\+\_\+nse\+::bss\+\_\+sns\+\_\+fi}, \textbf{ ns2\+\_\+sns\+\_\+state\+::initial\+\_\+bind}, \textbf{ list}, \textbf{ ns2\+\_\+sns\+\_\+bind\+::list}, \textbf{ llist\+\_\+del()}, \textbf{ llist\+\_\+entry}, \textbf{ llist\+\_\+for\+\_\+each\+\_\+entry\+\_\+safe}, \textbf{ NS2\+\_\+\+SNS\+\_\+\+EV\+\_\+\+REQ\+\_\+\+DELETE\+\_\+\+BIND}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+dispatch}, \textbf{ llist\+\_\+head\+::prev}, and \textbf{ osmo\+\_\+fsm\+\_\+inst\+::priv}.



Referenced by \textbf{ DEFUN()}, and \textbf{ gprs\+\_\+ns2\+\_\+free\+\_\+bind()}.

\mbox{\label{gprs__ns2_8h_af7ce29702d239e804ee31e3ddcb4f51b}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_sns\_del\_endpoint@{gprs\_ns2\_sns\_del\_endpoint}}
\index{gprs\_ns2\_sns\_del\_endpoint@{gprs\_ns2\_sns\_del\_endpoint}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_sns\_del\_endpoint()}
{\footnotesize\ttfamily int gprs\+\_\+ns2\+\_\+sns\+\_\+del\+\_\+endpoint (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+nse} $\ast$}]{nse,  }\item[{const struct \textbf{ osmo\+\_\+sockaddr} $\ast$}]{saddr }\end{DoxyParamCaption})}



gprs\+\_\+ns2\+\_\+sns\+\_\+del\+\_\+endpoint 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em nse} & \\
\hline
\mbox{\texttt{ in}}  & {\em sockaddr} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, otherwise $<$ 0 
\end{DoxyReturn}


References \textbf{ gprs\+\_\+ns2\+\_\+nse\+::bss\+\_\+sns\+\_\+fi}, \textbf{ gprs\+\_\+ns2\+\_\+nse\+::dialect}, \textbf{ GPRS\+\_\+\+NS2\+\_\+\+DIALECT\+\_\+\+SNS}, \textbf{ gprs\+\_\+ns2\+\_\+free\+\_\+nsvcs()}, \textbf{ GPRS\+\_\+\+NS2\+\_\+\+LL\+\_\+\+UDP}, \textbf{ ns2\+\_\+sns\+\_\+state\+::initial}, \textbf{ list}, \textbf{ sns\+\_\+endpoint\+::list}, \textbf{ gprs\+\_\+ns2\+\_\+nse\+::ll}, \textbf{ llist\+\_\+del()}, \textbf{ llist\+\_\+entry}, \textbf{ LOGL\+\_\+\+INFO}, \textbf{ LOGNSE}, \textbf{ llist\+\_\+head\+::next}, \textbf{ ns2\+\_\+get\+\_\+sns\+\_\+endpoint()}, \textbf{ llist\+\_\+head\+::prev}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+::priv}, \textbf{ sns\+\_\+endpoint\+::saddr}, and \textbf{ ns2\+\_\+sns\+\_\+state\+::sns\+\_\+endpoints}.



Referenced by \textbf{ DEFUN()}.

\mbox{\label{gprs__ns2_8h_a6898cbf36f2b7744dda1bb6d1b0dae19}} 
\index{gprs\_ns2.h@{gprs\_ns2.h}!gprs\_ns2\_vty\_init@{gprs\_ns2\_vty\_init}}
\index{gprs\_ns2\_vty\_init@{gprs\_ns2\_vty\_init}!gprs\_ns2.h@{gprs\_ns2.h}}
\doxysubsubsection{gprs\_ns2\_vty\_init()}
{\footnotesize\ttfamily int gprs\+\_\+ns2\+\_\+vty\+\_\+init (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+inst} $\ast$}]{nsi }\end{DoxyParamCaption})}



References \textbf{ gprs\+\_\+ns2\+\_\+vty\+\_\+init\+\_\+reduced()}, \textbf{ install\+\_\+lib\+\_\+element()}, \textbf{ install\+\_\+node()}, \textbf{ L\+\_\+\+NS\+\_\+\+BIND\+\_\+\+NODE}, \textbf{ L\+\_\+\+NS\+\_\+\+NODE}, \textbf{ L\+\_\+\+NS\+\_\+\+NSE\+\_\+\+NODE}, \textbf{ ns\+\_\+bind\+\_\+node}, and \textbf{ ns\+\_\+nse\+\_\+node}.

