libosmogb  1.7.0
Osmocom Gb library
bssgp_bvc_fsm.h File Reference
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  bssgp_bvc_fsm_ops
 

Enumerations

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
}
 

Functions

struct osmo_fsm_instbssgp_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_instbssgp_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_instbssgp_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_instbssgp_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...
 

Enumeration Type Documentation

◆ 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 

Function Documentation

◆ bssgp_bvc_fsm_alloc_ptp_bss()

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

Parameters
[in]ctxtalloc context from which to allocate
[in]nsiNS Instance on which this BVC operates
[in]nseiNS Entity Identifier on which this BVC operates
[in]bvciBVCI of this FSM
[in]ra_idRouting Area Identity of the cell (reported to SGSN)
[in]cell_idCell 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()

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

Parameters
[in]ctxtalloc context from which to allocate
[in]nsiNS Instance on which this BVC operates
[in]nseiNS Entity Identifier on which this BVC operates
[in]bvciBVCI 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()

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

Parameters
[in]ctxtalloc context from which to allocate
[in]nsiNS Instance on which this BVC operates
[in]nseiNS Entity Identifier on which this BVC operates
[in]featuresFeature [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()

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

Parameters
[in]ctxtalloc context from which to allocate
[in]nsiNS Instance on which this BVC operates
[in]nseiNS Entity Identifier on which this BVC operates
[in]featuresFeature [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)

Determine the cause value why given BVC FSM is blocked.

References bvc_fsm_priv::block_cause, bssgp_bvc_fsm, osmo_fsm_inst::fsm, OSMO_ASSERT, and osmo_fsm_inst::priv.

◆ bssgp_bvc_fsm_get_features_advertised()

uint32_t bssgp_bvc_fsm_get_features_advertised ( struct osmo_fsm_inst fi)

Return the advertised features / extended features.

References bvc_fsm_priv::advertised, bssgp_bvc_fsm, bvc_fsm_priv::features, osmo_fsm_inst::fsm, OSMO_ASSERT, and osmo_fsm_inst::priv.

◆ bssgp_bvc_fsm_get_features_negotiated()

uint32_t bssgp_bvc_fsm_get_features_negotiated ( struct osmo_fsm_inst fi)

Return the negotiated features / extended features.

References bssgp_bvc_fsm, bvc_fsm_priv::features, osmo_fsm_inst::fsm, bvc_fsm_priv::negotiated, OSMO_ASSERT, and osmo_fsm_inst::priv.

◆ bssgp_bvc_fsm_get_features_received()

uint32_t bssgp_bvc_fsm_get_features_received ( struct osmo_fsm_inst fi)

Return the received features / extended features.

References bssgp_bvc_fsm, bvc_fsm_priv::features, osmo_fsm_inst::fsm, OSMO_ASSERT, osmo_fsm_inst::priv, and bvc_fsm_priv::received.

◆ bssgp_bvc_fsm_get_max_pdu_len()

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.

9.2.10)

References bssgp_bvc_fsm, osmo_fsm_inst::fsm, bvc_fsm_priv::max_pdu_len, OSMO_ASSERT, and osmo_fsm_inst::priv.

◆ bssgp_bvc_fsm_is_unblocked()

bool bssgp_bvc_fsm_is_unblocked ( struct osmo_fsm_inst fi)

Return if the given BVC FSM is in UNBLOCKED state.

References BSSGP_BVCFSM_S_UNBLOCKED, and osmo_fsm_inst::state.

◆ 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 
)

Set 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. 9.2.10)

References bssgp_bvc_fsm, osmo_fsm_inst::fsm, bvc_fsm_priv::max_pdu_len, OSMO_ASSERT, and osmo_fsm_inst::priv.

◆ bssgp_bvc_fsm_set_ops()

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.

Parameters
[in]fiFSM instance for which the data shall be set
[in]opsBSSGP BVC FSM operations (call-back functions) to register
[in]ops_privopaque/private data pointer passed through to call-backs

References bssgp_bvc_fsm, osmo_fsm_inst::fsm, bvc_fsm_priv::ops, bvc_fsm_priv::ops_priv, OSMO_ASSERT, and osmo_fsm_inst::priv.

