libosmogb
1.5.1
Osmocom Gb library
|
#include <stdint.h>
Go to the source code of this file.
|
enum | bssp_ptp_bvc_fsm_state {
BSSGP_BVCFSM_S_NULL,
BSSGP_BVCFSM_S_BLOCKED,
BSSGP_BVCFSM_S_WAIT_RESET_ACK,
BSSGP_BVCFSM_S_UNBLOCKED
} |
|
enum | bssgp_ptp_bvc_fsm_event {
BSSGP_BVCFSM_E_RX_BLOCK,
BSSGP_BVCFSM_E_RX_BLOCK_ACK,
BSSGP_BVCFSM_E_RX_UNBLOCK,
BSSGP_BVCFSM_E_RX_UNBLOCK_ACK,
BSSGP_BVCFSM_E_RX_RESET,
BSSGP_BVCFSM_E_RX_RESET_ACK,
BSSGP_BVCFSM_E_RX_FC_BVC,
BSSGP_BVCFSM_E_RX_FC_BVC_ACK,
BSSGP_BVCFSM_E_REQ_BLOCK,
BSSGP_BVCFSM_E_REQ_UNBLOCK,
BSSGP_BVCFSM_E_REQ_RESET,
BSSGP_BVCFSM_E_REQ_FC_BVC
} |
|
|
struct osmo_fsm_inst * | bssgp_bvc_fsm_alloc_sig_bss (void *ctx, struct gprs_ns2_inst *nsi, uint16_t nsei, uint32_t features) |
| Allocate a SIGNALING-BVC FSM for the BSS role (facing a remote SGSN). More...
|
|
struct osmo_fsm_inst * | bssgp_bvc_fsm_alloc_ptp_bss (void *ctx, struct gprs_ns2_inst *nsi, uint16_t nsei, uint16_t bvci, const struct gprs_ra_id *ra_id, uint16_t cell_id) |
| Allocate a PTP-BVC FSM for the BSS role (facing a remote SGSN). More...
|
|
struct osmo_fsm_inst * | bssgp_bvc_fsm_alloc_sig_sgsn (void *ctx, struct gprs_ns2_inst *nsi, uint16_t nsei, uint32_t features) |
| Allocate a SIGNALING-BVC FSM for the SGSN role (facing a remote BSS). More...
|
|
struct osmo_fsm_inst * | bssgp_bvc_fsm_alloc_ptp_sgsn (void *ctx, struct gprs_ns2_inst *nsi, uint16_t nsei, uint16_t bvci) |
| Allocate a PTP-BVC FSM for the SGSN role (facing a remote BSS). More...
|
|
void | bssgp_bvc_fsm_set_ops (struct osmo_fsm_inst *fi, const struct bssgp_bvc_fsm_ops *ops, void *ops_priv) |
| Set the 'operations' callbacks + private data. More...
|
|
bool | bssgp_bvc_fsm_is_unblocked (struct osmo_fsm_inst *fi) |
| Return if the given BVC FSM is in UNBLOCKED state. More...
|
|
uint8_t | bssgp_bvc_fsm_get_block_cause (struct osmo_fsm_inst *fi) |
| Determine the cause value why given BVC FSM is blocked. More...
|
|
uint32_t | bssgp_bvc_fsm_get_features_advertised (struct osmo_fsm_inst *fi) |
| Return the advertised features / extended features. More...
|
|
uint32_t | bssgp_bvc_fsm_get_features_received (struct osmo_fsm_inst *fi) |
| Return the received features / extended features. More...
|
|
uint32_t | bssgp_bvc_fsm_get_features_negotiated (struct osmo_fsm_inst *fi) |
| Return the negotiated features / extended features. More...
|
|
void | bssgp_bvc_fsm_set_max_pdu_len (struct osmo_fsm_inst *fi, uint16_t max_pdu_len) |
| Set the maximum size of a BSSGP PDU. More...
|
|
uint16_t | bssgp_bvc_fsm_get_max_pdu_len (const struct osmo_fsm_inst *fi) |
| Return the maximum size of a BSSGP PDU ! On the NS layer this corresponds to the size of an NS SDU in NS-UNITDATA (3GPP TS 48.016 Ch. More...
|
|
◆ bssgp_ptp_bvc_fsm_event
Enumerator |
---|
BSSGP_BVCFSM_E_RX_BLOCK | |
BSSGP_BVCFSM_E_RX_BLOCK_ACK | |
BSSGP_BVCFSM_E_RX_UNBLOCK | |
BSSGP_BVCFSM_E_RX_UNBLOCK_ACK | |
BSSGP_BVCFSM_E_RX_RESET | |
BSSGP_BVCFSM_E_RX_RESET_ACK | |
BSSGP_BVCFSM_E_RX_FC_BVC | |
BSSGP_BVCFSM_E_RX_FC_BVC_ACK | |
BSSGP_BVCFSM_E_REQ_BLOCK | |
BSSGP_BVCFSM_E_REQ_UNBLOCK | |
BSSGP_BVCFSM_E_REQ_RESET | |
BSSGP_BVCFSM_E_REQ_FC_BVC | |
◆ bssp_ptp_bvc_fsm_state
Enumerator |
---|
BSSGP_BVCFSM_S_NULL | |
BSSGP_BVCFSM_S_BLOCKED | |
BSSGP_BVCFSM_S_WAIT_RESET_ACK | |
BSSGP_BVCFSM_S_UNBLOCKED | |
◆ bssgp_bvc_fsm_alloc_ptp_bss()
Allocate a PTP-BVC FSM for the BSS role (facing a remote SGSN).
- Parameters
-
[in] | ctx | talloc context from which to allocate |
[in] | nsi | NS Instance on which this BVC operates |
[in] | nsei | NS Entity Identifier on which this BVC operates |
[in] | bvci | BVCI of this FSM |
[in] | ra_id | Routing Area Identity of the cell (reported to SGSN) |
[in] | cell_id | Cell Identifier of the cell (reported to SGSN) |
- Returns
- newly-allocated FSM Instance; NULL in case of error
References _bvc_fsm_alloc(), bvci, bvc_fsm_priv::cell_id, nsei, bvc_fsm_priv::nsi, OSMO_ASSERT, osmo_fsm_inst::priv, and bvc_fsm_priv::ra_id.
◆ bssgp_bvc_fsm_alloc_ptp_sgsn()
Allocate a PTP-BVC FSM for the SGSN role (facing a remote BSS).
- Parameters
-
[in] | ctx | talloc context from which to allocate |
[in] | nsi | NS Instance on which this BVC operates |
[in] | nsei | NS Entity Identifier on which this BVC operates |
[in] | bvci | BVCI of this FSM |
- Returns
- newly-allocated FSM Instance; NULL in case of error
References _bvc_fsm_alloc(), bvci, nsei, and OSMO_ASSERT.
◆ bssgp_bvc_fsm_alloc_sig_bss()
Allocate a SIGNALING-BVC FSM for the BSS role (facing a remote SGSN).
- Parameters
-
[in] | ctx | talloc context from which to allocate |
[in] | nsi | NS Instance on which this BVC operates |
[in] | nsei | NS Entity Identifier on which this BVC operates |
[in] | features | Feature [byte 0] and Extended Feature [byte 1] bitmap |
- Returns
- newly-allocated FSM Instance; NULL in case of error
References _bvc_fsm_alloc(), bvc_fsm_priv::advertised, bvc_fsm_priv::features, nsei, and osmo_fsm_inst::priv.
◆ bssgp_bvc_fsm_alloc_sig_sgsn()
Allocate a SIGNALING-BVC FSM for the SGSN role (facing a remote BSS).
- Parameters
-
[in] | ctx | talloc context from which to allocate |
[in] | nsi | NS Instance on which this BVC operates |
[in] | nsei | NS Entity Identifier on which this BVC operates |
[in] | features | Feature [byte 0] and Extended Feature [byte 1] bitmap |
- Returns
- newly-allocated FSM Instance; NULL in case of error
References _bvc_fsm_alloc(), bvc_fsm_priv::advertised, bvc_fsm_priv::features, nsei, and osmo_fsm_inst::priv.
◆ bssgp_bvc_fsm_get_block_cause()
uint8_t bssgp_bvc_fsm_get_block_cause |
( |
struct osmo_fsm_inst * |
fi | ) |
|
◆ bssgp_bvc_fsm_get_features_advertised()
uint32_t bssgp_bvc_fsm_get_features_advertised |
( |
struct osmo_fsm_inst * |
fi | ) |
|
◆ bssgp_bvc_fsm_get_features_negotiated()
uint32_t bssgp_bvc_fsm_get_features_negotiated |
( |
struct osmo_fsm_inst * |
fi | ) |
|
◆ bssgp_bvc_fsm_get_features_received()
uint32_t bssgp_bvc_fsm_get_features_received |
( |
struct osmo_fsm_inst * |
fi | ) |
|
◆ bssgp_bvc_fsm_get_max_pdu_len()
uint16_t bssgp_bvc_fsm_get_max_pdu_len |
( |
const struct osmo_fsm_inst * |
fi | ) |
|
◆ bssgp_bvc_fsm_is_unblocked()
◆ bssgp_bvc_fsm_set_max_pdu_len()
void bssgp_bvc_fsm_set_max_pdu_len |
( |
struct osmo_fsm_inst * |
fi, |
|
|
uint16_t |
max_pdu_len |
|
) |
| |
◆ bssgp_bvc_fsm_set_ops()
#define NS_DESC_A(st)
Definition: gprs_ns.h:49
uint8_t data_weight
Definition: gsm_08_16.h:5
@ GPRS_NS2_EV_REQ_OM_BLOCK
Definition: gprs_ns2_vc_fsm.c:120
int ns2_vc_unblock(struct gprs_ns2_vc *nsvc)
Unblock a NS-VC.
Definition: gprs_ns2_vc_fsm.c:754
uint8_t sig_weight
Definition: gsm_08_16.h:4
static struct osmo_fsm ns2_vc_fsm
Definition: gprs_ns2_vc_fsm.c:676
static void ns2_sns_st_configured_add(struct osmo_fsm_inst *fi, struct ns2_sns_state *gss, struct tlv_parsed *tp)
Definition: gprs_ns2_sns.c:1063
Definition: gprs_ns2_vc_fsm.c:54
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:283
static int config_write_ns_bind(struct vty *vty)
Definition: gprs_ns2_vty.c:559
enum ns2_timeout mode
Definition: gprs_ns2_vc_fsm.c:71
static const struct value_string gprs_ns_timer_strs[]
Definition: gprs_ns2_vty.c:90
@ FR_ROLE_USER_EQUIPMENT
Definition: frame_relay.h:38
@ NS_CAUSE_INVAL_WEIGH
Definition: gsm_08_16.h:99
int gprs_ns_tx_unblock(struct gprs_nsvc *nsvc)
Transmit a NS-UNBLOCK on a given NS-VC.
Definition: gprs_ns.c:692
static void _config_write_ns_nse(struct vty *vty, struct gprs_ns2_nse *nse)
Definition: gprs_ns2_vty.c:521
static struct sns_endpoint * ns2_get_sns_endpoint(struct ns2_sns_state *state, const struct osmo_sockaddr *saddr)
Definition: gprs_ns2_sns.c:1695
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:1095
static int nsip_vc_sendmsg(struct gprs_ns2_vc *nsvc, struct msgb *msg)
send the msg and free it afterwards.
Definition: gprs_ns2_udp.c:161
struct osmo_fsm_inst * bss_sns_fi
Definition: gprs_ns.h:110
@ GPRS_NS2_EV_RX_UNBLOCK_ACK
Definition: gprs_ns2_vc_fsm.c:110
struct rate_ctr_group * ctrg
Definition: gprs_ns2_internal.h:222
static uint16_t tlvp_val16be(const struct tlv_parsed *tp, int pos)
int gprs_ns2_sns_del_bind(struct gprs_ns2_nse *nse, struct gprs_ns2_vc_bind *bind)
Definition: gprs_ns2_sns.c:1898
#define LOGNSVC(nsvc, lvl, fmt, args ...)
Definition: gprs_ns2_internal.h:18
static void log_set_nsvc_filter(struct log_target *target, struct gprs_ns2_vc *nsvc)
Definition: gprs_ns2_vty.c:1937
static int nsip_fd_cb(struct osmo_fd *bfd, unsigned int what)
Definition: gprs_ns2_udp.c:266
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:1028
void gprs_ns2_free_nse(struct gprs_ns2_nse *nse)
Destroy given NS Entity.
Definition: gprs_ns2.c:828
@ NS2_CS_CREATED
A NSVC object has been created.
Definition: gprs_ns2_internal.h:85
static void ns2_nsvc_create_ip4(struct osmo_fsm_inst *fi, struct gprs_ns2_nse *nse, const struct gprs_ns_ie_ip4_elem *ip4)
Definition: gprs_ns2_sns.c:320
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:356
@ GPRS_SNS_ST_CONFIGURED
Definition: gprs_ns_sns.c:275
@ NS_IE_NSEI
Definition: gsm_08_16.h:70
int ns2_tx_alive(struct gprs_ns2_vc *nsvc)
Transmit a NS-ALIVE on a given NS-VC.
Definition: gprs_ns2_message.c:371
int osmo_sockaddr_cmp(const struct osmo_sockaddr *a, const struct osmo_sockaddr *b)
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:492
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:1366
#define ip4_weight_sum_data(x, y)
Definition: gprs_ns2_sns.c:185
#define DNS
Definition: gprs_ns2_vc_fsm.c:52
Definition: gprs_ns2_vty.c:74
@ NS_IE_PDU
Definition: gsm_08_16.h:68
static struct msgb * read_nsip_msg(struct osmo_fd *bfd, int *error, struct osmo_sockaddr *saddr, const struct gprs_ns2_vc_bind *bind)
Definition: gprs_ns2_udp.c:173
int gprs_ns2_vty_init(struct gprs_ns2_inst *nsi)
Definition: gprs_ns2_vty.c:2050
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:1053
unsigned int num_ip4_remote
Definition: gprs_ns2_sns.c:157
void * priv
can be used by the bind/driver of the virtual circuit.
Definition: gprs_ns2_internal.h:217
static int nsip_sendmsg(struct gprs_ns2_vc_bind *bind, struct msgb *msg, struct osmo_sockaddr *dest)
Definition: gprs_ns2_udp.c:142
static void config_write_nsvc(struct vty *vty, const struct gprs_ns2_vc *nsvc)
Definition: gprs_ns2_vty.c:470
const struct value_string vty_ll_names[]
Definition: gprs_ns2_vty.c:110
uint8_t data_weight
Definition: gsm_08_16.h:36
int ns2_tx_status(struct gprs_ns2_vc *nsvc, uint8_t cause, uint16_t bvci, struct msgb *orig_msg)
Transmit a NS-STATUS on a given NS-VC.
Definition: gprs_ns2_message.c:429
struct llist_head list
Definition: gprs_ns2_vty.c:85
An instance of the NS protocol stack.
Definition: gprs_ns2_internal.h:119
unsigned int persistent
Definition: gprs_ns.h:140
const char * get_value_string(const struct value_string *vs, uint32_t val)
static void ns2_sns_st_configured(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_sns.c:1299
void rate_ctr_add(struct rate_ctr *ctr, int inc)
struct osmo_stat_item_group * statg
Definition: gprs_ns2_internal.h:271
#define osmo_fsm_inst_term(fi, cause, data)
static void gprs_sns_st_unconfigured(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns_sns.c:301
@ GPRS_NS2_EV_RX_UNITDATA
Definition: gprs_ns2_vc_fsm.c:117
static void ns2_vc_fsm_clean(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause)
Definition: gprs_ns2_vc_fsm.c:668
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:555
struct gprs_ns2_vc_driver vc_driver_ip
Definition: gprs_ns2_udp.c:43
void vty_out_fsm_inst2(struct vty *vty, const char *prefix, struct osmo_fsm_inst *fsmi)
struct llist_head list
Definition: gprs_ns2_vty.c:75
int osmo_sock_init_osa_ofd(struct osmo_fd *ofd, int type, int proto, const struct osmo_sockaddr *local, const struct osmo_sockaddr *remote, unsigned int flags)
@ GPRS_SNS_ST_UNCONFIGURED
Definition: gprs_ns_sns.c:271
uint8_t pdu_type
NS PDU type.
Definition: gsm_08_16.h:2
@ GPRS_SNS_ST_CONFIG_SGSN
SNS-CONFIG procedure (SGSN->BSS) ongoing.
Definition: gprs_ns_sns.c:274
@ IPv6
Definition: gprs_ns2_sns.c:61
@ NS_CAUSE_PROTO_ERR_UNSPEC
Definition: gsm_08_16.h:92
int ns2_tx_block_ack(struct gprs_ns2_vc *nsvc)
Transmit a NS-BLOCK-ACK on a given NS-VC.
Definition: gprs_ns2_message.c:243
void osmo_timer_add(struct osmo_timer_list *timer)
@ GPRS_NS2_AFF_CAUSE_SNS_CONFIGURED
Definition: gprs_ns2.h:84
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:586
int gprs_ns2_vty_init_reduced(struct gprs_ns2_inst *nsi)
initialized a reduced vty interface which excludes the configuration nodes besides timeouts.
Definition: gprs_ns2_vty.c:2017
#define DLCI_STR
Definition: gprs_ns2_vty.c:56
@ GPRS_SNS_ST_UNCONFIGURED
Definition: gprs_ns2_sns.c:65
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:263
#define NS_ALLOC_HEADROOM
Definition: gprs_ns.h:31
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:780
@ GPRS_NS2_LL_FR_GRE
NS/FR/GRE/IP.
Definition: gprs_ns2.h:48
static int vty_nse_remove_vbind(struct vty_nse *vnse, struct vty_bind *vbind)
Definition: gprs_ns2_vty.c:207
int dscp
Definition: gprs_ns2_frgre.c:114
int gprs_sns_init(void)
Definition: gprs_ns_sns.c:736
struct gprs_ns_inst * nsi
pointer to NS Instance
Definition: gprs_ns.h:126
static void osmo_prim_init(struct osmo_prim_hdr *oph, unsigned int sap, unsigned int primitive, enum osmo_prim_operation operation, struct msgb *msg)
static unsigned char * msgb_put(struct msgb *msgb, unsigned int len)
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:1753
@ NS_TOUT_TNS_ALIVE
Definition: gprs_ns.h:39
@ NS_PDUT_BLOCK
Definition: gsm_08_16.h:46
int ns2_vc_fsm_start(struct gprs_ns2_vc *nsvc)
Start a NS-VC FSM.
Definition: gprs_ns2_vc_fsm.c:727
@ GPRS_SNS_EV_CONFIG_ACK
Definition: gprs_ns_sns.c:282
static int remove_remote_ip4_elem(struct gprs_sns_state *gss, const struct gprs_ns_ie_ip4_elem *ip4)
Definition: gprs_ns_sns.c:150
static int ns_vc_tx(struct gprs_ns2_vc *nsvc, struct msgb *msg)
Definition: gprs_ns2_message.c:169
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:603
@ NS_IE_VCI
Definition: gsm_08_16.h:67
@ GPRS_SNS_EV_RX_CONFIG_END
SNS-CONFIG with end flag received.
Definition: gprs_ns2_sns.c:77
uint8_t data[0]
variable-length payload
Definition: gsm_08_16.h:3
void gprs_sns_dump_vty(struct vty *vty, const struct gprs_ns_inst *nsi, bool stats)
Definition: gprs_ns_sns.c:753
static struct gprs_ns_inst * vty_nsi
Definition: gprs_ns_vty.c:51
struct llist_head nsvc
llist head to hold all nsvc
Definition: gprs_ns2_internal.h:154
void osmo_identifier_sanitize_buf(char *str, const char *sep_chars, char replace_with)
static void ns2_st_blocked(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_vc_fsm.c:329
struct gprs_ns_ie_ip6_elem * ip6_remote
Definition: gprs_ns2_sns.c:160
static struct gprs_ns2_inst * ns_inst_from_fi(struct osmo_fsm_inst *fi)
Definition: gprs_ns2_vc_fsm.c:142
uint8_t sns_data_weight
the IP-SNS data weight when doing dynamic configuration
Definition: gprs_ns2_internal.h:269
bool accept_ipaccess
Definition: gprs_ns2_internal.h:244
int(* send_vc)(struct gprs_ns2_vc *nsvc, struct msgb *msg)
send a msg over a VC
Definition: gprs_ns2_internal.h:257
#define NSE_CMD_STR
Definition: gprs_ns_vty.c:280
@ GPRS_SNS_EV_RX_ADD
Definition: gprs_ns2_sns.c:79
static void dump_ns_entities(struct vty *vty, const struct gprs_ns2_inst *nsi, bool stats, bool persistent_only)
Definition: gprs_ns2_vty.c:1770
@ NS_PDUT_ALIVE_ACK
Definition: gsm_08_16.h:52
int gprs_ns_tx_block(struct gprs_nsvc *nsvc, uint8_t cause)
Transmit a NS-BLOCK on a given NS-VC.
Definition: gprs_ns.c:627
struct gprs_ns_inst::@15 frgre
NS-over-FR-over-GRE-over-IP specific bits.
#define TLVP_PRES_LEN(tp, tag, min_len)
static void dump_nse(struct vty *vty, const struct gprs_ns2_nse *nse, bool stats, bool persistent_only)
Definition: gprs_ns2_vty.c:1732
Definition: gprs_ns2_fr.c:119
@ GPRS_NS2_EV_RX_BLOCK
Definition: gprs_ns2_vc_fsm.c:111
int gprs_ns_frgre_listen(struct gprs_ns_inst *nsi)
Definition: gprs_ns_frgre.c:326
#define ERR_IF_NSVC_USES_SNS(nsvc, reason)
Definition: gprs_ns2_message.c:42
static void log_set_nse_filter(struct log_target *target, struct gprs_ns2_nse *nse)
Definition: gprs_ns2_vty.c:1925
@ NS_CAUSE_INVAL_NR_NS_VC
Definition: gsm_08_16.h:98
uint8_t pdu_type
NS PDU type.
Definition: gsm_08_16.h:18
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:764
gprs_ns2_ll
Osmocom NS link layer types.
Definition: gprs_ns2.h:44
int(* cb)(struct osmo_fd *fd, unsigned int what)
static void dump_nsvc(struct vty *vty, struct gprs_ns2_vc *nsvc, bool stats)
Definition: gprs_ns2_vty.c:1711
struct llist_head sns_endpoints
Definition: gprs_ns2_sns.c:121
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:1239
bool use_reset_block_unblock
IPA compatibility: NS-RESET/BLOCK/UNBLOCK even on IP-SNS.
Definition: gprs_ns.h:101
struct gprs_ns_ie_ip6_elem * ip6_local
Definition: gprs_ns2_sns.c:146
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:646
static void alive_timeout_handler(void *data)
Definition: gprs_ns2_vc_fsm.c:196
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:383
@ GPRS_SNS_EV_CHANGE_WEIGHT
Definition: gprs_ns_sns.c:285
enum gprs_ns_ll ll
which link-layer are we based on?
Definition: gprs_ns.h:147
static int handle_rx_gre_ipv4(struct osmo_fd *bfd, struct msgb *msg, struct iphdr *iph, struct gre_hdr *greh)
Definition: gprs_ns_frgre.c:95
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:541
struct osmo_stat_item_group * statg
Definition: gprs_ns2_internal.h:223
static struct llist_head binds
Definition: gprs_ns2_vty.c:60
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
int osmo_clock_gettime(clockid_t clk_id, struct timespec *tp)
@ SNS_PDUT_CHANGE_WEIGHT
Definition: gsm_08_16.h:56
struct osmo_fsm_inst * osmo_fsm_inst_alloc(struct osmo_fsm *fsm, void *ctx, void *priv, int log_level, const char *id)
static void ns2_st_unconfigured(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_vc_fsm.c:238
static void ns2_st_blocked_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns2_vc_fsm.c:306
bool accept_sns
Definition: gprs_ns2_internal.h:245
void gprs_nsvc_delete(struct gprs_nsvc *nsvc)
Delete given NS-VC.
Definition: gprs_ns.c:353
Definition: gprs_ns2_vty.c:84
#define llist_for_each_entry_safe(pos, n, head, member)
static void vty_dump_sns_ip4(struct vty *vty, const char *prefix, const struct gprs_ns_ie_ip4_elem *ip4)
Definition: gprs_ns2_sns.c:1617
bool accept_sns
Definition: gprs_ns2_vty.c:69
static int ns2_validate_reset(struct gprs_ns2_vc *nsvc, struct msgb *msg, struct tlv_parsed *tp, uint8_t *cause)
Definition: gprs_ns2_message.c:49
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:135
#define CMD_ERR_NOTHING_TODO
static const struct value_string ns2_vc_event_names[]
Definition: gprs_ns2_vc_fsm.c:124
int get_string_value(const struct value_string *vs, const char *str)
static struct cmd_node ns_node
Definition: gprs_ns2_vty.c:242
struct in6_addr ip_addr
Definition: gsm_08_16.h:33
struct gprs_ns2_inst * nsi
entry back to ns2_inst
Definition: gprs_ns2_internal.h:148
static uint8_t * msgb_v_put(struct msgb *msg, uint8_t val)
static struct gprs_nsvc * nsvc_by_ip4_elem(struct gprs_ns_inst *nsi, const struct gprs_ns_ie_ip4_elem *ip4)
Definition: gprs_ns_sns.c:74
#define NS_DESC_B(st)
Definition: gprs_ns.h:48
struct gprs_ns_inst::@14 nsip
NS-over-IP specific bits.
struct llist_head nse
linked lists of all NSVC in this instance
Definition: gprs_ns2_internal.h:130
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:550
@ NS_CTR_BLOCKED
Definition: gprs_ns.c:133
static int add_remote_ip6_elem(struct ns2_sns_state *gss, const struct gprs_ns_ie_ip6_elem *ip6)
Definition: gprs_ns2_sns.c:492
const char * get_value_string_or_null(const struct value_string *vs, uint32_t val)
enum gprs_ns2_ll ll
which link-layer are we based on?
Definition: gprs_ns2_internal.h:170
int ns2_tx_unblock(struct gprs_ns2_vc *nsvc)
Transmit a NS-UNBLOCK on a given NS-VC.
Definition: gprs_ns2_message.c:340
@ NS_CAUSE_INVAL_NR_IPv6_EP
Definition: gsm_08_16.h:97
@ NS_CTR_LOST_ALIVE
Definition: gprs_ns.c:139
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:550
static uint8_t * msgb_tv16_put(struct msgb *msg, uint8_t tag, uint16_t val)
bool initiate_reset
Definition: gprs_ns2_vc_fsm.c:62
const char * osmo_sockaddr_to_str(const struct osmo_sockaddr *sockaddr)
static void ns2_recv_unitdata(struct osmo_fsm_inst *fi, struct msgb *msg)
Definition: gprs_ns2_vc_fsm.c:545
Definition: gprs_ns2_vty.c:63
struct gprs_ns_ie_ip4_elem * ip4_local
Definition: gprs_ns2_sns.c:142
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:963
@ NS_CAUSE_MISSING_ESSENT_IE
Definition: gsm_08_16.h:94
int gprs_ns2_is_ip_bind(struct gprs_ns2_vc_bind *bind)
Is the given bind an IP bind?
Definition: gprs_ns2_udp.c:504
static void ns2_vc_create_ip(struct osmo_fsm_inst *fi, struct gprs_ns2_nse *nse, const struct osmo_sockaddr *remote, uint8_t sig_weight, uint8_t data_weight)
Definition: gprs_ns2_sns.c:295
static void ns2_sns_st_config_bss(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_sns.c:863
gprs_ns2_vc_state
Definition: gprs_ns2_vc_fsm.c:94
struct log_target * osmo_log_vty2tgt(struct vty *vty)
char ip[INET6_ADDRSTRLEN]
static struct gprs_ns2_vc * nsvc_by_ip4_elem(struct gprs_ns2_nse *nse, const struct gprs_ns_ie_ip4_elem *ip4)
Definition: gprs_ns2_sns.c:206
Structure repesenting a NSE.
Definition: gprs_ns2_internal.h:144
@ GPRS_SNS_EV_REQ_ADD_BIND
Definition: gprs_ns2_sns.c:84
#define INIT_LLIST_HEAD(ptr)
void vty_out_rate_ctr_group(struct vty *vty, const char *prefix, struct rate_ctr_group *ctrg)
uint16_t gprs_ns2_fr_nsvc_dlci(const struct gprs_ns2_vc *nsvc)
Return the dlci of the nsvc.
Definition: gprs_ns2_fr.c:1062
static void ns2_st_unconfigured_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns2_vc_fsm.c:233
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:1713
static int ns2_validate_status(struct gprs_ns2_vc *nsvc, struct msgb *msg, struct tlv_parsed *tp, uint8_t *cause)
Definition: gprs_ns2_message.c:90
@ NS_TOUT_TSNS_CONFIG_RETRIES
Definition: gprs_ns2_internal.h:64
uint16_t next_nsvci
Definition: gprs_ns_sns.c:47
struct gprs_ns2_vc * nsvc
Definition: gprs_ns2_vc_fsm.c:55
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:283
struct ns2_sns_bind * initial_bind
Definition: gprs_ns2_sns.c:125
uint16_t nsei
Definition: gprs_ns2_vty.c:76
@ GPRS_SNS_ST_CONFIG_SGSN
SNS-CONFIG procedure (SGSN->BSS) ongoing.
Definition: gprs_ns2_sns.c:68
static const struct value_string gprs_sns_event_names[]
Definition: gprs_ns2_sns.c:88
static void ns2_sns_st_config_sgsn(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_sns.c:1029
static int ns_sns_configured_timeout(struct osmo_fsm_inst *fi)
Definition: gprs_ns2_sns.c:909
@ NS_TOUT_TNS_RESET
Definition: gprs_ns.h:36
static void ns2_sns_st_configured_delete(struct osmo_fsm_inst *fi, struct ns2_sns_state *gss, struct tlv_parsed *tp)
Definition: gprs_ns2_sns.c:1129
#define GRE_PTYPE_IPv4
Definition: gprs_ns_frgre.c:46
int gprs_ns2_sns_count(struct gprs_ns2_nse *nse)
gprs_ns2_sns_count
Definition: gprs_ns2_sns.c:1806
uint16_t ptype
Definition: gprs_ns2_fr.c:88
void * filter_data[LOG_MAX_FILTERS+1]
static void ns2_st_alive_onleave(struct osmo_fsm_inst *fi, uint32_t next_state)
Definition: gprs_ns2_vc_fsm.c:435
static __attribute__((constructor))
Definition: gprs_ns2_sns.c:1939
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:386
static int do_sns_delete(struct osmo_fsm_inst *fi, const struct gprs_ns_ie_ip4_elem *ip4)
Definition: gprs_ns_sns.c:211
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:586
static void dump_ns_bind(struct vty *vty, const struct gprs_ns2_inst *nsi, bool stats)
Definition: gprs_ns2_vty.c:1760
static int handle_nsip_write(struct osmo_fd *bfd)
Definition: gprs_ns2_udp.c:260
struct gprs_nsvc::@16::@19 frgre
@ NS_TOUT_TNS_ALIVE_RETRIES
Definition: gprs_ns.h:40
@ GPRS_NS2_ST_RESET
Definition: gprs_ns2_vc_fsm.c:96
struct gprs_ns_ie_ip4_elem * ip4_remote
Definition: gprs_ns2_sns.c:156
static uint8_t tlvp_val8(const struct tlv_parsed *tp, uint8_t tag, uint8_t default_val)
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:305
static void ns2_st_alive(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_vc_fsm.c:411
size_t num_max_nsvcs
Definition: gprs_ns2_sns.c:151
@ GPRS_NS2_LL_FR
NS/FR.
Definition: gprs_ns2.h:47
uint16_t udp_port
Definition: gsm_08_16.h:34
@ GPRS_SNS_EV_RX_CHANGE_WEIGHT
Definition: gprs_ns2_sns.c:81
uint16_t local_port
Definition: gprs_ns.h:96
@ NS2_CS_ERROR
Failed to process message.
Definition: gprs_ns2_internal.h:89
int N
Definition: gprs_ns2_sns.c:137
static struct cmd_node ns_bind_node
Definition: gprs_ns2_vty.c:594
@ NS_CAUSE_INVAL_NR_IPv4_EP
Definition: gsm_08_16.h:96
const char * name
unique name
Definition: gprs_ns2_internal.h:233
static int update_remote_ip6_elem(struct ns2_sns_state *gss, const struct gprs_ns_ie_ip6_elem *ip6)
Definition: gprs_ns2_sns.c:521
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:1677
struct rate_ctr_group * ctrg
Definition: gprs_ns.h:143
static void ns2_sns_st_size_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns2_sns.c:726
uint16_t msgb_length(const struct msgb *msg)
uint16_t mtu
MTU of a NS PDU on this bind.
Definition: gprs_ns2_internal.h:251
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:603
static void llist_del(struct llist_head *entry)
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:464
An instance of the NS protocol stack.
Definition: gprs_ns.h:79
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:691
enum ns2_cs ns2_create_vc(struct gprs_ns2_vc_bind *bind, struct msgb *msg, 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:875
void install_lib_element_ve(struct cmd_element *cmd)
@ 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
Definition: gprs_ns_sns.c:27
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:1677
static void dump_vty(const struct gprs_ns2_vc_bind *bind, struct vty *vty, bool _stats)
Definition: gprs_ns2_udp.c:87
static void config_write_vbind(struct vty *vty, struct vty_bind *vbind)
Definition: gprs_ns2_vty.c:422
void osmo_stat_item_set(struct osmo_stat_item *item, int32_t value)
#define llist_first_entry(ptr, type, member)
@ NS_IE_MAX_NR_NSVC
Definition: gsm_08_16.h:74
@ NS_PDUT_ALIVE
Definition: gsm_08_16.h:51
@ NS_CAUSE_EQUIP_FAIL
Definition: gsm_08_16.h:86
@ GPRS_NS2_DIALECT_STATIC_ALIVE
Definition: gprs_ns2.h:37
const char * gprs_ns_ll_str(const struct gprs_nsvc *nsvc)
Definition: gprs_ns.c:1548
gprs_sns_event
Definition: gprs_ns2_sns.c:72
static uint16_t TVLV_GROSS_LEN(uint16_t len)
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:494
uint8_t data[0]
variable-length payload
Definition: gsm_08_16.h:19
struct msgb * ns2_msgb_alloc(void)
Allocate a message buffer for use with the NS2 stack.
Definition: gprs_ns2.c:670
void ns2_sns_update_weights(struct gprs_ns2_vc_bind *bind)
Definition: gprs_ns2_sns.c:1933
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:234
int log_set_context(uint8_t ctx_nr, void *value)
size_t num_max_ip4_remote
Definition: gprs_ns2_sns.c:152
bool accept_unitdata
Definition: gprs_ns2_vc_fsm.c:66
static int ns2_validate_reset_ack(struct gprs_ns2_vc *nsvc, struct msgb *msg, struct tlv_parsed *tp, uint8_t *cause)
Definition: gprs_ns2_message.c:60
int osmo_sock_init_ofd(struct osmo_fd *ofd, int family, int type, int proto, const char *host, uint16_t port, unsigned int flags)
struct osmo_fsm_inst * bss_sns_fi
Definition: gprs_ns2_internal.h:175
struct gprs_nsvc * gprs_nsvc_by_nsei(struct gprs_ns_inst *nsi, uint16_t nsei)
Lookup struct gprs_nsvc based on NSEI.
Definition: gprs_ns.c:254
static unsigned char * msgb_push(struct msgb *msgb, unsigned int len)
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:446
@ GPRS_SNS_EV_REQ_NO_NSVC
Definition: gprs_ns2_sns.c:82
int gprs_nsvc_reset(struct gprs_nsvc *nsvc, uint8_t cause)
Initiate a RESET procedure.
Definition: gprs_ns.c:2110
void install_node(struct cmd_node *node, int(*func)(struct vty *))
@ NS2_CS_REJECTED
Rejected and answered message.
Definition: gprs_ns2_internal.h:87
unsigned int num_ip6_remote
Definition: gprs_ns2_sns.c:161
static void rate_ctr_inc(struct rate_ctr *ctr)
@ 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
@ GPRS_NS2_PRIM_UNIT_DATA
Definition: gprs_ns2.h:53
const struct value_string vty_fr_role_names[]
Definition: gprs_ns2_vty.c:104
@ GPRS_NS2_ST_RECOVERING
Definition: gprs_ns2_vc_fsm.c:100
static int ns2_validate_block_ack(struct gprs_ns2_vc *nsvc, struct msgb *msg, struct tlv_parsed *tp, uint8_t *cause)
Definition: gprs_ns2_message.c:80
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:398
struct gprs_ns2_vc * gprs_ns2_nsvc_by_sockaddr_bind(struct gprs_ns2_vc_bind *bind, const struct osmo_sockaddr *saddr)
Find a NS-VC by its remote socket address.
Definition: gprs_ns2_udp.c:121
Section 10.3.2c List of IP4 Elements.
Definition: gsm_08_16.h:24
@ NS_PDUT_RESET
Definition: gsm_08_16.h:44
DEFUN_HIDDEN(show_ns, show_ns_cmd, "show ns", SHOW_STR SHOW_NS_STR)
Definition: gprs_ns2_vty.c:1781
static int config_write_ns(struct vty *vty)
Definition: gprs_ns2_vty.c:570
static void gprs_sns_st_config_bss_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns_sns.c:364
#define NS_TIMERS
Definition: gprs_ns.h:18
struct gprs_ns2_vc * sns_nsvc
Definition: gprs_ns2_sns.c:135
int gprs_ns_tx_sns_config(struct gprs_nsvc *nsvc, bool end_flag, const struct gprs_ns_ie_ip4_elem *ip4_elems, unsigned int num_ip4_elems)
Encode + Transmit a SNS-CONFIG as per Section 9.3.4.
Definition: gprs_ns.c:920
int gprs_ns2_sns_add_bind(struct gprs_ns2_nse *nse, struct gprs_ns2_vc_bind *bind)
Definition: gprs_ns2_sns.c:1867
@ NS_CAUSE_OM_INTERVENTION
Definition: gsm_08_16.h:85
gprs_ns_ll
Osmocom NS link layer types.
Definition: gprs_ns.h:53
Definition: gprs_ns2_fr.c:86
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:761
static int config_write_ns_nse(struct vty *vty)
Definition: gprs_ns2_vty.c:545
bool persistent
true if this NSE was created by VTY or pcu socket)
Definition: gprs_ns2_internal.h:160
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:580
@ GPRS_NS2_DIALECT_STATIC_RESETBLOCK
Definition: gprs_ns2.h:38
#define osmo_fsm_inst_dispatch(fi, event, data)
int ns2_vc_force_unconfigured(struct gprs_ns2_vc *nsvc)
Reset a NS-VC FSM.
Definition: gprs_ns2_vc_fsm.c:738
struct osmo_fr_network * osmo_fr_network_alloc(void *ctx)
Definition: frame_relay.c:898
uint8_t sns_sig_weight
the IP-SNS signalling weight when doing dynamic configuration
Definition: gprs_ns2_internal.h:267
Definition: gprs_ns2.h:109
uint16_t nsei
Identifiers of a BTS, equal to 'struct bssgp_bts_ctx'.
Definition: gprs_msgb.h:9
@ GPRS_SNS_ST_CONFIG_BSS
SNS-CONFIG procedure (BSS->SGSN) ongoing.
Definition: gprs_ns_sns.c:273
@ GPRS_SNS_ST_CONFIGURED
Definition: gprs_ns2_sns.c:69
@ NS_CTR_BYTES_OUT_DROP
Definition: gprs_ns2_internal.h:98
static int handle_nsip_read(struct osmo_fd *bfd)
Definition: gprs_ns2_udp.c:217
static void gprs_sns_st_configured(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns_sns.c:434
static int create_missing_nsvcs(struct osmo_fsm_inst *fi)
Definition: gprs_ns_sns.c:108
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:1482
uint8_t ip_sns_data_weight
Definition: gprs_ns2_vty.c:71
const char * name
Definition: gprs_ns2_internal.h:275
void msgb_free(struct msgb *m)
@ GPRS_NS2_EV_RX_ALIVE_ACK
Definition: gprs_ns2_vc_fsm.c:114
#define msgb_nsei(__x)
Definition: gprs_msgb.h:23
@ GPRS_NS2_ST_BLOCKED
Definition: gprs_ns2_vc_fsm.c:97
void vty_out_fsm_inst(struct vty *vty, struct osmo_fsm_inst *fsmi)
static void dump_nse(struct vty *vty, const struct gprs_nsvc *nsvc, bool stats, bool persistent_only)
Definition: gprs_ns_vty.c:170
@ GPRS_NS2_EV_RX_UNBLOCK
Definition: gprs_ns2_vc_fsm.c:109
uint16_t nsvci
end-to-end significance
Definition: gprs_ns.h:129
static struct gprs_ns2_inst * vty_nsi
Definition: gprs_ns2_vty.c:58
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:905
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:533
void osmo_fd_close(struct osmo_fd *fd)
struct llist_head binds
Definition: gprs_ns2_vty.c:80
static const char * gprs_ns2_cause_str(enum ns_cause val)
Obtain a human-readable string for NS primitives.
Definition: gprs_ns2.h:106
@ NS_TOUT_TNS_BLOCK_RETRIES
Definition: gprs_ns.h:35
Structure representing a single NS-VC.
Definition: gprs_ns2_internal.h:188
static int ns2_vc_fsm_timer_cb(struct osmo_fsm_inst *fi)
Definition: gprs_ns2_vc_fsm.c:492
@ NS_CAUSE_BVCI_UNKNOWN
Definition: gsm_08_16.h:89
unsigned int num_ip4_remote
Definition: gprs_ns_sns.c:42
struct gprs_ns2_nse * nse
pointer to NS Instance
Definition: gprs_ns2_internal.h:196
@ GPRS_NS2_EV_REQ_OM_UNBLOCK
Definition: gprs_ns2_vc_fsm.c:121
static struct vty_bind * vty_bind_by_name(const char *name)
Definition: gprs_ns2_vty.c:117
void ns2_sns_update_weights(struct gprs_ns2_vc_bind *bind)
Definition: gprs_ns2_sns.c:1933
static void ns2_sns_st_unconfigured(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_sns.c:697
struct timespec timer_started
Definition: gprs_ns2_vc_fsm.c:73
static int handle_nsfrgre_read(struct osmo_fd *bfd)
Definition: gprs_ns_frgre.c:249
@ GPRS_NS2_LL_UNDEF
undefined, used by vty
Definition: gprs_ns2.h:45
@ GPRS_SNS_EV_REQ_SELECT_ENDPOINT
Select a SNS endpoint from the list.
Definition: gprs_ns2_sns.c:73
#define NS_ALLOC_SIZE
Definition: gprs_ns.h:30
int gprs_ns_frgre_sendmsg(struct gprs_nsvc *nsvc, struct msgb *msg)
Definition: gprs_ns_frgre.c:282
bool reselection_running
Definition: gprs_ns2_sns.c:127
@ NS_CAUSE_UNKN_IP_ADDR
Definition: gsm_08_16.h:101
struct osmo_sockaddr saddr
Definition: gprs_ns2_sns.c:107
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:798
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:510
int gprs_ns_tx_sns_size(struct gprs_nsvc *nsvc, bool reset_flag, uint16_t max_nr_nsvc, uint16_t *ip4_ep_nr, uint16_t *ip6_ep_nr)
Encode + transmit a SNS-SIZE as per Section 9.3.7.
Definition: gprs_ns.c:1000
static void ns_sns_st_config_sgsn_ip4(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_sns.c:919
void osmo_timer_schedule(struct osmo_timer_list *timer, int seconds, int microseconds)
@ NS_CTR_PKTS_OUT_DROP
Definition: gprs_ns2_internal.h:95
static const char * osmo_fsm_inst_state_name(struct osmo_fsm_inst *fi)
uint8_t data_weight
signaling weight.
Definition: gprs_ns.h:162
void osmo_signal_dispatch(unsigned int subsys, unsigned int signal, void *signal_data)
static void stop_test_procedure(struct gprs_ns2_vc_priv *priv)
Definition: gprs_ns2_vc_fsm.c:163
struct gprs_ns2_vc_priv::@27 alive
@ GPRS_SNS_EV_SIZE_ACK
Definition: gprs_ns_sns.c:279
int ns2_vc_unblock(struct gprs_ns2_vc *nsvc)
Unblock a NS-VC.
Definition: gprs_ns2_vc_fsm.c:754
@ NS2_CS_FOUND
A NSVC object has been found.
Definition: gprs_ns2_internal.h:86
@ GPRS_NS2_EV_REQ_START
Definition: gprs_ns2_vc_fsm.c:104
size_t num_ip6_local
Definition: gprs_ns2_sns.c:147
size_t num_ip4_local
Definition: gprs_ns2_sns.c:143
static void ns2_st_reset_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns2_vc_fsm.c:264
Definition: gprs_ns2_sns.c:105
static void ns2_st_reset(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_vc_fsm.c:279
int dscp
Definition: gprs_ns.h:99
@ GPRS_SNS_EV_RX_SIZE_ACK
Definition: gprs_ns2_sns.c:75
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:1713
ns2_sns_type
Definition: gprs_ns2_sns.c:59
static void log_set_nsvc_filter(struct log_target *target, struct gprs_nsvc *nsvc)
Definition: gprs_ns_vty.c:67
bool initiator
Definition: gprs_ns2_vc_fsm.c:60
struct osmo_fsm_inst * fi
Definition: gprs_ns2_internal.h:227
@ NS_TOUT_TSNS_PROV
Definition: gprs_ns.h:41
static struct vty_bind * vty_bind_alloc(const char *name)
Definition: gprs_ns2_vty.c:127
static void vty_bind_free(struct vty_bind *vbind)
Definition: gprs_ns2_vty.c:145
struct vty_bind * vbind
Definition: gprs_ns2_vty.c:86
Structure representing a single NS-VC.
Definition: gprs_ns.h:122
Common header of GPRS NS.
Definition: gsm_08_16.h:17
static void gprs_sns_st_size_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns_sns.c:334
static void ns2_sns_st_configured_change(struct osmo_fsm_inst *fi, struct ns2_sns_state *gss, struct tlv_parsed *tp)
Definition: gprs_ns2_sns.c:1251
#define LOGNSE(nse, lvl, fmt, args ...)
Definition: gprs_ns2_internal.h:11
static const struct value_string gprs_sns_event_names[]
Definition: gprs_ns_sns.c:288
Structure repesenting a bind instance.
Definition: gprs_ns2_internal.h:231
static int create_missing_nsvcs(struct osmo_fsm_inst *fi)
Definition: gprs_ns2_sns.c:347
int ns2_tx_block_ack(struct gprs_ns2_vc *nsvc)
Transmit a NS-BLOCK-ACK on a given NS-VC.
Definition: gprs_ns2_message.c:243
static struct gprs_ns2_nse * nse_inst_from_fi(struct osmo_fsm_inst *fi)
Definition: gprs_ns2_sns.c:164
@ GPRS_SNS_EV_RX_SIZE
Definition: gprs_ns2_sns.c:74
int ns2_vc_force_unconfigured(struct gprs_ns2_vc *nsvc)
Reset a NS-VC FSM.
Definition: gprs_ns2_vc_fsm.c:738
@ NS_CTR_UNBLOCKED
Definition: gprs_ns2_internal.h:100
@ NS_IE_BVCI
Definition: gsm_08_16.h:69
struct gprs_ns_inst * nsi
Definition: gprs_ns_sns.c:28
void gprs_sns_dump_vty(struct vty *vty, const struct gprs_ns_inst *nsi, bool stats)
Definition: gprs_ns_sns.c:753
int transfer_capability
transfer capability in mbit
Definition: gprs_ns2_internal.h:248
static int vty_nse_add_vbind(struct vty_nse *vnse, struct vty_bind *vbind)
Definition: gprs_ns2_vty.c:186
static struct cmd_node ns_nse_node
Definition: gprs_ns2_vty.c:861
static int handle_nsfrgre_write(struct osmo_fd *bfd)
Definition: gprs_ns_frgre.c:276
@ GPRS_SNS_EV_DELETE
Definition: gprs_ns_sns.c:284
gprs_ns2_vc_event
Definition: gprs_ns2_vc_fsm.c:103
@ NS_IE_CAUSE
Definition: gsm_08_16.h:66
struct osmo_sockaddr remote
Definition: gprs_ns2_fr.c:120
static struct cmd_node ns_node
Definition: gprs_ns_vty.c:79
static int remove_remote_ip6_elem(struct ns2_sns_state *gss, const struct gprs_ns_ie_ip6_elem *ip6)
Definition: gprs_ns2_sns.c:505
@ GPRS_SNS_EV_CONFIG
Definition: gprs_ns_sns.c:280
bool osmo_identifier_valid(const char *str)
@ GPRS_NS2_ENDPOINT_REQUEST_CHANGE
Definition: gprs_ns2.h:99
enum ns2_sns_type ip
Definition: gprs_ns2_sns.c:118
@ SNS_PDUT_ADD
Definition: gsm_08_16.h:55
#define TLVP_PRESENT(x, y)
int gprs_ns_rx_sns(struct gprs_ns_inst *nsi, struct msgb *msg, struct tlv_parsed *tp)
Definition: gprs_ns_sns.c:686
static void ns2_vc_fsm_allstate_action(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_vc_fsm.c:579
void(* free_bind)(struct gprs_ns2_vc_bind *driver)
Definition: gprs_ns2_internal.h:277
@ NS_PDUT_RESET_ACK
Definition: gsm_08_16.h:45
@ GPRS_SNS_ST_SIZE
SNS-SIZE procedure ongoing.
Definition: gprs_ns_sns.c:272
@ NS_IE_IP_ADDR
Definition: gsm_08_16.h:78
struct gprs_ns2_nse * nse
Definition: gprs_ns2_sns.c:116
ns2_timeout
Definition: gprs_ns2_internal.h:54
struct llist_head list
Definition: gprs_ns2_vty.c:64
if(vty->type==VTY_SHELL_SERV)
struct gprs_nsvc * gprs_nsvc_by_rem_addr(struct gprs_ns_inst *nsi, const struct sockaddr_in *sin)
Lookup NS-VC based on specified remote peer socket addr.
Definition: gprs_ns.c:291
uint16_t flags
Definition: gprs_ns2_fr.c:87
static int nsvc_force_unconf_cb(struct gprs_ns2_vc *nsvc, void *ctx)
Definition: gprs_ns2_vty.c:1861
static void gprs_sns_st_config_bss(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns_sns.c:343
uint8_t sig_weight
Definition: gsm_08_16.h:35
#define ip4_weight_sum_data(x, y)
Definition: gprs_ns_sns.c:71
static const struct osmo_fsm_state gprs_sns_bss_states[]
Definition: gprs_ns_sns.c:557
#define log_tgt_mutex_lock()
Definition: frame_relay.h:53
@ NS_TOUT_TNS_TEST
Definition: gprs_ns.h:38
#define NSVCI_STR
Definition: gprs_ns2_vty.c:55
struct llist_head list
Definition: gprs_ns2_sns.c:106
struct gprs_ns2_inst * nsi
a pointer back to the nsi
Definition: gprs_ns2_internal.h:241
DEFUN(cfg_ns, cfg_ns_cmd, "ns", "Configure the GPRS Network Service")
Definition: gprs_ns_vty.c:162
int gprs_ns_tx_sns_ack(struct gprs_nsvc *nsvc, uint8_t trans_id, uint8_t *cause, const struct gprs_ns_ie_ip4_elem *ip4_elems, unsigned int num_ip4_elems)
Encode + Transmit a SNS-ACK as per Section 9.3.1.
Definition: gprs_ns.c:875
int osmo_timer_pending(struct osmo_timer_list *timer)
union osmo_sockaddr::@22 u
int ns2_tx_block(struct gprs_ns2_vc *nsvc, uint8_t cause)
Transmit a NS-BLOCK on a given NS-VC.
Definition: gprs_ns2_message.c:211
struct llist_head gprs_nsvcs
linked lists of all NSVC in this instance
Definition: gprs_ns.h:84
static int ip4_weight_sum(const struct gprs_ns_ie_ip4_elem *ip4, unsigned int num, bool data_weight)
Definition: gprs_ns2_sns.c:171
const struct value_string gprs_ns_pdu_strings[]
Definition: gprs_ns.c:398
@ NS_PDUT_BLOCK_ACK
Definition: gsm_08_16.h:47
static unsigned int msgb_l2len(const struct msgb *msgb)
static int ns_nse_nsvc_udp_cmds(struct vty *vty, const char *bind_name, const char *remote_char, uint16_t port, uint16_t sig_weight, uint16_t data_weight)
Definition: gprs_ns2_vty.c:1041
@ GPRS_SNS_EV_START
Definition: gprs_ns_sns.c:277
static void ns2_nsvc_create_ip6(struct osmo_fsm_inst *fi, struct gprs_ns2_nse *nse, const struct gprs_ns_ie_ip6_elem *ip6)
Definition: gprs_ns2_sns.c:333
static void ns2_sns_st_config_sgsn_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns2_sns.c:1021
void osmo_timer_setup(struct osmo_timer_list *timer, void(*cb)(void *data), void *data)
void * priv
driver private structure
Definition: gprs_ns2_internal.h:239
enum gprs_ns2_vc_mode ns2_dialect_to_vc_mode(enum gprs_ns2_dialect dialect)
Definition: gprs_ns2.c:1378
static void ns2_clear_ipv46_entries(struct ns2_sns_state *gss)
Definition: gprs_ns2_sns.c:282
@ GPRS_NS2_DIALECT_IPACCESS
Definition: gprs_ns2.h:39
#define TLVP_VAL_MINLEN(_tp, tag, min_len)
@ GPRS_NS2_DIALECT_SNS
Definition: gprs_ns2.h:40
#define osmo_fsm_inst_state_chg(fi, new_state, timeout_secs, T)
static void gprs_sns_st_config_sgsn(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns_sns.c:371
@ GPRS_NS2_AFF_CAUSE_VC_RECOVERY
Definition: gprs_ns2.h:80
uint16_t udp_port
Definition: gsm_08_16.h:26
gprs_sns_bss_state
Definition: gprs_ns2_sns.c:64
static void ns2_st_unblocked_on_enter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns2_vc_fsm.c:380
static const struct osmo_fsm_state ns2_sns_bss_states[]
Definition: gprs_ns2_sns.c:1326
struct gprs_nsvc * gprs_nsvc_create2(struct gprs_ns_inst *nsi, uint16_t nsvci, uint8_t sig_weight, uint8_t data_weight)
Create a new NS-VC (Virtual Circuit) within given instance.
Definition: gprs_ns.c:311
uint32_t ip_addr
Definition: gsm_08_16.h:2
static struct osmo_fr_network * vty_fr_network
Definition: gprs_ns2_vty.c:59
bool alive
Definition: gprs_ns2_sns.c:139
@ GPRS_NS2_AFF_CAUSE_SNS_NO_ENDPOINTS
Definition: gprs_ns2.h:86
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:1311
size_t num_max_ip4_remote
Definition: gprs_ns_sns.c:38
struct gprs_ns2_vc_driver * driver
Definition: gprs_ns2_internal.h:242
static struct gprs_ns_inst * ns_inst_from_fi(struct osmo_fsm_inst *fi)
Definition: gprs_ns_sns.c:50
int gprs_sns_bss_fsm_start(struct gprs_ns_inst *nsi)
Definition: gprs_ns_sns.c:680
static void ns2_sns_st_config_bss_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns2_sns.c:884
int osmo_sock_local_ip(char *local_ip, const char *remote_ip)
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:356
static unsigned int llist_count(const struct llist_head *head)
@ NS_PDUT_UNITDATA
Definition: gsm_08_16.h:43
osmo_fr_role
Definition: frame_relay.h:37
int osmo_sockaddr_str_from_str(struct osmo_sockaddr_str *sockaddr_str, const char *ip, uint16_t port)
static void vty_dump_sns_ip6(struct vty *vty, const char *prefix, const struct gprs_ns_ie_ip6_elem *ip6)
Definition: gprs_ns2_sns.c:1624
@ NS_TOUT_TSNS_SIZE_RETRIES
Definition: gprs_ns2_internal.h:63
@ NS_IE_RESET_FLAG
Definition: gsm_08_16.h:77
static int do_sns_delete(struct osmo_fsm_inst *fi, const struct gprs_ns_ie_ip4_elem *ip4, const struct gprs_ns_ie_ip6_elem *ip6)
Definition: gprs_ns2_sns.c:595
enum gprs_ns2_ll ll
which link-layer are we based on?
Definition: gprs_ns2_internal.h:254
#define S(x)
Definition: gprs_ns2_sns.c:57
static int update_remote_ip4_elem(struct ns2_sns_state *gss, const struct gprs_ns_ie_ip4_elem *ip4)
Definition: gprs_ns2_sns.c:475
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:492
static int config_write_ns(struct vty *vty)
Definition: gprs_ns_vty.c:85
#define llist_for_each_entry(pos, head, member)
#define ip6_weight_sum_sig(x, y)
Definition: gprs_ns2_sns.c:204
static struct msgb * read_nsfrgre_msg(struct osmo_fd *bfd, int *error, struct sockaddr_in *saddr)
Definition: gprs_ns_frgre.c:147
struct osmo_fsm_inst * ns2_vc_fsm_alloc(struct gprs_ns2_vc *nsvc, const char *id, bool initiator)
gprs_ns2_vc_fsm_alloc
Definition: gprs_ns2_vc_fsm.c:704
static void free_vc(struct gprs_ns2_vc *nsvc)
Definition: gprs_ns2_udp.c:74
static int add_remote_ip4_elem(struct ns2_sns_state *gss, const struct gprs_ns_ie_ip4_elem *ip4)
Definition: gprs_ns2_sns.c:435
static struct osmo_fsm gprs_sns_bss_fsm
Definition: gprs_ns_sns.c:617
#define SHOW_NS_STR
Definition: gprs_ns2_vty.c:54
void gprs_ns2_free_nsvc(struct gprs_ns2_vc *nsvc)
Destroy/release given NS-VC.
Definition: gprs_ns2.c:627
uint16_t bvci
Definition: gprs_msgb.h:10
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:135
@ NS_TOUT_TNS_BLOCK
Definition: gprs_ns.h:34
static void ns2_st_alive_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns2_vc_fsm.c:420
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:310
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:301
#define ip4_weight_sum_sig(x, y)
Definition: gprs_ns_sns.c:72
int gprs_ns_rcvmsg(struct gprs_ns_inst *nsi, struct msgb *msg, struct sockaddr_in *saddr, enum gprs_ns_ll ll)
Receive incoming NS message from underlying transport layer.
Definition: gprs_ns.c:1496
@ GPRS_NS2_EV_RX_RESET
Definition: gprs_ns2_vc_fsm.c:107
static void llist_add(struct llist_head *_new, struct llist_head *head)
int gprs_ns2_sns_add_bind(struct gprs_ns2_nse *nse, struct gprs_ns2_vc_bind *bind)
Definition: gprs_ns2_sns.c:1867
int ns2_vc_block(struct gprs_ns2_vc *nsvc)
Block a NS-VC.
Definition: gprs_ns2_vc_fsm.c:746
@ SNS_PDUT_CONFIG
Definition: gsm_08_16.h:57
@ GPRS_SNS_EV_REQ_NSVC_ALIVE
a NS-VC became alive
Definition: gprs_ns2_sns.c:83
@ FR_ROLE_NETWORK_EQUIPMENT
Definition: frame_relay.h:39
@ NS_IE_IPv4_EP_NR
Definition: gsm_08_16.h:75
@ GPRS_SNS_ST_SIZE
SNS-SIZE procedure ongoing.
Definition: gprs_ns2_sns.c:66
static void dump_bind(struct vty *vty, const struct gprs_ns2_vc_bind *bind, bool stats)
Definition: gprs_ns2_vty.c:1750
static struct vty_nse * vty_nse_by_nsei(uint16_t nsei)
Definition: gprs_ns2_vty.c:154
struct gprs_nsvc::@16::@18 ip
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:310
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:510
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:920
@ GPRS_NS2_EV_RX_RESET_ACK
Definition: gprs_ns2_vc_fsm.c:108
int ns2_tx_block(struct gprs_ns2_vc *nsvc, uint8_t cause)
Transmit a NS-BLOCK on a given NS-VC.
Definition: gprs_ns2_message.c:211
void gprs_ns2_free_nsvcs(struct gprs_ns2_nse *nse)
Destroy/release all NS-VC of given NSE.
Definition: gprs_ns2.c:657
void gprs_start_alive_all_nsvcs(struct gprs_ns_inst *nsi)
Definition: gprs_ns.c:2246
static void free_bind(struct gprs_ns2_vc_bind *bind)
clean up all private driver state.
Definition: gprs_ns2_udp.c:59
uint16_t timeout[NS_TIMERS_COUNT]
Definition: gprs_ns.h:90
int gprs_ns_vty_init(struct gprs_ns_inst *nsi)
Definition: gprs_ns_vty.c:635
static int add_remote_ip4_elem(struct gprs_sns_state *gss, const struct gprs_ns_ie_ip4_elem *ip4)
Definition: gprs_ns_sns.c:137
static void dump_ns(struct vty *vty, const struct gprs_ns_inst *nsi, bool stats, bool persistent_only)
Definition: gprs_ns_vty.c:200
const char * gprs_ns_cause_str(enum ns_cause cause)
Obtain a human-readable string for NS cause value.
Definition: gprs_ns.c:446
int ns2_tx_alive(struct gprs_ns2_vc *nsvc)
Transmit a NS-ALIVE on a given NS-VC.
Definition: gprs_ns2_message.c:371
static int do_sns_add(struct osmo_fsm_inst *fi, const struct gprs_ns_ie_ip4_elem *ip4, const struct gprs_ns_ie_ip6_elem *ip6)
Definition: gprs_ns2_sns.c:638
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:1121
static void llist_add_tail(struct llist_head *_new, struct llist_head *head)
static void ns2_sns_st_all_action(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_sns.c:1416
static __attribute__((constructor))
Definition: gprs_ns2_vc_fsm.c:857
uint8_t ip_sns_sig_weight
Definition: gprs_ns2_vty.c:70
@ SNS_PDUT_ACK
Definition: gsm_08_16.h:54
bool alive
true if this NSE has at least one alive VC
Definition: gprs_ns2_internal.h:167
@ GPRS_NS2_LL_UDP
NS/UDP/IP.
Definition: gprs_ns2.h:46
uint8_t data_weight
Definition: gsm_08_16.h:28
uint8_t sig_weight
signalling weight.
Definition: gprs_ns2_internal.h:208
struct gprs_ns_ie_ip4_elem * ip4_remote
Definition: gprs_ns_sns.c:41
int ns2_tx_unblock(struct gprs_ns2_vc *nsvc)
Transmit a NS-UNBLOCK on a given NS-VC.
Definition: gprs_ns2_message.c:340
@ NS_IE_TRANS_ID
Definition: gsm_08_16.h:79
#define ip4_weight_sum_sig(x, y)
Definition: gprs_ns2_sns.c:186
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:1639
@ NS_TOUT_TNS_RESET_RETRIES
Definition: gprs_ns.h:37
@ NS_PDUT_UNBLOCK
Definition: gsm_08_16.h:48
uint16_t nsvci
uniquely identifies NS-VC if VC contains nsvci
Definition: gprs_ns2_internal.h:205
@ GPRS_NS2_EV_REQ_FORCE_UNCONFIGURED
Definition: gprs_ns2_vc_fsm.c:119
void gprs_ns2_free_bind(struct gprs_ns2_vc_bind *bind)
Destroy a given bind.
Definition: gprs_ns2.c:1326
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:246
bool initiate_block
Definition: gprs_ns2_vc_fsm.c:61
Definition: gprs_ns2_internal.h:274
void osmo_timer_del(struct osmo_timer_list *timer)
static struct gprs_nsvc * gprs_nsvc_create_ip4(struct gprs_ns_inst *nsi, const struct gprs_ns_ie_ip4_elem *ip4)
Definition: gprs_ns_sns.c:84
int osmo_fsm_register(struct osmo_fsm *fsm)
static uint8_t * msgb_tvlv_put(struct msgb *msg, uint8_t tag, uint16_t len, const uint8_t *val)
Definition: gprs_ns2_sns.c:115
@ GPRS_NS2_EV_RX_BLOCK_ACK
Definition: gprs_ns2_vc_fsm.c:112
int osmo_sockaddr_str_from_sockaddr(struct osmo_sockaddr_str *sockaddr_str, const struct sockaddr_storage *src)
#define llist_entry(ptr, type, member)
Definition: gprs_ns2_sns.c:110
uint32_t remote_state
Definition: gprs_ns.h:132
enum gprs_ns2_dialect dialect
which dialect does this NSE speaks?
Definition: gprs_ns2_internal.h:173
struct sockaddr_storage sas
@ NS_PDUT_STATUS
Definition: gsm_08_16.h:50
struct osmo_stat_item_group * statg
Definition: gprs_ns.h:144
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:432
@ NS_IE_IPv6_LIST
Definition: gsm_08_16.h:73
#define GRE_PTYPE_KAR
Definition: gprs_ns_frgre.c:47
@ GPRS_NS_LL_UDP
NS/UDP/IP.
Definition: gprs_ns.h:54
#define LOGPFSML(fi, level, fmt, args...)
void install_lib_element(int ntype, struct cmd_element *cmd)
enum gprs_ns2_ll ll
Definition: gprs_ns2_vty.c:66
@ GPRS_NS2_ST_UNCONFIGURED
Definition: gprs_ns2_vc_fsm.c:95
Section 10.3.2d List of IP6 Elements.
Definition: gsm_08_16.h:32
struct gprs_nsvc * nsvc_hack
Definition: gprs_ns_sns.c:29
size_t num_ip4_local
Definition: gprs_ns_sns.c:33
static struct osmo_fsm gprs_ns2_sns_bss_fsm
Definition: gprs_ns2_sns.c:1506
@ NS_CTR_BYTES_OUT
Definition: gprs_ns.c:132
static int nsfrgre_fd_cb(struct osmo_fd *bfd, unsigned int what)
Definition: gprs_ns_frgre.c:314
@ GPRS_SNS_EV_RX_CONFIG
Definition: gprs_ns2_sns.c:76
int gprs_ns2_sns_count(struct gprs_ns2_nse *nse)
gprs_ns2_sns_count
Definition: gprs_ns2_sns.c:1806
static int update_remote_ip4_elem(struct gprs_sns_state *gss, const struct gprs_ns_ie_ip4_elem *ip4)
Definition: gprs_ns_sns.c:166
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:1639
#define ip6_weight_sum_data(x, y)
Definition: gprs_ns2_sns.c:203
#define NS_TIMERS_HELP
Definition: gprs_ns.h:19
struct gprs_ns_ie_ip4_elem * ip4_local
Definition: gprs_ns_sns.c:32
@ NS_CAUSE_UNKN_IP_EP
Definition: gsm_08_16.h:100
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:1557
@ NS_CTR_LOST_RESET
Definition: gprs_ns.c:140
@ GPRS_SNS_EV_RX_CONFIG_ACK
Definition: gprs_ns2_sns.c:78
static const struct value_string gprs_ns_timer_strs[]
Definition: gprs_ns_vty.c:55
struct llist_head list
Definition: gprs_ns2_sns.c:111
#define S(x)
Definition: gprs_ns2_vc_fsm.c:50
#define GRE_PTYPE_FR
Definition: gprs_ns_frgre.c:45
#define LOGBIND(bind, lvl, fmt, args ...)
Definition: gprs_ns2_internal.h:14
static int remove_remote_ip4_elem(struct ns2_sns_state *gss, const struct gprs_ns_ie_ip4_elem *ip4)
Definition: gprs_ns2_sns.c:459
#define log_tgt_mutex_unlock()
#define IPPROTO_GRE
Definition: gprs_ns_frgre.c:50
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:1041
struct llist_head nsvc
list of all VC
Definition: gprs_ns2_internal.h:237
uint8_t data_weight
data weight.
Definition: gprs_ns2_internal.h:214
void gprs_nsvc_start_test(struct gprs_nsvc *nsvc)
Start the ALIVE timer procedure in all NS-VCs part of this NS Instance.
Definition: gprs_ns.c:2236
@ IPv4
Definition: gprs_ns2_sns.c:60
static struct vty_nse * vty_nse_alloc(uint16_t nsei)
Definition: gprs_ns2_vty.c:164
unsigned int remote_end_is_sgsn
Definition: gprs_ns.h:139
struct osmo_timer_list timer
Definition: gprs_ns2_vc_fsm.c:70
@ GPRS_NS2_EV_RX_ALIVE
Definition: gprs_ns2_vc_fsm.c:113
Definition: gprs_ns.h:245
#define LOGP(ss, level, fmt, args...)
int N
Definition: gprs_ns2_vc_fsm.c:57
@ SNS_PDUT_CONFIG_ACK
Definition: gsm_08_16.h:58
@ NS_CAUSE_UNKN_IP_TEST_FAILED
Definition: gsm_08_16.h:102
static void ns2_sns_st_size(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_sns.c:702
static void vty_dump_sns_ip4(struct vty *vty, const struct gprs_ns_ie_ip4_elem *ip4)
Definition: gprs_ns_sns.c:746
struct msgb * msgb_alloc(uint16_t size, const char *name)
static int llist_empty(const struct llist_head *head)
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:936
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
struct gprs_ns2_vc * gprs_ns2_nsvc_by_sockaddr_bind(struct gprs_ns2_vc_bind *bind, const struct osmo_sockaddr *saddr)
Find a NS-VC by its remote socket address.
Definition: gprs_ns2_udp.c:121
#define S(x)
Definition: gprs_ns_sns.c:25
static struct llist_head nses
Definition: gprs_ns2_vty.c:61
@ NS_CAUSE_NSVC_UNKNOWN
Definition: gsm_08_16.h:88
@ NS_CAUSE_SEM_INCORR_PDU
Definition: gsm_08_16.h:90
@ GPRS_NS2_EV_RX_STATUS
Definition: gprs_ns2_vc_fsm.c:115
int ns2_vc_is_unblocked(struct gprs_ns2_vc *nsvc)
is the given NS-VC unblocked?
Definition: gprs_ns2_vc_fsm.c:851
struct gprs_nsvc * unknown_nsvc
a NSVC object that's needed to deal with packets for unknown NSVC
Definition: gprs_ns.h:88
@ GPRS_SNS_EV_CONFIG_END
SNS-CONFIG with end flag received.
Definition: gprs_ns_sns.c:281
static void ns2_st_unblocked(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_vc_fsm.c:394
gprs_ns2_vc_mode
Definition: gprs_ns2.h:25
static void ns2_sns_st_configured_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns2_sns.c:1320
bool accept_ipaccess
Definition: gprs_ns2_vty.c:68
bool om_blocked
Definition: gprs_ns2_vc_fsm.c:64
uint32_t state
uniquely identifies NS-VC at SGSN
Definition: gprs_ns.h:131
static void gprs_sns_st_configured_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns_sns.c:551
int osmo_sockaddr_local_ip(struct osmo_sockaddr *local_ip, const struct osmo_sockaddr *remote_ip)
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:646
const char * name
Definition: gprs_ns2_vty.c:65
@ GPRS_SNS_EV_SIZE
Definition: gprs_ns_sns.c:278
struct osmo_stat_item * items[0]
uint32_t local_ip
Definition: gprs_ns.h:95
struct gprs_ns2_vc_bind * bind
Definition: gprs_ns2_sns.c:112
uint8_t sig_weight
signalling weight.
Definition: gprs_ns.h:160
@ NS_CAUSE_NSVC_BLOCKED
Definition: gsm_08_16.h:87
struct osmo_fsm_inst * gprs_sns_bss_fsm_alloc(void *ctx, struct gprs_nsvc *nsvc, const char *id)
Definition: gprs_ns_sns.c:630
@ GPRS_SNS_EV_RX_DELETE
Definition: gprs_ns2_sns.c:80
@ SNS_PDUT_DELETE
Definition: gsm_08_16.h:59
@ NS2_CS_SKIPPED
Skipped message.
Definition: gprs_ns2_internal.h:88
static int do_sns_change_weight(struct osmo_fsm_inst *fi, const struct gprs_ns_ie_ip4_elem *ip4)
Definition: gprs_ns_sns.c:182
static int ns2_sns_fsm_bss_timer_cb(struct osmo_fsm_inst *fi)
Definition: gprs_ns2_sns.c:1376
bool nsvci_is_valid
Definition: gprs_ns2_internal.h:219
Definition: gprs_ns2_fr.c:99
bool persistent
true if this NS was created by VTY or pcu socket)
Definition: gprs_ns2_internal.h:202
unsigned int enabled
Definition: gprs_ns.h:107
int gprs_ns_tx_sns_config_ack(struct gprs_nsvc *nsvc, uint8_t *cause)
Encode + Transmit a SNS-CONFIG-ACK as per Section 9.3.5.
Definition: gprs_ns.c:961
static void ns_sns_st_config_sgsn_ip6(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_sns.c:970
#define ENCAPS_STR
Definition: gprs_ns_vty.c:471
uint8_t sig_weight
Definition: gsm_08_16.h:27
@ NS_PDUT_UNBLOCK_ACK
Definition: gsm_08_16.h:49
uint32_t ip_addr
Definition: gsm_08_16.h:25
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:305
@ GPRS_SNS_ST_CONFIG_BSS
SNS-CONFIG procedure (BSS->SGSN) ongoing.
Definition: gprs_ns2_sns.c:67
static struct priv_vc * ns2_driver_alloc_vc(struct gprs_ns2_vc_bind *bind, struct gprs_ns2_vc *nsvc, struct osmo_sockaddr *remote)
Definition: gprs_ns2_udp.c:205
int gprs_ns2_is_ip_bind(struct gprs_ns2_vc_bind *bind)
Is the given bind an IP bind?
Definition: gprs_ns2_udp.c:504
@ NS_CTR_PKTS_OUT
Definition: gprs_ns.c:130
struct gre_hdr __attribute__((packed))
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:1527
DEFUN(cfg_ns, cfg_ns_cmd, "ns", "Configure the GPRS Network Service")
Definition: gprs_ns2_vty.c:248
bool sns_only
Definition: gprs_ns2_internal.h:220
struct osmo_sockaddr addr
Definition: gprs_ns2_frgre.c:112
struct osmo_fd fd
Definition: gprs_ns2_frgre.c:111
void ns2_sns_notify_alive(struct gprs_ns2_nse *nse, struct gprs_ns2_vc *nsvc, bool alive)
Definition: gprs_ns2_sns.c:1827
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:494
@ GPRS_NS2_AFF_CAUSE_SNS_FAILURE
Definition: gprs_ns2.h:85
struct gprs_ns2_vc_bind * bind
pointer to NS VL bind.
Definition: gprs_ns2_internal.h:199
size_t num_max_ip6_remote
Definition: gprs_ns2_sns.c:153
@ NS_IE_IPv6_EP_NR
Definition: gsm_08_16.h:76
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:1753
@ SNS_PDUT_SIZE_ACK
Definition: gsm_08_16.h:61
int osmo_sockaddr_str_to_sockaddr(const struct osmo_sockaddr_str *sockaddr_str, struct sockaddr_storage *dst)
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:745
static int ns2_validate_block(struct gprs_ns2_vc *nsvc, struct msgb *msg, struct tlv_parsed *tp, uint8_t *cause)
Definition: gprs_ns2_message.c:70
int dscp
Definition: gprs_ns2_vty.c:67
static int alive_timer_elapsed_ms(struct gprs_ns2_vc_priv *priv)
Definition: gprs_ns2_vc_fsm.c:168
int ns2_vc_fsm_start(struct gprs_ns2_vc *nsvc)
Start a NS-VC FSM.
Definition: gprs_ns2_vc_fsm.c:727
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:386
static int do_sns_change_weight(struct osmo_fsm_inst *fi, const struct gprs_ns_ie_ip4_elem *ip4, const struct gprs_ns_ie_ip6_elem *ip6)
Definition: gprs_ns2_sns.c:536
uint16_t nsei
Definition: gprs_ns.h:128
int ns2_vc_is_unblocked(struct gprs_ns2_vc *nsvc)
is the given NS-VC unblocked?
Definition: gprs_ns2_vc_fsm.c:851
size_t num_max_nsvcs
Definition: gprs_ns_sns.c:37
enum gprs_ns2_vc_mode mode
Definition: gprs_ns2_internal.h:225
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:383
int ns2_tx_status(struct gprs_ns2_vc *nsvc, uint8_t cause, uint16_t bvci, struct msgb *orig_msg)
Transmit a NS-STATUS on a given NS-VC.
Definition: gprs_ns2_message.c:429
#define timespecsub(a, b, result)
@ GPRS_NS2_ST_UNBLOCKED
Definition: gprs_ns2_vc_fsm.c:98
static void vty_nse_free(struct vty_nse *vnse)
Definition: gprs_ns2_vty.c:176
static void recv_test_procedure(struct osmo_fsm_inst *fi)
Definition: gprs_ns2_vc_fsm.c:179
static int do_sns_add(struct osmo_fsm_inst *fi, const struct gprs_ns_ie_ip4_elem *ip4)
Definition: gprs_ns_sns.c:230
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:1140
struct llist_head binds
Definition: gprs_ns2_sns.c:123
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:446
@ GPRS_NS_LL_FR_GRE
NS/FR/GRE/IP.
Definition: gprs_ns.h:56
void(* free_vc)(struct gprs_ns2_vc *nsvc)
free the vc priv data
Definition: gprs_ns2_internal.h:260
struct llist_head binding
linked lists of all NSVC binds (e.g.
Definition: gprs_ns2_internal.h:127
@ GPRS_NS2_DIALECT_UNDEF
Definition: gprs_ns2.h:36
#define CMD_ERR_INCOMPLETE
static int ns2_tx_simple(struct gprs_ns2_vc *nsvc, uint8_t pdu_type)
Definition: gprs_ns2_message.c:188
@ NS_STAT_ALIVE_DELAY
Definition: gprs_ns.c:167
static void gprs_sns_st_size(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns_sns.c:313
int gprs_ns2_sns_del_bind(struct gprs_ns2_nse *nse, struct gprs_ns2_vc_bind *bind)
Definition: gprs_ns2_sns.c:1898
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
static const struct osmo_fsm_state ns2_vc_states[]
Definition: gprs_ns2_vc_fsm.c:440
struct osmo_timer_list timer
vty_out(vty, "!%s", VTY_NEWLINE)
const char * osmo_sock_get_name2(int fd)
uint16_t nsei
Definition: gprs_ns2_internal.h:145
@ NS_CAUSE_PDU_INCOMP_PSTATE
Definition: gsm_08_16.h:91
@ NS_IE_IPv4_LIST
Definition: gsm_08_16.h:72
@ S_SNS_CONFIGURED
Definition: gprs_ns.h:239
struct gprs_nsvc * gprs_nsvc_by_nsvci(struct gprs_ns_inst *nsi, uint16_t nsvci)
Lookup struct gprs_nsvc based on NSVCI.
Definition: gprs_ns.c:239
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:1527
static uint8_t * msgb_tv_put(struct msgb *msg, uint8_t tag, uint8_t val)
@ SNS_PDUT_SIZE
Definition: gsm_08_16.h:60
uint16_t timeout[NS_TIMERS_COUNT]
Definition: gprs_ns2_internal.h:132
static int ip4_weight_sum(const struct gprs_ns_ie_ip4_elem *ip4, unsigned int num, bool data_weight)
Definition: gprs_ns_sns.c:57
int ns2_vc_block(struct gprs_ns2_vc *nsvc)
Block a NS-VC.
Definition: gprs_ns2_vc_fsm.c:746
struct sns_endpoint * initial
Definition: gprs_ns2_sns.c:133
@ NS_CAUSE_INVAL_ESSENT_IE
Definition: gsm_08_16.h:93
struct osmo_fd fd
Definition: gprs_ns.h:94
@ GPRS_SNS_EV_ADD
Definition: gprs_ns_sns.c:283
static void start_test_procedure(struct gprs_ns2_vc_priv *priv)
Definition: gprs_ns2_vc_fsm.c:148
static int gprs_sns_fsm_bss_timer_cb(struct osmo_fsm_inst *fi)
Definition: gprs_ns_sns.c:602
static int ip6_weight_sum(const struct gprs_ns_ie_ip6_elem *ip6, unsigned int num, bool data_weight)
Definition: gprs_ns2_sns.c:189
void vty_out_stat_item_group(struct vty *vty, const char *prefix, struct osmo_stat_item_group *statg)
static struct gprs_ns2_vc * nsvc_by_ip6_elem(struct gprs_ns2_nse *nse, const struct gprs_ns_ie_ip6_elem *ip6)
Definition: gprs_ns2_sns.c:218
static bool vty_nse_check_sns(struct gprs_ns2_nse *nse)
Definition: gprs_ns2_vty.c:224
@ GPRS_SNS_EV_REQ_DELETE_BIND
Definition: gprs_ns2_sns.c:85