\doxysection{src/gb/gprs\+\_\+ns2\+\_\+fr.c File Reference}
\label{gprs__ns2__fr_8c}\index{src/gb/gprs\_ns2\_fr.c@{src/gb/gprs\_ns2\_fr.c}}


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


{\ttfamily \#include $<$errno.\+h$>$}\newline
{\ttfamily \#include $<$string.\+h$>$}\newline
{\ttfamily \#include $<$unistd.\+h$>$}\newline
{\ttfamily \#include $<$sys/socket.\+h$>$}\newline
{\ttfamily \#include $<$netinet/in.\+h$>$}\newline
{\ttfamily \#include $<$netinet/ip.\+h$>$}\newline
{\ttfamily \#include $<$netinet/ip6.\+h$>$}\newline
{\ttfamily \#include $<$arpa/inet.\+h$>$}\newline
{\ttfamily \#include $<$linux/if.\+h$>$}\newline
{\ttfamily \#include $<$sys/ioctl.\+h$>$}\newline
{\ttfamily \#include $<$netpacket/packet.\+h$>$}\newline
{\ttfamily \#include $<$linux/if\+\_\+ether.\+h$>$}\newline
{\ttfamily \#include $<$linux/hdlc.\+h$>$}\newline
{\ttfamily \#include $<$linux/hdlc/ioctl.\+h$>$}\newline
{\ttfamily \#include $<$linux/sockios.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gprs/frame\+\_\+relay.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/byteswap.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/stat\+\_\+item.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/logging.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/msgb.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/select.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/socket.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/timer.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/talloc.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gprs/gprs\+\_\+ns2.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/netdev.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gprs/protocol/gsm\+\_\+08\+\_\+16.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gprs/protocol/gsm\+\_\+08\+\_\+18.\+h$>$}\newline
{\ttfamily \#include \char`\"{}config.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}common\+\_\+vty.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}gprs\+\_\+ns2\+\_\+internal.\+h\char`\"{}}\newline
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ priv\+\_\+bind}
\item 
struct \textbf{ priv\+\_\+vc}
\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ GRE\+\_\+\+PTYPE\+\_\+\+FR}~0x6559
\item 
\#define \textbf{ GRE\+\_\+\+PTYPE\+\_\+\+IPv4}~0x0800
\item 
\#define \textbf{ GRE\+\_\+\+PTYPE\+\_\+\+IPv6}~0x86dd
\item 
\#define \textbf{ GRE\+\_\+\+PTYPE\+\_\+\+KAR}~0x0000 /$\ast$ keepalive response $\ast$/
\item 
\#define \textbf{ IPPROTO\+\_\+\+GRE}~47
\item 
\#define \textbf{ E1\+\_\+\+LINERATE}~2048000
\item 
\#define \textbf{ E1\+\_\+\+SLOTS\+\_\+\+TOTAL}~32
\item 
\#define \textbf{ E1\+\_\+\+SLOTS\+\_\+\+USED}~31
\item 
\#define \textbf{ SUPERCHANNEL\+\_\+\+LINERATE}~(\textbf{ E1\+\_\+\+LINERATE}$\ast$\textbf{ E1\+\_\+\+SLOTS\+\_\+\+USED})/\textbf{ E1\+\_\+\+SLOTS\+\_\+\+TOTAL}
\item 
\#define \textbf{ BIT\+\_\+\+DURATION\+\_\+\+NS}~(1000000000 / \textbf{ SUPERCHANNEL\+\_\+\+LINERATE})
\item 
\#define \textbf{ LMI\+\_\+\+Q933\+A\+\_\+\+DLCI}~0
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static void \textbf{ free\+\_\+bind} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind)
\begin{DoxyCompactList}\small\item\em clean up all private driver state. \end{DoxyCompactList}\item 
static int \textbf{ fr\+\_\+dlci\+\_\+rx\+\_\+cb} (void $\ast$cb\+\_\+data, struct \textbf{ msgb} $\ast$\textbf{ msg})
\item 
static void \textbf{ free\+\_\+vc} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc)
\item 
static void \textbf{ dump\+\_\+vty} (const struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind, struct \textbf{ vty} $\ast$\textbf{ vty}, bool stats)
\item 
static void \textbf{ fr\+\_\+dlci\+\_\+status\+\_\+cb} (struct \textbf{ osmo\+\_\+fr\+\_\+dlc} $\ast$dlc, void $\ast$cb\+\_\+data, bool active)
\item 
static struct \textbf{ priv\+\_\+vc} $\ast$ \textbf{ fr\+\_\+alloc\+\_\+vc} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind, struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, uint16\+\_\+t dlci)
\item 
int \textbf{ gprs\+\_\+ns2\+\_\+find\+\_\+vc\+\_\+by\+\_\+dlci} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind, uint16\+\_\+t dlci, struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$$\ast$result)
\item 
static int \textbf{ fr\+\_\+netif\+\_\+ofd\+\_\+cb} (struct \textbf{ osmo\+\_\+fd} $\ast$bfd, uint32\+\_\+t what)
\item 
static int \textbf{ fr\+\_\+netif\+\_\+write\+\_\+one} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind, struct \textbf{ msgb} $\ast$\textbf{ msg})
\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 
static int \textbf{ fr\+\_\+vc\+\_\+sendmsg} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$nsvc, struct \textbf{ msgb} $\ast$\textbf{ msg})
\item 
static void \textbf{ enqueue\+\_\+at\+\_\+head} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind, struct \textbf{ msgb} $\ast$\textbf{ msg})
\item 
static void \textbf{ enqueue\+\_\+at\+\_\+tail} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind, struct \textbf{ msgb} $\ast$\textbf{ msg})
\item 
static int \textbf{ backlog\+\_\+enqueue\+\_\+or\+\_\+free} (struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind, struct \textbf{ msgb} $\ast$\textbf{ msg})
\item 
static void \textbf{ fr\+\_\+backlog\+\_\+timer\+\_\+cb} (void $\ast$\textbf{ data})
\item 
int \textbf{ fr\+\_\+tx\+\_\+cb} (void $\ast$\textbf{ data}, struct \textbf{ msgb} $\ast$\textbf{ msg})
\item 
static int \textbf{ devname2ifindex} (const char $\ast$ifname)
\item 
static int \textbf{ open\+\_\+socket} (int ifindex, const struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$nsbind)
\item 
static int \textbf{ gprs\+\_\+n2\+\_\+fr\+\_\+ifupdown\+\_\+ind\+\_\+cb} (struct \textbf{ osmo\+\_\+netdev} $\ast$netdev, bool if\+\_\+running)
\item 
static int \textbf{ gprs\+\_\+n2\+\_\+fr\+\_\+mtu\+\_\+chg\+\_\+cb} (struct \textbf{ osmo\+\_\+netdev} $\ast$netdev, uint32\+\_\+t new\+\_\+mtu)
\item 
static int \textbf{ set\+\_\+ifupdown} (const char $\ast$netif, bool up)
\item 
static int \textbf{ setup\+\_\+device} (const char $\ast$netif, const struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$bind)
\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 
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 
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 
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 
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\+\_\+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 
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}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+driver} \textbf{ vc\+\_\+driver\+\_\+fr}
\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__fr_8c_a94e67080d43794a095b057f07e5fbac8}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!BIT\_DURATION\_NS@{BIT\_DURATION\_NS}}
\index{BIT\_DURATION\_NS@{BIT\_DURATION\_NS}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{BIT\_DURATION\_NS}
{\footnotesize\ttfamily \#define BIT\+\_\+\+DURATION\+\_\+\+NS~(1000000000 / \textbf{ SUPERCHANNEL\+\_\+\+LINERATE})}

\mbox{\label{gprs__ns2__fr_8c_ac8e4b894b5f35d4706f283efdd93f0b2}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!E1\_LINERATE@{E1\_LINERATE}}
\index{E1\_LINERATE@{E1\_LINERATE}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{E1\_LINERATE}
{\footnotesize\ttfamily \#define E1\+\_\+\+LINERATE~2048000}

\mbox{\label{gprs__ns2__fr_8c_ab8d8f8d26c4c854a90ec90bedf9261f1}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!E1\_SLOTS\_TOTAL@{E1\_SLOTS\_TOTAL}}
\index{E1\_SLOTS\_TOTAL@{E1\_SLOTS\_TOTAL}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{E1\_SLOTS\_TOTAL}
{\footnotesize\ttfamily \#define E1\+\_\+\+SLOTS\+\_\+\+TOTAL~32}

\mbox{\label{gprs__ns2__fr_8c_a3681b6ca00ed2e4172d8fd14789bbda0}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!E1\_SLOTS\_USED@{E1\_SLOTS\_USED}}
\index{E1\_SLOTS\_USED@{E1\_SLOTS\_USED}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{E1\_SLOTS\_USED}
{\footnotesize\ttfamily \#define E1\+\_\+\+SLOTS\+\_\+\+USED~31}

\mbox{\label{gprs__ns2__fr_8c_a8f21d6a9aa6a76a99064adede0069eaa}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!GRE\_PTYPE\_FR@{GRE\_PTYPE\_FR}}
\index{GRE\_PTYPE\_FR@{GRE\_PTYPE\_FR}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{GRE\_PTYPE\_FR}
{\footnotesize\ttfamily \#define GRE\+\_\+\+PTYPE\+\_\+\+FR~0x6559}

\mbox{\label{gprs__ns2__fr_8c_a62ecd933e8d4e55dcb50528774e5628c}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!GRE\_PTYPE\_IPv4@{GRE\_PTYPE\_IPv4}}
\index{GRE\_PTYPE\_IPv4@{GRE\_PTYPE\_IPv4}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{GRE\_PTYPE\_IPv4}
{\footnotesize\ttfamily \#define GRE\+\_\+\+PTYPE\+\_\+\+IPv4~0x0800}

\mbox{\label{gprs__ns2__fr_8c_a4394e647277ad4c9a325d0a65e0ed4e6}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!GRE\_PTYPE\_IPv6@{GRE\_PTYPE\_IPv6}}
\index{GRE\_PTYPE\_IPv6@{GRE\_PTYPE\_IPv6}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{GRE\_PTYPE\_IPv6}
{\footnotesize\ttfamily \#define GRE\+\_\+\+PTYPE\+\_\+\+IPv6~0x86dd}

\mbox{\label{gprs__ns2__fr_8c_ae81d806ca5ef853fc65003d6c1cd88df}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!GRE\_PTYPE\_KAR@{GRE\_PTYPE\_KAR}}
\index{GRE\_PTYPE\_KAR@{GRE\_PTYPE\_KAR}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{GRE\_PTYPE\_KAR}
{\footnotesize\ttfamily \#define GRE\+\_\+\+PTYPE\+\_\+\+KAR~0x0000 /$\ast$ keepalive response $\ast$/}

\mbox{\label{gprs__ns2__fr_8c_a62b96b4d881982b3a6d911ddc0294f09}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!IPPROTO\_GRE@{IPPROTO\_GRE}}
\index{IPPROTO\_GRE@{IPPROTO\_GRE}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{IPPROTO\_GRE}
{\footnotesize\ttfamily \#define IPPROTO\+\_\+\+GRE~47}

\mbox{\label{gprs__ns2__fr_8c_afb8f77e51db46f92c8539474f76ec503}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!LMI\_Q933A\_DLCI@{LMI\_Q933A\_DLCI}}
\index{LMI\_Q933A\_DLCI@{LMI\_Q933A\_DLCI}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{LMI\_Q933A\_DLCI}
{\footnotesize\ttfamily \#define LMI\+\_\+\+Q933\+A\+\_\+\+DLCI~0}

\mbox{\label{gprs__ns2__fr_8c_aeb8c7f614d4ca3b7b481bf07d6250edb}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!SUPERCHANNEL\_LINERATE@{SUPERCHANNEL\_LINERATE}}
\index{SUPERCHANNEL\_LINERATE@{SUPERCHANNEL\_LINERATE}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{SUPERCHANNEL\_LINERATE}
{\footnotesize\ttfamily \#define SUPERCHANNEL\+\_\+\+LINERATE~(\textbf{ E1\+\_\+\+LINERATE}$\ast$\textbf{ E1\+\_\+\+SLOTS\+\_\+\+USED})/\textbf{ E1\+\_\+\+SLOTS\+\_\+\+TOTAL}}



\doxysubsection{Function Documentation}
\mbox{\label{gprs__ns2__fr_8c_a1f78ac95e4b71cef95be8db8264842f3}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!backlog\_enqueue\_or\_free@{backlog\_enqueue\_or\_free}}
\index{backlog\_enqueue\_or\_free@{backlog\_enqueue\_or\_free}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{backlog\_enqueue\_or\_free()}
{\footnotesize\ttfamily static int backlog\+\_\+enqueue\+\_\+or\+\_\+free (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$}]{bind,  }\item[{struct \textbf{ msgb} $\ast$}]{msg }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ priv\+\_\+bind\+::backlog}, \textbf{ bvci}, \textbf{ BVCI\+\_\+\+SIGNALLING}, \textbf{ priv\+\_\+bind\+::dlci}, \textbf{ enqueue\+\_\+at\+\_\+head()}, \textbf{ enqueue\+\_\+at\+\_\+tail()}, \textbf{ priv\+\_\+bind\+::if\+\_\+running}, \textbf{ priv\+\_\+bind\+::lmi\+\_\+msg}, \textbf{ LMI\+\_\+\+Q933\+A\+\_\+\+DLCI}, \textbf{ msg}, \textbf{ msgb\+\_\+free()}, \textbf{ msgb\+\_\+length()}, \textbf{ NS\+\_\+\+PDUT\+\_\+\+UNITDATA}, and \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::priv}.



Referenced by \textbf{ fr\+\_\+tx\+\_\+cb()}.

\mbox{\label{gprs__ns2__fr_8c_a9c4b24b1692e561a358d91d1d5137428}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!devname2ifindex@{devname2ifindex}}
\index{devname2ifindex@{devname2ifindex}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{devname2ifindex()}
{\footnotesize\ttfamily static int devname2ifindex (\begin{DoxyParamCaption}\item[{const char $\ast$}]{ifname }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ OSMO\+\_\+\+STRLCPY\+\_\+\+ARRAY}.



Referenced by \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+bind()}.

\mbox{\label{gprs__ns2__fr_8c_a83a4494ac7f6f12b6e6b2c6a3aecd6a4}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!dump\_vty@{dump\_vty}}
\index{dump\_vty@{dump\_vty}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{dump\_vty()}
{\footnotesize\ttfamily static void dump\+\_\+vty (\begin{DoxyParamCaption}\item[{const struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$}]{bind,  }\item[{struct \textbf{ vty} $\ast$}]{vty,  }\item[{bool}]{stats }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ priv\+\_\+bind\+::if\+\_\+running}, \textbf{ priv\+\_\+bind\+::link}, \textbf{ llist\+\_\+for\+\_\+each\+\_\+entry}, \textbf{ priv\+\_\+bind\+::netif}, \textbf{ ns2\+\_\+vty\+\_\+dump\+\_\+nsvc()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::nsvc}, \textbf{ osmo\+\_\+fr\+\_\+role\+\_\+str()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::priv}, \textbf{ osmo\+\_\+fr\+\_\+link\+::role}, \textbf{ VTY\+\_\+\+NEWLINE}, and \textbf{ vty\+\_\+out()}.



Referenced by \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+bind()}.

\mbox{\label{gprs__ns2__fr_8c_a76e4918a9975902f994a5fde733b053d}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!enqueue\_at\_head@{enqueue\_at\_head}}
\index{enqueue\_at\_head@{enqueue\_at\_head}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{enqueue\_at\_head()}
{\footnotesize\ttfamily static void enqueue\+\_\+at\+\_\+head (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$}]{bind,  }\item[{struct \textbf{ msgb} $\ast$}]{msg }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ priv\+\_\+bind\+::backlog}, \textbf{ priv\+\_\+bind\+::list}, \textbf{ llist\+\_\+add()}, \textbf{ msg}, \textbf{ NS2\+\_\+\+BIND\+\_\+\+STAT\+\_\+\+BACKLOG\+\_\+\+LEN}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group\+\_\+get\+\_\+item()}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+inc()}, \textbf{ osmo\+\_\+timer\+\_\+schedule()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::priv}, \textbf{ priv\+\_\+bind\+::retry\+\_\+us}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::statg}, and \textbf{ priv\+\_\+bind\+::timer}.



Referenced by \textbf{ backlog\+\_\+enqueue\+\_\+or\+\_\+free()}.

\mbox{\label{gprs__ns2__fr_8c_a5d477897f0f7d640f66d21e2a78acb24}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!enqueue\_at\_tail@{enqueue\_at\_tail}}
\index{enqueue\_at\_tail@{enqueue\_at\_tail}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{enqueue\_at\_tail()}
{\footnotesize\ttfamily static void enqueue\+\_\+at\+\_\+tail (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$}]{bind,  }\item[{struct \textbf{ msgb} $\ast$}]{msg }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ priv\+\_\+bind\+::backlog}, \textbf{ priv\+\_\+bind\+::list}, \textbf{ llist\+\_\+add\+\_\+tail()}, \textbf{ msg}, \textbf{ NS2\+\_\+\+BIND\+\_\+\+STAT\+\_\+\+BACKLOG\+\_\+\+LEN}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group\+\_\+get\+\_\+item()}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+inc()}, \textbf{ osmo\+\_\+timer\+\_\+schedule()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::priv}, \textbf{ priv\+\_\+bind\+::retry\+\_\+us}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::statg}, and \textbf{ priv\+\_\+bind\+::timer}.



Referenced by \textbf{ backlog\+\_\+enqueue\+\_\+or\+\_\+free()}.

\mbox{\label{gprs__ns2__fr_8c_aecf961bf879b00b11bb0681a1f4ad9e2}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!fr\_alloc\_vc@{fr\_alloc\_vc}}
\index{fr\_alloc\_vc@{fr\_alloc\_vc}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{fr\_alloc\_vc()}
{\footnotesize\ttfamily static struct \textbf{ priv\+\_\+vc} $\ast$ fr\+\_\+alloc\+\_\+vc (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$}]{bind,  }\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc,  }\item[{uint16\+\_\+t}]{dlci }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+fr\+\_\+dlc\+::cb\+\_\+data}, \textbf{ priv\+\_\+vc\+::dlc}, \textbf{ priv\+\_\+vc\+::dlci}, \textbf{ fr\+\_\+dlci\+\_\+rx\+\_\+cb()}, \textbf{ fr\+\_\+dlci\+\_\+status\+\_\+cb()}, \textbf{ gprs\+\_\+ns2\+\_\+is\+\_\+fr\+\_\+bind()}, \textbf{ priv\+\_\+bind\+::link}, \textbf{ OSMO\+\_\+\+ASSERT}, \textbf{ osmo\+\_\+fr\+\_\+dlc\+\_\+alloc()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::priv}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::priv}, \textbf{ osmo\+\_\+fr\+\_\+dlc\+::rx\+\_\+cb}, and \textbf{ osmo\+\_\+fr\+\_\+dlc\+::status\+\_\+cb}.



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

\mbox{\label{gprs__ns2__fr_8c_a0c201b01f4ff0f5d9234b5d3ea3f6114}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!fr\_backlog\_timer\_cb@{fr\_backlog\_timer\_cb}}
\index{fr\_backlog\_timer\_cb@{fr\_backlog\_timer\_cb}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{fr\_backlog\_timer\_cb()}
{\footnotesize\ttfamily static void fr\+\_\+backlog\+\_\+timer\+\_\+cb (\begin{DoxyParamCaption}\item[{void $\ast$}]{data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ priv\+\_\+bind\+::backlog}, \textbf{ data}, \textbf{ fr\+\_\+netif\+\_\+write\+\_\+one()}, \textbf{ priv\+\_\+bind\+::list}, \textbf{ llist\+\_\+add()}, \textbf{ llist\+\_\+empty()}, \textbf{ priv\+\_\+bind\+::lmi\+\_\+msg}, \textbf{ msg}, \textbf{ msgb\+\_\+dequeue()}, \textbf{ NS2\+\_\+\+BIND\+\_\+\+STAT\+\_\+\+BACKLOG\+\_\+\+LEN}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+dec()}, \textbf{ osmo\+\_\+stat\+\_\+item\+\_\+group\+\_\+get\+\_\+item()}, \textbf{ osmo\+\_\+timer\+\_\+schedule()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::priv}, \textbf{ priv\+\_\+bind\+::retry\+\_\+us}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::statg}, and \textbf{ priv\+\_\+bind\+::timer}.



Referenced by \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+bind()}.

\mbox{\label{gprs__ns2__fr_8c_a8a589780eb5a014d414ea24c7a390aeb}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!fr\_dlci\_rx\_cb@{fr\_dlci\_rx\_cb}}
\index{fr\_dlci\_rx\_cb@{fr\_dlci\_rx\_cb}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{fr\_dlci\_rx\_cb()}
{\footnotesize\ttfamily static int fr\+\_\+dlci\+\_\+rx\+\_\+cb (\begin{DoxyParamCaption}\item[{void $\ast$}]{cb\+\_\+data,  }\item[{struct \textbf{ msgb} $\ast$}]{msg }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ msg}, and \textbf{ ns2\+\_\+recv\+\_\+vc()}.



Referenced by \textbf{ fr\+\_\+alloc\+\_\+vc()}.

\mbox{\label{gprs__ns2__fr_8c_ab78cd7662949dbd568bb009e8415d304}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!fr\_dlci\_status\_cb@{fr\_dlci\_status\_cb}}
\index{fr\_dlci\_status\_cb@{fr\_dlci\_status\_cb}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{fr\_dlci\_status\_cb()}
{\footnotesize\ttfamily static void fr\+\_\+dlci\+\_\+status\+\_\+cb (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+fr\+\_\+dlc} $\ast$}]{dlc,  }\item[{void $\ast$}]{cb\+\_\+data,  }\item[{bool}]{active }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ ns2\+\_\+vc\+\_\+force\+\_\+unconfigured()}, and \textbf{ ns2\+\_\+vc\+\_\+fsm\+\_\+start()}.



Referenced by \textbf{ fr\+\_\+alloc\+\_\+vc()}.

\mbox{\label{gprs__ns2__fr_8c_a2a71702409b7e78c00f3907aeb0b5e26}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!fr\_netif\_ofd\_cb@{fr\_netif\_ofd\_cb}}
\index{fr\_netif\_ofd\_cb@{fr\_netif\_ofd\_cb}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{fr\_netif\_ofd\_cb()}
{\footnotesize\ttfamily static int fr\+\_\+netif\+\_\+ofd\+\_\+cb (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+fd} $\ast$}]{bfd,  }\item[{uint32\+\_\+t}]{what }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+fd\+::data}, \textbf{ osmo\+\_\+fd\+::fd}, \textbf{ priv\+\_\+bind\+::ifindex}, \textbf{ priv\+\_\+bind\+::link}, \textbf{ LOGBIND}, \textbf{ LOGL\+\_\+\+ERROR}, \textbf{ msg}, \textbf{ msgb\+\_\+alloc()}, \textbf{ msgb\+\_\+free()}, \textbf{ msgb\+\_\+put()}, \textbf{ NS\+\_\+\+ALLOC\+\_\+\+SIZE}, \textbf{ OSMO\+\_\+\+FD\+\_\+\+READ}, \textbf{ osmo\+\_\+fr\+\_\+rx()}, and \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::priv}.



Referenced by \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+bind()}.

\mbox{\label{gprs__ns2__fr_8c_a2025faa48be3b84588ffcd2c46728783}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!fr\_netif\_write\_one@{fr\_netif\_write\_one}}
\index{fr\_netif\_write\_one@{fr\_netif\_write\_one}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{fr\_netif\_write\_one()}
{\footnotesize\ttfamily static int fr\+\_\+netif\+\_\+write\+\_\+one (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$}]{bind,  }\item[{struct \textbf{ msgb} $\ast$}]{msg }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ priv\+\_\+bind\+::backlog}, \textbf{ BIT\+\_\+\+DURATION\+\_\+\+NS}, \textbf{ osmo\+\_\+fd\+::fd}, \textbf{ len()}, \textbf{ LOGBIND}, \textbf{ LOGL\+\_\+\+ERROR}, \textbf{ msg}, \textbf{ msgb\+\_\+data()}, \textbf{ msgb\+\_\+free()}, \textbf{ msgb\+\_\+length()}, \textbf{ priv\+\_\+bind\+::ofd}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::priv}, and \textbf{ priv\+\_\+bind\+::retry\+\_\+us}.



Referenced by \textbf{ fr\+\_\+backlog\+\_\+timer\+\_\+cb()}, and \textbf{ fr\+\_\+tx\+\_\+cb()}.

\mbox{\label{gprs__ns2__fr_8c_adcdbb083de6554e5419b75d415a9695a}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!fr\_tx\_cb@{fr\_tx\_cb}}
\index{fr\_tx\_cb@{fr\_tx\_cb}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{fr\_tx\_cb()}
{\footnotesize\ttfamily int fr\+\_\+tx\+\_\+cb (\begin{DoxyParamCaption}\item[{void $\ast$}]{data,  }\item[{struct \textbf{ msgb} $\ast$}]{msg }\end{DoxyParamCaption})}



References \textbf{ priv\+\_\+bind\+::backlog}, \textbf{ backlog\+\_\+enqueue\+\_\+or\+\_\+free()}, \textbf{ data}, \textbf{ fr\+\_\+netif\+\_\+write\+\_\+one()}, \textbf{ priv\+\_\+bind\+::list}, \textbf{ llist\+\_\+empty()}, \textbf{ msg}, and \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::priv}.



Referenced by \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+bind()}.

\mbox{\label{gprs__ns2__fr_8c_a139941fd6c5f4f878556a87075f238da}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!fr\_vc\_sendmsg@{fr\_vc\_sendmsg}}
\index{fr\_vc\_sendmsg@{fr\_vc\_sendmsg}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{fr\_vc\_sendmsg()}
{\footnotesize\ttfamily static int fr\+\_\+vc\+\_\+sendmsg (\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{ priv\+\_\+vc\+::dlc}, \textbf{ msg}, \textbf{ msgb\+\_\+length()}, \textbf{ NS\+\_\+\+CTR\+\_\+\+BYTES\+\_\+\+OUT}, \textbf{ NS\+\_\+\+CTR\+\_\+\+BYTES\+\_\+\+OUT\+\_\+\+DROP}, \textbf{ NS\+\_\+\+CTR\+\_\+\+PKTS\+\_\+\+OUT}, \textbf{ NS\+\_\+\+CTR\+\_\+\+PKTS\+\_\+\+OUT\+\_\+\+DROP}, \textbf{ osmo\+\_\+fr\+\_\+tx\+\_\+dlc()}, \textbf{ OSMO\+\_\+\+LIKELY}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+::priv}, \textbf{ RATE\+\_\+\+CTR\+\_\+\+ADD\+\_\+\+NS}, and \textbf{ RATE\+\_\+\+CTR\+\_\+\+INC\+\_\+\+NS}.



Referenced by \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+bind()}.

\mbox{\label{gprs__ns2__fr_8c_aa89cc0502634be0baf2ef0adbf2a38ac}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!free\_bind@{free\_bind}}
\index{free\_bind@{free\_bind}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{free\_bind()}
{\footnotesize\ttfamily static void free\+\_\+bind (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$}]{bind }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



clean up all private driver state. 

Should be only called by \doxyref{gprs\+\_\+ns2\+\_\+free\+\_\+bind()}{p.}{group__libgb_ga60ce0e2a04d5ac46598ebd123fe744f6} 

References \textbf{ priv\+\_\+bind\+::backlog}, \textbf{ gprs\+\_\+ns2\+\_\+is\+\_\+fr\+\_\+bind()}, \textbf{ priv\+\_\+bind\+::link}, \textbf{ list}, \textbf{ priv\+\_\+bind\+::list}, \textbf{ llist\+\_\+empty()}, \textbf{ llist\+\_\+for\+\_\+each\+\_\+entry\+\_\+safe}, \textbf{ priv\+\_\+bind\+::lmi\+\_\+msg}, \textbf{ msg}, \textbf{ msgb\+\_\+free()}, \textbf{ priv\+\_\+bind\+::netdev}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::nsvc}, \textbf{ priv\+\_\+bind\+::ofd}, \textbf{ OSMO\+\_\+\+ASSERT}, \textbf{ osmo\+\_\+fd\+\_\+close()}, \textbf{ osmo\+\_\+fr\+\_\+link\+\_\+free()}, \textbf{ osmo\+\_\+netdev\+\_\+free()}, \textbf{ osmo\+\_\+timer\+\_\+del()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::priv}, and \textbf{ priv\+\_\+bind\+::timer}.

\mbox{\label{gprs__ns2__fr_8c_af69dea93a93b1e8edcedc44f5a27e8f8}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!free\_vc@{free\_vc}}
\index{free\_vc@{free\_vc}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{free\_vc()}
{\footnotesize\ttfamily static void free\+\_\+vc (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$}]{nsvc }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



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



Referenced by \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+bind()}.

\mbox{\label{gprs__ns2__fr_8c_a36a47f76b8b31d73241ab4da3c57a99f}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!gprs\_n2\_fr\_ifupdown\_ind\_cb@{gprs\_n2\_fr\_ifupdown\_ind\_cb}}
\index{gprs\_n2\_fr\_ifupdown\_ind\_cb@{gprs\_n2\_fr\_ifupdown\_ind\_cb}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{gprs\_n2\_fr\_ifupdown\_ind\_cb()}
{\footnotesize\ttfamily static int gprs\+\_\+n2\+\_\+fr\+\_\+ifupdown\+\_\+ind\+\_\+cb (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+netdev} $\ast$}]{netdev,  }\item[{bool}]{if\+\_\+running }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ priv\+\_\+bind\+::backlog}, \textbf{ priv\+\_\+bind\+::if\+\_\+running}, \textbf{ list}, \textbf{ priv\+\_\+bind\+::list}, \textbf{ llist\+\_\+for\+\_\+each\+\_\+entry\+\_\+safe}, \textbf{ priv\+\_\+bind\+::lmi\+\_\+msg}, \textbf{ LOGBIND}, \textbf{ LOGL\+\_\+\+NOTICE}, \textbf{ msg}, \textbf{ msgb\+\_\+free()}, \textbf{ priv\+\_\+bind\+::netif}, \textbf{ osmo\+\_\+netdev\+\_\+get\+\_\+priv\+\_\+data()}, \textbf{ osmo\+\_\+timer\+\_\+del()}, \textbf{ osmo\+\_\+timer\+\_\+schedule()}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::priv}, \textbf{ priv\+\_\+bind\+::retry\+\_\+us}, and \textbf{ priv\+\_\+bind\+::timer}.



Referenced by \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+bind()}.

\mbox{\label{gprs__ns2__fr_8c_a1d994a76f5b3ef2e7ece64507dd5f340}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!gprs\_n2\_fr\_mtu\_chg\_cb@{gprs\_n2\_fr\_mtu\_chg\_cb}}
\index{gprs\_n2\_fr\_mtu\_chg\_cb@{gprs\_n2\_fr\_mtu\_chg\_cb}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{gprs\_n2\_fr\_mtu\_chg\_cb()}
{\footnotesize\ttfamily static int gprs\+\_\+n2\+\_\+fr\+\_\+mtu\+\_\+chg\+\_\+cb (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+netdev} $\ast$}]{netdev,  }\item[{uint32\+\_\+t}]{new\+\_\+mtu }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ priv\+\_\+bind\+::if\+\_\+running}, \textbf{ list}, \textbf{ llist\+\_\+for\+\_\+each\+\_\+entry}, \textbf{ LOGBIND}, \textbf{ LOGL\+\_\+\+INFO}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::mtu}, \textbf{ ns2\+\_\+nse\+\_\+update\+\_\+mtu()}, \textbf{ gprs\+\_\+ns2\+\_\+inst\+::nse}, \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::nsi}, \textbf{ osmo\+\_\+netdev\+\_\+get\+\_\+priv\+\_\+data()}, and \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind\+::priv}.



Referenced by \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+bind()}.

\mbox{\label{gprs__ns2__fr_8c_a13127078d56da56bd33370e6cde49170}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!gprs\_ns2\_find\_vc\_by\_dlci@{gprs\_ns2\_find\_vc\_by\_dlci}}
\index{gprs\_ns2\_find\_vc\_by\_dlci@{gprs\_ns2\_find\_vc\_by\_dlci}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{gprs\_ns2\_find\_vc\_by\_dlci()}
{\footnotesize\ttfamily int gprs\+\_\+ns2\+\_\+find\+\_\+vc\+\_\+by\+\_\+dlci (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$}]{bind,  }\item[{uint16\+\_\+t}]{dlci,  }\item[{struct \textbf{ gprs\+\_\+ns2\+\_\+vc} $\ast$$\ast$}]{result }\end{DoxyParamCaption})}



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}.

\mbox{\label{gprs__ns2__fr_8c_a673527be920647fde63ec0b7a8c9d5ed}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!gprs\_ns2\_fr\_bind@{gprs\_ns2\_fr\_bind}}
\index{gprs\_ns2\_fr\_bind@{gprs\_ns2\_fr\_bind}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\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__fr_8c_a086917d968c0f0e70c1d36dedf6c59e8}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!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\_fr.c@{gprs\_ns2\_fr.c}}
\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__fr_8c_a1ff9ad4b66b68a9981d3b722844c3038}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!gprs\_ns2\_fr\_bind\_netif@{gprs\_ns2\_fr\_bind\_netif}}
\index{gprs\_ns2\_fr\_bind\_netif@{gprs\_ns2\_fr\_bind\_netif}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\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__fr_8c_abbb2e4e7ae6f8288f03c4fcc10e2b329}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!gprs\_ns2\_fr\_bind\_role@{gprs\_ns2\_fr\_bind\_role}}
\index{gprs\_ns2\_fr\_bind\_role@{gprs\_ns2\_fr\_bind\_role}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\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__fr_8c_a6f16fc129c2aec0d981dbcd2ce96ac9f}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!gprs\_ns2\_fr\_connect@{gprs\_ns2\_fr\_connect}}
\index{gprs\_ns2\_fr\_connect@{gprs\_ns2\_fr\_connect}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\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__fr_8c_a29c5cfa0ba80ef074bc89044208c68b5}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!gprs\_ns2\_fr\_connect2@{gprs\_ns2\_fr\_connect2}}
\index{gprs\_ns2\_fr\_connect2@{gprs\_ns2\_fr\_connect2}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\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__fr_8c_a5c88e59906893ba5ebd5bc79975ba87e}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!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\_fr.c@{gprs\_ns2\_fr.c}}
\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__fr_8c_a6d880ef22bf47cbd86427f3b693a5899}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!gprs\_ns2\_fr\_nsvc\_dlci@{gprs\_ns2\_fr\_nsvc\_dlci}}
\index{gprs\_ns2\_fr\_nsvc\_dlci@{gprs\_ns2\_fr\_nsvc\_dlci}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\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__fr_8c_a80a485eb506916a6b971551d38e22ce2}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!gprs\_ns2\_is\_fr\_bind@{gprs\_ns2\_is\_fr\_bind}}
\index{gprs\_ns2\_is\_fr\_bind@{gprs\_ns2\_is\_fr\_bind}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\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__fr_8c_a4baa32ea905105197502c43429a37b67}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!open\_socket@{open\_socket}}
\index{open\_socket@{open\_socket}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{open\_socket()}
{\footnotesize\ttfamily static int open\+\_\+socket (\begin{DoxyParamCaption}\item[{int}]{ifindex,  }\item[{const struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$}]{nsbind }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ LOGBIND}, and \textbf{ LOGL\+\_\+\+ERROR}.



Referenced by \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+bind()}.

\mbox{\label{gprs__ns2__fr_8c_aa7cbbf0fd60f0bae3312a9a560c3d3d1}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!set\_ifupdown@{set\_ifupdown}}
\index{set\_ifupdown@{set\_ifupdown}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{set\_ifupdown()}
{\footnotesize\ttfamily static int set\+\_\+ifupdown (\begin{DoxyParamCaption}\item[{const char $\ast$}]{netif,  }\item[{bool}]{up }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ OSMO\+\_\+\+STRLCPY\+\_\+\+ARRAY}.



Referenced by \textbf{ setup\+\_\+device()}.

\mbox{\label{gprs__ns2__fr_8c_a0874a6ceccb817c3fc3972dfee7e5271}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!setup\_device@{setup\_device}}
\index{setup\_device@{setup\_device}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{setup\_device()}
{\footnotesize\ttfamily static int setup\+\_\+device (\begin{DoxyParamCaption}\item[{const char $\ast$}]{netif,  }\item[{const struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+bind} $\ast$}]{bind }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ LOGBIND}, \textbf{ LOGL\+\_\+\+ERROR}, \textbf{ LOGL\+\_\+\+INFO}, \textbf{ LOGL\+\_\+\+NOTICE}, \textbf{ OSMO\+\_\+\+STRLCPY\+\_\+\+ARRAY}, \textbf{ set\+\_\+ifupdown()}, and \textbf{ buffer\+::size}.



Referenced by \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+bind()}.



\doxysubsection{Variable Documentation}
\mbox{\label{gprs__ns2__fr_8c_a20a2d8fb97103f8fc2ad3d0492b0f83b}} 
\index{gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}!vc\_driver\_fr@{vc\_driver\_fr}}
\index{vc\_driver\_fr@{vc\_driver\_fr}!gprs\_ns2\_fr.c@{gprs\_ns2\_fr.c}}
\doxysubsubsection{vc\_driver\_fr}
{\footnotesize\ttfamily struct \textbf{ gprs\+\_\+ns2\+\_\+vc\+\_\+driver} vc\+\_\+driver\+\_\+fr}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{}
\DoxyCodeLine{        .name = \textcolor{stringliteral}{"{}GB frame relay"{}},}
\DoxyCodeLine{        .free\_bind = free\_bind,}
\DoxyCodeLine{\}}

\end{DoxyCode}


Referenced by \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+bind()}, \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+bind\+\_\+netif()}, \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+bind\+\_\+role()}, \textbf{ gprs\+\_\+ns2\+\_\+fr\+\_\+nsvc\+\_\+dlci()}, and \textbf{ gprs\+\_\+ns2\+\_\+is\+\_\+fr\+\_\+bind()}.