NS_DESC_A
#define NS_DESC_A(st)
Definition: gprs_ns.h:49
ns2_sns_copy_local_endpoints
static int ns2_sns_copy_local_endpoints(struct ns2_sns_state *gss)
Definition: gprs_ns2_sns.c:854
stats.h
OSMO_FSM_TERM_ERROR
OSMO_FSM_TERM_ERROR
data_weight
uint8_t data_weight
Definition: gsm_08_16.h:3
GPRS_NS2_EV_REQ_OM_BLOCK
@ GPRS_NS2_EV_REQ_OM_BLOCK
Definition: gprs_ns2_vc_fsm.c:119
ns2_vc_unblock
int ns2_vc_unblock(struct gprs_ns2_vc *nsvc)
Unblock a NS-VC.
Definition: gprs_ns2_vc_fsm.c:846
sig_weight
uint8_t sig_weight
Definition: gsm_08_16.h:2
ns2_vc_fsm
static struct osmo_fsm ns2_vc_fsm
Definition: gprs_ns2_vc_fsm.c:763
ns2_sns_st_configured_add
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:1201
version
uint8_t version
vty::index
void * index
gprs_ns2_vc_priv
Definition: gprs_ns2_vc_fsm.c:52
gprs_ns2_ip_bind_by_sockaddr
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:287
osmo_fr_network::links
struct llist_head links
Definition: frame_relay.h:55
config_write_ns_bind
static int config_write_ns_bind(struct vty *vty)
Definition: gprs_ns2_vty.c:574
NS2_SNS_EV_REQ_SELECT_ENDPOINT
@ NS2_SNS_EV_REQ_SELECT_ENDPOINT
Select a SNS endpoint from the list.
Definition: gprs_ns2_internal.h:332
gprs_ns2_vc_priv::mode
enum ns2_timeout mode
Definition: gprs_ns2_vc_fsm.c:69
gprs_ns_timer_strs
static const struct value_string gprs_ns_timer_strs[]
Definition: gprs_ns2_vty.c:93
osmo_timer_list
FR_ROLE_USER_EQUIPMENT
@ FR_ROLE_USER_EQUIPMENT
Definition: frame_relay.h:39
NS_CAUSE_INVAL_WEIGH
@ NS_CAUSE_INVAL_WEIGH
Definition: gsm_08_16.h:99
gprs_ns_tx_unblock
int gprs_ns_tx_unblock(struct gprs_nsvc *nsvc)
Transmit a NS-UNBLOCK on a given NS-VC.
Definition: gprs_ns.c:692
ns2_sns_state::local
struct ns2_sns_elems local
Definition: gprs_ns2_sns.c:169
_config_write_ns_nse
static void _config_write_ns_nse(struct vty *vty, struct gprs_ns2_nse *nse)
Definition: gprs_ns2_vty.c:535
ip6_weight_sum
static int ip6_weight_sum(const struct ns2_sns_elems *elems, bool data_weight)
Definition: gprs_ns2_sns.c:233
SNS_PROC_ADD
@ SNS_PROC_ADD
Definition: gprs_ns2_sns.c:100
ns2_get_sns_endpoint
static struct sns_endpoint * ns2_get_sns_endpoint(struct ns2_sns_state *state, const struct osmo_sockaddr *saddr)
Definition: gprs_ns2_sns.c:2455
gprs_ns2_nse::ip_sns_role_sgsn
bool ip_sns_role_sgsn
are we implementing the SGSN role?
Definition: gprs_ns2_internal.h:216
gprs_ns2_nsvc_by_sockaddr_nse
struct gprs_ns2_vc * gprs_ns2_nsvc_by_sockaddr_nse(struct gprs_ns2_nse *nse, const struct osmo_sockaddr *sockaddr)
Find NS-VC for given socket address.
Definition: gprs_ns2.c:1245
nsip_vc_sendmsg
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:163
gprs_ns_inst::bss_sns_fi
struct osmo_fsm_inst * bss_sns_fi
Definition: gprs_ns.h:110
NS2_SNS_EV_RX_DELETE
@ NS2_SNS_EV_RX_DELETE
Definition: gprs_ns2_internal.h:339
GPRS_NS2_EV_RX_UNBLOCK_ACK
@ GPRS_NS2_EV_RX_UNBLOCK_ACK
Definition: gprs_ns2_vc_fsm.c:108
ns2_sns_st_sgsn_unconfigured
static void ns2_sns_st_sgsn_unconfigured(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_sns.c:2768
gprs_ns2_vc::ctrg
struct rate_ctr_group * ctrg
Definition: gprs_ns2_internal.h:264
tlvp_val16be
static uint16_t tlvp_val16be(const struct tlv_parsed *tp, int pos)
osmo_sockaddr::sa
struct sockaddr sa
gprs_ns2_sns_del_bind
int gprs_ns2_sns_del_bind(struct gprs_ns2_nse *nse, struct gprs_ns2_vc_bind *bind)
Definition: gprs_ns2_sns.c:2675
remove_bind_elem
static int remove_bind_elem(struct ns2_sns_state *gss, struct ns2_sns_elems *elems, struct ns2_sns_bind *sbind)
Definition: gprs_ns2_sns.c:603
LOGNSVC
#define LOGNSVC(nsvc, lvl, fmt, args ...)
Definition: gprs_ns2_internal.h:29
log_set_nsvc_filter
static void log_set_nsvc_filter(struct log_target *target, struct gprs_ns2_vc *nsvc)
Definition: gprs_ns2_vty.c:2138
nsip_fd_cb
static int nsip_fd_cb(struct osmo_fd *bfd, unsigned int what)
Definition: gprs_ns2_udp.c:270
gprs_ns2_ip_connect_inactive
struct gprs_ns2_vc * gprs_ns2_ip_connect_inactive(struct gprs_ns2_vc_bind *bind, const struct osmo_sockaddr *remote, struct gprs_ns2_nse *nse, uint16_t nsvci)
Create, and connect an inactive, new IP-based NS-VC.
Definition: gprs_ns2.c:1178
gprs_ns2_free_nse
void gprs_ns2_free_nse(struct gprs_ns2_nse *nse)
Destroy given NS Entity.
Definition: gprs_ns2.c:903
NS2_CS_CREATED
@ NS2_CS_CREATED
A NSVC object has been created.
Definition: gprs_ns2_internal.h:114
ns2_nsvc_create_ip4
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:378
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:366
GPRS_SNS_ST_CONFIGURED
@ GPRS_SNS_ST_CONFIGURED
Definition: gprs_ns_sns.c:275
ns2_sns_state::current_procedure
struct ns2_sns_procedure * current_procedure
Definition: gprs_ns2_sns.c:184
ns2_sns_elems
Definition: gprs_ns2_sns.c:130
ip46_weight_sum_sig
#define ip46_weight_sum_sig(elems)
Definition: gprs_ns2_sns.c:255
NS_IE_NSEI
@ NS_IE_NSEI
Definition: gsm_08_16.h:70
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:379
osmo_sockaddr_cmp
int osmo_sockaddr_cmp(const struct osmo_sockaddr *a, const struct osmo_sockaddr *b)
osmo_fsm_inst::priv
void * priv
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:619
gprs_ns2_bind_by_name
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:1535
osmo_fsm_state
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:437
vty_nse
Definition: gprs_ns2_vty.c:77
NS_IE_PDU
@ NS_IE_PDU
Definition: gsm_08_16.h:68
read_nsip_msg
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:175
gprs_ns2_vty_init
int gprs_ns2_vty_init(struct gprs_ns2_inst *nsi)
Definition: gprs_ns2_vty.c:2252
signal.h
gprs_ns2_ip_connect
struct gprs_ns2_vc * gprs_ns2_ip_connect(struct gprs_ns2_vc_bind *bind, const struct osmo_sockaddr *remote, struct gprs_ns2_nse *nse, uint16_t nsvci)
Create, connect and activate a new IP-based NS-VC.
Definition: gprs_ns2.c:1203
gprs_ns2_vc::priv
void * priv
can be used by the bind/driver of the virtual circuit.
Definition: gprs_ns2_internal.h:258
_osmo_fsm_inst_dispatch
int _osmo_fsm_inst_dispatch(struct osmo_fsm_inst *fi, uint32_t event, void *data, const char *file, int line)
nsip_sendmsg
static int nsip_sendmsg(struct gprs_ns2_vc_bind *bind, struct msgb *msg, struct osmo_sockaddr *dest)
Definition: gprs_ns2_udp.c:144
config_write_nsvc
static void config_write_nsvc(struct vty *vty, const struct gprs_ns2_vc *nsvc)
Definition: gprs_ns2_vty.c:484
gprs_ns2_nse::ts_alive_change
struct timespec ts_alive_change
when the NSE became alive or dead
Definition: gprs_ns2_internal.h:225
vty_ll_names
const struct value_string vty_ll_names[]
Definition: gprs_ns2_vty.c:114
gprs_ns_ie_ip6_elem::data_weight
uint8_t data_weight
Definition: gsm_08_16.h:36
vty_nse_bind::list
struct llist_head list
Definition: gprs_ns2_vty.c:88
vty.h
gprs_ns2_inst
An instance of the NS protocol stack.
Definition: gprs_ns2_internal.h:148
ns2_add_procedure
static void ns2_add_procedure(struct ns2_sns_state *gss, struct ns2_sns_bind *sbind, enum sns_procedure procedure_type)
Definition: gprs_ns2_sns.c:1890
gprs_nsvc::persistent
unsigned int persistent
Definition: gprs_ns.h:140
RATE_CTR_INC_NS
#define RATE_CTR_INC_NS(nsvc, ctr)
Definition: gprs_ns2_internal.h:41
get_value_string
const char * get_value_string(const struct value_string *vs, uint32_t val)
ns2_sns_st_configured
static void ns2_sns_st_configured(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_sns.c:1437
osmo_fr_network_dump_vty
void osmo_fr_network_dump_vty(struct vty *vty, const struct osmo_fr_network *net)
Definition: frame_relay.c:1041
gprs_ns2_vc_bind::statg
struct osmo_stat_item_group * statg
Definition: gprs_ns2_internal.h:319
ip4_weight_sum_sig
#define ip4_weight_sum_sig(elems)
Definition: gprs_ns2_sns.c:230
osmo_fsm_inst_term
#define osmo_fsm_inst_term(fi, cause, data)
gprs_msgb.h
gprs_sns_st_unconfigured
static void gprs_sns_st_unconfigured(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns_sns.c:301
gprs_bssgp.h
GPRS_NS2_EV_RX_UNITDATA
@ GPRS_NS2_EV_RX_UNITDATA
Definition: gprs_ns2_vc_fsm.c:115
LOG_NS_DATA
#define LOG_NS_DATA(nsvc, direction, pdu_type, lvl, fmt, args ...)
Definition: gprs_ns2_internal.h:35
ns2_vc_fsm_clean
static void ns2_vc_fsm_clean(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause)
Definition: gprs_ns2_vc_fsm.c:755
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:580
cause
uint8_t cause
vc_driver_ip
struct gprs_ns2_vc_driver vc_driver_ip
Definition: gprs_ns2_udp.c:43
vty_out_fsm_inst2
void vty_out_fsm_inst2(struct vty *vty, const char *prefix, struct osmo_fsm_inst *fsmi)
osmo_fsm::name
const char * name
vty_nse::list
struct llist_head list
Definition: gprs_ns2_vty.c:78
ns2_sns_st_local_procedure
static void ns2_sns_st_local_procedure(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_sns.c:1591
ns2_sns_procedure::procedure
enum sns_procedure procedure
Definition: gprs_ns2_sns.c:124
osmo_sock_init_osa_ofd
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)
add_ip6_elem
static int add_ip6_elem(struct ns2_sns_state *gss, struct ns2_sns_elems *elems, const struct gprs_ns_ie_ip6_elem *ip6)
Definition: gprs_ns2_sns.c:551
GPRS_SNS_ST_UNCONFIGURED
@ GPRS_SNS_ST_UNCONFIGURED
Definition: gprs_ns_sns.c:271
pdu_type
uint8_t pdu_type
NS PDU type.
Definition: gsm_08_16.h:0
GPRS_SNS_ST_CONFIG_SGSN
@ GPRS_SNS_ST_CONFIG_SGSN
SNS-CONFIG procedure (SGSN->BSS) ongoing.
Definition: gprs_ns_sns.c:274
ns2_sns_state::block_no_nsvc_events
bool block_no_nsvc_events
Definition: gprs_ns2_sns.c:154
NS_CAUSE_PROTO_ERR_UNSPEC
@ NS_CAUSE_PROTO_ERR_UNSPEC
Definition: gsm_08_16.h:92
ns2_sns_st_bss_size_onenter
static void ns2_sns_st_bss_size_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns2_sns.c:999
osmo_timer_add
void osmo_timer_add(struct osmo_timer_list *timer)
GPRS_NS2_AFF_CAUSE_SNS_CONFIGURED
@ GPRS_NS2_AFF_CAUSE_SNS_CONFIGURED
Definition: gprs_ns2.h:84
gprs_ns2_ip_bind_set_sns_weight
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:611
gprs_ns2_vty_init_reduced
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:2218
DLCI_STR
#define DLCI_STR
Definition: gprs_ns2_vty.c:57
gprs_ns2_internal.h
GPRS_SNS_ST_UNCONFIGURED
@ GPRS_SNS_ST_UNCONFIGURED
Definition: gprs_ns2_sns.c:66
NS2_SNS_EV_RX_CONFIG
@ NS2_SNS_EV_RX_CONFIG
Definition: gprs_ns2_internal.h:335
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:311
NS_ALLOC_HEADROOM
#define NS_ALLOC_HEADROOM
Definition: gprs_ns.h:31
OSMO_ASSERT
#define OSMO_ASSERT(exp)
GPRS_NS2_LL_FR_GRE
@ GPRS_NS2_LL_FR_GRE
NS/FR/GRE/IP.
Definition: gprs_ns2.h:48
vty_nse_remove_vbind
static int vty_nse_remove_vbind(struct vty_nse *vnse, struct vty_bind *vbind)
Definition: gprs_ns2_vty.c:211
priv_bind::dscp
int dscp
Definition: gprs_ns2_frgre.c:114
RATE_CTR_ADD_NS
#define RATE_CTR_ADD_NS(nsvc, ctr, val)
Definition: gprs_ns2_internal.h:48
ns2_sns_state::local_procedure
struct ns2_sns_elems local_procedure
Definition: gprs_ns2_sns.c:172
gprs_sns_init
int gprs_sns_init(void)
Definition: gprs_ns_sns.c:736
gprs_nsvc::nsi
struct gprs_ns_inst * nsi
pointer to NS Instance
Definition: gprs_ns.h:126
ns_pdu_type
ns_pdu_type
NS PDU Type (TS 08.16, Section 10.3.7, Table 14)
Definition: gsm_08_16.h:42
osmo_prim_init
static void osmo_prim_init(struct osmo_prim_hdr *oph, unsigned int sap, unsigned int primitive, enum osmo_prim_operation operation, struct msgb *msg)
msgb_put
static unsigned char * msgb_put(struct msgb *msgb, unsigned int len)
gprs_ns2_sns_del_endpoint
int gprs_ns2_sns_del_endpoint(struct gprs_ns2_nse *nse, const struct osmo_sockaddr *saddr)
gprs_ns2_sns_del_endpoint
Definition: gprs_ns2_sns.c:2513
NS_TOUT_TNS_ALIVE
@ NS_TOUT_TNS_ALIVE
Definition: gprs_ns.h:39
OSMO_SOCK_F_DSCP
#define OSMO_SOCK_F_DSCP(x)
ns2_sns_elems::num_ip4
unsigned int num_ip4
Definition: gprs_ns2_sns.c:132
NS_PDUT_BLOCK
@ NS_PDUT_BLOCK
Definition: gsm_08_16.h:46
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:815
GPRS_SNS_EV_CONFIG_ACK
@ GPRS_SNS_EV_CONFIG_ACK
Definition: gprs_ns_sns.c:282
remove_remote_ip4_elem
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
ns_vc_tx
static int ns_vc_tx(struct gprs_ns2_vc *nsvc, struct msgb *msg)
Definition: gprs_ns2_message.c:173
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:737
NS_IE_VCI
@ NS_IE_VCI
Definition: gsm_08_16.h:67
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:600
data
uint8_t data[0]
variable-length payload
Definition: gsm_08_16.h:1
gprs_sns_dump_vty
void gprs_sns_dump_vty(struct vty *vty, const struct gprs_ns_inst *nsi, bool stats)
Definition: gprs_ns_sns.c:753
vty_nsi
static struct gprs_ns_inst * vty_nsi
Definition: gprs_ns_vty.c:51
gprs_ns2_nse::nsvc
struct llist_head nsvc
llist head to hold all nsvc
Definition: gprs_ns2_internal.h:183
osmo_identifier_sanitize_buf
void osmo_identifier_sanitize_buf(char *str, const char *sep_chars, char replace_with)
ns2_st_blocked
static void ns2_st_blocked(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_vc_fsm.c:362
ns2_sns_state::role
enum ns2_sns_role role
Definition: gprs_ns2_sns.c:142
ns_inst_from_fi
static struct gprs_ns2_inst * ns_inst_from_fi(struct osmo_fsm_inst *fi)
Definition: gprs_ns2_vc_fsm.c:144
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:317
gprs_ns2_vc_bind::accept_ipaccess
bool accept_ipaccess
Definition: gprs_ns2_internal.h:292
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:305
LOG_FLT_GB_NSVC
LOG_FLT_GB_NSVC
ns2_free_nsvcs
void ns2_free_nsvcs(struct gprs_ns2_nse *nse)
Definition: gprs_ns2.c:668
NSE_CMD_STR
#define NSE_CMD_STR
Definition: gprs_ns_vty.c:280
dump_ns_entities
static void dump_ns_entities(struct vty *vty, const struct gprs_ns2_inst *nsi, bool stats, bool persistent_only)
Definition: gprs_ns2_vty.c:1942
LOG_CTX_GB_NSVC
LOG_CTX_GB_NSVC
NS_PDUT_ALIVE_ACK
@ NS_PDUT_ALIVE_ACK
Definition: gsm_08_16.h:52
gprs_ns_tx_block
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
gprs_ns_inst::frgre
struct gprs_ns_inst::@15 frgre
NS-over-FR-over-GRE-over-IP specific bits.
common_vty.h
TLVP_PRES_LEN
#define TLVP_PRES_LEN(tp, tag, min_len)
dump_nse
static void dump_nse(struct vty *vty, const struct gprs_ns2_nse *nse, bool stats, bool persistent_only)
Definition: gprs_ns2_vty.c:1900
priv_vc
Definition: gprs_ns2_fr.c:114
GPRS_NS2_EV_RX_BLOCK
@ GPRS_NS2_EV_RX_BLOCK
Definition: gprs_ns2_vc_fsm.c:109
gprs_ns_frgre_listen
int gprs_ns_frgre_listen(struct gprs_ns_inst *nsi)
Definition: gprs_ns_frgre.c:326
ERR_IF_NSVC_USES_SNS
#define ERR_IF_NSVC_USES_SNS(nsvc, reason)
Definition: gprs_ns2_message.c:42
log_set_nse_filter
static void log_set_nse_filter(struct log_target *target, struct gprs_ns2_nse *nse)
Definition: gprs_ns2_vty.c:2126
osmo_sock_set_priority
int osmo_sock_set_priority(int fd, int prio)
NS_CAUSE_INVAL_NR_NS_VC
@ NS_CAUSE_INVAL_NR_NS_VC
Definition: gsm_08_16.h:98
gprs_ns_hdr::pdu_type
uint8_t pdu_type
NS PDU type.
Definition: gsm_08_16.h:18
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_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:868
gprs_ns2_ll
gprs_ns2_ll
Osmocom NS link layer types.
Definition: gprs_ns2.h:44
osmo_fd::cb
int(* cb)(struct osmo_fd *fd, unsigned int what)
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:564
ns2_sns_state::sns_endpoints
struct llist_head sns_endpoints
Definition: gprs_ns2_sns.c:145
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
gprs_ns_inst::use_reset_block_unblock
bool use_reset_block_unblock
IPA compatibility: NS-RESET/BLOCK/UNBLOCK even on IP-SNS.
Definition: gprs_ns.h:101
remove_ip4_elem
static int remove_ip4_elem(struct ns2_sns_state *gss, struct ns2_sns_elems *elems, const struct gprs_ns_ie_ip4_elem *ip4)
Definition: gprs_ns2_sns.c:516
PRIM_OP_INDICATION
PRIM_OP_INDICATION
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:783
alive_timeout_handler
static void alive_timeout_handler(void *data)
Definition: gprs_ns2_vc_fsm.c:220
VTY_NEWLINE
#define VTY_NEWLINE
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:390
SNS_PROC_NONE
@ SNS_PROC_NONE
used as invalid/idle value
Definition: gprs_ns2_sns.c:99
GPRS_SNS_EV_CHANGE_WEIGHT
@ GPRS_SNS_EV_CHANGE_WEIGHT
Definition: gprs_ns_sns.c:285
gprs_nsvc::ll
enum gprs_ns_ll ll
which link-layer are we based on?
Definition: gprs_ns.h:147
osmo_fsm::log_subsys
int log_subsys
GPRS_SNS_ST_SGSN_WAIT_CONFIG
@ GPRS_SNS_ST_SGSN_WAIT_CONFIG
Definition: gprs_ns2_sns.c:71
msgb.h
handle_rx_gre_ipv4
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
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
gprs_ns2_vc::statg
struct osmo_stat_item_group * statg
Definition: gprs_ns2_internal.h:265
binds
static struct llist_head binds
Definition: gprs_ns2_vty.c:61
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:287
osmo_clock_gettime
int osmo_clock_gettime(clockid_t clk_id, struct timespec *tp)
SNS_PDUT_CHANGE_WEIGHT
@ SNS_PDUT_CHANGE_WEIGHT
Definition: gsm_08_16.h:56
osmo_fsm_inst_alloc
struct osmo_fsm_inst * osmo_fsm_inst_alloc(struct osmo_fsm *fsm, void *ctx, void *priv, int log_level, const char *id)
TLVP_LEN
#define TLVP_LEN(x, y)
ns2_st_unconfigured
static void ns2_st_unconfigured(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_vc_fsm.c:265
msg
uint8_t msg[0]
_osmo_fsm_inst_state_chg
int _osmo_fsm_inst_state_chg(struct osmo_fsm_inst *fi, uint32_t new_state, unsigned long timeout_secs, int T, const char *file, int line)
ns2_st_blocked_onenter
static void ns2_st_blocked_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns2_vc_fsm.c:338
gprs_ns2_vc_bind::accept_sns
bool accept_sns
Definition: gprs_ns2_internal.h:293
gprs_nsvc_delete
void gprs_nsvc_delete(struct gprs_nsvc *nsvc)
Delete given NS-VC.
Definition: gprs_ns.c:353
vty_nse_bind
Definition: gprs_ns2_vty.c:87
llist_for_each_entry_safe
#define llist_for_each_entry_safe(pos, n, head, member)
vty_dump_sns_ip4
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:2377
vty_bind::accept_sns
bool accept_sns
Definition: gprs_ns2_vty.c:72
ns2_validate_reset
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
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_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:253
ns2_clear_elems
static void ns2_clear_elems(struct ns2_sns_elems *elems)
Definition: gprs_ns2_sns.c:334
CMD_ERR_NOTHING_TODO
#define CMD_ERR_NOTHING_TODO
osmo_sockaddr
update_ip4_elem
static int update_ip4_elem(struct ns2_sns_state *gss, struct ns2_sns_elems *elems, const struct gprs_ns_ie_ip4_elem *ip4)
Definition: gprs_ns2_sns.c:533
ns2_vc_event_names
static const struct value_string ns2_vc_event_names[]
Definition: gprs_ns2_vc_fsm.c:124
get_string_value
int get_string_value(const struct value_string *vs, const char *str)
ns_node
static struct cmd_node ns_node
Definition: gprs_ns2_vty.c:247
gprs_ns_ie_ip6_elem::ip_addr
struct in6_addr ip_addr
Definition: gsm_08_16.h:33
gprs_ns2_nse::nsi
struct gprs_ns2_inst * nsi
entry back to ns2_inst
Definition: gprs_ns2_internal.h:177
llist_head::next
struct llist_head * next
msgb_v_put
static uint8_t * msgb_v_put(struct msgb *msg, uint8_t val)
nsvc_by_ip4_elem
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
NS_DESC_B
#define NS_DESC_B(st)
Definition: gprs_ns.h:48
gprs_ns_inst::nsip
struct gprs_ns_inst::@14 nsip
NS-over-IP specific bits.
gprs_ns2_inst::nse
struct llist_head nse
linked lists of all NSVC in this instance
Definition: gprs_ns2_internal.h:159
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:681
NS_CTR_BLOCKED
@ NS_CTR_BLOCKED
Definition: gprs_ns.c:133
get_value_string_or_null
const char * get_value_string_or_null(const struct value_string *vs, uint32_t val)
rate_ctr.h
gprs_ns2_nse::ll
enum gprs_ns2_ll ll
which link-layer are we based on?
Definition: gprs_ns2_internal.h:199
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:352
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:345
SNS_PROC_DEL
@ SNS_PROC_DEL
Definition: gprs_ns2_sns.c:101
NS_CAUSE_INVAL_NR_IPv6_EP
@ NS_CAUSE_INVAL_NR_IPv6_EP
Definition: gsm_08_16.h:97
NS_CTR_LOST_ALIVE
@ NS_CTR_LOST_ALIVE
Definition: gprs_ns.c:139
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:681
msgb_tv16_put
static uint8_t * msgb_tv16_put(struct msgb *msg, uint8_t tag, uint16_t val)
gprs_ns2_vc_priv::initiate_reset
bool initiate_reset
Definition: gprs_ns2_vc_fsm.c:60
LOG_CTX_GB_NSE
LOG_CTX_GB_NSE
osmo_sockaddr_to_str
const char * osmo_sockaddr_to_str(const struct osmo_sockaddr *sockaddr)
ns2_recv_unitdata
static void ns2_recv_unitdata(struct osmo_fsm_inst *fi, struct msgb *msg)
Definition: gprs_ns2_vc_fsm.c:598
NS_TOUT_TSNS_PROCEDURES_RETRIES
@ NS_TOUT_TSNS_PROCEDURES_RETRIES
Definition: gprs_ns2_internal.h:93
vty_bind
Definition: gprs_ns2_vty.c:65
osmo_fsm_term_cause
osmo_fsm_term_cause
gprs_ns2_fr_connect
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:962
OSMO_FD_READ
#define OSMO_FD_READ
NS_CAUSE_MISSING_ESSENT_IE
@ NS_CAUSE_MISSING_ESSENT_IE
Definition: gsm_08_16.h:94
gprs_ns2_is_ip_bind
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
ns2_sns_st_bss_config_sgsn_onenter
static void ns2_sns_st_bss_config_sgsn_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns2_sns.c:1147
ns2_vc_create_ip
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:353
gprs_ns2_vc_state
gprs_ns2_vc_state
Definition: gprs_ns2_vc_fsm.c:92
osmo_log_vty2tgt
struct log_target * osmo_log_vty2tgt(struct vty *vty)
ns2_clear_sgsn
static void ns2_clear_sgsn(struct ns2_sns_state *gss, struct gprs_ns2_vc *size_nsvc)
Definition: gprs_ns2_sns.c:2743
osmo_sockaddr_str::ip
char ip[INET6_ADDRSTRLEN]
nsvc_by_ip4_elem
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:257
gprs_ns2_nse
Structure repesenting a NSE.
Definition: gprs_ns2_internal.h:173
INIT_LLIST_HEAD
#define INIT_LLIST_HEAD(ptr)
vty_out_rate_ctr_group
void vty_out_rate_ctr_group(struct vty *vty, const char *prefix, struct rate_ctr_group *ctrg)
gprs_ns2_fr_nsvc_dlci
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
ns2_st_unconfigured_onenter
static void ns2_st_unconfigured_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns2_vc_fsm.c:257
gprs_ns2_sns_add_endpoint
int gprs_ns2_sns_add_endpoint(struct gprs_ns2_nse *nse, const struct osmo_sockaddr *saddr)
gprs_ns2_sns_add_endpoint
Definition: gprs_ns2_sns.c:2473
ns2_validate_status
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
@ NS_TOUT_TSNS_CONFIG_RETRIES
Definition: gprs_ns2_internal.h:92
gprs_sns_state::next_nsvci
uint16_t next_nsvci
Definition: gprs_ns_sns.c:47
gprs_ns2_vc_priv::nsvc
struct gprs_ns2_vc * nsvc
Definition: gprs_ns2_vc_fsm.c:53
osmo_ntohs
#define osmo_ntohs(x)
gprs_ns2_ip_bind_by_sockaddr
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:287
ns2_vc_reset
int ns2_vc_reset(struct gprs_ns2_vc *nsvc)
Reset a NS-VC.
Definition: gprs_ns2_vc_fsm.c:858
ns2_sns_state::initial_bind
struct ns2_sns_bind * initial_bind
Definition: gprs_ns2_sns.c:149
vty_nse::nsei
uint16_t nsei
Definition: gprs_ns2_vty.c:79
osmo_sockaddr::sin6
struct sockaddr_in6 sin6
gprs_sns_event_names
static const struct value_string gprs_sns_event_names[]
Definition: gprs_ns2_sns.c:76
dump_vty
static void dump_vty(const struct gprs_ns2_vc_bind *bind, struct vty *vty, bool stats)
Definition: gprs_ns2_udp.c:88
ns_sns_configured_timeout
static int ns_sns_configured_timeout(struct osmo_fsm_inst *fi)
Definition: gprs_ns2_sns.c:1087
NS_TOUT_TNS_RESET
@ NS_TOUT_TNS_RESET
Definition: gprs_ns.h:36
ns2_sns_st_configured_delete
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:1267
GRE_PTYPE_IPv4
#define GRE_PTYPE_IPv4
Definition: gprs_ns_frgre.c:46
gprs_ns2_sns_count
int gprs_ns2_sns_count(struct gprs_ns2_nse *nse)
gprs_ns2_sns_count
Definition: gprs_ns2_sns.c:2566
gre_hdr::ptype
uint16_t ptype
Definition: gprs_ns2_frgre.c:61
log_target::filter_data
void * filter_data[LOG_MAX_FILTERS+1]
ns2_tx_sns_procedure
static int ns2_tx_sns_procedure(struct gprs_ns2_vc *nsvc, enum ns_pdu_type pdu, 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/SNS-CHANGE-WEIGHT as per Section 9.3.2/9.3.3.
Definition: gprs_ns2_message.c:504
ns2_sns_role
ns2_sns_role
Definition: gprs_ns2_sns.c:59
ns2_sns_count_num_local_ep
static int ns2_sns_count_num_local_ep(struct osmo_fsm_inst *fi, int ip_proto)
Definition: gprs_ns2_sns.c:829
ns2_sns_state::procedures
struct llist_head procedures
Definition: gprs_ns2_sns.c:183
__attribute__
static __attribute__((constructor))
Definition: gprs_ns2_sns.c:3102
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:384
do_sns_delete
static int do_sns_delete(struct osmo_fsm_inst *fi, const struct gprs_ns_ie_ip4_elem *ip4)
Definition: gprs_ns_sns.c:211
gprs_ns2_ip_bind_set_sns_weight
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:611
dump_ns_bind
static void dump_ns_bind(struct vty *vty, const struct gprs_ns2_inst *nsi, bool stats)
Definition: gprs_ns2_vty.c:1932
handle_nsip_write
static int handle_nsip_write(struct osmo_fd *bfd)
Definition: gprs_ns2_udp.c:264
gprs_nsvc::frgre
struct gprs_nsvc::@16::@19 frgre
GPRS_SNS_ST_BSS_SIZE
@ GPRS_SNS_ST_BSS_SIZE
SNS-SIZE procedure ongoing.
Definition: gprs_ns2_sns.c:67
osmo_fsm_inst
NS_TOUT_TNS_ALIVE_RETRIES
@ NS_TOUT_TNS_ALIVE_RETRIES
Definition: gprs_ns.h:40
GPRS_NS2_ST_RESET
@ GPRS_NS2_ST_RESET
Definition: gprs_ns2_vc_fsm.c:94
NS2_SNS_EV_RX_SIZE_ACK
@ NS2_SNS_EV_RX_SIZE_ACK
Definition: gprs_ns2_internal.h:334
ns2_get_sbind_ip6_entry
static struct gprs_ns_ie_ip6_elem * ns2_get_sbind_ip6_entry(struct ns2_sns_state *gss, struct ns2_sns_bind *sbind, struct ns2_sns_elems *endpoints)
Definition: gprs_ns2_sns.c:1838
cmd_node
tlvp_val8
static uint8_t tlvp_val8(const struct tlv_parsed *tp, uint8_t tag, uint8_t default_val)
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:318
ns2_st_alive
static void ns2_st_alive(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_vc_fsm.c:467
ns2_sns_state::num_max_nsvcs
size_t num_max_nsvcs
Definition: gprs_ns2_sns.c:179
GPRS_SNS_ST_SGSN_WAIT_CONFIG_ACK
@ GPRS_SNS_ST_SGSN_WAIT_CONFIG_ACK
Definition: gprs_ns2_sns.c:72
GPRS_NS2_LL_FR
@ GPRS_NS2_LL_FR
NS/FR.
Definition: gprs_ns2.h:47
gprs_ns_ie_ip6_elem::udp_port
uint16_t udp_port
Definition: gsm_08_16.h:34
ns2_sns_add_elements
static int ns2_sns_add_elements(struct ns2_sns_state *gss, struct ns2_sns_bind *sbind, struct ns2_sns_elems *elems)
Definition: gprs_ns2_sns.c:1972
gprs_ns_inst::local_port
uint16_t local_port
Definition: gprs_ns.h:96
ns2_sns_st_all_action_sgsn
static void ns2_sns_st_all_action_sgsn(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_sns.c:2947
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:564
NS2_CS_ERROR
@ NS2_CS_ERROR
Failed to process message.
Definition: gprs_ns2_internal.h:118
osmo_sockaddr_to_str_buf
char * osmo_sockaddr_to_str_buf(char *buf, size_t buf_len, const struct osmo_sockaddr *sockaddr)
ns2_sns_st_bss_unconfigured
static void ns2_sns_st_bss_unconfigured(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_sns.c:796
ns2_sns_state::N
int N
Definition: gprs_ns2_sns.c:164
ns_bind_node
static struct cmd_node ns_bind_node
Definition: gprs_ns2_vty.c:614
NS_CAUSE_INVAL_NR_IPv4_EP
@ NS_CAUSE_INVAL_NR_IPv4_EP
Definition: gsm_08_16.h:96
gprs_ns2_vc_bind::name
const char * name
unique name
Definition: gprs_ns2_internal.h:281
ns2_clear_procedures
static void ns2_clear_procedures(struct ns2_sns_state *gss)
Definition: gprs_ns2_sns.c:343
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:2437
gprs_nsvc::ctrg
struct rate_ctr_group * ctrg
Definition: gprs_ns.h:143
osmo_fsm
msgb_length
uint16_t msgb_length(const struct msgb *msg)
gprs_ns2_vc_bind::mtu
uint16_t mtu
MTU of a NS PDU on this bind.
Definition: gprs_ns2_internal.h:299
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:737
llist_del
static void llist_del(struct llist_head *entry)
gprs_ns2_ip_vc_equal
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
gprs_ns_inst
An instance of the NS protocol stack.
Definition: gprs_ns.h:79
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:831
install_lib_element_ve
void install_lib_element_ve(struct cmd_element *cmd)
GPRS_NS2_VC_MODE_BLOCKRESET
@ GPRS_NS2_VC_MODE_BLOCKRESET
The VC will use RESET/BLOCK/UNBLOCK to start the connection and do ALIVE/ACK.
Definition: gprs_ns2.h:29
gprs_sns_state
Definition: gprs_ns_sns.c:27
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:2437
ns2_sns_st_bss_config_bss_onenter
static void ns2_sns_st_bss_config_bss_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns2_sns.c:1060
config_write_vbind
static void config_write_vbind(struct vty *vty, struct vty_bind *vbind)
Definition: gprs_ns2_vty.c:432
osmo_stat_item_set
void osmo_stat_item_set(struct osmo_stat_item *item, int32_t value)
llist_first_entry
#define llist_first_entry(ptr, type, member)
NS_IE_MAX_NR_NSVC
@ NS_IE_MAX_NR_NSVC
Definition: gsm_08_16.h:74
NS_PDUT_ALIVE
@ NS_PDUT_ALIVE
Definition: gsm_08_16.h:51
NS_CAUSE_EQUIP_FAIL
@ NS_CAUSE_EQUIP_FAIL
Definition: gsm_08_16.h:86
GPRS_NS2_DIALECT_STATIC_ALIVE
@ GPRS_NS2_DIALECT_STATIC_ALIVE
Definition: gprs_ns2.h:37
osmo_ntohl
#define osmo_ntohl(x)
gprs_ns_ll_str
const char * gprs_ns_ll_str(const struct gprs_nsvc *nsvc)
Definition: gprs_ns.c:1548
TVLV_GROSS_LEN
static uint16_t TVLV_GROSS_LEN(uint16_t len)
gprs_ns2_ip_bind_sockaddr
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_ns_hdr::data
uint8_t data[0]
variable-length payload
Definition: gsm_08_16.h:19
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_sns_update_weights
void ns2_sns_update_weights(struct gprs_ns2_vc_bind *bind)
Definition: gprs_ns2_sns.c:2711
gprs_ns2_nse_sns_remote
const struct osmo_sockaddr * gprs_ns2_nse_sns_remote(struct gprs_ns2_nse *nse)
Return the initial SNS remote socket address.
Definition: gprs_ns2_sns.c:285
log_set_context
int log_set_context(uint8_t ctx_nr, void *value)
ns2_sns_state::num_max_ip4_remote
size_t num_max_ip4_remote
Definition: gprs_ns2_sns.c:180
GPRS_NS2_EV_RX_BLOCK_FOREIGN
@ GPRS_NS2_EV_RX_BLOCK_FOREIGN
Definition: gprs_ns2_vc_fsm.c:121
gprs_ns2_vc_priv::accept_unitdata
bool accept_unitdata
Definition: gprs_ns2_vc_fsm.c:64
ns2_validate_reset_ack
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
NS2_SNS_EV_RX_CHANGE_WEIGHT
@ NS2_SNS_EV_RX_CHANGE_WEIGHT
Definition: gprs_ns2_internal.h:340
osmo_sock_init_ofd
int osmo_sock_init_ofd(struct osmo_fd *ofd, int family, int type, int proto, const char *host, uint16_t port, unsigned int flags)
gprs_ns2_nse::bss_sns_fi
struct osmo_fsm_inst * bss_sns_fi
Definition: gprs_ns2_internal.h:204
ip46_weight_sum
static int ip46_weight_sum(const struct ns2_sns_elems *elems, bool data_weight)
Definition: gprs_ns2_sns.c:249
gprs_nsvc_by_nsei
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
msgb
msgb_push
static unsigned char * msgb_push(struct msgb *msgb, unsigned int len)
gprs_ns2_ip_vc_remote
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_ns2_vc::ts_alive_change
struct timespec ts_alive_change
when the NSVC became alive or dead
Definition: gprs_ns2_internal.h:275
gprs_nsvc_reset
int gprs_nsvc_reset(struct gprs_nsvc *nsvc, uint8_t cause)
Initiate a RESET procedure.
Definition: gprs_ns.c:2105
LOGL_INFO
#define LOGL_INFO
install_node
void install_node(struct cmd_node *node, int(*func)(struct vty *))
NS2_CS_REJECTED
@ NS2_CS_REJECTED
Rejected and answered message.
Definition: gprs_ns2_internal.h:116
rate_ctr_inc
static void rate_ctr_inc(struct rate_ctr *ctr)
log_target
CONFIG_NODE
CONFIG_NODE
GPRS_NS2_VC_MODE_ALIVE
@ 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
NS2_SNS_EV_RX_ADD
@ NS2_SNS_EV_RX_ADD
Definition: gprs_ns2_internal.h:338
GPRS_NS2_PRIM_UNIT_DATA
@ GPRS_NS2_PRIM_UNIT_DATA
Definition: gprs_ns2.h:53
vty_fr_role_names
const struct value_string vty_fr_role_names[]
Definition: gprs_ns2_vty.c:108
GPRS_NS2_ST_RECOVERING
@ GPRS_NS2_ST_RECOVERING
Definition: gprs_ns2_vc_fsm.c:98
ns2_sns_bss_valid_configuration
static int ns2_sns_bss_valid_configuration(struct ns2_sns_state *gss)
Definition: gprs_ns2_sns.c:2156
ns2_validate_block_ack
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
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:404
gprs_ns2_nsvc_by_sockaddr_bind
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:123
gprs_ns_ie_ip4_elem
Section 10.3.2c List of IP4 Elements.
Definition: gsm_08_16.h:24
NS_PDUT_RESET
@ NS_PDUT_RESET
Definition: gsm_08_16.h:44
DEFUN_HIDDEN
DEFUN_HIDDEN(show_ns, show_ns_cmd, "show ns", SHOW_STR SHOW_NS_STR)
Definition: gprs_ns2_vty.c:1953
ns2_nse_set_dialect
int ns2_nse_set_dialect(struct gprs_ns2_nse *nse, enum gprs_ns2_dialect dialect)
Definition: gprs_ns2.c:847
config_write_ns
static int config_write_ns(struct vty *vty)
Definition: gprs_ns2_vty.c:585
ns2_sns_st_sgsn_wait_config_ack_onenter
static void ns2_sns_st_sgsn_wait_config_ack_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns2_sns.c:2816
gprs_sns_st_config_bss_onenter
static void gprs_sns_st_config_bss_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns_sns.c:364
NS_TIMERS
#define NS_TIMERS
Definition: gprs_ns.h:18
ns2_sns_state::sns_nsvc
struct gprs_ns2_vc * sns_nsvc
Definition: gprs_ns2_sns.c:162
gprs_ns_tx_sns_config
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
gprs_ns2_sns_add_bind
int gprs_ns2_sns_add_bind(struct gprs_ns2_nse *nse, struct gprs_ns2_vc_bind *bind)
Definition: gprs_ns2_sns.c:2644
NS_CAUSE_OM_INTERVENTION
@ NS_CAUSE_OM_INTERVENTION
Definition: gsm_08_16.h:85
gprs_ns_ll
gprs_ns_ll
Osmocom NS link layer types.
Definition: gprs_ns.h:53
gre_hdr
Definition: gprs_ns2_frgre.c:59
gprs_ns2_nsvc_by_nsvci
struct gprs_ns2_vc * gprs_ns2_nsvc_by_nsvci(struct gprs_ns2_inst *nsi, uint16_t nsvci)
Resolve a NS-VC Entity based on its NS-VCI.
Definition: gprs_ns2.c:786
config_write_ns_nse
static int config_write_ns_nse(struct vty *vty)
Definition: gprs_ns2_vty.c:560
gprs_ns2_nse::persistent
bool persistent
true if this NSE was created by VTY or pcu socket)
Definition: gprs_ns2_internal.h:189
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
GPRS_NS2_DIALECT_STATIC_RESETBLOCK
@ GPRS_NS2_DIALECT_STATIC_RESETBLOCK
Definition: gprs_ns2.h:38
osmo_fsm_inst_dispatch
#define osmo_fsm_inst_dispatch(fi, event, data)
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:826
gprs_ns.h
tlv.h
SNS_PROC_CHANGE_WEIGHT
@ SNS_PROC_CHANGE_WEIGHT
Definition: gprs_ns2_sns.c:102
CFG_LOG_NODE
CFG_LOG_NODE
osmo_fr_network_alloc
struct osmo_fr_network * osmo_fr_network_alloc(void *ctx)
Definition: frame_relay.c:898
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:315
osmo_gprs_ns2_prim
Definition: gprs_ns2.h:109
nsei
uint16_t nsei
Identifiers of a BTS, equal to 'struct bssgp_bts_ctx'.
Definition: gprs_msgb.h:7
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:437
GPRS_SNS_ST_CONFIG_BSS
@ GPRS_SNS_ST_CONFIG_BSS
SNS-CONFIG procedure (BSS->SGSN) ongoing.
Definition: gprs_ns_sns.c:273
GPRS_SNS_ST_CONFIGURED
@ GPRS_SNS_ST_CONFIGURED
Definition: gprs_ns2_sns.c:70
NS_CTR_BYTES_OUT_DROP
@ NS_CTR_BYTES_OUT_DROP
Definition: gprs_ns2_internal.h:127
handle_nsip_read
static int handle_nsip_read(struct osmo_fd *bfd)
Definition: gprs_ns2_udp.c:219
gprs_sns_st_configured
static void gprs_sns_st_configured(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns_sns.c:434
NS2_SNS_EV_RX_CONFIG_END
@ NS2_SNS_EV_RX_CONFIG_END
SNS-CONFIG with end flag received.
Definition: gprs_ns2_internal.h:336
create_missing_nsvcs
static int create_missing_nsvcs(struct osmo_fsm_inst *fi)
Definition: gprs_ns_sns.c:108
gprs_ns2_create_nse2
struct gprs_ns2_nse * gprs_ns2_create_nse2(struct gprs_ns2_inst *nsi, uint16_t nsei, enum gprs_ns2_ll linklayer, enum gprs_ns2_dialect dialect, bool local_sgsn_role)
Create a NS Entity within given NS instance.
Definition: gprs_ns2.c:806
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:216
gprs_ns2_ip_bind_set_priority
int gprs_ns2_ip_bind_set_priority(struct gprs_ns2_vc_bind *bind, uint8_t priority)
Set the socket priority of the given bind.
Definition: gprs_ns2_udp.c:535
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:1652
vty_bind::ip_sns_data_weight
uint8_t ip_sns_data_weight
Definition: gprs_ns2_vty.c:74
gprs_ns2_vc_driver::name
const char * name
Definition: gprs_ns2_internal.h:326
msgb_free
void msgb_free(struct msgb *m)
GPRS_NS2_EV_RX_ALIVE_ACK
@ GPRS_NS2_EV_RX_ALIVE_ACK
Definition: gprs_ns2_vc_fsm.c:112
msgb_nsei
#define msgb_nsei(__x)
Definition: gprs_msgb.h:23
GPRS_NS2_ST_BLOCKED
@ GPRS_NS2_ST_BLOCKED
Definition: gprs_ns2_vc_fsm.c:95
vty_out_fsm_inst
void vty_out_fsm_inst(struct vty *vty, struct osmo_fsm_inst *fsmi)
dump_nse
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
@ GPRS_NS2_EV_RX_UNBLOCK
Definition: gprs_ns2_vc_fsm.c:107
byteswap.h
gprs_nsvc::nsvci
uint16_t nsvci
end-to-end significance
Definition: gprs_ns.h:129
vty
vty_nsi
static struct gprs_ns2_inst * vty_nsi
Definition: gprs_ns2_vty.c:59
gprs_ns2_fr_bind_role
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:904
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:558
osmo_fd_close
void osmo_fd_close(struct osmo_fd *fd)
vty_nse::binds
struct llist_head binds
Definition: gprs_ns2_vty.c:83
gprs_ns2_cause_str
static const char * gprs_ns2_cause_str(enum ns_cause val)
Obtain a human-readable string for NS primitives.
Definition: gprs_ns2.h:106
GPRS_NS2_EV_REQ_OM_RESET
@ GPRS_NS2_EV_REQ_OM_RESET
Definition: gprs_ns2_vc_fsm.c:118
ns2_sns_st_all_action_bss
static void ns2_sns_st_all_action_bss(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_sns.c:2199
NS_TOUT_TNS_BLOCK_RETRIES
@ NS_TOUT_TNS_BLOCK_RETRIES
Definition: gprs_ns.h:35
gprs_ns2_vc
Structure representing a single NS-VC.
Definition: gprs_ns2_internal.h:229
ns2_sns_bind::change_weight_state
uint8_t change_weight_state
Definition: gprs_ns2_sns.c:113
ns2_vc_fsm_timer_cb
static int ns2_vc_fsm_timer_cb(struct osmo_fsm_inst *fi)
Definition: gprs_ns2_vc_fsm.c:545
NS_CAUSE_BVCI_UNKNOWN
@ NS_CAUSE_BVCI_UNKNOWN
Definition: gsm_08_16.h:89
gprs_sns_state::num_ip4_remote
unsigned int num_ip4_remote
Definition: gprs_ns_sns.c:42
gprs_ns2_vc::nse
struct gprs_ns2_nse * nse
pointer to NS Instance
Definition: gprs_ns2_internal.h:237
GPRS_NS2_EV_REQ_OM_UNBLOCK
@ GPRS_NS2_EV_REQ_OM_UNBLOCK
Definition: gprs_ns2_vc_fsm.c:120
gprs_ns2.h
vty_bind_by_name
static struct vty_bind * vty_bind_by_name(const char *name)
Definition: gprs_ns2_vty.c:121
ns2_vc_reset
int ns2_vc_reset(struct gprs_ns2_vc *nsvc)
Reset a NS-VC.
Definition: gprs_ns2_vc_fsm.c:858
GPRS_SNS_ROLE_SGSN
@ GPRS_SNS_ROLE_SGSN
Definition: gprs_ns2_sns.c:61
NS2_SNS_EV_REQ_NSVC_ALIVE
@ NS2_SNS_EV_REQ_NSVC_ALIVE
a NS-VC became alive
Definition: gprs_ns2_internal.h:344
ns2_sns_update_weights
void ns2_sns_update_weights(struct gprs_ns2_vc_bind *bind)
Definition: gprs_ns2_sns.c:2711
remove_ip6_elem
static int remove_ip6_elem(struct ns2_sns_state *gss, struct ns2_sns_elems *elems, const struct gprs_ns_ie_ip6_elem *ip6)
Definition: gprs_ns2_sns.c:570
LOGPFSMLSRC
#define LOGPFSMLSRC(fi, level, caller_file, caller_line, fmt, args...)
gprs_ns2_vc_priv::timer_started
struct timespec timer_started
Definition: gprs_ns2_vc_fsm.c:71
handle_nsfrgre_read
static int handle_nsfrgre_read(struct osmo_fd *bfd)
Definition: gprs_ns_frgre.c:249
CMD_WARNING
#define CMD_WARNING
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:600
GPRS_NS2_LL_UNDEF
@ GPRS_NS2_LL_UNDEF
undefined, used by vty
Definition: gprs_ns2.h:45
NS_ALLOC_SIZE
#define NS_ALLOC_SIZE
Definition: gprs_ns.h:30
gprs_ns_frgre_sendmsg
int gprs_ns_frgre_sendmsg(struct gprs_nsvc *nsvc, struct msgb *msg)
Definition: gprs_ns_frgre.c:282
ns2_sns_state::reselection_running
bool reselection_running
Definition: gprs_ns2_sns.c:151
NS_CAUSE_UNKN_IP_ADDR
@ NS_CAUSE_UNKN_IP_ADDR
Definition: gsm_08_16.h:101
sns_endpoint::saddr
struct osmo_sockaddr saddr
Definition: gprs_ns2_sns.c:107
gprs_ns2_fr_bind
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:797
gprs_ns2_ip_bind_set_dscp
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
gprs_ns_tx_sns_size
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
osmo_timer_schedule
void osmo_timer_schedule(struct osmo_timer_list *timer, int seconds, int microseconds)
NS_CTR_PKTS_OUT_DROP
@ NS_CTR_PKTS_OUT_DROP
Definition: gprs_ns2_internal.h:124
ns2_vty_dump_nsvc
void ns2_vty_dump_nsvc(struct vty *vty, struct gprs_ns2_vc *nsvc, bool stats)
Definition: gprs_ns2_vty.c:1875
ENABLE_NODE
ENABLE_NODE
osmo_fsm_inst_state_name
static const char * osmo_fsm_inst_state_name(struct osmo_fsm_inst *fi)
osmo_htonl
#define osmo_htonl(x)
gprs_nsvc::data_weight
uint8_t data_weight
signaling weight.
Definition: gprs_ns.h:162
sns_failed
#define sns_failed(fi, reason)
Definition: gprs_ns2_sns.c:195
osmo_signal_dispatch
void osmo_signal_dispatch(unsigned int subsys, unsigned int signal, void *signal_data)
stop_test_procedure
static void stop_test_procedure(struct gprs_ns2_vc_priv *priv)
Definition: gprs_ns2_vc_fsm.c:184
gprs_ns2_vc_priv::alive
struct gprs_ns2_vc_priv::@27 alive
GPRS_SNS_EV_SIZE_ACK
@ GPRS_SNS_EV_SIZE_ACK
Definition: gprs_ns_sns.c:279
ns2_vc_unblock
int ns2_vc_unblock(struct gprs_ns2_vc *nsvc)
Unblock a NS-VC.
Definition: gprs_ns2_vc_fsm.c:846
vty::node
int node
ip4_weight_sum_data
#define ip4_weight_sum_data(elems)
Definition: gprs_ns2_sns.c:229
NS2_CS_FOUND
@ NS2_CS_FOUND
A NSVC object has been found.
Definition: gprs_ns2_internal.h:115
GPRS_NS2_EV_REQ_START
@ GPRS_NS2_EV_REQ_START
Definition: gprs_ns2_vc_fsm.c:102
ip6_weight_sum_data
#define ip6_weight_sum_data(elems)
Definition: gprs_ns2_sns.c:246
ns2_sns_procedure::data_weight
uint16_t data_weight
Definition: gprs_ns2_sns.c:120
ns2_st_reset_onenter
static void ns2_st_reset_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns2_vc_fsm.c:296
priv_bind::priority
uint8_t priority
Definition: gprs_ns2_udp.c:52
sns_endpoint
Definition: gprs_ns2_sns.c:105
ns2_st_reset
static void ns2_st_reset(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_vc_fsm.c:311
gprs_ns_inst::dscp
int dscp
Definition: gprs_ns.h:99
NS2_SNS_EV_REQ_FREE_NSVCS
@ NS2_SNS_EV_REQ_FREE_NSVCS
free all NS-VCs
Definition: gprs_ns2_internal.h:343
gprs_ns2_sns_add_endpoint
int gprs_ns2_sns_add_endpoint(struct gprs_ns2_nse *nse, const struct osmo_sockaddr *saddr)
gprs_ns2_sns_add_endpoint
Definition: gprs_ns2_sns.c:2473
log_set_nsvc_filter
static void log_set_nsvc_filter(struct log_target *target, struct gprs_nsvc *nsvc)
Definition: gprs_ns_vty.c:67
start_test_procedure
static void start_test_procedure(struct osmo_fsm_inst *fi, bool start_tx_alive)
Definition: gprs_ns2_vc_fsm.c:152
gprs_ns2_vc_priv::initiator
bool initiator
Definition: gprs_ns2_vc_fsm.c:58
gprs_ns2_vc::fi
struct osmo_fsm_inst * fi
Definition: gprs_ns2_internal.h:269
gprs_sns_event
gprs_sns_event
Definition: gprs_ns_sns.c:276
NS_TOUT_TSNS_PROV
@ NS_TOUT_TSNS_PROV
Definition: gprs_ns.h:41
vty_bind_alloc
static struct vty_bind * vty_bind_alloc(const char *name)
Definition: gprs_ns2_vty.c:131
vty_bind_free
static void vty_bind_free(struct vty_bind *vbind)
Definition: gprs_ns2_vty.c:149
vty_nse_bind::vbind
struct vty_bind * vbind
Definition: gprs_ns2_vty.c:89
gprs_nsvc
Structure representing a single NS-VC.
Definition: gprs_ns.h:122
gprs_ns_hdr
Common header of GPRS NS.
Definition: gsm_08_16.h:17
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:341
gprs_sns_st_size_onenter
static void gprs_sns_st_size_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns_sns.c:334
ns2_sns_st_configured_change
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:1389
L_NS_NODE
L_NS_NODE
vty_bind::priority
uint8_t priority
Definition: gprs_ns2_vty.c:70
LOGNSE
#define LOGNSE(nse, lvl, fmt, args ...)
Definition: gprs_ns2_internal.h:12
osmo_fsm_inst::state
uint32_t state
gprs_sns_event_names
static const struct value_string gprs_sns_event_names[]
Definition: gprs_ns_sns.c:288
gprs_ns2_vc_bind
Structure repesenting a bind instance.
Definition: gprs_ns2_internal.h:279
create_missing_nsvcs
static int create_missing_nsvcs(struct osmo_fsm_inst *fi)
Definition: gprs_ns2_sns.c:420
_sns_failed
static void _sns_failed(struct osmo_fsm_inst *fi, const char *reason, const char *file, int line)
Definition: gprs_ns2_sns.c:197
nse_inst_from_fi
static struct gprs_ns2_nse * nse_inst_from_fi(struct osmo_fsm_inst *fi)
Definition: gprs_ns2_sns.c:188
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:826
ns2_sns_st_bss_config_bss
static void ns2_sns_st_bss_config_bss(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_sns.c:1036
NS_CTR_UNBLOCKED
@ NS_CTR_UNBLOCKED
Definition: gprs_ns2_internal.h:129
NS_IE_BVCI
@ NS_IE_BVCI
Definition: gsm_08_16.h:69
event
event
talloc.h
gprs_sns_state::nsi
struct gprs_ns_inst * nsi
Definition: gprs_ns_sns.c:28
gprs_sns_dump_vty
void gprs_sns_dump_vty(struct vty *vty, const struct gprs_ns_inst *nsi, bool stats)
Definition: gprs_ns_sns.c:753
name
const char * name
gprs_ns2_vc_bind::transfer_capability
int transfer_capability
transfer capability in mbit
Definition: gprs_ns2_internal.h:296
vty_nse_add_vbind
static int vty_nse_add_vbind(struct vty_nse *vnse, struct vty_bind *vbind)
Definition: gprs_ns2_vty.c:190
GPRS_SNS_ROLE_BSS
@ GPRS_SNS_ROLE_BSS
Definition: gprs_ns2_sns.c:60
ns_nse_node
static struct cmd_node ns_nse_node
Definition: gprs_ns2_vty.c:948
create_nsvc_for_new_sbind
static void create_nsvc_for_new_sbind(struct ns2_sns_state *gss, struct ns2_sns_bind *sbind)
Definition: gprs_ns2_sns.c:1532
handle_nsfrgre_write
static int handle_nsfrgre_write(struct osmo_fd *bfd)
Definition: gprs_ns_frgre.c:276
ns2_sns_elems::num_ip6
unsigned int num_ip6
Definition: gprs_ns2_sns.c:134
GPRS_SNS_EV_DELETE
@ GPRS_SNS_EV_DELETE
Definition: gprs_ns_sns.c:284
gprs_ns2_vc_event
gprs_ns2_vc_event
Definition: gprs_ns2_vc_fsm.c:101
rate_ctr_group_get_ctr
struct rate_ctr * rate_ctr_group_get_ctr(struct rate_ctr_group *grp, unsigned int idx)
ns2_sns_procedure::sig_weight
uint16_t sig_weight
Definition: gprs_ns2_sns.c:119
NS_IE_CAUSE
@ NS_IE_CAUSE
Definition: gsm_08_16.h:66
priv_vc::remote
struct osmo_sockaddr remote
Definition: gprs_ns2_fr.c:115
ns_node
static struct cmd_node ns_node
Definition: gprs_ns_vty.c:79
GPRS_SNS_EV_CONFIG
@ GPRS_SNS_EV_CONFIG
Definition: gprs_ns_sns.c:280
osmo_identifier_valid
bool osmo_identifier_valid(const char *str)
GPRS_NS2_ENDPOINT_REQUEST_CHANGE
@ GPRS_NS2_ENDPOINT_REQUEST_CHANGE
Definition: gprs_ns2.h:99
SNS_PDUT_ADD
@ SNS_PDUT_ADD
Definition: gsm_08_16.h:55
TLVP_PRESENT
#define TLVP_PRESENT(x, y)
gprs_ns_rx_sns
int gprs_ns_rx_sns(struct gprs_ns_inst *nsi, struct msgb *msg, struct tlv_parsed *tp)
Definition: gprs_ns_sns.c:686
ns2_vc_fsm_allstate_action
static void ns2_vc_fsm_allstate_action(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_vc_fsm.c:632
NS_PDUT_RESET_ACK
@ NS_PDUT_RESET_ACK
Definition: gsm_08_16.h:45
GPRS_SNS_ST_SIZE
@ GPRS_SNS_ST_SIZE
SNS-SIZE procedure ongoing.
Definition: gprs_ns_sns.c:272
llist_head
ns2_sns_st_sgsn_unconfigured_onenter
static void ns2_sns_st_sgsn_unconfigured_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns2_sns.c:2761
NS_IE_IP_ADDR
@ NS_IE_IP_ADDR
Definition: gsm_08_16.h:78
ns2_sns_state::nse
struct gprs_ns2_nse * nse
Definition: gprs_ns2_sns.c:138
ns2_timeout
ns2_timeout
Definition: gprs_ns2_internal.h:82
vty_bind::list
struct llist_head list
Definition: gprs_ns2_vty.c:66
if
if(vty->type==VTY_SHELL_SERV)
gprs_nsvc_by_rem_addr
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
gre_hdr::flags
uint16_t flags
Definition: gprs_ns2_frgre.c:60
nsvc_force_unconf_cb
static int nsvc_force_unconf_cb(struct gprs_ns2_vc *nsvc, void *ctx)
Definition: gprs_ns2_vty.c:2035
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:3072
gprs_sns_st_config_bss
static void gprs_sns_st_config_bss(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns_sns.c:343
gprs_ns2_sns_sgsn_fsm
static struct osmo_fsm gprs_ns2_sns_sgsn_fsm
Definition: gprs_ns2_sns.c:3050
gprs_ns_ie_ip6_elem::sig_weight
uint8_t sig_weight
Definition: gsm_08_16.h:35
ip4_weight_sum_data
#define ip4_weight_sum_data(x, y)
Definition: gprs_ns_sns.c:71
gprs_sns_bss_states
static const struct osmo_fsm_state gprs_sns_bss_states[]
Definition: gprs_ns_sns.c:557
log_tgt_mutex_lock
#define log_tgt_mutex_lock()
osmo_fr_network
Definition: frame_relay.h:54
NS_TOUT_TNS_TEST
@ NS_TOUT_TNS_TEST
Definition: gprs_ns.h:38
NSVCI_STR
#define NSVCI_STR
Definition: gprs_ns2_vty.c:56
ns2_sns_fsm_sgsn_timer_cb
static int ns2_sns_fsm_sgsn_timer_cb(struct osmo_fsm_inst *fi)
Definition: gprs_ns2_sns.c:2914
sns_endpoint::list
struct llist_head list
Definition: gprs_ns2_sns.c:106
gprs_ns2_vc_bind::nsi
struct gprs_ns2_inst * nsi
a pointer back to the nsi
Definition: gprs_ns2_internal.h:289
DEFUN
DEFUN(cfg_ns, cfg_ns_cmd, "ns", "Configure the GPRS Network Service")
Definition: gprs_ns_vty.c:162
gprs_ns_tx_sns_ack
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
osmo_fsm_inst::T
int T
ns2_sns_procedure::running
bool running
Definition: gprs_ns2_sns.c:127
osmo_sockaddr::u
union osmo_sockaddr::@22 u
gprs_ns_inst::gprs_nsvcs
struct llist_head gprs_nsvcs
linked lists of all NSVC in this instance
Definition: gprs_ns.h:84
gb_internal.h
gprs_ns_pdu_strings
const struct value_string gprs_ns_pdu_strings[]
Definition: gprs_ns.c:398
NS_PDUT_BLOCK_ACK
@ NS_PDUT_BLOCK_ACK
Definition: gsm_08_16.h:47
msgb_l2len
static unsigned int msgb_l2len(const struct msgb *msgb)
ns_nse_nsvc_udp_cmds
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:1128
ns2_sns_elems::ip4
struct gprs_ns_ie_ip4_elem * ip4
Definition: gprs_ns2_sns.c:131
GPRS_SNS_EV_START
@ GPRS_SNS_EV_START
Definition: gprs_ns_sns.c:277
ns2_nsvc_create_ip6
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:391
osmo_timer_setup
void osmo_timer_setup(struct osmo_timer_list *timer, void(*cb)(void *data), void *data)
gprs_ns2_vc_bind::priv
void * priv
driver private structure
Definition: gprs_ns2_internal.h:287
ns2_dialect_to_vc_mode
enum gprs_ns2_vc_mode ns2_dialect_to_vc_mode(enum gprs_ns2_dialect dialect)
Definition: gprs_ns2.c:1547
GPRS_SNS_ST_LOCAL_PROCEDURE
@ GPRS_SNS_ST_LOCAL_PROCEDURE
in process of a ADD/DEL/CHANGE procedure towards SGSN (BSS->SGSN)
Definition: gprs_ns2_sns.c:73
GPRS_NS2_DIALECT_IPACCESS
@ GPRS_NS2_DIALECT_IPACCESS
Definition: gprs_ns2.h:39
TLVP_VAL_MINLEN
#define TLVP_VAL_MINLEN(_tp, tag, min_len)
GPRS_NS2_DIALECT_SNS
@ GPRS_NS2_DIALECT_SNS
Definition: gprs_ns2.h:40
osmo_fsm_inst_state_chg
#define osmo_fsm_inst_state_chg(fi, new_state, timeout_secs, T)
gprs_sns_st_config_sgsn
static void gprs_sns_st_config_sgsn(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns_sns.c:371
vty_out_uptime
int vty_out_uptime(struct vty *vty, const struct timespec *starttime)
GPRS_NS2_AFF_CAUSE_VC_RECOVERY
@ GPRS_NS2_AFF_CAUSE_VC_RECOVERY
Definition: gprs_ns2.h:80
gsm_08_16.h
gprs_ns_ie_ip4_elem::udp_port
uint16_t udp_port
Definition: gsm_08_16.h:26
gprs_sns_bss_state
gprs_sns_bss_state
Definition: gprs_ns2_sns.c:65
GPRS_SNS_ST_BSS_CONFIG_BSS
@ GPRS_SNS_ST_BSS_CONFIG_BSS
SNS-CONFIG procedure (BSS->SGSN) ongoing.
Definition: gprs_ns2_sns.c:68
ns2_st_unblocked_on_enter
static void ns2_st_unblocked_on_enter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns2_vc_fsm.c:423
ns2_sns_bss_states
static const struct osmo_fsm_state ns2_sns_bss_states[]
Definition: gprs_ns2_sns.c:1704
gprs_nsvc_create2
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
ip_addr
uint32_t ip_addr
Definition: gsm_08_16.h:0
vty_fr_network
static struct osmo_fr_network * vty_fr_network
Definition: gprs_ns2_vty.c:60
ns2_sns_state::alive
bool alive
Definition: gprs_ns2_sns.c:166
GPRS_NS2_AFF_CAUSE_SNS_NO_ENDPOINTS
@ GPRS_NS2_AFF_CAUSE_SNS_NO_ENDPOINTS
Definition: gprs_ns2.h:86
gprs_ns2_start_alive_all_nsvcs
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:1472
gprs_sns_state::num_max_ip4_remote
size_t num_max_ip4_remote
Definition: gprs_ns_sns.c:38
gprs_ns2_vc_bind::driver
struct gprs_ns2_vc_driver * driver
Definition: gprs_ns2_internal.h:290
ns_inst_from_fi
static struct gprs_ns_inst * ns_inst_from_fi(struct osmo_fsm_inst *fi)
Definition: gprs_ns_sns.c:50
gprs_sns_bss_fsm_start
int gprs_sns_bss_fsm_start(struct gprs_ns_inst *nsi)
Definition: gprs_ns_sns.c:680
osmo_sock_local_ip
int osmo_sock_local_ip(char *local_ip, const char *remote_ip)
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:366
llist_count
static unsigned int llist_count(const struct llist_head *head)
NS_PDUT_UNITDATA
@ NS_PDUT_UNITDATA
Definition: gsm_08_16.h:43
osmo_fr_role
osmo_fr_role
Definition: frame_relay.h:38
osmo_sockaddr_str_from_str
int osmo_sockaddr_str_from_str(struct osmo_sockaddr_str *sockaddr_str, const char *ip, uint16_t port)
vty_dump_sns_ip6
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:2384
NS_TOUT_TSNS_SIZE_RETRIES
@ NS_TOUT_TSNS_SIZE_RETRIES
Definition: gprs_ns2_internal.h:91
NS_IE_RESET_FLAG
@ NS_IE_RESET_FLAG
Definition: gsm_08_16.h:77
do_sns_delete
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:688
gprs_ns2_vc_bind::ll
enum gprs_ns2_ll ll
which link-layer are we based on?
Definition: gprs_ns2_internal.h:302
S
#define S(x)
Definition: gprs_ns2_sns.c:57
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:582
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:619
config_write_ns
static int config_write_ns(struct vty *vty)
Definition: gprs_ns_vty.c:85
llist_for_each_entry
#define llist_for_each_entry(pos, head, member)
read_nsfrgre_msg
static struct msgb * read_nsfrgre_msg(struct osmo_fd *bfd, int *error, struct sockaddr_in *saddr)
Definition: gprs_ns_frgre.c:147
ns2_vc_fsm_alloc
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:792
free_vc
static void free_vc(struct gprs_ns2_vc *nsvc)
Definition: gprs_ns2_udp.c:75
NS2_SNS_EV_REQ_NO_NSVC
@ NS2_SNS_EV_REQ_NO_NSVC
no more NS-VC remaining (all dead)
Definition: gprs_ns2_internal.h:342
gprs_sns_bss_fsm
static struct osmo_fsm gprs_sns_bss_fsm
Definition: gprs_ns_sns.c:617
SHOW_NS_STR
#define SHOW_NS_STR
Definition: gprs_ns2_vty.c:55
gprs_ns2_free_nsvc
void gprs_ns2_free_nsvc(struct gprs_ns2_vc *nsvc)
Destroy/release given NS-VC.
Definition: gprs_ns2.c:641
bvci
uint16_t bvci
Definition: gprs_msgb.h:8
ns2_sns_sgsn_states
static const struct osmo_fsm_state ns2_sns_sgsn_states[]
Definition: gprs_ns2_sns.c:2856
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
LOGL_NOTICE
#define LOGL_NOTICE
NS_TOUT_TNS_BLOCK
@ NS_TOUT_TNS_BLOCK
Definition: gprs_ns.h:34
ns2_st_alive_onenter
static void ns2_st_alive_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns2_vc_fsm.c:476
gprs_ns2_ip_bind
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:314
prim.h
gprs_ns2_ll_str
const char * gprs_ns2_ll_str(struct gprs_ns2_vc *nsvc)
string-format a given NS-VC to a thread-local static buffer.
Definition: gprs_ns2.c:309
ip4_weight_sum_sig
#define ip4_weight_sum_sig(x, y)
Definition: gprs_ns_sns.c:72
gprs_ns_rcvmsg
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
@ GPRS_NS2_EV_RX_RESET
Definition: gprs_ns2_vc_fsm.c:105
osmo_sockaddr::sin
struct sockaddr_in sin
gprs_ns2_sns_add_bind
int gprs_ns2_sns_add_bind(struct gprs_ns2_nse *nse, struct gprs_ns2_vc_bind *bind)
Definition: gprs_ns2_sns.c:2644
ns2_sns_procedure::list
struct llist_head list
Definition: gprs_ns2_sns.c:117
ip6_weight_sum_sig
#define ip6_weight_sum_sig(elems)
Definition: gprs_ns2_sns.c:247
ns2_vc_block
int ns2_vc_block(struct gprs_ns2_vc *nsvc)
Block a NS-VC.
Definition: gprs_ns2_vc_fsm.c:834
value_string
SNS_PDUT_CONFIG
@ SNS_PDUT_CONFIG
Definition: gsm_08_16.h:57
FR_ROLE_NETWORK_EQUIPMENT
@ FR_ROLE_NETWORK_EQUIPMENT
Definition: frame_relay.h:40
NS_IE_IPv4_EP_NR
@ NS_IE_IPv4_EP_NR
Definition: gsm_08_16.h:75
ns2_sns_choose_next_bind
static void ns2_sns_choose_next_bind(struct ns2_sns_state *gss)
Definition: gprs_ns2_sns.c:989
dump_bind
static void dump_bind(struct vty *vty, const struct gprs_ns2_vc_bind *bind, bool stats)
Definition: gprs_ns2_vty.c:1922
vty_nse_by_nsei
static struct vty_nse * vty_nse_by_nsei(uint16_t nsei)
Definition: gprs_ns2_vty.c:158
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:216
gprs_nsvc::ip
struct gprs_nsvc::@16::@18 ip
gprs_ns2_ip_bind
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:314
llist_first_entry_or_null
#define llist_first_entry_or_null(ptr, type, member)
linuxlist.h
gprs_ns2_ip_bind_set_dscp
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
gprs_ns2_fr_bind_netif
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:919
GPRS_NS2_EV_RX_RESET_ACK
@ GPRS_NS2_EV_RX_RESET_ACK
Definition: gprs_ns2_vc_fsm.c:106
gprs_ns2_free_nsvcs
void gprs_ns2_free_nsvcs(struct gprs_ns2_nse *nse)
Destroy/release all NS-VC of given NSE.
Definition: gprs_ns2.c:682
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:831
gprs_start_alive_all_nsvcs
void gprs_start_alive_all_nsvcs(struct gprs_ns_inst *nsi)
Definition: gprs_ns.c:2241
free_bind
static void free_bind(struct gprs_ns2_vc_bind *bind)
clean up all private driver state.
Definition: gprs_ns2_udp.c:60
gprs_ns_inst::timeout
uint16_t timeout[NS_TIMERS_COUNT]
Definition: gprs_ns.h:90
gprs_ns_vty_init
int gprs_ns_vty_init(struct gprs_ns_inst *nsi)
Definition: gprs_ns_vty.c:635
add_remote_ip4_elem
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
LOG_FLT_GB_NSE
LOG_FLT_GB_NSE
dump_ns
static void dump_ns(struct vty *vty, const struct gprs_ns_inst *nsi, bool stats, bool persistent_only)
Definition: gprs_ns_vty.c:200
gprs_ns_cause_str
const char * gprs_ns_cause_str(enum ns_cause cause)
Obtain a human-readable string for NS cause value.
Definition: gprs_ns.c:446
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:379
do_sns_add
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:731
gprs_ns2_nse_foreach_nsvc
int gprs_ns2_nse_foreach_nsvc(struct gprs_ns2_nse *nse, gprs_ns2_foreach_nsvc_cb cb, void *cb_data)
Iterate over all nsvc of a NS Entity and call the callback.
Definition: gprs_ns2.c:1271
ns2_sns_st_all_action
static void ns2_sns_st_all_action(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_sns.c:2004
llist_add_tail
static void llist_add_tail(struct llist_head *_new, struct llist_head *head)
ns2_sns_compute_local_ep_from_binds
static void ns2_sns_compute_local_ep_from_binds(struct osmo_fsm_inst *fi)
Definition: gprs_ns2_sns.c:884
osmo_sock_set_dscp
int osmo_sock_set_dscp(int fd, uint8_t dscp)
__attribute__
static __attribute__((constructor))
Definition: gprs_ns2_vc_fsm.c:991
vty_bind::ip_sns_sig_weight
uint8_t ip_sns_sig_weight
Definition: gprs_ns2_vty.c:73
ARRAY_SIZE
#define ARRAY_SIZE(x)
ns2_update_weight_entry
static int ns2_update_weight_entry(struct ns2_sns_state *gss, struct ns2_sns_bind *sbind, struct ns2_sns_elems *endpoints)
Definition: gprs_ns2_sns.c:1863
SNS_PDUT_ACK
@ SNS_PDUT_ACK
Definition: gsm_08_16.h:54
gprs_ns2_nse::alive
bool alive
true if this NSE has at least one alive VC
Definition: gprs_ns2_internal.h:196
GPRS_NS2_LL_UDP
@ GPRS_NS2_LL_UDP
NS/UDP/IP.
Definition: gprs_ns2.h:46
gprs_ns_ie_ip4_elem::data_weight
uint8_t data_weight
Definition: gsm_08_16.h:28
gprs_ns2_vc::sig_weight
uint8_t sig_weight
signalling weight.
Definition: gprs_ns2_internal.h:249
gprs_sns_state::ip4_remote
struct gprs_ns_ie_ip4_elem * ip4_remote
Definition: gprs_ns_sns.c:41
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:352
NS_IE_TRANS_ID
@ NS_IE_TRANS_ID
Definition: gsm_08_16.h:79
argv
argv
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:2399
NS_TOUT_TNS_RESET_RETRIES
@ NS_TOUT_TNS_RESET_RETRIES
Definition: gprs_ns.h:37
NS_PDUT_UNBLOCK
@ NS_PDUT_UNBLOCK
Definition: gsm_08_16.h:48
LOG_NS_TX_SIGNAL
#define LOG_NS_TX_SIGNAL(nsvc, pdu_type)
Definition: gprs_ns2_internal.h:39
gprs_ns2_vc::nsvci
uint16_t nsvci
uniquely identifies NS-VC if VC contains nsvci
Definition: gprs_ns2_internal.h:246
GPRS_NS2_EV_REQ_FORCE_UNCONFIGURED
@ GPRS_NS2_EV_REQ_FORCE_UNCONFIGURED
Definition: gprs_ns2_vc_fsm.c:117
gprs_ns2_free_bind
void gprs_ns2_free_bind(struct gprs_ns2_vc_bind *bind)
Destroy a given bind.
Definition: gprs_ns2.c:1490
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:297
gprs_ns2_vc_priv::initiate_block
bool initiate_block
Definition: gprs_ns2_vc_fsm.c:59
osmo_timer_pending
int osmo_timer_pending(const struct osmo_timer_list *timer)
gprs_ns2_vc_driver
Definition: gprs_ns2_internal.h:325
osmo_timer_del
void osmo_timer_del(struct osmo_timer_list *timer)
gprs_nsvc_create_ip4
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
osmo_fsm_register
int osmo_fsm_register(struct osmo_fsm *fsm)
msgb_tvlv_put
static uint8_t * msgb_tvlv_put(struct msgb *msg, uint8_t tag, uint16_t len, const uint8_t *val)
ns2_sns_state
Definition: gprs_ns2_sns.c:137
GPRS_NS2_EV_RX_BLOCK_ACK
@ GPRS_NS2_EV_RX_BLOCK_ACK
Definition: gprs_ns2_vc_fsm.c:110
osmo_sockaddr_str_from_sockaddr
int osmo_sockaddr_str_from_sockaddr(struct osmo_sockaddr_str *sockaddr_str, const struct sockaddr_storage *src)
llist_entry
#define llist_entry(ptr, type, member)
ns2_sns_bind
Definition: gprs_ns2_sns.c:110
gprs_nsvc::remote_state
uint32_t remote_state
Definition: gprs_ns.h:132
gprs_ns2_nse::dialect
enum gprs_ns2_dialect dialect
which dialect does this NSE speaks?
Definition: gprs_ns2_internal.h:202
msgb::l2h
unsigned char * l2h
osmo_sockaddr::sas
struct sockaddr_storage sas
NS_PDUT_STATUS
@ NS_PDUT_STATUS
Definition: gsm_08_16.h:50
gprs_nsvc::statg
struct osmo_stat_item_group * statg
Definition: gprs_ns.h:144
gprs_ns2_ip_vc_local
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
ns2_sns_procedure::ip6
struct gprs_ns_ie_ip6_elem ip6
Definition: gprs_ns2_sns.c:123
NS_IE_IPv6_LIST
@ NS_IE_IPv6_LIST
Definition: gsm_08_16.h:73
GRE_PTYPE_KAR
#define GRE_PTYPE_KAR
Definition: gprs_ns_frgre.c:47
GPRS_NS_LL_UDP
@ GPRS_NS_LL_UDP
NS/UDP/IP.
Definition: gprs_ns.h:54
LOGPFSML
#define LOGPFSML(fi, level, fmt, args...)
install_lib_element
void install_lib_element(int ntype, struct cmd_element *cmd)
update_ip6_elem
static int update_ip6_elem(struct ns2_sns_state *gss, struct ns2_sns_elems *elems, const struct gprs_ns_ie_ip6_elem *ip6)
Definition: gprs_ns2_sns.c:587
ns2_sns_procedure::sbind
struct ns2_sns_bind * sbind
Definition: gprs_ns2_sns.c:118
OSMO_FD_WRITE
#define OSMO_FD_WRITE
vty_bind::ll
enum gprs_ns2_ll ll
Definition: gprs_ns2_vty.c:68
GPRS_NS2_ST_UNCONFIGURED
@ GPRS_NS2_ST_UNCONFIGURED
Definition: gprs_ns2_vc_fsm.c:93
gprs_ns_ie_ip6_elem
Section 10.3.2d List of IP6 Elements.
Definition: gsm_08_16.h:32
gprs_sns_state::nsvc_hack
struct gprs_nsvc * nsvc_hack
Definition: gprs_ns_sns.c:29
gprs_sns_state::num_ip4_local
size_t num_ip4_local
Definition: gprs_ns_sns.c:33
gprs_ns2_sns_bss_fsm
static struct osmo_fsm gprs_ns2_sns_bss_fsm
Definition: gprs_ns2_sns.c:2253
NS_CTR_BYTES_OUT
@ NS_CTR_BYTES_OUT
Definition: gprs_ns.c:132
nsfrgre_fd_cb
static int nsfrgre_fd_cb(struct osmo_fd *bfd, unsigned int what)
Definition: gprs_ns_frgre.c:314
gprs_ns2_sns_count
int gprs_ns2_sns_count(struct gprs_ns2_nse *nse)
gprs_ns2_sns_count
Definition: gprs_ns2_sns.c:2566
update_remote_ip4_elem
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
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:2399
argc
argc
file
write Write running configuration to or terminal n Write configuration to the file(same as write file)\n") ALIAS(config_write_file
NS_TIMERS_HELP
#define NS_TIMERS_HELP
Definition: gprs_ns.h:19
gprs_sns_state::ip4_local
struct gprs_ns_ie_ip4_elem * ip4_local
Definition: gprs_ns_sns.c:32
NS_CAUSE_UNKN_IP_EP
@ NS_CAUSE_UNKN_IP_EP
Definition: gsm_08_16.h:100
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:210
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:2310
GPRS_SNS_ST_BSS_CONFIG_SGSN
@ GPRS_SNS_ST_BSS_CONFIG_SGSN
SNS-CONFIG procedure (SGSN->BSS) ongoing.
Definition: gprs_ns2_sns.c:69
NS_CTR_LOST_RESET
@ NS_CTR_LOST_RESET
Definition: gprs_ns.c:140
ns2_get_sbind_ip4_entry
static struct gprs_ns_ie_ip4_elem * ns2_get_sbind_ip4_entry(struct ns2_sns_state *gss, struct ns2_sns_bind *sbind, struct ns2_sns_elems *endpoints)
Definition: gprs_ns2_sns.c:1814
ip_sns_default_binds
static struct llist_head ip_sns_default_binds
Definition: gprs_ns2_vty.c:63
SS_L_NS
SS_L_NS
gprs_ns_timer_strs
static const struct value_string gprs_ns_timer_strs[]
Definition: gprs_ns_vty.c:55
sns_procedure
sns_procedure
Definition: gprs_ns2_sns.c:98
ns2_sns_bind::list
struct llist_head list
Definition: gprs_ns2_sns.c:111
S
#define S(x)
Definition: gprs_ns2_vc_fsm.c:50
ns2_sns_procedure::ip4
struct gprs_ns_ie_ip4_elem ip4
Definition: gprs_ns2_sns.c:122
GRE_PTYPE_FR
#define GRE_PTYPE_FR
Definition: gprs_ns_frgre.c:45
LOGBIND
#define LOGBIND(bind, lvl, fmt, args ...)
Definition: gprs_ns2_internal.h:15
log_tgt_mutex_unlock
#define log_tgt_mutex_unlock()
gprs_ns2_ip_bind_set_priority
int gprs_ns2_ip_bind_set_priority(struct gprs_ns2_vc_bind *bind, uint8_t priority)
Set the socket priority of the given bind.
Definition: gprs_ns2_udp.c:535
IPPROTO_GRE
#define IPPROTO_GRE
Definition: gprs_ns_frgre.c:50
gprs_ns2_fr_nsvc_by_dlci
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
gprs_ns2_vc_bind::nsvc
struct llist_head nsvc
list of all VC
Definition: gprs_ns2_internal.h:285
osmo_fd
gprs_ns2_vc::data_weight
uint8_t data_weight
data weight.
Definition: gprs_ns2_internal.h:255
osmo_fsm_state::in_event_mask
uint32_t in_event_mask
gprs_nsvc_start_test
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:2231
ns2_sns_state::family
int family
Definition: gprs_ns2_sns.c:141
sockaddr_str.h
L_NS_BIND_NODE
L_NS_BIND_NODE
vty_nse_alloc
static struct vty_nse * vty_nse_alloc(uint16_t nsei)
Definition: gprs_ns2_vty.c:168
gprs_nsvc::remote_end_is_sgsn
unsigned int remote_end_is_sgsn
Definition: gprs_ns.h:139
gprs_ns2_vc_priv::timer
struct osmo_timer_list timer
Definition: gprs_ns2_vc_fsm.c:68
GPRS_NS2_EV_RX_ALIVE
@ GPRS_NS2_EV_RX_ALIVE
Definition: gprs_ns2_vc_fsm.c:111
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:582
ns_signal_data
Definition: gprs_ns.h:245
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:253
LOGP
#define LOGP(ss, level, fmt, args...)
gprs_ns2_vc_priv::N
int N
Definition: gprs_ns2_vc_fsm.c:55
SNS_PDUT_CONFIG_ACK
@ SNS_PDUT_CONFIG_ACK
Definition: gsm_08_16.h:58
NS_CAUSE_UNKN_IP_TEST_FAILED
@ NS_CAUSE_UNKN_IP_TEST_FAILED
Definition: gsm_08_16.h:102
add_ip4_elem
static int add_ip4_elem(struct ns2_sns_state *gss, struct ns2_sns_elems *elems, const struct gprs_ns_ie_ip4_elem *ip4)
Definition: gprs_ns2_sns.c:498
vty_dump_sns_ip4
static void vty_dump_sns_ip4(struct vty *vty, const struct gprs_ns_ie_ip4_elem *ip4)
Definition: gprs_ns_sns.c:746
msgb_alloc
struct msgb * msgb_alloc(uint16_t size, const char *name)
llist_empty
static int llist_empty(const struct llist_head *head)
gprs_ns2_fr_bind_by_netif
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:935
ip46_weight_sum_data
#define ip46_weight_sum_data(elems)
Definition: gprs_ns2_sns.c:254
gprs_ns2_lltype_str
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
gprs_ns2_nsvc_by_sockaddr_bind
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:123
S
#define S(x)
Definition: gprs_ns_sns.c:25
nses
static struct llist_head nses
Definition: gprs_ns2_vty.c:62
NS_CAUSE_NSVC_UNKNOWN
@ NS_CAUSE_NSVC_UNKNOWN
Definition: gsm_08_16.h:88
L_NS_NSE_NODE
L_NS_NSE_NODE
NS_CAUSE_SEM_INCORR_PDU
@ NS_CAUSE_SEM_INCORR_PDU
Definition: gsm_08_16.h:90
GPRS_NS2_EV_RX_STATUS
@ GPRS_NS2_EV_RX_STATUS
Definition: gprs_ns2_vc_fsm.c:113
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:985
gprs_ns_inst::unknown_nsvc
struct gprs_nsvc * unknown_nsvc
a NSVC object that's needed to deal with packets for unknown NSVC
Definition: gprs_ns.h:88
osmo_stat_item_group_get_item
struct osmo_stat_item * osmo_stat_item_group_get_item(struct osmo_stat_item_group *grp, unsigned int idx)
GPRS_SNS_EV_CONFIG_END
@ GPRS_SNS_EV_CONFIG_END
SNS-CONFIG with end flag received.
Definition: gprs_ns_sns.c:281
ns2_st_unblocked
static void ns2_st_unblocked(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_vc_fsm.c:445
gprs_ns2_vc_mode
gprs_ns2_vc_mode
Definition: gprs_ns2.h:25
fsm.h
ns2_sns_add_sns_default_binds
int ns2_sns_add_sns_default_binds(struct gprs_ns2_nse *nse)
Definition: gprs_ns2_vty.c:1622
ns2_sns_st_configured_onenter
static void ns2_sns_st_configured_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns2_sns.c:1458
vty_bind::accept_ipaccess
bool accept_ipaccess
Definition: gprs_ns2_vty.c:71
gprs_ns2_vc_priv::om_blocked
bool om_blocked
Definition: gprs_ns2_vc_fsm.c:62
gprs_nsvc::state
uint32_t state
uniquely identifies NS-VC at SGSN
Definition: gprs_ns.h:131
gprs_sns_st_configured_onenter
static void gprs_sns_st_configured_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns_sns.c:551
NS2_SNS_EV_REQ_CHANGE_WEIGHT
@ NS2_SNS_EV_REQ_CHANGE_WEIGHT
a bind changed its weight
Definition: gprs_ns2_internal.h:347
osmo_sockaddr_local_ip
int osmo_sockaddr_local_ip(struct osmo_sockaddr *local_ip, const struct osmo_sockaddr *remote_ip)
GPRS_SNS_FLAG_KEEP_SELECT_ENDPOINT_ORDER
#define GPRS_SNS_FLAG_KEEP_SELECT_ENDPOINT_ORDER
Definition: gprs_ns2_sns.c:96
osmo_htons
#define osmo_htons(x)
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:783
llist_head::prev
struct llist_head * prev
frame_relay.h
vty_bind::name
const char * name
Definition: gprs_ns2_vty.c:67
GPRS_SNS_EV_SIZE
@ GPRS_SNS_EV_SIZE
Definition: gprs_ns_sns.c:278
ns2_sns_st_local_procedure_onenter
static void ns2_sns_st_local_procedure_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
Definition: gprs_ns2_sns.c:1486
gprs_ns_inst::local_ip
uint32_t local_ip
Definition: gprs_ns.h:95
ns2_sns_st_sgsn_wait_config
static void ns2_sns_st_sgsn_wait_config(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_sns.c:2776
ns2_sns_state::trans_id
uint8_t trans_id
Definition: gprs_ns2_sns.c:185
ns2_sns_bind::bind
struct gprs_ns2_vc_bind * bind
Definition: gprs_ns2_sns.c:112
DLNS
#define DLNS
gprs_nsvc::sig_weight
uint8_t sig_weight
signalling weight.
Definition: gprs_ns.h:160
NS_CAUSE_NSVC_BLOCKED
@ NS_CAUSE_NSVC_BLOCKED
Definition: gsm_08_16.h:87
gprs_sns_bss_fsm_alloc
struct osmo_fsm_inst * gprs_sns_bss_fsm_alloc(void *ctx, struct gprs_nsvc *nsvc, const char *id)
Definition: gprs_ns_sns.c:630
SNS_PDUT_DELETE
@ SNS_PDUT_DELETE
Definition: gsm_08_16.h:59
logging.h
NS2_CS_SKIPPED
@ NS2_CS_SKIPPED
Skipped message.
Definition: gprs_ns2_internal.h:117
do_sns_change_weight
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
ns2_sns_fsm_bss_timer_cb
static int ns2_sns_fsm_bss_timer_cb(struct osmo_fsm_inst *fi)
Definition: gprs_ns2_sns.c:1771
CMD_SUCCESS
return CMD_SUCCESS
NS2_SNS_EV_RX_SIZE
@ NS2_SNS_EV_RX_SIZE
Definition: gprs_ns2_internal.h:333
gprs_ns2_vc::nsvci_is_valid
bool nsvci_is_valid
Definition: gprs_ns2_internal.h:260
priv_bind
Definition: gprs_ns2_fr.c:94
NS2_SNS_EV_REQ_DELETE_BIND
@ NS2_SNS_EV_REQ_DELETE_BIND
remove a local bind from this NSE
Definition: gprs_ns2_internal.h:346
gprs_ns2_vc::persistent
bool persistent
true if this NS was created by VTY or pcu socket)
Definition: gprs_ns2_internal.h:243
gprs_ns_inst::enabled
unsigned int enabled
Definition: gprs_ns.h:107
gprs_ns_tx_sns_config_ack
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
ENCAPS_STR
#define ENCAPS_STR
Definition: gprs_ns_vty.c:471
gprs_ns_ie_ip4_elem::sig_weight
uint8_t sig_weight
Definition: gsm_08_16.h:27
list
struct llist_head list
NS_PDUT_UNBLOCK_ACK
@ NS_PDUT_UNBLOCK_ACK
Definition: gsm_08_16.h:49
gprs_ns_ie_ip4_elem::ip_addr
uint32_t ip_addr
Definition: gsm_08_16.h:25
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:318
ns2_sns_st_bss_size
static void ns2_sns_st_bss_size(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_sns.c:803
ns2_sns_elems::ip6
struct gprs_ns_ie_ip6_elem * ip6
Definition: gprs_ns2_sns.c:133
ns2_driver_alloc_vc
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:207
gprs_ns2_is_ip_bind
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
@ NS_CTR_PKTS_OUT
Definition: gprs_ns.c:130
log_target::filter_map
int filter_map
vty_out_newline
int vty_out_newline(struct vty *)
__attribute__
struct gre_hdr __attribute__((packed))
DEFUN
DEFUN(cfg_ns, cfg_ns_cmd, "ns", "Configure the GPRS Network Service")
Definition: gprs_ns2_vty.c:253
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:262
priority
unsigned int priority
priv_bind::addr
struct osmo_sockaddr addr
Definition: gprs_ns2_frgre.c:112
priv_bind::fd
struct osmo_fd fd
Definition: gprs_ns2_frgre.c: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:2587
LOG_NS_SIGNAL
#define LOG_NS_SIGNAL(nsvc, direction, pdu_type, lvl, fmt, args ...)
Definition: gprs_ns2_internal.h:32
gprs_ns2_ip_bind_sockaddr
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
@ GPRS_NS2_AFF_CAUSE_SNS_FAILURE
Definition: gprs_ns2.h:85
NS2_SNS_EV_RX_CONFIG_ACK
@ NS2_SNS_EV_RX_CONFIG_ACK
Definition: gprs_ns2_internal.h:337
command.h
gprs_ns2_vc::bind
struct gprs_ns2_vc_bind * bind
pointer to NS VL bind.
Definition: gprs_ns2_internal.h:240
ns2_sns_state::num_max_ip6_remote
size_t num_max_ip6_remote
Definition: gprs_ns2_sns.c:181
NS_IE_IPv6_EP_NR
@ NS_IE_IPv6_EP_NR
Definition: gsm_08_16.h:76
osmo_fd::fd
int fd
socket.h
gprs_ns2_sns_del_endpoint
int gprs_ns2_sns_del_endpoint(struct gprs_ns2_nse *nse, const struct osmo_sockaddr *saddr)
gprs_ns2_sns_del_endpoint
Definition: gprs_ns2_sns.c:2513
SNS_PDUT_SIZE_ACK
@ SNS_PDUT_SIZE_ACK
Definition: gsm_08_16.h:61
osmo_sockaddr_str_to_sockaddr
int osmo_sockaddr_str_to_sockaddr(const struct osmo_sockaddr_str *sockaddr_str, struct sockaddr_storage *dst)
gprs_ns2_nse_by_nsei
struct gprs_ns2_nse * gprs_ns2_nse_by_nsei(struct gprs_ns2_inst *nsi, uint16_t nsei)
Resolve a NS Entity based on its NSEI.
Definition: gprs_ns2.c:770
ns2_validate_block
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
vty_bind::dscp
int dscp
Definition: gprs_ns2_vty.c:69
alive_timer_elapsed_ms
static int alive_timer_elapsed_ms(struct gprs_ns2_vc_priv *priv)
Definition: gprs_ns2_vc_fsm.c:191
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:815
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:384
do_sns_change_weight
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:629
telnet_interface.h
gprs_nsvc::nsei
uint16_t nsei
Definition: gprs_ns.h:128
ns_sns_append_remote_eps
static int ns_sns_append_remote_eps(struct osmo_fsm_inst *fi, const struct tlv_parsed *tp)
Definition: gprs_ns2_sns.c:1098
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:985
gprs_sns_state::num_max_nsvcs
size_t num_max_nsvcs
Definition: gprs_ns_sns.c:37
gprs_ns2_vc::mode
enum gprs_ns2_vc_mode mode
Definition: gprs_ns2_internal.h:267
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:390
timespecsub
#define timespecsub(a, b, result)
GPRS_NS2_ST_UNBLOCKED
@ GPRS_NS2_ST_UNBLOCKED
Definition: gprs_ns2_vc_fsm.c:96
LOGL_DEBUG
#define LOGL_DEBUG
select.h
ip4_weight_sum
static int ip4_weight_sum(const struct ns2_sns_elems *elems, bool data_weight)
Definition: gprs_ns2_sns.c:216
vty_nse_free
static void vty_nse_free(struct vty_nse *vnse)
Definition: gprs_ns2_vty.c:180
recv_test_procedure
static void recv_test_procedure(struct osmo_fsm_inst *fi)
Definition: gprs_ns2_vc_fsm.c:203
do_sns_add
static int do_sns_add(struct osmo_fsm_inst *fi, const struct gprs_ns_ie_ip4_elem *ip4)
Definition: gprs_ns_sns.c:230
OSMO_SOCK_F_BIND
#define OSMO_SOCK_F_BIND
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_sns_state::binds
struct llist_head binds
Definition: gprs_ns2_sns.c:147
DNS
int DNS
Definition: common_vty.c:66
ns2_sns_procedure
Definition: gprs_ns2_sns.c:116
osmo_fd::data
void * data
gprs_ns2_ip_vc_remote
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
@ GPRS_NS_LL_FR_GRE
NS/FR/GRE/IP.
Definition: gprs_ns.h:56
gprs_ns2_vc_bind::free_vc
void(* free_vc)(struct gprs_ns2_vc *nsvc)
free the vc priv data
Definition: gprs_ns2_internal.h:308
osmo_sockaddr_str
LOGL_ERROR
#define LOGL_ERROR
gprs_ns2_inst::binding
struct llist_head binding
linked lists of all NSVC binds (e.g.
Definition: gprs_ns2_internal.h:156
osmo_sockaddr_str::port
uint16_t port
GPRS_NS2_DIALECT_UNDEF
@ GPRS_NS2_DIALECT_UNDEF
Definition: gprs_ns2.h:36
CMD_ERR_INCOMPLETE
#define CMD_ERR_INCOMPLETE
ns2_tx_simple
static int ns2_tx_simple(struct gprs_ns2_vc *nsvc, uint8_t pdu_type)
Definition: gprs_ns2_message.c:192
tlv_parsed
ns2_sns_st_bss_config_sgsn
static void ns2_sns_st_bss_config_sgsn(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_sns.c:1157
NS_STAT_ALIVE_DELAY
@ NS_STAT_ALIVE_DELAY
Definition: gprs_ns.c:167
gprs_sns_st_size
static void gprs_sns_st_size(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns_sns.c:313
gprs_ns2_sns_del_bind
int gprs_ns2_sns_del_bind(struct gprs_ns2_nse *nse, struct gprs_ns2_vc_bind *bind)
Definition: gprs_ns2_sns.c:2675
ns2_sns_state::remote
struct ns2_sns_elems remote
Definition: gprs_ns2_sns.c:175
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:287
ns2_vc_states
static const struct osmo_fsm_state ns2_vc_states[]
Definition: gprs_ns2_vc_fsm.c:491
osmo_fsm_inst::timer
struct osmo_timer_list timer
vty_out
vty_out(vty, "!%s", VTY_NEWLINE)
osmo_sock_get_name2
const char * osmo_sock_get_name2(int fd)
OSMO_MAX
#define OSMO_MAX(a, b)
gprs_ns2_nse::nsei
uint16_t nsei
Definition: gprs_ns2_internal.h:174
nsvc_for_bind_and_remote
static struct gprs_ns2_vc * nsvc_for_bind_and_remote(struct gprs_ns2_nse *nse, struct gprs_ns2_vc_bind *bind, const struct osmo_sockaddr *remote)
Definition: gprs_ns2_sns.c:404
NS_CAUSE_PDU_INCOMP_PSTATE
@ NS_CAUSE_PDU_INCOMP_PSTATE
Definition: gsm_08_16.h:91
NS_IE_IPv4_LIST
@ NS_IE_IPv4_LIST
Definition: gsm_08_16.h:72
S_SNS_CONFIGURED
@ S_SNS_CONFIGURED
Definition: gprs_ns.h:239
gprs_nsvc_by_nsvci
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
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:2275
msgb_tv_put
static uint8_t * msgb_tv_put(struct msgb *msg, uint8_t tag, uint8_t val)
SNS_PDUT_SIZE
@ SNS_PDUT_SIZE
Definition: gsm_08_16.h:60
stat_item.h
TLVP_VAL
#define TLVP_VAL(x, y)
gprs_ns2_inst::timeout
uint16_t timeout[NS_TIMERS_COUNT]
Definition: gprs_ns2_internal.h:161
ip4_weight_sum
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
ns2_vc_block
int ns2_vc_block(struct gprs_ns2_vc *nsvc)
Block a NS-VC.
Definition: gprs_ns2_vc_fsm.c:834
ns2_sns_state::initial
struct sns_endpoint * initial
Definition: gprs_ns2_sns.c:160
NS_CAUSE_INVAL_ESSENT_IE
@ NS_CAUSE_INVAL_ESSENT_IE
Definition: gsm_08_16.h:93
gprs_ns_inst::fd
struct osmo_fd fd
Definition: gprs_ns.h:94
GPRS_SNS_EV_ADD
@ GPRS_SNS_EV_ADD
Definition: gprs_ns_sns.c:283
ns2_sns_st_sgsn_wait_config_ack
static void ns2_sns_st_sgsn_wait_config_ack(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: gprs_ns2_sns.c:2827
gprs_sns_fsm_bss_timer_cb
static int gprs_sns_fsm_bss_timer_cb(struct osmo_fsm_inst *fi)
Definition: gprs_ns_sns.c:602
ns2_sns_procedure::trans_id
uint8_t trans_id
Definition: gprs_ns2_sns.c:125
vty_out_stat_item_group
void vty_out_stat_item_group(struct vty *vty, const char *prefix, struct osmo_stat_item_group *statg)
ns2_vty_dump_nsvc
void ns2_vty_dump_nsvc(struct vty *vty, struct gprs_ns2_vc *nsvc, bool stats)
Definition: gprs_ns2_vty.c:1875
misc.h
nsvc_by_ip6_elem
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:269
vty_nse_check_sns
static bool vty_nse_check_sns(struct gprs_ns2_nse *nse)
Definition: gprs_ns2_vty.c:229