\doxysection{gprs\+\_\+ns2.\+h}
\label{gprs__ns2_8h_source}\index{include/osmocom/gprs/gprs\_ns2.h@{include/osmocom/gprs/gprs\_ns2.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 }
\DoxyCodeLine{4 \textcolor{preprocessor}{\#pragma once}}
\DoxyCodeLine{5 }
\DoxyCodeLine{6 \textcolor{preprocessor}{\#include <stdint.h>}}
\DoxyCodeLine{7 \textcolor{preprocessor}{\#include <netinet/in.h>}}
\DoxyCodeLine{8 }
\DoxyCodeLine{9 \textcolor{preprocessor}{\#include <osmocom/core/prim.h>}}
\DoxyCodeLine{10 \textcolor{preprocessor}{\#include <osmocom/gprs/protocol/gsm\_08\_16.h>}}
\DoxyCodeLine{11 \textcolor{preprocessor}{\#include <osmocom/gprs/frame\_relay.h>}}
\DoxyCodeLine{12 }
\DoxyCodeLine{13 \textcolor{keyword}{struct }osmo\_sockaddr;}
\DoxyCodeLine{14 \textcolor{keyword}{struct }osmo\_sockaddr\_str;}
\DoxyCodeLine{15 \textcolor{keyword}{struct }osmo\_fr\_network;}
\DoxyCodeLine{16 }
\DoxyCodeLine{17 \textcolor{keyword}{struct }gprs\_ns2\_inst;}
\DoxyCodeLine{18 \textcolor{keyword}{struct }gprs\_ns2\_nse;}
\DoxyCodeLine{19 \textcolor{keyword}{struct }gprs\_ns2\_vc;}
\DoxyCodeLine{20 \textcolor{keyword}{struct }gprs\_ns2\_vc\_bind;}
\DoxyCodeLine{21 \textcolor{keyword}{struct }gprs\_ns2\_vc\_driver;}
\DoxyCodeLine{22 \textcolor{keyword}{struct }gprs\_ns\_ie\_ip4\_elem;}
\DoxyCodeLine{23 \textcolor{keyword}{struct }gprs\_ns\_ie\_ip6\_elem;}
\DoxyCodeLine{24 }
\DoxyCodeLine{25 \textcolor{keyword}{enum} gprs\_ns2\_vc\_mode \{}
\DoxyCodeLine{29         GPRS\_NS2\_VC\_MODE\_BLOCKRESET,}
\DoxyCodeLine{32         GPRS\_NS2\_VC\_MODE\_ALIVE,}
\DoxyCodeLine{33 \};}
\DoxyCodeLine{34 }
\DoxyCodeLine{35 \textcolor{keyword}{enum} gprs\_ns2\_dialect \{}
\DoxyCodeLine{36         GPRS\_NS2\_DIALECT\_UNDEF,}
\DoxyCodeLine{37         GPRS\_NS2\_DIALECT\_STATIC\_ALIVE,}
\DoxyCodeLine{38         GPRS\_NS2\_DIALECT\_STATIC\_RESETBLOCK,}
\DoxyCodeLine{39         GPRS\_NS2\_DIALECT\_IPACCESS,}
\DoxyCodeLine{40         GPRS\_NS2\_DIALECT\_SNS,}
\DoxyCodeLine{41 \};}
\DoxyCodeLine{42 }
\DoxyCodeLine{44 \textcolor{keyword}{enum} gprs\_ns2\_ll \{}
\DoxyCodeLine{45         GPRS\_NS2\_LL\_UNDEF,     }
\DoxyCodeLine{46         GPRS\_NS2\_LL\_UDP, }
\DoxyCodeLine{47         GPRS\_NS2\_LL\_FR,           }
\DoxyCodeLine{48         GPRS\_NS2\_LL\_FR\_GRE,   }
\DoxyCodeLine{49 \};}
\DoxyCodeLine{50 }
\DoxyCodeLine{52 \textcolor{keyword}{enum} gprs\_ns2\_prim \{}
\DoxyCodeLine{53         GPRS\_NS2\_PRIM\_UNIT\_DATA,}
\DoxyCodeLine{54         GPRS\_NS2\_PRIM\_CONGESTION,}
\DoxyCodeLine{55         GPRS\_NS2\_PRIM\_STATUS,}
\DoxyCodeLine{56 \};}
\DoxyCodeLine{57 }
\DoxyCodeLine{58 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string gprs\_ns2\_prim\_strs[];}
\DoxyCodeLine{59 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string gprs\_ns2\_lltype\_strs[];}
\DoxyCodeLine{60 }
\DoxyCodeLine{62 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *gprs\_ns2\_prim\_str(\textcolor{keyword}{enum} gprs\_ns2\_prim val)}
\DoxyCodeLine{63 \{ \textcolor{keywordflow}{return} get\_value\_string(gprs\_ns2\_prim\_strs, val); \}}
\DoxyCodeLine{64 }
\DoxyCodeLine{66 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *gprs\_ns2\_lltype\_str(\textcolor{keyword}{enum} gprs\_ns2\_ll val)}
\DoxyCodeLine{67 \{ \textcolor{keywordflow}{return} get\_value\_string(gprs\_ns2\_lltype\_strs, val); \}}
\DoxyCodeLine{68 }
\DoxyCodeLine{70 \textcolor{keyword}{enum} gprs\_ns2\_congestion\_cause \{}
\DoxyCodeLine{71         GPRS\_NS2\_CONG\_CAUSE\_BACKWARD\_BEGIN,}
\DoxyCodeLine{72         GPRS\_NS2\_CONG\_CAUSE\_BACKWARD\_END,}
\DoxyCodeLine{73         GPRS\_NS2\_CONG\_CAUSE\_FORWARD\_BEGIN,}
\DoxyCodeLine{74         GPRS\_NS2\_CONG\_CAUSE\_FORWARD\_END,}
\DoxyCodeLine{75 \};}
\DoxyCodeLine{76 }
\DoxyCodeLine{78 \textcolor{keyword}{enum} gprs\_ns2\_affecting\_cause \{}
\DoxyCodeLine{79         GPRS\_NS2\_AFF\_CAUSE\_VC\_FAILURE,}
\DoxyCodeLine{80         GPRS\_NS2\_AFF\_CAUSE\_VC\_RECOVERY,}
\DoxyCodeLine{81         GPRS\_NS2\_AFF\_CAUSE\_FAILURE,}
\DoxyCodeLine{82         GPRS\_NS2\_AFF\_CAUSE\_RECOVERY,}
\DoxyCodeLine{83         \textcolor{comment}{/* osmocom own causes */}}
\DoxyCodeLine{84         GPRS\_NS2\_AFF\_CAUSE\_SNS\_CONFIGURED,}
\DoxyCodeLine{85         GPRS\_NS2\_AFF\_CAUSE\_SNS\_FAILURE,}
\DoxyCodeLine{86         GPRS\_NS2\_AFF\_CAUSE\_SNS\_NO\_ENDPOINTS,}
\DoxyCodeLine{87         GPRS\_NS2\_AFF\_CAUSE\_MTU\_CHANGE,}
\DoxyCodeLine{88 \};}
\DoxyCodeLine{89 }
\DoxyCodeLine{90 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string gprs\_ns2\_aff\_cause\_prim\_strs[];}
\DoxyCodeLine{91 }
\DoxyCodeLine{93 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *gprs\_ns2\_aff\_cause\_prim\_str(\textcolor{keyword}{enum} gprs\_ns2\_affecting\_cause val)}
\DoxyCodeLine{94 \{ \textcolor{keywordflow}{return} get\_value\_string(gprs\_ns2\_aff\_cause\_prim\_strs, val); \}}
\DoxyCodeLine{95 }
\DoxyCodeLine{97 \textcolor{keyword}{enum} gprs\_ns2\_change\_ip\_endpoint \{}
\DoxyCodeLine{98         GRPS\_NS2\_ENDPOINT\_NO\_CHANGE,}
\DoxyCodeLine{99         GPRS\_NS2\_ENDPOINT\_REQUEST\_CHANGE,}
\DoxyCodeLine{100         GPRS\_NS2\_ENDPOINT\_CONFIRM\_CHANGE,}
\DoxyCodeLine{101 \};}
\DoxyCodeLine{102 }
\DoxyCodeLine{103 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string gprs\_ns2\_cause\_strs[];}
\DoxyCodeLine{104 }
\DoxyCodeLine{106 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *gprs\_ns2\_cause\_str(\textcolor{keyword}{enum} ns\_cause val)}
\DoxyCodeLine{107 \{ \textcolor{keywordflow}{return} get\_value\_string(gprs\_ns2\_cause\_strs, val); \}}
\DoxyCodeLine{108 }
\DoxyCodeLine{109 \textcolor{keyword}{struct }osmo\_gprs\_ns2\_prim \{}
\DoxyCodeLine{110         \textcolor{keyword}{struct }osmo\_prim\_hdr oph;}
\DoxyCodeLine{111 }
\DoxyCodeLine{112         uint16\_t nsei;}
\DoxyCodeLine{113         uint16\_t bvci;}
\DoxyCodeLine{114 }
\DoxyCodeLine{115         \textcolor{keyword}{union }\{}
\DoxyCodeLine{116                 \textcolor{keyword}{struct }\{}
\DoxyCodeLine{117                         \textcolor{keyword}{enum} gprs\_ns2\_change\_ip\_endpoint change;}
\DoxyCodeLine{118                         uint32\_t link\_selector;}
\DoxyCodeLine{119                         \textcolor{comment}{/* TODO: implement resource distribution}}
\DoxyCodeLine{120 \textcolor{comment}{                         * add place holder for the link selector */}}
\DoxyCodeLine{121                         \textcolor{keywordtype}{long} \textcolor{keywordtype}{long} \_resource\_distribution\_placeholder1;}
\DoxyCodeLine{122                         \textcolor{keywordtype}{long} \textcolor{keywordtype}{long} \_resource\_distribution\_placeholder2;}
\DoxyCodeLine{123                         \textcolor{keywordtype}{long} \textcolor{keywordtype}{long} \_resource\_distribution\_placeholder3;}
\DoxyCodeLine{124                 \} unitdata;}
\DoxyCodeLine{125                 \textcolor{keyword}{struct }\{}
\DoxyCodeLine{126                         \textcolor{keyword}{enum} gprs\_ns2\_congestion\_cause cause;}
\DoxyCodeLine{127                 \} congestion;}
\DoxyCodeLine{128                 \textcolor{keyword}{struct }\{}
\DoxyCodeLine{129                         \textcolor{keyword}{enum} gprs\_ns2\_affecting\_cause cause;}
\DoxyCodeLine{130                         \textcolor{keywordtype}{char} *nsvc;}
\DoxyCodeLine{131                         \textcolor{comment}{/* 48.016 5.2.2.6 transfer capability */}}
\DoxyCodeLine{132                         \textcolor{keywordtype}{int} transfer;}
\DoxyCodeLine{133                         \textcolor{comment}{/* osmocom specific */}}
\DoxyCodeLine{134                         \textcolor{comment}{/* Persistent NSE/NSVC are configured by vty */}}
\DoxyCodeLine{135                         \textcolor{keywordtype}{bool} persistent;}
\DoxyCodeLine{136                         \textcolor{comment}{/* Only true on the first time it's available.}}
\DoxyCodeLine{137 \textcolor{comment}{                         * Allow the BSSGP layer to reset persistent NSE */}}
\DoxyCodeLine{138                         \textcolor{keywordtype}{bool} first;}
\DoxyCodeLine{139                         \textcolor{comment}{/* MTU of a NS SDU. It's the lowest MTU of all (alive \& dead) NSVCs */}}
\DoxyCodeLine{140                         uint16\_t mtu;}
\DoxyCodeLine{141                 \} status;}
\DoxyCodeLine{142         \} u;}
\DoxyCodeLine{143 \};}
\DoxyCodeLine{144 }
\DoxyCodeLine{145 \textcolor{comment}{/* instance */}}
\DoxyCodeLine{146 \textcolor{keyword}{struct }gprs\_ns2\_inst *gprs\_ns2\_instantiate(\textcolor{keywordtype}{void} *ctx, osmo\_prim\_cb cb, \textcolor{keywordtype}{void} *cb\_data);}
\DoxyCodeLine{147 \textcolor{keywordtype}{void} gprs\_ns2\_free(\textcolor{keyword}{struct} gprs\_ns2\_inst *inst);}
\DoxyCodeLine{148 }
\DoxyCodeLine{149 \textcolor{comment}{/* Entrypoint for primitives from the NS USER */}}
\DoxyCodeLine{150 \textcolor{keywordtype}{int} gprs\_ns2\_recv\_prim(\textcolor{keyword}{struct} gprs\_ns2\_inst *nsi, \textcolor{keyword}{struct} osmo\_prim\_hdr *oph);}
\DoxyCodeLine{151 }
\DoxyCodeLine{153 \textcolor{keyword}{typedef} int (*gprs\_ns2\_foreach\_nsvc\_cb)(\textcolor{keyword}{struct }gprs\_ns2\_vc *nsvc, \textcolor{keywordtype}{void} *ctx);}
\DoxyCodeLine{154 }
\DoxyCodeLine{155 \textcolor{keywordtype}{int} gprs\_ns2\_nse\_foreach\_nsvc(\textcolor{keyword}{struct} gprs\_ns2\_nse *nse,}
\DoxyCodeLine{156                               gprs\_ns2\_foreach\_nsvc\_cb cb, \textcolor{keywordtype}{void} *cb\_data);}
\DoxyCodeLine{157 \textcolor{keyword}{struct }gprs\_ns2\_nse *gprs\_ns2\_nse\_by\_nsei(\textcolor{keyword}{struct} gprs\_ns2\_inst *nsi, uint16\_t nsei);}
\DoxyCodeLine{158 \textcolor{keyword}{struct }gprs\_ns2\_nse *gprs\_ns2\_create\_nse(\textcolor{keyword}{struct} gprs\_ns2\_inst *nsi, uint16\_t nsei,}
\DoxyCodeLine{159                                          \textcolor{keyword}{enum} gprs\_ns2\_ll linklayer,}
\DoxyCodeLine{160                                          \textcolor{keyword}{enum} gprs\_ns2\_dialect dialect);}
\DoxyCodeLine{161 \textcolor{keyword}{struct }gprs\_ns2\_nse *gprs\_ns2\_create\_nse2(\textcolor{keyword}{struct} gprs\_ns2\_inst *nsi, uint16\_t nsei,}
\DoxyCodeLine{162                                          \textcolor{keyword}{enum} gprs\_ns2\_ll linklayer,}
\DoxyCodeLine{163                                          \textcolor{keyword}{enum} gprs\_ns2\_dialect dialect, \textcolor{keywordtype}{bool} local\_sgsn\_role);}
\DoxyCodeLine{164 uint16\_t gprs\_ns2\_nse\_nsei(\textcolor{keyword}{struct} gprs\_ns2\_nse *nse);}
\DoxyCodeLine{165 \textcolor{keywordtype}{void} gprs\_ns2\_free\_nse(\textcolor{keyword}{struct} gprs\_ns2\_nse *nse);}
\DoxyCodeLine{166 \textcolor{keywordtype}{void} gprs\_ns2\_free\_nses(\textcolor{keyword}{struct} gprs\_ns2\_inst *nsi);}
\DoxyCodeLine{167 }
\DoxyCodeLine{168 \textcolor{comment}{/* create vc */}}
\DoxyCodeLine{169 \textcolor{keywordtype}{void} gprs\_ns2\_free\_nsvc(\textcolor{keyword}{struct} gprs\_ns2\_vc *nsvc);}
\DoxyCodeLine{170 \textcolor{keywordtype}{void} gprs\_ns2\_free\_nsvcs(\textcolor{keyword}{struct} gprs\_ns2\_nse *nse);}
\DoxyCodeLine{171 \textcolor{keyword}{struct }gprs\_ns2\_vc *gprs\_ns2\_nsvc\_by\_nsvci(\textcolor{keyword}{struct} gprs\_ns2\_inst *nsi, uint16\_t nsvci);}
\DoxyCodeLine{172 }
\DoxyCodeLine{173 \textcolor{comment}{/* generic VL driver */}}
\DoxyCodeLine{174 \textcolor{keyword}{struct }gprs\_ns2\_vc\_bind *gprs\_ns2\_bind\_by\_name(\textcolor{keyword}{struct} gprs\_ns2\_inst *nsi,}
\DoxyCodeLine{175                                                \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name);}
\DoxyCodeLine{176 }
\DoxyCodeLine{177 \textcolor{comment}{/* IP VL driver */}}
\DoxyCodeLine{178 \textcolor{keywordtype}{int} gprs\_ns2\_ip\_bind(\textcolor{keyword}{struct} gprs\_ns2\_inst *nsi,}
\DoxyCodeLine{179                      \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name,}
\DoxyCodeLine{180                      \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sockaddr *local,}
\DoxyCodeLine{181                      \textcolor{keywordtype}{int} dscp,}
\DoxyCodeLine{182                      \textcolor{keyword}{struct} gprs\_ns2\_vc\_bind **result);}
\DoxyCodeLine{183 \textcolor{keyword}{struct }gprs\_ns2\_vc\_bind *gprs\_ns2\_ip\_bind\_by\_sockaddr(\textcolor{keyword}{struct} gprs\_ns2\_inst *nsi,}
\DoxyCodeLine{184                                                       \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sockaddr *sockaddr);}
\DoxyCodeLine{185 }
\DoxyCodeLine{186 \textcolor{comment}{/* FR VL driver */}}
\DoxyCodeLine{187 \textcolor{keyword}{struct }gprs\_ns2\_vc\_bind *gprs\_ns2\_fr\_bind\_by\_netif(}
\DoxyCodeLine{188                 \textcolor{keyword}{struct} gprs\_ns2\_inst *nsi,}
\DoxyCodeLine{189                 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *netif);}
\DoxyCodeLine{190 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *gprs\_ns2\_fr\_bind\_netif(\textcolor{keyword}{struct} gprs\_ns2\_vc\_bind *bind);}
\DoxyCodeLine{191 \textcolor{keyword}{enum} osmo\_fr\_role gprs\_ns2\_fr\_bind\_role(\textcolor{keyword}{struct} gprs\_ns2\_vc\_bind *bind);}
\DoxyCodeLine{192 \textcolor{keywordtype}{int} gprs\_ns2\_fr\_bind(\textcolor{keyword}{struct} gprs\_ns2\_inst *nsi,}
\DoxyCodeLine{193                      \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name,}
\DoxyCodeLine{194                      \textcolor{keyword}{const} \textcolor{keywordtype}{char} *netif,}
\DoxyCodeLine{195                      \textcolor{keyword}{struct} osmo\_fr\_network *fr\_network,}
\DoxyCodeLine{196                      \textcolor{keyword}{enum} osmo\_fr\_role fr\_role,}
\DoxyCodeLine{197                      \textcolor{keyword}{struct} gprs\_ns2\_vc\_bind **result);}
\DoxyCodeLine{198 \textcolor{keywordtype}{int} gprs\_ns2\_is\_fr\_bind(\textcolor{keyword}{struct} gprs\_ns2\_vc\_bind *bind);}
\DoxyCodeLine{199 \textcolor{keyword}{struct }gprs\_ns2\_vc *gprs\_ns2\_fr\_nsvc\_by\_dlci(\textcolor{keyword}{struct} gprs\_ns2\_vc\_bind *bind, uint16\_t dlci);}
\DoxyCodeLine{200 \textcolor{keyword}{struct }gprs\_ns2\_vc *gprs\_ns2\_fr\_connect(\textcolor{keyword}{struct} gprs\_ns2\_vc\_bind *bind,}
\DoxyCodeLine{201                                         \textcolor{keyword}{struct} gprs\_ns2\_nse *nse,}
\DoxyCodeLine{202                                         uint16\_t nsvci,}
\DoxyCodeLine{203                                         uint16\_t dlci);}
\DoxyCodeLine{204 \textcolor{keyword}{struct }gprs\_ns2\_vc *gprs\_ns2\_fr\_connect2(\textcolor{keyword}{struct} gprs\_ns2\_vc\_bind *bind,}
\DoxyCodeLine{205                                         uint16\_t nsei,}
\DoxyCodeLine{206                                         uint16\_t nsvci,}
\DoxyCodeLine{207                                         uint16\_t dlci);}
\DoxyCodeLine{208 }
\DoxyCodeLine{209 \textcolor{comment}{/* create a VC connection */}}
\DoxyCodeLine{210 \textcolor{keyword}{struct }gprs\_ns2\_vc *gprs\_ns2\_ip\_connect(\textcolor{keyword}{struct} gprs\_ns2\_vc\_bind *bind,}
\DoxyCodeLine{211                                         \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sockaddr *remote,}
\DoxyCodeLine{212                                         \textcolor{keyword}{struct} gprs\_ns2\_nse *nse,}
\DoxyCodeLine{213                                         uint16\_t nsvci);}
\DoxyCodeLine{214 }
\DoxyCodeLine{215 \textcolor{keyword}{struct }gprs\_ns2\_vc *gprs\_ns2\_ip\_connect2(\textcolor{keyword}{struct} gprs\_ns2\_vc\_bind *bind,}
\DoxyCodeLine{216                                          \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sockaddr *remote,}
\DoxyCodeLine{217                                          uint16\_t nsei,}
\DoxyCodeLine{218                                          uint16\_t nsvci,}
\DoxyCodeLine{219                                          \textcolor{keyword}{enum} gprs\_ns2\_dialect dialect);}
\DoxyCodeLine{220 \textcolor{keyword}{struct }gprs\_ns2\_vc *gprs\_ns2\_ip\_connect\_inactive(\textcolor{keyword}{struct} gprs\_ns2\_vc\_bind *bind,}
\DoxyCodeLine{221                                         \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sockaddr *remote,}
\DoxyCodeLine{222                                         \textcolor{keyword}{struct} gprs\_ns2\_nse *nse,}
\DoxyCodeLine{223                                         uint16\_t nsvci);}
\DoxyCodeLine{224 \textcolor{keywordtype}{void} gprs\_ns2\_ip\_bind\_set\_sns\_weight(\textcolor{keyword}{struct} gprs\_ns2\_vc\_bind *bind,}
\DoxyCodeLine{225                                      uint8\_t signalling, uint8\_t data);}
\DoxyCodeLine{226 }
\DoxyCodeLine{227 \textcolor{keywordtype}{void} gprs\_ns2\_free\_bind(\textcolor{keyword}{struct} gprs\_ns2\_vc\_bind *bind);}
\DoxyCodeLine{228 \textcolor{keywordtype}{void} gprs\_ns2\_free\_binds(\textcolor{keyword}{struct} gprs\_ns2\_inst *nsi);}
\DoxyCodeLine{229 }
\DoxyCodeLine{230 \textcolor{comment}{/* create a VC SNS connection */}}
\DoxyCodeLine{231 \textcolor{keywordtype}{int} gprs\_ns2\_sns\_count(\textcolor{keyword}{struct} gprs\_ns2\_nse *nse);}
\DoxyCodeLine{232 \textcolor{keywordtype}{int} gprs\_ns2\_sns\_add\_endpoint(\textcolor{keyword}{struct} gprs\_ns2\_nse *nse,}
\DoxyCodeLine{233                                    \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sockaddr *saddr);}
\DoxyCodeLine{234 \textcolor{keywordtype}{int} gprs\_ns2\_sns\_del\_endpoint(\textcolor{keyword}{struct} gprs\_ns2\_nse *nse,}
\DoxyCodeLine{235                                    \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sockaddr *saddr);}
\DoxyCodeLine{236 \textcolor{keywordtype}{int} gprs\_ns2\_sns\_add\_bind(\textcolor{keyword}{struct} gprs\_ns2\_nse *nse, \textcolor{keyword}{struct} gprs\_ns2\_vc\_bind *bind);}
\DoxyCodeLine{237 \textcolor{keywordtype}{int} gprs\_ns2\_sns\_del\_bind(\textcolor{keyword}{struct} gprs\_ns2\_nse *nse, \textcolor{keyword}{struct} gprs\_ns2\_vc\_bind *bind);}
\DoxyCodeLine{238 \textcolor{keyword}{const} \textcolor{keyword}{struct }osmo\_sockaddr *gprs\_ns2\_nse\_sns\_remote(\textcolor{keyword}{struct} gprs\_ns2\_nse *nse);}
\DoxyCodeLine{239 }
\DoxyCodeLine{240 \textcolor{keyword}{const} \textcolor{keyword}{struct }osmo\_sockaddr *gprs\_ns2\_ip\_vc\_remote(\textcolor{keyword}{const} \textcolor{keyword}{struct} gprs\_ns2\_vc *nsvc);}
\DoxyCodeLine{241 \textcolor{keyword}{const} \textcolor{keyword}{struct }osmo\_sockaddr *gprs\_ns2\_ip\_vc\_local(\textcolor{keyword}{const} \textcolor{keyword}{struct} gprs\_ns2\_vc *nsvc);}
\DoxyCodeLine{242 \textcolor{keywordtype}{bool} gprs\_ns2\_ip\_vc\_equal(\textcolor{keyword}{const} \textcolor{keyword}{struct} gprs\_ns2\_vc *nsvc,}
\DoxyCodeLine{243                           \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sockaddr *local,}
\DoxyCodeLine{244                           \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sockaddr *remote,}
\DoxyCodeLine{245                           uint16\_t nsvci);}
\DoxyCodeLine{246 \textcolor{keyword}{const} \textcolor{keyword}{struct }osmo\_sockaddr *gprs\_ns2\_ip\_bind\_sockaddr(\textcolor{keyword}{struct} gprs\_ns2\_vc\_bind *bind);}
\DoxyCodeLine{247 \textcolor{keywordtype}{int} gprs\_ns2\_is\_ip\_bind(\textcolor{keyword}{struct} gprs\_ns2\_vc\_bind *bind);}
\DoxyCodeLine{248 \textcolor{keywordtype}{int} gprs\_ns2\_ip\_bind\_set\_dscp(\textcolor{keyword}{struct} gprs\_ns2\_vc\_bind *bind, \textcolor{keywordtype}{int} dscp);}
\DoxyCodeLine{249 \textcolor{keywordtype}{int} gprs\_ns2\_ip\_bind\_set\_priority(\textcolor{keyword}{struct} gprs\_ns2\_vc\_bind *bind, uint8\_t priority);}
\DoxyCodeLine{250 \textcolor{keyword}{struct }gprs\_ns2\_vc *gprs\_ns2\_nsvc\_by\_sockaddr\_bind(}
\DoxyCodeLine{251                 \textcolor{keyword}{struct} gprs\_ns2\_vc\_bind *bind,}
\DoxyCodeLine{252                 \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sockaddr *rem\_addr);}
\DoxyCodeLine{253 }
\DoxyCodeLine{254 \textcolor{keywordtype}{int} gprs\_ns2\_frgre\_bind(\textcolor{keyword}{struct} gprs\_ns2\_inst *nsi,}
\DoxyCodeLine{255                         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name,}
\DoxyCodeLine{256                         \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sockaddr *local,}
\DoxyCodeLine{257                         \textcolor{keywordtype}{int} dscp,}
\DoxyCodeLine{258                         \textcolor{keyword}{struct} gprs\_ns2\_vc\_bind **result);}
\DoxyCodeLine{259 \textcolor{keywordtype}{int} gprs\_ns2\_is\_frgre\_bind(\textcolor{keyword}{struct} gprs\_ns2\_vc\_bind *bind);}
\DoxyCodeLine{260 uint16\_t gprs\_ns2\_fr\_nsvc\_dlci(\textcolor{keyword}{const} \textcolor{keyword}{struct} gprs\_ns2\_vc *nsvc);}
\DoxyCodeLine{261 }
\DoxyCodeLine{262 \textcolor{keyword}{struct }gprs\_ns2\_vc *gprs\_ns2\_nsvc\_by\_sockaddr\_nse(}
\DoxyCodeLine{263                 \textcolor{keyword}{struct} gprs\_ns2\_nse *nse,}
\DoxyCodeLine{264                 \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sockaddr *sockaddr);}
\DoxyCodeLine{265 \textcolor{keywordtype}{void} gprs\_ns2\_start\_alive\_all\_nsvcs(\textcolor{keyword}{struct} gprs\_ns2\_nse *nse);}
\DoxyCodeLine{266 }
\DoxyCodeLine{267 \textcolor{comment}{/* VC information */}}
\DoxyCodeLine{268 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *gprs\_ns2\_ll\_str(\textcolor{keyword}{struct} gprs\_ns2\_vc *nsvc);}
\DoxyCodeLine{269 \textcolor{keywordtype}{char} *gprs\_ns2\_ll\_str\_buf(\textcolor{keywordtype}{char} *buf, \textcolor{keywordtype}{size\_t} buf\_len, \textcolor{keyword}{struct} gprs\_ns2\_vc *nsvc);}
\DoxyCodeLine{270 \textcolor{keywordtype}{char} *gprs\_ns2\_ll\_str\_c(\textcolor{keyword}{const} \textcolor{keywordtype}{void} *ctx, \textcolor{keyword}{struct} gprs\_ns2\_vc *nsvc);}
\DoxyCodeLine{271 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *gprs\_ns2\_nsvc\_state\_name(\textcolor{keyword}{struct} gprs\_ns2\_vc *nsvc);}
\DoxyCodeLine{272 }
\DoxyCodeLine{273 \textcolor{comment}{/* vty */}}
\DoxyCodeLine{274 \textcolor{keywordtype}{int} gprs\_ns2\_vty\_init(\textcolor{keyword}{struct} gprs\_ns2\_inst *nsi);}
\DoxyCodeLine{275 }

\end{DoxyCode}
