libosmogb 1.9.0.196-9975
Osmocom Gb library
gprs_ns2.h
Go to the documentation of this file.
1
4#pragma once
5
6#include <stdint.h>
7#include <netinet/in.h>
8
9#include <osmocom/core/prim.h>
12
13struct osmo_sockaddr;
15struct osmo_fr_network;
16
17struct gprs_ns2_inst;
18struct gprs_ns2_nse;
19struct gprs_ns2_vc;
20struct gprs_ns2_vc_bind;
24
33};
34
41};
42
49};
50
56};
57
58extern const struct value_string gprs_ns2_prim_strs[];
59extern const struct value_string gprs_ns2_lltype_strs[];
60
62static inline const char *gprs_ns2_prim_str(enum gprs_ns2_prim val)
64
66static inline const char *gprs_ns2_lltype_str(enum gprs_ns2_ll val)
68
75};
76
83 /* osmocom own causes */
88};
89
90extern const struct value_string gprs_ns2_aff_cause_prim_strs[];
91
93static inline const char *gprs_ns2_aff_cause_prim_str(enum gprs_ns2_affecting_cause val)
95
101};
102
103extern const struct value_string gprs_ns2_cause_strs[];
104
106static inline const char *gprs_ns2_cause_str(enum ns_cause val)
108
111
112 uint16_t nsei;
113 uint16_t bvci;
114
115 union {
116 struct {
119 /* TODO: implement resource distribution
120 * add place holder for the link selector */
125 struct {
128 struct {
130 char *nsvc;
131 /* 48.016 5.2.2.6 transfer capability */
133 /* osmocom specific */
134 /* Persistent NSE/NSVC are configured by vty */
136 /* Only true on the first time it's available.
137 * Allow the BSSGP layer to reset persistent NSE */
138 bool first;
139 /* MTU of a NS SDU. It's the lowest MTU of all (alive & dead) NSVCs */
140 uint16_t mtu;
142 } u;
143};
144
145/* instance */
146struct gprs_ns2_inst *gprs_ns2_instantiate(void *ctx, osmo_prim_cb cb, void *cb_data);
147void gprs_ns2_free(struct gprs_ns2_inst *inst);
148
149/* Entrypoint for primitives from the NS USER */
150int gprs_ns2_recv_prim(struct gprs_ns2_inst *nsi, struct osmo_prim_hdr *oph);
151
153typedef int (*gprs_ns2_foreach_nsvc_cb)(struct gprs_ns2_vc *nsvc, void *ctx);
154
156 gprs_ns2_foreach_nsvc_cb cb, void *cb_data);
157struct gprs_ns2_nse *gprs_ns2_nse_by_nsei(struct gprs_ns2_inst *nsi, uint16_t nsei);
158struct gprs_ns2_nse *gprs_ns2_create_nse(struct gprs_ns2_inst *nsi, uint16_t nsei,
159 enum gprs_ns2_ll linklayer,
161struct gprs_ns2_nse *gprs_ns2_create_nse2(struct gprs_ns2_inst *nsi, uint16_t nsei,
162 enum gprs_ns2_ll linklayer,
163 enum gprs_ns2_dialect dialect, bool local_sgsn_role);
164uint16_t gprs_ns2_nse_nsei(struct gprs_ns2_nse *nse);
165void gprs_ns2_free_nse(struct gprs_ns2_nse *nse);
167
168/* create vc */
170void gprs_ns2_free_nsvcs(struct gprs_ns2_nse *nse);
171struct gprs_ns2_vc *gprs_ns2_nsvc_by_nsvci(struct gprs_ns2_inst *nsi, uint16_t nsvci);
172
173/* generic VL driver */
175 const char *name);
176
177/* IP VL driver */
179 const char *name,
180 const struct osmo_sockaddr *local,
181 int dscp,
182 struct gprs_ns2_vc_bind **result);
184 const struct osmo_sockaddr *sockaddr);
185
186/* FR VL driver */
188 struct gprs_ns2_inst *nsi,
189 const char *netif);
190const char *gprs_ns2_fr_bind_netif(struct gprs_ns2_vc_bind *bind);
193 const char *name,
194 const char *netif,
195 struct osmo_fr_network *fr_network,
196 enum osmo_fr_role fr_role,
197 struct gprs_ns2_vc_bind **result);
198int gprs_ns2_is_fr_bind(struct gprs_ns2_vc_bind *bind);
199struct gprs_ns2_vc *gprs_ns2_fr_nsvc_by_dlci(struct gprs_ns2_vc_bind *bind, uint16_t dlci);
201 struct gprs_ns2_nse *nse,
202 uint16_t nsvci,
203 uint16_t dlci);
205 uint16_t nsei,
206 uint16_t nsvci,
207 uint16_t dlci);
208
209/* create a VC connection */
211 const struct osmo_sockaddr *remote,
212 struct gprs_ns2_nse *nse,
213 uint16_t nsvci);
214
216 const struct osmo_sockaddr *remote,
217 uint16_t nsei,
218 uint16_t nsvci,
219 enum gprs_ns2_dialect dialect);
221 const struct osmo_sockaddr *remote,
222 struct gprs_ns2_nse *nse,
223 uint16_t nsvci);
225 uint8_t signalling, uint8_t data);
226
228void gprs_ns2_free_binds(struct gprs_ns2_inst *nsi);
229
230/* create a VC SNS connection */
233 const struct osmo_sockaddr *saddr);
235 const struct osmo_sockaddr *saddr);
238const struct osmo_sockaddr *gprs_ns2_nse_sns_remote(struct gprs_ns2_nse *nse);
239
240const struct osmo_sockaddr *gprs_ns2_ip_vc_remote(const struct gprs_ns2_vc *nsvc);
241const struct osmo_sockaddr *gprs_ns2_ip_vc_local(const struct gprs_ns2_vc *nsvc);
242bool gprs_ns2_ip_vc_equal(const struct gprs_ns2_vc *nsvc,
243 const struct osmo_sockaddr *local,
244 const struct osmo_sockaddr *remote,
245 uint16_t nsvci);
247int gprs_ns2_is_ip_bind(struct gprs_ns2_vc_bind *bind);
248int gprs_ns2_ip_bind_set_dscp(struct gprs_ns2_vc_bind *bind, int dscp);
251 struct gprs_ns2_vc_bind *bind,
252 const struct osmo_sockaddr *rem_addr);
253
254int gprs_ns2_frgre_bind(struct gprs_ns2_inst *nsi,
255 const char *name,
256 const struct osmo_sockaddr *local,
257 int dscp,
258 struct gprs_ns2_vc_bind **result);
260uint16_t gprs_ns2_fr_nsvc_dlci(const struct gprs_ns2_vc *nsvc);
261
263 struct gprs_ns2_nse *nse,
264 const struct osmo_sockaddr *sockaddr);
266
267/* VC information */
268const char *gprs_ns2_ll_str(struct gprs_ns2_vc *nsvc);
269char *gprs_ns2_ll_str_buf(char *buf, size_t buf_len, struct gprs_ns2_vc *nsvc);
270char *gprs_ns2_ll_str_c(const void *ctx, struct gprs_ns2_vc *nsvc);
271const char *gprs_ns2_nsvc_state_name(struct gprs_ns2_vc *nsvc);
272
273/* vty */
274int gprs_ns2_vty_init(struct gprs_ns2_inst *nsi);
275
osmo_fr_role
Definition: frame_relay.h:38
uint16_t nsei
Identifiers of a BTS, equal to 'struct bssgp_bts_ctx'.
Definition: gprs_msgb.h:7
int gprs_ns2_is_frgre_bind(struct gprs_ns2_vc_bind *bind)
determine if given bind is for FR-GRE encapsulation.
Definition: gprs_ns2_frgre.c:543
struct gprs_ns2_vc_bind * gprs_ns2_fr_bind_by_netif(struct gprs_ns2_inst *nsi, const char *netif)
Find NS bind for a given network interface.
Definition: gprs_ns2_fr.c:849
int gprs_ns2_is_ip_bind(struct gprs_ns2_vc_bind *bind)
Is the given bind an IP bind?
Definition: gprs_ns2_udp.c:476
int gprs_ns2_ip_bind_set_priority(struct gprs_ns2_vc_bind *bind, uint8_t priority)
Set the socket priority of the given bind.
Definition: gprs_ns2_udp.c:507
static const char * gprs_ns2_aff_cause_prim_str(enum gprs_ns2_affecting_cause val)
Obtain a human-readable string for NS affecting cause in primitives.
Definition: gprs_ns2.h:93
static const char * gprs_ns2_cause_str(enum ns_cause val)
Obtain a human-readable string for NS primitives.
Definition: gprs_ns2.h:106
const struct osmo_sockaddr * gprs_ns2_ip_bind_sockaddr(struct gprs_ns2_vc_bind *bind)
Return the locally bound socket address of the bind.
Definition: gprs_ns2_udp.c:466
struct gprs_ns2_vc_bind * gprs_ns2_ip_bind_by_sockaddr(struct gprs_ns2_inst *nsi, const struct osmo_sockaddr *sockaddr)
Find NS bind for a given socket address.
Definition: gprs_ns2_udp.c:250
const char * gprs_ns2_fr_bind_netif(struct gprs_ns2_vc_bind *bind)
Return the network interface of the bind.
Definition: gprs_ns2_fr.c:833
struct gprs_ns2_vc * gprs_ns2_fr_connect2(struct gprs_ns2_vc_bind *bind, uint16_t nsei, uint16_t nsvci, uint16_t dlci)
Create, connect and activate a new FR-based NS-VC.
Definition: gprs_ns2_fr.c:919
static const char * gprs_ns2_prim_str(enum gprs_ns2_prim val)
Obtain a human-readable string for NS primitives.
Definition: gprs_ns2.h:62
void gprs_ns2_ip_bind_set_sns_weight(struct gprs_ns2_vc_bind *bind, uint8_t signalling, uint8_t data)
set the signalling and data weight for this bind
Definition: gprs_ns2_udp.c:591
gprs_ns2_vc_mode
Definition: gprs_ns2.h:25
@ GPRS_NS2_VC_MODE_BLOCKRESET
The VC will use RESET/BLOCK/UNBLOCK to start the connection and do ALIVE/ACK.
Definition: gprs_ns2.h:29
@ GPRS_NS2_VC_MODE_ALIVE
The VC will only use ALIVE/ACK (no RESET/BLOCK/UNBLOCK), which is for Gb-IP interface compliant to 3G...
Definition: gprs_ns2.h:32
struct gprs_ns2_vc * gprs_ns2_fr_nsvc_by_dlci(struct gprs_ns2_vc_bind *bind, uint16_t dlci)
Return the nsvc by dlci.
Definition: gprs_ns2_fr.c:955
int(* gprs_ns2_foreach_nsvc_cb)(struct gprs_ns2_vc *nsvc, void *ctx)
a callback to iterate over all NSVC
Definition: gprs_ns2.h:153
int gprs_ns2_fr_bind(struct gprs_ns2_inst *nsi, const char *name, const char *netif, struct osmo_fr_network *fr_network, enum osmo_fr_role fr_role, struct gprs_ns2_vc_bind **result)
Create a new bind for NS over FR.
Definition: gprs_ns2_fr.c:703
int gprs_ns2_vty_init(struct gprs_ns2_inst *nsi)
Definition: gprs_ns2_vty.c:2306
uint16_t gprs_ns2_fr_nsvc_dlci(const struct gprs_ns2_vc *nsvc)
Return the dlci of the nsvc.
Definition: gprs_ns2_fr.c:976
struct gprs_ns2_vc * gprs_ns2_fr_connect(struct gprs_ns2_vc_bind *bind, struct gprs_ns2_nse *nse, uint16_t nsvci, uint16_t dlci)
Create, connect and activate a new FR-based NS-VC.
Definition: gprs_ns2_fr.c:876
const struct osmo_sockaddr * gprs_ns2_nse_sns_remote(struct gprs_ns2_nse *nse)
Return the initial SNS remote socket address.
Definition: gprs_ns2_sns.c:285
int gprs_ns2_is_fr_bind(struct gprs_ns2_vc_bind *bind)
determine if given bind is for FR-GRE encapsulation.
Definition: gprs_ns2_fr.c:326
int gprs_ns2_frgre_bind(struct gprs_ns2_inst *nsi, const char *name, const struct osmo_sockaddr *local, int dscp, struct gprs_ns2_vc_bind **result)
Create a new bind for NS over FR-GRE.
Definition: gprs_ns2_frgre.c:554
const struct osmo_sockaddr * gprs_ns2_ip_vc_remote(const struct gprs_ns2_vc *nsvc)
Return the socket address of the remote peer of a NS-VC.
Definition: gprs_ns2_udp.c:418
gprs_ns2_prim
Osmocom NS primitives according to 48.016 5.2 Service primitives.
Definition: gprs_ns2.h:52
@ GPRS_NS2_PRIM_CONGESTION
Definition: gprs_ns2.h:54
@ GPRS_NS2_PRIM_STATUS
Definition: gprs_ns2.h:55
@ GPRS_NS2_PRIM_UNIT_DATA
Definition: gprs_ns2.h:53
gprs_ns2_congestion_cause
Osmocom NS primitives according to 48.016 5.2.2.4 Service primitives.
Definition: gprs_ns2.h:70
@ GPRS_NS2_CONG_CAUSE_BACKWARD_BEGIN
Definition: gprs_ns2.h:71
@ GPRS_NS2_CONG_CAUSE_BACKWARD_END
Definition: gprs_ns2.h:72
@ GPRS_NS2_CONG_CAUSE_FORWARD_END
Definition: gprs_ns2.h:74
@ GPRS_NS2_CONG_CAUSE_FORWARD_BEGIN
Definition: gprs_ns2.h:73
int gprs_ns2_sns_add_endpoint(struct gprs_ns2_nse *nse, const struct osmo_sockaddr *saddr)
gprs_ns2_sns_add_endpoint
Definition: gprs_ns2_sns.c:2473
const struct osmo_sockaddr * gprs_ns2_ip_vc_local(const struct gprs_ns2_vc *nsvc)
Return the socket address of the local peer of a NS-VC.
Definition: gprs_ns2_udp.c:404
gprs_ns2_affecting_cause
Osmocom NS primitives according to 48.016 5.2.2.6 Service primitives.
Definition: gprs_ns2.h:78
@ GPRS_NS2_AFF_CAUSE_FAILURE
Definition: gprs_ns2.h:81
@ GPRS_NS2_AFF_CAUSE_VC_FAILURE
Definition: gprs_ns2.h:79
@ GPRS_NS2_AFF_CAUSE_MTU_CHANGE
Definition: gprs_ns2.h:87
@ GPRS_NS2_AFF_CAUSE_VC_RECOVERY
Definition: gprs_ns2.h:80
@ GPRS_NS2_AFF_CAUSE_RECOVERY
Definition: gprs_ns2.h:82
@ GPRS_NS2_AFF_CAUSE_SNS_FAILURE
Definition: gprs_ns2.h:85
@ GPRS_NS2_AFF_CAUSE_SNS_CONFIGURED
Definition: gprs_ns2.h:84
@ GPRS_NS2_AFF_CAUSE_SNS_NO_ENDPOINTS
Definition: gprs_ns2.h:86
enum osmo_fr_role gprs_ns2_fr_bind_role(struct gprs_ns2_vc_bind *bind)
Return the frame relay role of a bind.
Definition: gprs_ns2_fr.c:818
int gprs_ns2_ip_bind_set_dscp(struct gprs_ns2_vc_bind *bind, int dscp)
Set the DSCP (TOS) bit value of the given bind.
Definition: gprs_ns2_udp.c:482
gprs_ns2_ll
Osmocom NS link layer types.
Definition: gprs_ns2.h:44
@ GPRS_NS2_LL_FR
NS/FR.
Definition: gprs_ns2.h:47
@ GPRS_NS2_LL_UNDEF
undefined, used by vty
Definition: gprs_ns2.h:45
@ GPRS_NS2_LL_FR_GRE
NS/FR/GRE/IP.
Definition: gprs_ns2.h:48
@ GPRS_NS2_LL_UDP
NS/UDP/IP.
Definition: gprs_ns2.h:46
struct gprs_ns2_vc * gprs_ns2_nsvc_by_sockaddr_bind(struct gprs_ns2_vc_bind *bind, const struct osmo_sockaddr *rem_addr)
Find a NS-VC by its remote socket address.
Definition: gprs_ns2_udp.c:125
int gprs_ns2_sns_del_bind(struct gprs_ns2_nse *nse, struct gprs_ns2_vc_bind *bind)
Definition: gprs_ns2_sns.c:2675
gprs_ns2_change_ip_endpoint
Osmocom NS primitives according to 48.016 5.2.2.7 Service primitives.
Definition: gprs_ns2.h:97
@ GPRS_NS2_ENDPOINT_REQUEST_CHANGE
Definition: gprs_ns2.h:99
@ GRPS_NS2_ENDPOINT_NO_CHANGE
Definition: gprs_ns2.h:98
@ GPRS_NS2_ENDPOINT_CONFIRM_CHANGE
Definition: gprs_ns2.h:100
int gprs_ns2_sns_add_bind(struct gprs_ns2_nse *nse, struct gprs_ns2_vc_bind *bind)
Definition: gprs_ns2_sns.c:2644
bool gprs_ns2_ip_vc_equal(const struct gprs_ns2_vc *nsvc, const struct osmo_sockaddr *local, const struct osmo_sockaddr *remote, uint16_t nsvci)
Compare the NS-VC with the given parameter.
Definition: gprs_ns2_udp.c:436
int gprs_ns2_sns_count(struct gprs_ns2_nse *nse)
gprs_ns2_sns_count
Definition: gprs_ns2_sns.c:2566
gprs_ns2_dialect
Definition: gprs_ns2.h:35
@ GPRS_NS2_DIALECT_IPACCESS
Definition: gprs_ns2.h:39
@ GPRS_NS2_DIALECT_STATIC_RESETBLOCK
Definition: gprs_ns2.h:38
@ GPRS_NS2_DIALECT_STATIC_ALIVE
Definition: gprs_ns2.h:37
@ GPRS_NS2_DIALECT_UNDEF
Definition: gprs_ns2.h:36
@ GPRS_NS2_DIALECT_SNS
Definition: gprs_ns2.h:40
static const char * gprs_ns2_lltype_str(enum gprs_ns2_ll val)
Obtain a human-readable string for NS link-layer type.
Definition: gprs_ns2.h:66
int gprs_ns2_ip_bind(struct gprs_ns2_inst *nsi, const char *name, const struct osmo_sockaddr *local, int dscp, struct gprs_ns2_vc_bind **result)
Bind to an IPv4/IPv6 address.
Definition: gprs_ns2_udp.c:277
int gprs_ns2_sns_del_endpoint(struct gprs_ns2_nse *nse, const struct osmo_sockaddr *saddr)
gprs_ns2_sns_del_endpoint
Definition: gprs_ns2_sns.c:2513
unsigned int priority
void gprs_ns2_free_binds(struct gprs_ns2_inst *nsi)
Definition: gprs_ns2.c:1521
ns_cause
NS Cause (TS 08.16, Section 10.3.2, Table 13)
Definition: gsm_08_16.h:83
void gprs_ns2_free(struct gprs_ns2_inst *inst)
Destroy a NS Instance (including all its NSEs, binds, ...).
Definition: gprs_ns2.c:1461
struct gprs_ns2_nse * gprs_ns2_create_nse(struct gprs_ns2_inst *nsi, uint16_t nsei, enum gprs_ns2_ll linklayer, enum gprs_ns2_dialect dialect)
Create a NS Entity within given NS instance.
Definition: gprs_ns2.c:886
struct gprs_ns2_vc * gprs_ns2_ip_connect_inactive(struct gprs_ns2_vc_bind *bind, const struct osmo_sockaddr *remote, struct gprs_ns2_nse *nse, uint16_t nsvci)
Create, and connect an inactive, new IP-based NS-VC.
Definition: gprs_ns2.c:1178
const char * gprs_ns2_nsvc_state_name(struct gprs_ns2_vc *nsvc)
Return the current state name of a given NS-VC to a thread-local static buffer.
Definition: gprs_ns2.c:330
char * gprs_ns2_ll_str_buf(char *buf, size_t buf_len, struct gprs_ns2_vc *nsvc)
string-format a given NS-VC into a user-supplied buffer.
Definition: gprs_ns2.c:252
void gprs_ns2_start_alive_all_nsvcs(struct gprs_ns2_nse *nse)
Start the NS-ALIVE FSM in all NS-VCs of given NSE.
Definition: gprs_ns2.c:1474
void gprs_ns2_free_bind(struct gprs_ns2_vc_bind *bind)
Destroy a given bind.
Definition: gprs_ns2.c:1492
int gprs_ns2_nse_foreach_nsvc(struct gprs_ns2_nse *nse, gprs_ns2_foreach_nsvc_cb cb, void *cb_data)
Iterate over all nsvc of a NS Entity and call the callback.
Definition: gprs_ns2.c:1271
struct gprs_ns2_vc * gprs_ns2_nsvc_by_nsvci(struct gprs_ns2_inst *nsi, uint16_t nsvci)
Resolve a NS-VC Entity based on its NS-VCI.
Definition: gprs_ns2.c:786
const struct value_string gprs_ns2_lltype_strs[]
Definition: gprs_ns2.c:240
const struct value_string gprs_ns2_cause_strs[]
Definition: gprs_ns2.c:140
struct gprs_ns2_vc_bind * gprs_ns2_bind_by_name(struct gprs_ns2_inst *nsi, const char *name)
Search for a bind with a unique name.
Definition: gprs_ns2.c:1537
const char * gprs_ns2_ll_str(struct gprs_ns2_vc *nsvc)
string-format a given NS-VC to a thread-local static buffer.
Definition: gprs_ns2.c:309
int gprs_ns2_recv_prim(struct gprs_ns2_inst *nsi, struct osmo_prim_hdr *oph)
Receive a primitive from the NS User (Gb).
Definition: gprs_ns2.c:486
struct gprs_ns2_vc * gprs_ns2_nsvc_by_sockaddr_nse(struct gprs_ns2_nse *nse, const struct osmo_sockaddr *sockaddr)
Find NS-VC for given socket address.
Definition: gprs_ns2.c:1245
char * gprs_ns2_ll_str_c(const void *ctx, struct gprs_ns2_vc *nsvc)
string-format a given NS-VC to a dynamically allocated string.
Definition: gprs_ns2.c:319
const struct value_string gprs_ns2_prim_strs[]
Definition: gprs_ns2.c:233
struct gprs_ns2_inst * gprs_ns2_instantiate(void *ctx, osmo_prim_cb cb, void *cb_data)
Create a new GPRS NS instance.
Definition: gprs_ns2.c:1429
struct gprs_ns2_vc * gprs_ns2_ip_connect(struct gprs_ns2_vc_bind *bind, const struct osmo_sockaddr *remote, struct gprs_ns2_nse *nse, uint16_t nsvci)
Create, connect and activate a new IP-based NS-VC.
Definition: gprs_ns2.c:1203
struct gprs_ns2_vc * gprs_ns2_ip_connect2(struct gprs_ns2_vc_bind *bind, const struct osmo_sockaddr *remote, uint16_t nsei, uint16_t nsvci, enum gprs_ns2_dialect dialect)
Create, connect and activate a new IP-based NS-VC.
Definition: gprs_ns2.c:1224
const struct value_string gprs_ns2_aff_cause_prim_strs[]
Definition: gprs_ns2.c:221
uint8_t data[0]
variable-length payload
Definition: gsm_08_16.h:1
struct gprs_ns2_nse * gprs_ns2_nse_by_nsei(struct gprs_ns2_inst *nsi, uint16_t nsei)
Resolve a NS Entity based on its NSEI.
Definition: gprs_ns2.c:770
void gprs_ns2_free_nsvcs(struct gprs_ns2_nse *nse)
Destroy/release all NS-VC of given NSE.
Definition: gprs_ns2.c:682
void gprs_ns2_free_nse(struct gprs_ns2_nse *nse)
Destroy given NS Entity.
Definition: gprs_ns2.c:903
uint16_t gprs_ns2_nse_nsei(struct gprs_ns2_nse *nse)
Return the NSEI.
Definition: gprs_ns2.c:896
void gprs_ns2_free_nses(struct gprs_ns2_inst *nsi)
Definition: gprs_ns2.c:924
struct gprs_ns2_nse * gprs_ns2_create_nse2(struct gprs_ns2_inst *nsi, uint16_t nsei, enum gprs_ns2_ll linklayer, enum gprs_ns2_dialect dialect, bool local_sgsn_role)
Create a NS Entity within given NS instance.
Definition: gprs_ns2.c:806
void gprs_ns2_free_nsvc(struct gprs_ns2_vc *nsvc)
Destroy/release given NS-VC.
Definition: gprs_ns2.c:641
int(* osmo_prim_cb)(struct osmo_prim_hdr *oph, void *ctx)
const char * name
const char * get_value_string(const struct value_string *vs, uint32_t val)
GPRS Networks Service (NS) messages on the Gb interface.
An instance of the NS protocol stack.
Definition: gprs_ns2_internal.h:166
void * cb_data
callback data
Definition: gprs_ns2_internal.h:171
osmo_prim_cb cb
callback to the user for incoming UNIT DATA IND
Definition: gprs_ns2_internal.h:168
Structure repesenting a NSE.
Definition: gprs_ns2_internal.h:190
enum gprs_ns2_dialect dialect
which dialect does this NSE speaks?
Definition: gprs_ns2_internal.h:219
struct gprs_ns2_inst * nsi
entry back to ns2_inst
Definition: gprs_ns2_internal.h:194
struct llist_head nsvc
llist head to hold all nsvc
Definition: gprs_ns2_internal.h:200
Structure repesenting a bind instance.
Definition: gprs_ns2_internal.h:299
struct gprs_ns2_inst * nsi
a pointer back to the nsi
Definition: gprs_ns2_internal.h:309
Definition: gprs_ns2_internal.h:345
Structure representing a single NS-VC.
Definition: gprs_ns2_internal.h:246
struct gprs_ns2_vc_bind * bind
pointer to NS VL bind.
Definition: gprs_ns2_internal.h:257
struct gprs_ns2_nse * nse
pointer to NS Instance
Definition: gprs_ns2_internal.h:254
uint16_t nsvci
uniquely identifies NS-VC if VC contains nsvci
Definition: gprs_ns2_internal.h:263
Section 10.3.2c List of IP4 Elements.
Definition: gsm_08_16.h:24
Section 10.3.2d List of IP6 Elements.
Definition: gsm_08_16.h:32
Definition: frame_relay.h:54
Definition: gprs_ns2.h:109
union osmo_gprs_ns2_prim::@20 u
int transfer
Definition: gprs_ns2.h:132
bool persistent
Definition: gprs_ns2.h:135
uint32_t link_selector
Definition: gprs_ns2.h:118
struct osmo_gprs_ns2_prim::@20::@21 unitdata
uint16_t mtu
Definition: gprs_ns2.h:140
bool first
Definition: gprs_ns2.h:138
enum gprs_ns2_change_ip_endpoint change
Definition: gprs_ns2.h:117
uint16_t nsei
Definition: gprs_ns2.h:112
enum gprs_ns2_congestion_cause cause
Definition: gprs_ns2.h:126
long long _resource_distribution_placeholder1
Definition: gprs_ns2.h:121
struct osmo_prim_hdr oph
Definition: gprs_ns2.h:110
char * nsvc
Definition: gprs_ns2.h:130
long long _resource_distribution_placeholder2
Definition: gprs_ns2.h:122
uint16_t bvci
Definition: gprs_ns2.h:113
enum gprs_ns2_affecting_cause cause
Definition: gprs_ns2.h:129
struct osmo_gprs_ns2_prim::@20::@23 status
struct osmo_gprs_ns2_prim::@20::@22 congestion
long long _resource_distribution_placeholder3
Definition: gprs_ns2.h:123