libosmogb 1.13.1.1-afb4 Osmocom Gb library

Functions
gb_internal.h File Reference
`#include <osmocom/core/msgb.h>`
`#include <osmocom/gsm/tlv.h>`
`#include <osmocom/gprs/gprs_ns.h>`

Go to the source code of this file.

## Functions
int | gprs_ns_rx_sns (struct gprs_ns_inst *nsi, struct msgb *msg, struct tlv_parsed *tp)
struct osmo_fsm_inst * | gprs_sns_bss_fsm_alloc (void *ctx, struct gprs_nsvc *nsvc, const char *id)
int | gprs_sns_bss_fsm_start (struct gprs_ns_inst *nsi)
int | gprs_sns_init (void)
void | gprs_nsvc_start_test (struct gprs_nsvc *nsvc)
| Start the ALIVE timer procedure in all NS-VCs part of this NS Instance. More...
void | gprs_start_alive_all_nsvcs (struct gprs_ns_inst *nsi)
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. More...
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. More...
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. More...
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. More...
int | gprs_ns_tx_sns_size_ack (struct gprs_nsvc *nsvc, uint8_t *cause)
| Encode + Transmit a SNS-SIZE-ACK as per Section 9.3.8. More...
void | gprs_sns_dump_vty (struct vty *vty, const struct gprs_ns_inst *nsi, bool stats)

## Function Documentation

## ◆ gprs_ns_rx_sns()

int gprs_ns_rx_sns | ( | struct gprs_ns_inst * | nsi,
|  | struct msgb * | msg,
|  | struct tlv_parsed * | tp
| ) |  |

References gprs_ns_inst::bss_sns_fi, gprs_ns_hdr::data, DNS, get_value_string(), gprs_ns_pdu_strings, GPRS_SNS_EV_ADD, GPRS_SNS_EV_CHANGE_WEIGHT, GPRS_SNS_EV_CONFIG, GPRS_SNS_EV_CONFIG_ACK, GPRS_SNS_EV_CONFIG_END, GPRS_SNS_EV_DELETE, GPRS_SNS_EV_SIZE, GPRS_SNS_EV_SIZE_ACK, LOGL_DEBUG, LOGL_ERROR, LOGL_NOTICE, LOGP, msg, msgb_nsei, nsei, osmo_fsm_inst_dispatch, gprs_ns_hdr::pdu_type, SNS_PDUT_ACK, SNS_PDUT_ADD, SNS_PDUT_CHANGE_WEIGHT, SNS_PDUT_CONFIG, SNS_PDUT_CONFIG_ACK, SNS_PDUT_DELETE, SNS_PDUT_SIZE, and SNS_PDUT_SIZE_ACK.

Referenced by gprs_ns_process_msg().

## ◆ gprs_sns_bss_fsm_alloc()

struct osmo_fsm_inst * gprs_sns_bss_fsm_alloc | ( | void * | ctx,
|  | struct gprs_nsvc * | nsvc,
|  | const char * | id
| ) |  |

References gprs_nsvc::bts_addr, gprs_ns_ie_ip4_elem::data_weight, gprs_sns_bss_fsm, gprs_nsvc::ip, gprs_sns_state::ip4_local, gprs_ns_ie_ip4_elem::ip_addr, gprs_ns_inst::local_ip, gprs_ns_inst::local_port, LOGL_DEBUG, gprs_sns_state::next_nsvci, gprs_nsvc::nsi, gprs_sns_state::nsi, gprs_ns_inst::nsip, gprs_sns_state::nsvc_hack, gprs_sns_state::num_ip4_local, gprs_sns_state::num_max_ip4_remote, gprs_sns_state::num_max_nsvcs, osmo_fsm_inst_alloc(), osmo_fsm_inst_term, OSMO_FSM_TERM_ERROR, osmo_sock_local_ip(), osmo_fsm_inst::priv, gprs_ns_ie_ip4_elem::sig_weight, and gprs_ns_ie_ip4_elem::udp_port.

Referenced by gprs_ns_nsip_connect_sns().

## ◆ gprs_sns_bss_fsm_start()

int gprs_sns_bss_fsm_start | ( | struct gprs_ns_inst * | nsi | ) |

References gprs_ns_inst::bss_sns_fi, GPRS_SNS_EV_START, and osmo_fsm_inst_dispatch.

Referenced by gprs_ns_nsip_connect_sns().

## ◆ gprs_sns_dump_vty()

void gprs_sns_dump_vty | ( | struct vty * | vty,
|  | const struct gprs_ns_inst * | nsi,
|  | bool | stats
| ) |  |

References gprs_ns_inst::bss_sns_fi, gprs_sns_state::ip4_local, gprs_sns_state::ip4_remote, gprs_sns_state::nsi, gprs_sns_state::num_ip4_local, gprs_sns_state::num_ip4_remote, gprs_sns_state::num_max_ip4_remote, gprs_sns_state::num_max_nsvcs, osmo_fsm_inst::priv, vty_dump_sns_ip4(), VTY_NEWLINE, vty_out(), and vty_out_fsm_inst().

Referenced by dump_ns().

## ◆ gprs_sns_init()

int gprs_sns_init | ( | void |  | ) |

References DNS, gprs_sns_bss_fsm, osmo_fsm::log_subsys, and osmo_fsm_register().

Referenced by gprs_ns_instantiate().