libosmogb 1.13.1.1-afb4 Osmocom Gb library

gprs_ns2_internal.h
Go to the documentation of this file.
1
3#pragma once
4
5#include <stdbool.h>
6#include <stdint.h>
7
8#include <osmocom/core/logging.h>
9#include <osmocom/core/rate_ctr.h>
10#include <osmocom/gprs/protocol/gsm_08_16.h>
11#include <osmocom/gprs/gprs_ns2.h>
12
13#define LOGNSE(nse, lvl, fmt, args ...) \
14 LOGP(DLNS, lvl, "NSE(%05u) " fmt, (nse)->nsei, ## args)
15
16#define LOGBIND(bind, lvl, fmt, args ...) \
17 LOGP(DLNS, lvl, "BIND(%s) " fmt, (bind)->name, ## args)
18
19#define LOGNSVC_SS(ss, nsvc, lvl, fmt, args ...) \
20 do { \
21 if ((nsvc)->nsvci_is_valid) { \
22 LOGP(ss, lvl, "NSE(%05u)-NSVC(%05u) " fmt, \
23 (nsvc)->nse->nsei, (nsvc)->nsvci, ## args); \
24 } else { \
25 LOGP(ss, lvl, "NSE(%05u)-NSVC(none) " fmt, \
26 (nsvc)->nse->nsei, ## args); \
27 } \
28 } while (0)
29
30#define LOGNSVC(nsvc, lvl, fmt, args ...) \
31 LOGNSVC_SS(DLNS, nsvc, lvl, fmt, ## args)
32
33#define LOG_NS_SIGNAL(nsvc, direction, pdu_type, lvl, fmt, args ...) \
34 LOGNSVC_SS(DLNSSIGNAL, nsvc, lvl, "%s %s" fmt, direction, get_value_string(gprs_ns_pdu_strings, pdu_type), ## args)
35
36#define LOG_NS_DATA(nsvc, direction, pdu_type, lvl, fmt, args ...) \
37 LOGNSVC_SS(DLNSDATA, nsvc, lvl, "%s %s" fmt, direction, get_value_string(gprs_ns_pdu_strings, pdu_type), ## args)
38
39#define LOG_NS_RX_SIGNAL(nsvc, pdu_type) LOG_NS_SIGNAL(nsvc, "Rx", pdu_type, LOGL_INFO, "\n")
40#define LOG_NS_TX_SIGNAL(nsvc, pdu_type) LOG_NS_SIGNAL(nsvc, "Tx", pdu_type, LOGL_INFO, "\n")
41
42#define RATE_CTR_INC_NS(nsvc, ctr) \
43 do { \
44 struct gprs_ns2_vc *_nsvc = (nsvc); \
45 rate_ctr_inc(rate_ctr_group_get_ctr(_nsvc->ctrg, ctr)); \
46 rate_ctr_inc(rate_ctr_group_get_ctr(_nsvc->nse->ctrg, ctr)); \
47 } while (0)
48
49#define RATE_CTR_ADD_NS(nsvc, ctr, val) \
50 do { \
51 struct gprs_ns2_vc *_nsvc = (nsvc); \
52 rate_ctr_add(rate_ctr_group_get_ctr(_nsvc->ctrg, ctr), val); \
53 rate_ctr_add(rate_ctr_group_get_ctr(_nsvc->nse->ctrg, ctr), val); \
54 } while (0)
55
56
57 struct osmo_fsm_inst;
58 struct tlv_parsed;
59 struct vty;
60
61 struct gprs_ns2_vc_driver;
62 struct gprs_ns2_vc_bind;
63
64#define NS_TIMERS_COUNT 11
65
66#define TNS_BLOCK_STR "tns-block"
67#define TNS_BLOCK_RETRIES_STR "tns-block-retries"
68#define TNS_RESET_STR "tns-reset"
69#define TNS_RESET_RETRIES_STR "tns-reset-retries"
70#define TNS_TEST_STR "tns-test"
71#define TNS_ALIVE_STR "tns-alive"
72#define TNS_ALIVE_RETRIES_STR "tns-alive-retries"
73#define TSNS_PROV_STR "tsns-prov"
74#define TSNS_SIZE_RETRIES_STR "tsns-size-retries"
75#define TSNS_CONFIG_RETRIES_STR "tsns-config-retries"
76#define TSNS_PROCEDURES_RETRIES_STR "tsns-procedures-retries"
77#define NS_TIMERS "(" TNS_BLOCK_STR "|" TNS_BLOCK_RETRIES_STR "|" TNS_RESET_STR "|" TNS_RESET_RETRIES_STR "|" TNS_TEST_STR "|"\
78 TNS_ALIVE_STR "|" TNS_ALIVE_RETRIES_STR "|" TSNS_PROV_STR "|" TSNS_SIZE_RETRIES_STR "|" TSNS_CONFIG_RETRIES_STR "|"\
79 TSNS_PROCEDURES_RETRIES_STR ")"
80
81#define NS_TIMERS_HELP \
82 "(un)blocking Timer (Tns-block) timeout\n" \
83 "(un)blocking Timer (Tns-block) number of retries\n" \
84 "Reset Timer (Tns-reset) timeout\n" \
85 "Reset Timer (Tns-reset) number of retries\n" \
86 "Test Timer (Tns-test) timeout\n" \
87 "Alive Timer (Tns-alive) timeout\n" \
88 "Alive Timer (Tns-alive) number of retries\n" \
89 "SNS Provision Timer (Tsns-prov) timeout\n" \
90 "SNS Size number of retries\n" \
91 "SNS Config number of retries\n" \
92 "SNS Procedures number of retries\n" \
93
94/* Educated guess - LLC user payload is 1500 bytes plus possible headers */
95#define NS_ALLOC_SIZE 3072
96#define NS_ALLOC_HEADROOM 20
97
98#define NS_DEFAULT_TXQUEUE_MAX_LENGTH 128
99
100 enum ns2_timeout {
101 NS_TOUT_TNS_BLOCK,
102 NS_TOUT_TNS_BLOCK_RETRIES,
103 NS_TOUT_TNS_RESET,
104 NS_TOUT_TNS_RESET_RETRIES,
105 NS_TOUT_TNS_TEST,
106 NS_TOUT_TNS_ALIVE,
107 NS_TOUT_TNS_ALIVE_RETRIES,
108 NS_TOUT_TSNS_PROV,
109 NS_TOUT_TSNS_SIZE_RETRIES,
110 NS_TOUT_TSNS_CONFIG_RETRIES,
111 NS_TOUT_TSNS_PROCEDURES_RETRIES,
112};
113
114 enum nsvc_timer_mode {
115 /* standard timers */
116 NSVC_TIMER_TNS_TEST,
117 NSVC_TIMER_TNS_ALIVE,
118 NSVC_TIMER_TNS_RESET,
119 _NSVC_TIMER_NR,
120};
121
122 enum ns2_vc_stat {
123 NS_STAT_ALIVE_DELAY,
124};
125
126 enum ns2_bind_stat {
127 NS2_BIND_STAT_BACKLOG_LEN,
128};
129
131 enum ns2_cs {
132 NS2_CS_CREATED,
133 NS2_CS_FOUND,
134 NS2_CS_REJECTED,
135 NS2_CS_SKIPPED,
136 NS2_CS_ERROR,
137};
138
139 enum ns_ctr {
140 NS_CTR_PKTS_IN,
141 NS_CTR_PKTS_OUT,
142 NS_CTR_PKTS_OUT_DROP,
143 NS_CTR_BYTES_IN,
144 NS_CTR_BYTES_OUT,
145 NS_CTR_BYTES_OUT_DROP,
146 NS_CTR_BLOCKED,
147 NS_CTR_UNBLOCKED,
148 NS_CTR_DEAD,
149 NS_CTR_REPLACED,
150 NS_CTR_NSEI_CHG,
151 NS_CTR_INV_VCI,
152 NS_CTR_INV_NSEI,
153 NS_CTR_LOST_ALIVE,
154 NS_CTR_LOST_RESET,
155};
156
157#define NSE_S_BLOCKED 0x0001
158#define NSE_S_ALIVE 0x0002
159#define NSE_S_RESET 0x0004
160
161#define NS_DESC_B(st) ((st) & NSE_S_BLOCKED ? "BLOCKED" : "UNBLOCKED")
162#define NS_DESC_A(st) ((st) & NSE_S_ALIVE ? "ALIVE" : "DEAD")
163#define NS_DESC_R(st) ((st) & NSE_S_RESET ? "RESET" : "UNRESET")
164
166 struct gprs_ns2_inst {
168 osmo_prim_cb cb;
169
171 void *cb_data;
172
174 struct llist_head binding;
175
177 struct llist_head nse;
178
179 uint16_t timeout[NS_TIMERS_COUNT];
180
182 uint32_t nsvc_rate_ctr_idx;
183 uint32_t bind_rate_ctr_idx;
184
185 uint32_t txqueue_max_length;
186};
187
188
190 struct gprs_ns2_nse {
191 uint16_t nsei;
192
194 struct gprs_ns2_inst *nsi;
195
197 struct llist_head list;
198
200 struct llist_head nsvc;
201
203 int nsvc_count;
204
206 bool persistent;
207
210 bool first;
211
213 bool alive;
214
216 enum gprs_ns2_ll ll;
217
219 enum gprs_ns2_dialect dialect;
220
221 struct osmo_fsm_inst *bss_sns_fi;
222
224 uint32_t sum_data_weight;
225
227 uint32_t sum_sig_weight;
228
230 uint16_t mtu;
231
233 bool ip_sns_role_sgsn;
234
236 struct rate_ctr_group *ctrg;
237
239 bool freed;
240
242 struct timespec ts_alive_change;
243};
244
246 struct gprs_ns2_vc {
248 struct llist_head list;
249
251 struct llist_head blist;
252
254 struct gprs_ns2_nse *nse;
255
257 struct gprs_ns2_vc_bind *bind;
258
260 bool persistent;
261
263 uint16_t nsvci;
264
266 uint8_t sig_weight;
267
269 uint8_t sig_counter;
270
272 uint8_t data_weight;
273
275 void *priv;
276
277 bool nsvci_is_valid;
279 bool sns_only;
280
281 struct rate_ctr_group *ctrg;
282 struct osmo_stat_item_group *statg;
283
284 enum gprs_ns2_vc_mode mode;
285
286 struct osmo_fsm_inst *fi;
287
289 bool freed;
290
292 bool om_blocked;
293
295 struct timespec ts_alive_change;
296};
297
299 struct gprs_ns2_vc_bind {
301 const char *name;
303 struct llist_head list;
305 struct llist_head nsvc;
307 void *priv;
309 struct gprs_ns2_inst *nsi;
310 struct gprs_ns2_vc_driver *driver;
311
312 bool accept_ipaccess;
313 bool accept_sns;
314
316 int transfer_capability;
317
319 uint16_t mtu;
320
322 enum gprs_ns2_ll ll;
323
325 int (*send_vc)(struct gprs_ns2_vc *nsvc, struct msgb *msg);
326
328 void (*free_vc)(struct gprs_ns2_vc *nsvc);
329
331 void (*dump_vty)(const struct gprs_ns2_vc_bind *bind,
332 struct vty *vty, bool stats);
333
335 uint8_t sns_sig_weight;
337 uint8_t sns_data_weight;
338
339 struct osmo_stat_item_group *statg;
340
342 bool freed;
343};
344
345 struct gprs_ns2_vc_driver {
346 const char *name;
347 void *priv;
348 void (*free_bind)(struct gprs_ns2_vc_bind *driver);
349};
350
351 enum ns2_sns_event {
352 NS2_SNS_EV_REQ_SELECT_ENDPOINT,
353 NS2_SNS_EV_RX_SIZE,
354 NS2_SNS_EV_RX_SIZE_ACK,
355 NS2_SNS_EV_RX_CONFIG,
356 NS2_SNS_EV_RX_CONFIG_END,
357 NS2_SNS_EV_RX_CONFIG_ACK,
358 NS2_SNS_EV_RX_ADD,
359 NS2_SNS_EV_RX_DELETE,
360 NS2_SNS_EV_RX_CHANGE_WEIGHT,
361 NS2_SNS_EV_RX_ACK,
362 NS2_SNS_EV_REQ_NO_NSVC,
363 NS2_SNS_EV_REQ_FREE_NSVCS,
364 NS2_SNS_EV_REQ_NSVC_ALIVE,
365 NS2_SNS_EV_REQ_ADD_BIND,
366 NS2_SNS_EV_REQ_DELETE_BIND,
367 NS2_SNS_EV_REQ_CHANGE_WEIGHT,
368};
369
370 enum ns2_cs ns2_create_vc(struct gprs_ns2_vc_bind *bind,
371 struct msgb *msg,
372 const struct osmo_sockaddr *remote,
373 const char *logname,
374 struct msgb **reject,
375 struct gprs_ns2_vc **success);
376
377 int ns2_recv_vc(struct gprs_ns2_vc *nsvc,
378 struct msgb *msg);
379
380 struct gprs_ns2_vc *ns2_vc_alloc(struct gprs_ns2_vc_bind *bind,
381 struct gprs_ns2_nse *nse,
382 bool initiater,
383 enum gprs_ns2_vc_mode vc_mode,
384 const char *id);
385
386 void ns2_free_nsvcs(struct gprs_ns2_nse *nse);
387 int ns2_bind_alloc(struct gprs_ns2_inst *nsi, const char *name,
388 struct gprs_ns2_vc_bind **result);
389
390 struct msgb *ns2_msgb_alloc(void);
391
392 void ns2_sns_write_vty(struct vty *vty, const struct gprs_ns2_nse *nse);
393 void ns2_sns_dump_vty(struct vty *vty, const char *prefix, const struct gprs_ns2_nse *nse, bool stats);
394 void ns2_prim_status_ind(struct gprs_ns2_nse *nse,
395 struct gprs_ns2_vc *nsvc,
396 uint16_t bvci,
397 enum gprs_ns2_affecting_cause cause);
398 void ns2_nse_notify_alive(struct gprs_ns2_vc *nsvc, bool alive);
399 void ns2_nse_update_mtu(struct gprs_ns2_nse *nse);
400 int ns2_nse_set_dialect(struct gprs_ns2_nse *nse, enum gprs_ns2_dialect dialect);
401
402/* message */
403 int ns2_validate(struct gprs_ns2_vc *nsvc,
404 uint8_t pdu_type,
405 struct msgb *msg,
406 struct tlv_parsed *tp,
407 uint8_t *cause);
408
409/* SNS messages */
410 int ns2_tx_sns_ack(struct gprs_ns2_vc *nsvc, uint8_t trans_id, uint8_t *cause,
411 const struct gprs_ns_ie_ip4_elem *ip4_elems,
412 unsigned int num_ip4_elems,
413 const struct gprs_ns_ie_ip6_elem *ip6_elems,
414 unsigned int num_ip6_elems);
415 int ns2_tx_sns_config(struct gprs_ns2_vc *nsvc, bool end_flag,
416 const struct gprs_ns_ie_ip4_elem *ip4_elems,
417 unsigned int num_ip4_elems,
418 const struct gprs_ns_ie_ip6_elem *ip6_elems,
419 unsigned int num_ip6_elems);
420 int ns2_tx_sns_config_ack(struct gprs_ns2_vc *nsvc, uint8_t *cause);
421 int ns2_tx_sns_size(struct gprs_ns2_vc *nsvc, bool reset_flag, uint16_t max_nr_nsvc,
422 int ip4_ep_nr, int ip6_ep_nr);
423 int ns2_tx_sns_size_ack(struct gprs_ns2_vc *nsvc, uint8_t *cause);
424
425 int ns2_tx_sns_add(struct gprs_ns2_vc *nsvc,
426 uint8_t trans_id,
427 const struct gprs_ns_ie_ip4_elem *ip4_elems,
428 unsigned int num_ip4_elems,
429 const struct gprs_ns_ie_ip6_elem *ip6_elems,
430 unsigned int num_ip6_elems);
431 int ns2_tx_sns_change_weight(struct gprs_ns2_vc *nsvc,
432 uint8_t trans_id,
433 const struct gprs_ns_ie_ip4_elem *ip4_elems,
434 unsigned int num_ip4_elems,
435 const struct gprs_ns_ie_ip6_elem *ip6_elems,
436 unsigned int num_ip6_elems);
437 int ns2_tx_sns_del(struct gprs_ns2_vc *nsvc,
438 uint8_t trans_id,
439 const struct gprs_ns_ie_ip4_elem *ip4_elems,
440 unsigned int num_ip4_elems,
441 const struct gprs_ns_ie_ip6_elem *ip6_elems,
442 unsigned int num_ip6_elems);
443
444/* transmit message over a VC */
445 int ns2_tx_block(struct gprs_ns2_vc *nsvc, uint8_t cause, uint16_t *nsvci);
446 int ns2_tx_block_ack(struct gprs_ns2_vc *nsvc, uint16_t *nsvci);
447
448 int ns2_tx_reset(struct gprs_ns2_vc *nsvc, uint8_t cause);
449 int ns2_tx_reset_ack(struct gprs_ns2_vc *nsvc);
450
451 int ns2_tx_unblock(struct gprs_ns2_vc *nsvc);
452 int ns2_tx_unblock_ack(struct gprs_ns2_vc *nsvc);
453
454 int ns2_tx_alive(struct gprs_ns2_vc *nsvc);
455 int ns2_tx_alive_ack(struct gprs_ns2_vc *nsvc);
456
457 int ns2_tx_unit_data(struct gprs_ns2_vc *nsvc,
458 uint16_t bvci, uint8_t sducontrol,
459 struct msgb *msg);
460
461 int ns2_tx_status(struct gprs_ns2_vc *nsvc, uint8_t cause,
462 uint16_t bvci, struct msgb *orig_msg, uint16_t *nsvci);
463
464/* driver */
465 struct gprs_ns2_vc *ns2_ip_bind_connect(struct gprs_ns2_vc_bind *bind,
466 struct gprs_ns2_nse *nse,
467 const struct osmo_sockaddr *remote);
468 int ns2_ip_count_bind(struct gprs_ns2_inst *nsi, struct osmo_sockaddr *remote);
469 struct gprs_ns2_vc_bind *ns2_ip_get_bind_by_index(struct gprs_ns2_inst *nsi,
470 struct osmo_sockaddr *remote,
471 int index);
472 void ns2_ip_set_txqueue_max_length(struct gprs_ns2_vc_bind *bind, unsigned int max_length);
473
474/* sns */
475 int ns2_sns_rx(struct gprs_ns2_vc *nsvc, struct msgb *msg, struct tlv_parsed *tp);
476 struct osmo_fsm_inst *ns2_sns_bss_fsm_alloc(struct gprs_ns2_nse *nse,
477 const char *id);
478 struct osmo_fsm_inst *ns2_sns_sgsn_fsm_alloc(struct gprs_ns2_nse *nse, const char *id);
479 void ns2_sns_replace_nsvc(struct gprs_ns2_vc *nsvc);
480 void ns2_sns_notify_alive(struct gprs_ns2_nse *nse, struct gprs_ns2_vc *nsvc, bool alive);
481 void ns2_sns_update_weights(struct gprs_ns2_vc_bind *bind);
482
483/* vc */
484 struct osmo_fsm_inst *ns2_vc_fsm_alloc(struct gprs_ns2_vc *nsvc,
485 const char *id, bool initiate);
486 int ns2_vc_fsm_start(struct gprs_ns2_vc *nsvc);
487 int ns2_vc_force_unconfigured(struct gprs_ns2_vc *nsvc);
488 int ns2_vc_rx(struct gprs_ns2_vc *nsvc, struct msgb *msg, struct tlv_parsed *tp);
489 int ns2_vc_is_alive(struct gprs_ns2_vc *nsvc);
490 int ns2_vc_is_unblocked(struct gprs_ns2_vc *nsvc);
491 int ns2_vc_block(struct gprs_ns2_vc *nsvc);
492 int ns2_vc_reset(struct gprs_ns2_vc *nsvc);
493 int ns2_vc_unblock(struct gprs_ns2_vc *nsvc);
494 void ns2_vty_dump_nsvc(struct vty *vty, struct gprs_ns2_vc *nsvc, bool stats);
495
496/* nse */
497 void ns2_nse_notify_unblocked(struct gprs_ns2_vc *nsvc, bool unblocked);
498 enum gprs_ns2_vc_mode ns2_dialect_to_vc_mode(enum gprs_ns2_dialect dialect);
499 int ns2_count_transfer_cap(struct gprs_ns2_nse *nse,
500 uint16_t bvci);
501
502/* vty */
503 int ns2_sns_add_sns_default_binds(struct gprs_ns2_nse *nse);
bvci
uint16_t bvci
Definition: gprs_msgb.h:8
gprs_ns2.h
gprs_ns2_vc_mode
gprs_ns2_vc_mode
Definition: gprs_ns2.h:25
gprs_ns2_affecting_cause
gprs_ns2_affecting_cause
Osmocom NS primitives according to 48.016 5.2.2.6 Service primitives.
Definition: gprs_ns2.h:78
gprs_ns2_ll
gprs_ns2_ll
Osmocom NS link layer types.
Definition: gprs_ns2.h:44
gprs_ns2_dialect
gprs_ns2_dialect
Definition: gprs_ns2.h:35
ns2_tx_sns_config
int ns2_tx_sns_config(struct gprs_ns2_vc *nsvc, bool end_flag, const struct gprs_ns_ie_ip4_elem *ip4_elems, unsigned int num_ip4_elems, const struct gprs_ns_ie_ip6_elem *ip6_elems, unsigned int num_ip6_elems)
Encode + Transmit a SNS-CONFIG as per Section 9.3.4.
Definition: gprs_ns2_message.c:667
ns2_tx_sns_del
int ns2_tx_sns_del(struct gprs_ns2_vc *nsvc, uint8_t trans_id, const struct gprs_ns_ie_ip4_elem *ip4_elems, unsigned int num_ip4_elems, const struct gprs_ns_ie_ip6_elem *ip6_elems, unsigned int num_ip6_elems)
Encode + Transmit a SNS-DEL as per Section 9.3.6.
Definition: gprs_ns2_message.c:586
ns2_vc_reset
int ns2_vc_reset(struct gprs_ns2_vc *nsvc)
Reset a NS-VC.
Definition: gprs_ns2_vc_fsm.c:856
ns2_vc_rx
int ns2_vc_rx(struct gprs_ns2_vc *nsvc, struct msgb *msg, struct tlv_parsed *tp)
entry point for messages from the driver/VL
Definition: gprs_ns2_vc_fsm.c:866
ns2_tx_reset
int ns2_tx_reset(struct gprs_ns2_vc *nsvc, uint8_t cause)
Transmit a NS-RESET on a given NS-VC.
Definition: gprs_ns2_message.c:273
NSVC_TIMER_TNS_RESET
@ NSVC_TIMER_TNS_RESET
Definition: gprs_ns2_internal.h:118
NSVC_TIMER_TNS_ALIVE
@ NSVC_TIMER_TNS_ALIVE
Definition: gprs_ns2_internal.h:117
NSVC_TIMER_TNS_TEST
@ NSVC_TIMER_TNS_TEST
Definition: gprs_ns2_internal.h:116
_NSVC_TIMER_NR
@ _NSVC_TIMER_NR
Definition: gprs_ns2_internal.h:119
ns2_tx_block_ack
int ns2_tx_block_ack(struct gprs_ns2_vc *nsvc, uint16_t *nsvci)
Transmit a NS-BLOCK-ACK on a given NS-VC.
Definition: gprs_ns2_message.c:239
ns2_bind_stat
ns2_bind_stat
Definition: gprs_ns2_internal.h:126
NS2_BIND_STAT_BACKLOG_LEN
@ NS2_BIND_STAT_BACKLOG_LEN
Definition: gprs_ns2_internal.h:127
ns2_tx_sns_config_ack
int ns2_tx_sns_config_ack(struct gprs_ns2_vc *nsvc, uint8_t *cause)
Encode + Transmit a SNS-CONFIG-ACK as per Section 9.3.5.
Definition: gprs_ns2_message.c:723
ns2_sns_bss_fsm_alloc
struct osmo_fsm_inst * ns2_sns_bss_fsm_alloc(struct gprs_ns2_nse *nse, const char *id)
Allocate an IP-SNS FSM for the BSS side.
Definition: gprs_ns2_sns.c:2285
ns2_tx_sns_add
int ns2_tx_sns_add(struct gprs_ns2_vc *nsvc, uint8_t trans_id, const struct gprs_ns_ie_ip4_elem *ip4_elems, unsigned int num_ip4_elems, const struct gprs_ns_ie_ip6_elem *ip6_elems, unsigned int num_ip6_elems)
Encode + Transmit a SNS-ADD as per Section 9.3.2.
Definition: gprs_ns2_message.c:550
ns2_tx_alive
int ns2_tx_alive(struct gprs_ns2_vc *nsvc)
Transmit a NS-ALIVE on a given NS-VC.
Definition: gprs_ns2_message.c:365
ns2_tx_unblock_ack
int ns2_tx_unblock_ack(struct gprs_ns2_vc *nsvc)
Transmit a NS-UNBLOCK-ACK on a given NS-VC.
Definition: gprs_ns2_message.c:352
ns2_tx_alive_ack
int ns2_tx_alive_ack(struct gprs_ns2_vc *nsvc)
Transmit a NS-ALIVE-ACK on a given NS-VC.
Definition: gprs_ns2_message.c:376
ns2_vty_dump_nsvc
void ns2_vty_dump_nsvc(struct vty *vty, struct gprs_ns2_vc *nsvc, bool stats)
Definition: gprs_ns2_vty.c:1900
ns2_vc_is_alive
int ns2_vc_is_alive(struct gprs_ns2_vc *nsvc)
ns2_tx_sns_change_weight
int ns2_tx_sns_change_weight(struct gprs_ns2_vc *nsvc, uint8_t trans_id, const struct gprs_ns_ie_ip4_elem *ip4_elems, unsigned int num_ip4_elems, const struct gprs_ns_ie_ip6_elem *ip6_elems, unsigned int num_ip6_elems)
Encode + Transmit a SNS-CHANGE-WEIGHT as per Section 9.3.3.
Definition: gprs_ns2_message.c:568
ns2_ip_bind_connect
struct gprs_ns2_vc * ns2_ip_bind_connect(struct gprs_ns2_vc_bind *bind, struct gprs_ns2_nse *nse, const struct osmo_sockaddr *remote)
Create new NS-VC to a given remote address.
Definition: gprs_ns2_udp.c:356
ns2_tx_sns_size
int ns2_tx_sns_size(struct gprs_ns2_vc *nsvc, bool reset_flag, uint16_t max_nr_nsvc, int ip4_ep_nr, int ip6_ep_nr)
Encode + transmit a SNS-SIZE as per Section 9.3.7.
Definition: gprs_ns2_message.c:769
ns2_nse_notify_alive
void ns2_nse_notify_alive(struct gprs_ns2_vc *nsvc, bool alive)
ns2_tx_sns_size_ack
int ns2_tx_sns_size_ack(struct gprs_ns2_vc *nsvc, uint8_t *cause)
Encode + Transmit a SNS-SIZE-ACK as per Section 9.3.8.
Definition: gprs_ns2_message.c:817
ns2_tx_sns_ack
int ns2_tx_sns_ack(struct gprs_ns2_vc *nsvc, uint8_t trans_id, uint8_t *cause, const struct gprs_ns_ie_ip4_elem *ip4_elems, unsigned int num_ip4_elems, const struct gprs_ns_ie_ip6_elem *ip6_elems, unsigned int num_ip6_elems)
Encode + Transmit a SNS-ACK as per Section 9.3.1.
Definition: gprs_ns2_message.c:605
ns2_sns_rx
int ns2_sns_rx(struct gprs_ns2_vc *nsvc, struct msgb *msg, struct tlv_parsed *tp)
main entry point for receiving SNS messages from the network.
Definition: gprs_ns2_sns.c:2320
ns2_sns_add_sns_default_binds
int ns2_sns_add_sns_default_binds(struct gprs_ns2_nse *nse)
Definition: gprs_ns2_vty.c:1626
ns2_sns_event
ns2_sns_event
Definition: gprs_ns2_internal.h:351
NS2_SNS_EV_REQ_ADD_BIND
@ NS2_SNS_EV_REQ_ADD_BIND
add a new local bind to this NSE
Definition: gprs_ns2_internal.h:365
NS2_SNS_EV_REQ_NSVC_ALIVE
@ NS2_SNS_EV_REQ_NSVC_ALIVE
a NS-VC became alive
Definition: gprs_ns2_internal.h:364
NS2_SNS_EV_RX_CONFIG
@ NS2_SNS_EV_RX_CONFIG
Definition: gprs_ns2_internal.h:355
NS2_SNS_EV_RX_DELETE
@ NS2_SNS_EV_RX_DELETE
Definition: gprs_ns2_internal.h:359
NS2_SNS_EV_RX_CONFIG_ACK
@ NS2_SNS_EV_RX_CONFIG_ACK
Definition: gprs_ns2_internal.h:357
NS2_SNS_EV_REQ_NO_NSVC
@ NS2_SNS_EV_REQ_NO_NSVC
no more NS-VC remaining (all dead)
Definition: gprs_ns2_internal.h:362
NS2_SNS_EV_RX_ADD
@ NS2_SNS_EV_RX_ADD
Definition: gprs_ns2_internal.h:358
NS2_SNS_EV_RX_CONFIG_END
@ NS2_SNS_EV_RX_CONFIG_END
SNS-CONFIG with end flag received.
Definition: gprs_ns2_internal.h:356
NS2_SNS_EV_REQ_FREE_NSVCS
@ NS2_SNS_EV_REQ_FREE_NSVCS
free all NS-VCs
Definition: gprs_ns2_internal.h:363
NS2_SNS_EV_REQ_CHANGE_WEIGHT
@ NS2_SNS_EV_REQ_CHANGE_WEIGHT
a bind changed its weight
Definition: gprs_ns2_internal.h:367
NS2_SNS_EV_RX_ACK
@ NS2_SNS_EV_RX_ACK
Rx of SNS-ACK (response to ADD/DELETE/CHG_WEIGHT.
Definition: gprs_ns2_internal.h:361
NS2_SNS_EV_RX_SIZE
@ NS2_SNS_EV_RX_SIZE
Definition: gprs_ns2_internal.h:353
NS2_SNS_EV_REQ_DELETE_BIND
@ NS2_SNS_EV_REQ_DELETE_BIND
remove a local bind from this NSE
Definition: gprs_ns2_internal.h:366
NS2_SNS_EV_RX_SIZE_ACK
@ NS2_SNS_EV_RX_SIZE_ACK
Definition: gprs_ns2_internal.h:354
NS2_SNS_EV_RX_CHANGE_WEIGHT
@ NS2_SNS_EV_RX_CHANGE_WEIGHT
Definition: gprs_ns2_internal.h:360
NS2_SNS_EV_REQ_SELECT_ENDPOINT
@ NS2_SNS_EV_REQ_SELECT_ENDPOINT
Select a SNS endpoint from the list.
Definition: gprs_ns2_internal.h:352
NS_TIMERS_COUNT
#define NS_TIMERS_COUNT
Definition: gprs_ns2_internal.h:64
ns2_vc_fsm_alloc
struct osmo_fsm_inst * ns2_vc_fsm_alloc(struct gprs_ns2_vc *nsvc, const char *id, bool initiate)
gprs_ns2_vc_fsm_alloc
Definition: gprs_ns2_vc_fsm.c:790
ns2_vc_unblock
int ns2_vc_unblock(struct gprs_ns2_vc *nsvc)
Unblock a NS-VC.
Definition: gprs_ns2_vc_fsm.c:844
ns2_validate
int ns2_validate(struct gprs_ns2_vc *nsvc, uint8_t pdu_type, struct msgb *msg, struct tlv_parsed *tp, uint8_t *cause)
Definition: gprs_ns2_message.c:139
ns2_timeout
ns2_timeout
Definition: gprs_ns2_internal.h:100
NS_TOUT_TSNS_PROV
@ NS_TOUT_TSNS_PROV
Definition: gprs_ns2_internal.h:108
NS_TOUT_TNS_BLOCK
@ NS_TOUT_TNS_BLOCK
Definition: gprs_ns2_internal.h:101
NS_TOUT_TNS_RESET
@ NS_TOUT_TNS_RESET
Definition: gprs_ns2_internal.h:103
NS_TOUT_TSNS_CONFIG_RETRIES
@ NS_TOUT_TSNS_CONFIG_RETRIES
Definition: gprs_ns2_internal.h:110
NS_TOUT_TSNS_SIZE_RETRIES
@ NS_TOUT_TSNS_SIZE_RETRIES
Definition: gprs_ns2_internal.h:109
NS_TOUT_TNS_BLOCK_RETRIES
@ NS_TOUT_TNS_BLOCK_RETRIES
Definition: gprs_ns2_internal.h:102
NS_TOUT_TNS_TEST
@ NS_TOUT_TNS_TEST
Definition: gprs_ns2_internal.h:105
NS_TOUT_TNS_ALIVE_RETRIES
@ NS_TOUT_TNS_ALIVE_RETRIES
Definition: gprs_ns2_internal.h:107
NS_TOUT_TNS_RESET_RETRIES
@ NS_TOUT_TNS_RESET_RETRIES
Definition: gprs_ns2_internal.h:104
NS_TOUT_TNS_ALIVE
@ NS_TOUT_TNS_ALIVE
Definition: gprs_ns2_internal.h:106
NS_TOUT_TSNS_PROCEDURES_RETRIES
@ NS_TOUT_TSNS_PROCEDURES_RETRIES
Definition: gprs_ns2_internal.h:111
ns2_sns_notify_alive
void ns2_sns_notify_alive(struct gprs_ns2_nse *nse, struct gprs_ns2_vc *nsvc, bool alive)
Definition: gprs_ns2_sns.c:2597
ns2_tx_unblock
int ns2_tx_unblock(struct gprs_ns2_vc *nsvc)
Transmit a NS-UNBLOCK on a given NS-VC.
Definition: gprs_ns2_message.c:338
ns2_tx_reset_ack
int ns2_tx_reset_ack(struct gprs_ns2_vc *nsvc)
Transmit a NS-RESET-ACK on a given NS-VC.
Definition: gprs_ns2_message.c:304
ns2_sns_update_weights
void ns2_sns_update_weights(struct gprs_ns2_vc_bind *bind)
Definition: gprs_ns2_sns.c:2721
ns2_ip_count_bind
int ns2_ip_count_bind(struct gprs_ns2_inst *nsi, struct osmo_sockaddr *remote)
Count UDP binds compatible with remote.
Definition: gprs_ns2_udp.c:530
ns2_vc_force_unconfigured
int ns2_vc_force_unconfigured(struct gprs_ns2_vc *nsvc)
Reset a NS-VC FSM.
Definition: gprs_ns2_vc_fsm.c:824
ns2_ip_set_txqueue_max_length
void ns2_ip_set_txqueue_max_length(struct gprs_ns2_vc_bind *bind, unsigned int max_length)
Definition: gprs_ns2_udp.c:578
ns2_tx_status
int ns2_tx_status(struct gprs_ns2_vc *nsvc, uint8_t cause, uint16_t bvci, struct msgb *orig_msg, uint16_t *nsvci)
Transmit a NS-STATUS on a given NS-VC.
Definition: gprs_ns2_message.c:423
ns2_vc_block
int ns2_vc_block(struct gprs_ns2_vc *nsvc)
Block a NS-VC.
Definition: gprs_ns2_vc_fsm.c:832
ns2_sns_replace_nsvc
void ns2_sns_replace_nsvc(struct gprs_ns2_vc *nsvc)
called when a nsvc is beeing freed or the nsvc became dead
Definition: gprs_ns2_sns.c:298
ns2_sns_dump_vty
void ns2_sns_dump_vty(struct vty *vty, const char *prefix, const struct gprs_ns2_nse *nse, bool stats)
Dump the IP-SNS state to a vty.
Definition: gprs_ns2_sns.c:2409
ns2_cs
ns2_cs
Osmocom NS2 VC create status.
Definition: gprs_ns2_internal.h:131
NS2_CS_FOUND
@ NS2_CS_FOUND
A NSVC object has been found.
Definition: gprs_ns2_internal.h:133
NS2_CS_CREATED
@ NS2_CS_CREATED
A NSVC object has been created.
Definition: gprs_ns2_internal.h:132
NS2_CS_SKIPPED
@ NS2_CS_SKIPPED
Skipped message.
Definition: gprs_ns2_internal.h:135
NS2_CS_ERROR
@ NS2_CS_ERROR
Failed to process message.
Definition: gprs_ns2_internal.h:136
NS2_CS_REJECTED
@ NS2_CS_REJECTED
Rejected and answered message.
Definition: gprs_ns2_internal.h:134
ns2_tx_block
int ns2_tx_block(struct gprs_ns2_vc *nsvc, uint8_t cause, uint16_t *nsvci)
Transmit a NS-BLOCK on a given NS-VC.
Definition: gprs_ns2_message.c:202
ns2_vc_stat
ns2_vc_stat
Definition: gprs_ns2_internal.h:122
NS_STAT_ALIVE_DELAY
@ NS_STAT_ALIVE_DELAY
Definition: gprs_ns2_internal.h:123
ns2_vc_fsm_start
int ns2_vc_fsm_start(struct gprs_ns2_vc *nsvc)
Start a NS-VC FSM.
Definition: gprs_ns2_vc_fsm.c:813
ns2_sns_write_vty
void ns2_sns_write_vty(struct vty *vty, const struct gprs_ns2_nse *nse)
write IP-SNS to a vty
Definition: gprs_ns2_sns.c:2447
ns2_tx_unit_data
int ns2_tx_unit_data(struct gprs_ns2_vc *nsvc, uint16_t bvci, uint8_t sducontrol, struct msgb *msg)
Transmit NS-UNITDATA on a given NS-VC.
Definition: gprs_ns2_message.c:390
ns2_ip_get_bind_by_index
struct gprs_ns2_vc_bind * ns2_ip_get_bind_by_index(struct gprs_ns2_inst *nsi, struct osmo_sockaddr *remote, int index)
Definition: gprs_ns2_udp.c:552
ns2_vc_is_unblocked
int ns2_vc_is_unblocked(struct gprs_ns2_vc *nsvc)
is the given NS-VC unblocked?
Definition: gprs_ns2_vc_fsm.c:983
ns2_sns_sgsn_fsm_alloc
struct osmo_fsm_inst * ns2_sns_sgsn_fsm_alloc(struct gprs_ns2_nse *nse, const char *id)
Allocate an IP-SNS FSM for the SGSN side.
Definition: gprs_ns2_sns.c:3082
nsvc_timer_mode
nsvc_timer_mode
Definition: gprs_ns.h:113
vty
vty
name
const char * name
ns2_vc_alloc
struct gprs_ns2_vc * ns2_vc_alloc(struct gprs_ns2_vc_bind *bind, struct gprs_ns2_nse *nse, bool initiater, enum gprs_ns2_vc_mode vc_mode, const char *id)
Allocate a NS-VC within the given bind + NSE.
Definition: gprs_ns2.c:590
pdu_type
uint8_t pdu_type
NS PDU type.
Definition: gsm_08_16.h:0
ns2_nse_update_mtu
void ns2_nse_update_mtu(struct gprs_ns2_nse *nse)
Definition: gprs_ns2.c:1580
ns2_create_vc
enum ns2_cs ns2_create_vc(struct gprs_ns2_vc_bind *bind, struct msgb *msg, const struct osmo_sockaddr *remote, const char *logname, struct msgb **reject, struct gprs_ns2_vc **success)
Create a new NS-VC based on a [received] message.
Definition: gprs_ns2.c:1005
ns2_dialect_to_vc_mode
enum gprs_ns2_vc_mode ns2_dialect_to_vc_mode(enum gprs_ns2_dialect dialect)
Definition: gprs_ns2.c:1549
ns_ctr
ns_ctr
Definition: gprs_ns.c:128
NS_CTR_LOST_RESET
@ NS_CTR_LOST_RESET
Definition: gprs_ns2_internal.h:154
NS_CTR_PKTS_OUT_DROP
@ NS_CTR_PKTS_OUT_DROP
Definition: gprs_ns2_internal.h:142
NS_CTR_PKTS_OUT
@ NS_CTR_PKTS_OUT
Definition: gprs_ns2_internal.h:141
NS_CTR_BYTES_OUT
@ NS_CTR_BYTES_OUT
Definition: gprs_ns2_internal.h:144
NS_CTR_BYTES_IN
@ NS_CTR_BYTES_IN
Definition: gprs_ns2_internal.h:143
NS_CTR_INV_NSEI
@ NS_CTR_INV_NSEI
Definition: gprs_ns2_internal.h:152
NS_CTR_LOST_ALIVE
@ NS_CTR_LOST_ALIVE
Definition: gprs_ns2_internal.h:153
NS_CTR_PKTS_IN
@ NS_CTR_PKTS_IN
Definition: gprs_ns2_internal.h:140
NS_CTR_UNBLOCKED
@ NS_CTR_UNBLOCKED
Definition: gprs_ns2_internal.h:147
NS_CTR_INV_VCI
@ NS_CTR_INV_VCI
Definition: gprs_ns2_internal.h:151
NS_CTR_DEAD
@ NS_CTR_DEAD
Definition: gprs_ns2_internal.h:148
NS_CTR_REPLACED
@ NS_CTR_REPLACED
Definition: gprs_ns2_internal.h:149
NS_CTR_BLOCKED
@ NS_CTR_BLOCKED
Definition: gprs_ns2_internal.h:146
NS_CTR_NSEI_CHG
@ NS_CTR_NSEI_CHG
Definition: gprs_ns2_internal.h:150
NS_CTR_BYTES_OUT_DROP
@ NS_CTR_BYTES_OUT_DROP
Definition: gprs_ns2_internal.h:145
ns2_recv_vc
int ns2_recv_vc(struct gprs_ns2_vc *nsvc, struct msgb *msg)
Bottom-side entry-point for received NS PDU from the driver/bind.
Definition: gprs_ns2.c:1290
ns2_count_transfer_cap
int ns2_count_transfer_cap(struct gprs_ns2_nse *nse, uint16_t bvci)
calculate the transfer capabilities for a nse
Definition: gprs_ns2.c:1610
ns2_nse_notify_unblocked
void ns2_nse_notify_unblocked(struct gprs_ns2_vc *nsvc, bool unblocked)
Notify a nse about the change of a NS-VC.
Definition: gprs_ns2.c:1392
ns2_prim_status_ind
void ns2_prim_status_ind(struct gprs_ns2_nse *nse, struct gprs_ns2_vc *nsvc, uint16_t bvci, enum gprs_ns2_affecting_cause cause)
Send a STATUS.ind primitive to the specified NS instance user.
Definition: gprs_ns2.c:551
ns2_nse_set_dialect
int ns2_nse_set_dialect(struct gprs_ns2_nse *nse, enum gprs_ns2_dialect dialect)
Definition: gprs_ns2.c:847
ns2_bind_alloc
int ns2_bind_alloc(struct gprs_ns2_inst *nsi, const char *name, struct gprs_ns2_vc_bind **result)
common allocation + low-level initialization of a bind.
Definition: gprs_ns2.c:1654
ns2_msgb_alloc
struct msgb * ns2_msgb_alloc(void)
Allocate a message buffer for use with the NS2 stack.
Definition: gprs_ns2.c:695
ns2_free_nsvcs
void ns2_free_nsvcs(struct gprs_ns2_nse *nse)
Definition: gprs_ns2.c:668
osmo_prim_cb
int(* osmo_prim_cb)(struct osmo_prim_hdr *oph, void *ctx)
msg
uint8_t msg[0]
gsm_08_16.h
GPRS Networks Service (NS) messages on the Gb interface.
logging.h
rate_ctr.h
gprs_ns2_inst
An instance of the NS protocol stack.
Definition: gprs_ns2_internal.h:166
gprs_ns2_inst::txqueue_max_length
uint32_t txqueue_max_length
Definition: gprs_ns2_internal.h:185
gprs_ns2_inst::nse
struct llist_head nse
linked lists of all NSVC in this instance
Definition: gprs_ns2_internal.h:177
gprs_ns2_inst::nsvc_rate_ctr_idx
uint32_t nsvc_rate_ctr_idx
workaround for rate counter until rate counter accepts char str as index
Definition: gprs_ns2_internal.h:182
gprs_ns2_inst::binding
struct llist_head binding
linked lists of all NSVC binds (e.g.
Definition: gprs_ns2_internal.h:174
gprs_ns2_inst::cb_data
void * cb_data
callback data
Definition: gprs_ns2_internal.h:171
gprs_ns2_inst::cb
osmo_prim_cb cb
callback to the user for incoming UNIT DATA IND
Definition: gprs_ns2_internal.h:168
gprs_ns2_inst::timeout
uint16_t timeout[NS_TIMERS_COUNT]
Definition: gprs_ns2_internal.h:179
gprs_ns2_inst::bind_rate_ctr_idx
uint32_t bind_rate_ctr_idx
Definition: gprs_ns2_internal.h:183
gprs_ns2_nse
Structure repesenting a NSE.
Definition: gprs_ns2_internal.h:190
gprs_ns2_nse::dialect
enum gprs_ns2_dialect dialect
which dialect does this NSE speaks?
Definition: gprs_ns2_internal.h:219
gprs_ns2_nse::sum_sig_weight
uint32_t sum_sig_weight
sum of all the signalling weight of alive NS-VCs
Definition: gprs_ns2_internal.h:227
gprs_ns2_nse::ctrg
struct rate_ctr_group * ctrg
NSE-wide statistics.
Definition: gprs_ns2_internal.h:236
gprs_ns2_nse::nsi
struct gprs_ns2_inst * nsi
entry back to ns2_inst
Definition: gprs_ns2_internal.h:194
gprs_ns2_nse::ll
enum gprs_ns2_ll ll
which link-layer are we based on?
Definition: gprs_ns2_internal.h:216
gprs_ns2_nse::nsvc
struct llist_head nsvc
llist head to hold all nsvc
Definition: gprs_ns2_internal.h:200
gprs_ns2_nse::sum_data_weight
uint32_t sum_data_weight
sum of all the data weight of alive NS-VCs
Definition: gprs_ns2_internal.h:224
gprs_ns2_nse::ip_sns_role_sgsn
bool ip_sns_role_sgsn
are we implementing the SGSN role?
Definition: gprs_ns2_internal.h:233
gprs_ns2_nse::persistent
bool persistent
true if this NSE was created by VTY or pcu socket)
Definition: gprs_ns2_internal.h:206
gprs_ns2_nse::list
struct llist_head list
llist entry for gprs_ns2_inst
Definition: gprs_ns2_internal.h:197
gprs_ns2_nse::first
bool first
true if this NSE wasn't yet alive at all.
Definition: gprs_ns2_internal.h:210
gprs_ns2_nse::bss_sns_fi
struct osmo_fsm_inst * bss_sns_fi
Definition: gprs_ns2_internal.h:221
gprs_ns2_nse::mtu
uint16_t mtu
MTU of a NS PDU.
Definition: gprs_ns2_internal.h:230
gprs_ns2_nse::nsei
uint16_t nsei
Definition: gprs_ns2_internal.h:191
gprs_ns2_nse::nsvc_count
int nsvc_count
count all active NSVCs
Definition: gprs_ns2_internal.h:203
gprs_ns2_nse::freed
bool freed
recursive anchor
Definition: gprs_ns2_internal.h:239
gprs_ns2_nse::ts_alive_change
struct timespec ts_alive_change
when the NSE became alive or dead
Definition: gprs_ns2_internal.h:242
gprs_ns2_nse::alive
bool alive
true if this NSE has at least one alive VC
Definition: gprs_ns2_internal.h:213
gprs_ns2_vc_bind
Structure repesenting a bind instance.
Definition: gprs_ns2_internal.h:299
gprs_ns2_vc_bind::sns_data_weight
uint8_t sns_data_weight
the IP-SNS data weight when doing dynamic configuration
Definition: gprs_ns2_internal.h:337
gprs_ns2_vc_bind::accept_sns
bool accept_sns
Definition: gprs_ns2_internal.h:313
gprs_ns2_vc_bind::dump_vty
void(* dump_vty)(const struct gprs_ns2_vc_bind *bind, struct vty *vty, bool stats)
allow to show information for the vty
Definition: gprs_ns2_internal.h:331
gprs_ns2_vc_bind::name
const char * name
unique name
Definition: gprs_ns2_internal.h:301
gprs_ns2_vc_bind::free_vc
void(* free_vc)(struct gprs_ns2_vc *nsvc)
free the vc priv data
Definition: gprs_ns2_internal.h:328
gprs_ns2_vc_bind::accept_ipaccess
bool accept_ipaccess
Definition: gprs_ns2_internal.h:312
gprs_ns2_vc_bind::transfer_capability
int transfer_capability
transfer capability in mbit
Definition: gprs_ns2_internal.h:316
gprs_ns2_vc_bind::mtu
uint16_t mtu
MTU of a NS PDU on this bind.
Definition: gprs_ns2_internal.h:319
gprs_ns2_vc_bind::freed
bool freed
recursive anchor
Definition: gprs_ns2_internal.h:342
gprs_ns2_vc_bind::send_vc
int(* send_vc)(struct gprs_ns2_vc *nsvc, struct msgb *msg)
send a msg over a VC
Definition: gprs_ns2_internal.h:325
gprs_ns2_vc_bind::nsvc
struct llist_head nsvc
list of all VC
Definition: gprs_ns2_internal.h:305
gprs_ns2_vc_bind::sns_sig_weight
uint8_t sns_sig_weight
the IP-SNS signalling weight when doing dynamic configuration
Definition: gprs_ns2_internal.h:335
gprs_ns2_vc_bind::priv
void * priv
driver private structure
Definition: gprs_ns2_internal.h:307
gprs_ns2_vc_bind::statg
struct osmo_stat_item_group * statg
Definition: gprs_ns2_internal.h:339
gprs_ns2_vc_bind::list
struct llist_head list
list entry in nsi
Definition: gprs_ns2_internal.h:303
gprs_ns2_vc_bind::nsi
struct gprs_ns2_inst * nsi
a pointer back to the nsi
Definition: gprs_ns2_internal.h:309
gprs_ns2_vc_bind::driver
struct gprs_ns2_vc_driver * driver
Definition: gprs_ns2_internal.h:310
gprs_ns2_vc_bind::ll
enum gprs_ns2_ll ll
which link-layer are we based on?
Definition: gprs_ns2_internal.h:322
gprs_ns2_vc_driver
Definition: gprs_ns2_internal.h:345
gprs_ns2_vc_driver::priv
void * priv
Definition: gprs_ns2_internal.h:347
gprs_ns2_vc_driver::free_bind
void(* free_bind)(struct gprs_ns2_vc_bind *driver)
Definition: gprs_ns2_internal.h:348
gprs_ns2_vc_driver::name
const char * name
Definition: gprs_ns2_internal.h:346
gprs_ns2_vc
Structure representing a single NS-VC.
Definition: gprs_ns2_internal.h:246
gprs_ns2_vc::fi
struct osmo_fsm_inst * fi
Definition: gprs_ns2_internal.h:286
gprs_ns2_vc::sns_only
bool sns_only
should this NS-VC only be used for SNS-SIZE and SNS-CONFIG?
Definition: gprs_ns2_internal.h:279
gprs_ns2_vc::freed
bool freed
recursive anchor
Definition: gprs_ns2_internal.h:289
gprs_ns2_vc::persistent
bool persistent
true if this NS was created by VTY or pcu socket)
Definition: gprs_ns2_internal.h:260
gprs_ns2_vc::nsvci_is_valid
bool nsvci_is_valid
Definition: gprs_ns2_internal.h:277
gprs_ns2_vc::bind
struct gprs_ns2_vc_bind * bind
pointer to NS VL bind.
Definition: gprs_ns2_internal.h:257
gprs_ns2_vc::ts_alive_change
struct timespec ts_alive_change
when the NSVC became alive or dead
Definition: gprs_ns2_internal.h:295
gprs_ns2_vc::blist
struct llist_head blist
list of NS-VCs within bind, bind is the owner!
Definition: gprs_ns2_internal.h:251
gprs_ns2_vc::sig_counter
uint8_t sig_counter
signalling packet counter for the load sharing function
Definition: gprs_ns2_internal.h:269
gprs_ns2_vc::sig_weight
uint8_t sig_weight
signalling weight.
Definition: gprs_ns2_internal.h:266
gprs_ns2_vc::nse
struct gprs_ns2_nse * nse
pointer to NS Instance
Definition: gprs_ns2_internal.h:254
gprs_ns2_vc::mode
enum gprs_ns2_vc_mode mode
Definition: gprs_ns2_internal.h:284
gprs_ns2_vc::list
struct llist_head list
list of NS-VCs within NSE
Definition: gprs_ns2_internal.h:248
gprs_ns2_vc::data_weight
uint8_t data_weight
data weight.
Definition: gprs_ns2_internal.h:272
gprs_ns2_vc::nsvci
uint16_t nsvci
uniquely identifies NS-VC if VC contains nsvci
Definition: gprs_ns2_internal.h:263
gprs_ns2_vc::priv
void * priv
can be used by the bind/driver of the virtual circuit.
Definition: gprs_ns2_internal.h:275
gprs_ns2_vc::om_blocked
bool om_blocked
if blocked by O&M/vty
Definition: gprs_ns2_internal.h:292
gprs_ns2_vc::ctrg
struct rate_ctr_group * ctrg
Definition: gprs_ns2_internal.h:281
gprs_ns2_vc::statg
struct osmo_stat_item_group * statg
Definition: gprs_ns2_internal.h:282
gprs_ns_ie_ip4_elem
Section 10.3.2c List of IP4 Elements.
Definition: gsm_08_16.h:24
gprs_ns_ie_ip6_elem
Section 10.3.2d List of IP6 Elements.
Definition: gsm_08_16.h:32
llist_head
msgb
osmo_fsm_inst
osmo_sockaddr
osmo_stat_item_group
rate_ctr_group
tlv_parsed
vty