libosmogsm 1.11.0.26-c59d.202505152026
Osmocom GSM library
|
#include <errno.h>
#include <inttypes.h>
#include <osmocom/core/crc8gen.h>
#include <osmocom/core/crc16gen.h>
#include <osmocom/core/fsm.h>
#include <osmocom/core/prim.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/logging.h>
#include <osmocom/gsm/prim.h>
#include <osmocom/gsm/protocol/gsm_25_415.h>
#include <osmocom/gsm/iuup.h>
Data Structures | |
struct | osmo_timer_nt |
struct | osmo_iuup_instance |
Macros | |
#define | S(x) (1 << (x)) |
#define | IUUP_TIMER_INIT 1 |
#define | IUUP_TIMER_TA 2 |
#define | IUUP_TIMER_RC 3 |
#define | IUUP_MSGB_SIZE 4096 |
#define | PTR_ALIGNMENT_BYTES 8 |
#define | IUUP_MSGB_HEADROOM_MIN_REQUIRED (OSMO_MAX(sizeof(struct osmo_iuup_tnl_prim), sizeof(struct osmo_iuup_rnl_prim)) + (PTR_ALIGNMENT_BYTES - 1)) |
#define IUUP_MSGB_HEADROOM_MIN_REQUIRED (OSMO_MAX(sizeof(struct osmo_iuup_tnl_prim), sizeof(struct osmo_iuup_rnl_prim)) + (PTR_ALIGNMENT_BYTES - 1)) |
#define IUUP_MSGB_SIZE 4096 |
#define IUUP_TIMER_INIT 1 |
#define IUUP_TIMER_RC 3 |
#define IUUP_TIMER_TA 2 |
#define PTR_ALIGNMENT_BYTES 8 |
|
inlinestatic |
References __attribute__, len, msg, msgb_data(), and PTR_ALIGNMENT_BYTES.
|
static |
References __attribute__, iuup_fsm, OSMO_ASSERT, and osmo_fsm_register().
|
static |
References cause, IUUP_PROC_ERR_EVENT, len, msg, msgb_alloc_c(), OSMO_IUUP_RNL_STATUS, PRIM_OP_INDICATION, and SAP_IUUP_RNL.
Referenced by iuup_fsm_init(), and iuup_fsm_timer_cb().
|
static |
References IUUP_MSGB_SIZE, IUUP_PROC_INIT, len, osmo_iuup_rnl_prim_alloc(), OSMO_IUUP_RNL_STATUS, and PRIM_OP_INDICATION.
Referenced by iuup_rx_initialization().
|
static |
References len, msg, msgb_copy_c(), and msgb_data().
Referenced by retransmit_initialization().
|
static |
References IUUP_AN_ACK, IUUP_MSGB_SIZE, IUUP_PDU_T_CONTROL, len, msgb_l2, osmo_iuup_compute_header_crc(), osmo_iuup_tnl_prim_alloc(), OSMO_IUUP_TNL_UNITDATA, and PRIM_OP_REQUEST.
Referenced by iuup_rx_initialization().
References data, osmo_iuup_instance::fi, irp_error_event_alloc_c(), IUUP_ERR_CAUSE_INIT_FAILURE_REP_NACK, IUUP_ERR_DIST_SECOND_FWD, IUUP_FSM_EVT_INIT, IUUP_FSM_EVT_INIT_NACK, IUUP_FSM_EVT_IUUP_CONFIG_REQ, IUUP_FSM_EVT_IUUP_DATA_REQ, IUUP_FSM_EVT_LAST_INIT_ACK, IUUP_FSM_ST_NULL, IUUP_FSM_ST_SMpSDU_DATA_XFER_READY, iuup_rx_initialization(), len, LOGL_INFO, LOGL_NOTICE, LOGPFSML, msgb_free(), OSMO_ASSERT, osmo_fsm_inst_state_chg, osmo_timer_del(), osmo_fsm_inst::priv, retransmit_initialization(), and osmo_fsm_inst::timer.
|
static |
References osmo_iuup_instance::fi, len, osmo_fsm_inst::priv, retransmit_initialization(), and tnp_ctrl_init_alloc().
References data, osmo_iuup_instance::fi, IUUP_FSM_EVT_INIT, IUUP_FSM_EVT_IUUP_CONFIG_REQ, IUUP_FSM_EVT_IUUP_DATA_IND, IUUP_FSM_EVT_IUUP_DATA_REQ, IUUP_FSM_ST_INIT, IUUP_FSM_ST_NULL, iuup_rx_initialization(), len, osmo_fsm_inst_state_chg, osmo_fsm_inst::priv, rnl_to_tnl_data(), and tnl_to_rnl_data().
|
static |
References data.
Referenced by iuup_verify_pdu().
Referenced by osmo_iuup_compute_payload_crc().
References data.
Referenced by iuup_verify_pdu(), osmo_iuup_tnl_prim_up(), and tnl_to_rnl_data().
|
static |
References hdr, osmo_iuup_rfci::id, irp_init_ind_alloc(), itp_ctrl_ack_alloc(), IUUP_ERR_CAUSE_UNEXPECTED_RFCI, IUUP_ERR_CAUSE_UNEXPECTED_VALUE, IUUP_MAX_RFCIS, IUUP_PROC_INIT, len, LOGL_DEBUG, LOGL_NOTICE, LOGPFSML, msgb_l2, osmo_iuup_tnl_prim::oph, osmo_hexdump(), osmo_iuup_rfci::subflow_sizes, tnp_ctrl_nack_alloc(), and osmo_iuup_rfci::used.
Referenced by iuup_fsm_init(), and iuup_fsm_smpsdu_data().
References data, DLIUUP, IUUP_AN_PROCEDURE, iuup_get_hdr_crc(), iuup_get_pdu_type(), IUUP_PDU_T_CONTROL, IUUP_PDU_T_DATA_CRC, IUUP_PDU_T_DATA_NOCRC, len, LOGL_NOTICE, LOGP, osmo_iuup_compute_header_crc(), osmo_iuup_compute_payload_crc(), and pdu_type.
Referenced by osmo_iuup_tnl_prim_up().
References iuup_hdr_crc_code, len, osmo_crc8gen_compute_bits(), and osmo_pbit2ubit().
Referenced by itp_ctrl_ack_alloc(), iuup_verify_pdu(), rnl_to_tnl_data(), tnp_ctrl_init_alloc(), and tnp_ctrl_nack_alloc().
References iuup_data_crc_code, iuup_get_payload_offset(), len, osmo_crc16gen_compute_bits(), osmo_pbit2ubit(), and pdu_type.
Referenced by iuup_verify_pdu(), rnl_to_tnl_data(), and tnp_ctrl_init_alloc().
struct osmo_iuup_instance * osmo_iuup_instance_alloc | ( | void * | ctx, |
const char * | id | ||
) |
References iuup_fsm, len, LOGL_DEBUG, and osmo_fsm_inst_alloc().
void osmo_iuup_instance_free | ( | struct osmo_iuup_instance * | iui | ) |
References len, and osmo_fsm_inst_free().
void osmo_iuup_instance_set_transport_prim_cb | ( | struct osmo_iuup_instance * | iui, |
osmo_prim_cb | func, | ||
void * | priv | ||
) |
References len.
void osmo_iuup_instance_set_user_prim_cb | ( | struct osmo_iuup_instance * | iui, |
osmo_prim_cb | func, | ||
void * | priv | ||
) |
References len.
References IUUP_MSGB_HEADROOM_MIN_REQUIRED, and OSMO_ASSERT.
Referenced by osmo_iuup_rnl_prim_alloc(), and osmo_iuup_tnl_prim_alloc().
struct osmo_iuup_rnl_prim * osmo_iuup_rnl_prim_alloc | ( | void * | ctx, |
unsigned int | primitive, | ||
unsigned int | operation, | ||
unsigned int | size | ||
) |
References len, msg, osmo_iuup_msgb_alloc_c(), and SAP_IUUP_RNL.
Referenced by irp_init_ind_alloc().
int osmo_iuup_rnl_prim_down | ( | struct osmo_iuup_instance * | inst, |
struct osmo_iuup_rnl_prim * | irp | ||
) |
struct osmo_iuup_tnl_prim * osmo_iuup_tnl_prim_alloc | ( | void * | ctx, |
unsigned int | primitive, | ||
unsigned int | operation, | ||
unsigned int | size | ||
) |
References len, msg, osmo_iuup_msgb_alloc_c(), and SAP_IUUP_TNL.
Referenced by itp_ctrl_ack_alloc(), tnp_ctrl_init_alloc(), and tnp_ctrl_nack_alloc().
int osmo_iuup_tnl_prim_up | ( | struct osmo_iuup_instance * | inst, |
struct osmo_iuup_tnl_prim * | itp | ||
) |
References IUUP_AN_ACK, IUUP_AN_NACK, IUUP_AN_PROCEDURE, IUUP_FSM_EVT_INIT, IUUP_FSM_EVT_INIT_NACK, IUUP_FSM_EVT_IUUP_DATA_IND, IUUP_FSM_EVT_LAST_INIT_ACK, iuup_get_pdu_type(), IUUP_PDU_T_CONTROL, IUUP_PDU_T_DATA_CRC, IUUP_PDU_T_DATA_NOCRC, IUUP_PROC_ERR_EVENT, IUUP_PROC_INIT, IUUP_PROC_RATE_CTRL, IUUP_PROC_TIME_ALIGN, iuup_verify_pdu(), msgb::l3h, len, LOGL_ERROR, LOGL_NOTICE, LOGPFSML, osmo_prim_hdr::msg, msgb_l2, OSMO_ASSERT, osmo_fsm_inst_dispatch, osmo_hexdump(), OSMO_IUUP_TNL_UNITDATA, OSMO_PRIM, OSMO_PRIM_HDR, PRIM_OP_INDICATION, osmo_prim_hdr::sap, and SAP_IUUP_TNL.
|
static |
References itp_copy_c(), IUUP_TIMER_INIT, len, and osmo_timer_schedule().
Referenced by iuup_fsm_init(), iuup_fsm_init_on_enter(), and iuup_fsm_timer_cb().
|
static |
|
static |
References iuup_get_pdu_type(), IUUP_PDU_T_DATA_CRC, IUUP_PDU_T_DATA_NOCRC, len, osmo_prim_hdr::msg, msg, msgb_l2, osmo_iuup_rnl_prim::oph, OSMO_ASSERT, OSMO_IUUP_RNL_DATA, OSMO_IUUP_TNL_UNITDATA, OSMO_PRIM, OSMO_PRIM_HDR, PRIM_OP_INDICATION, and SAP_IUUP_RNL.
Referenced by iuup_fsm_smpsdu_data().
|
static |
References ARRAY_SIZE, DLIUUP, hdr, osmo_iuup_rfci::id, osmo_iuup_rfci::IPTI, IUUP_AN_PROCEDURE, IUUP_MSGB_SIZE, IUUP_PDU_T_CONTROL, IUUP_PROC_INIT, len, LOGL_ERROR, LOGP, msg, msgb_free(), msgb_l2, osmo_iuup_compute_header_crc(), osmo_iuup_compute_payload_crc(), osmo_iuup_tnl_prim_alloc(), OSMO_IUUP_TNL_UNITDATA, PRIM_OP_REQUEST, osmo_iuup_rfci::subflow_sizes, and osmo_iuup_rfci::used.
Referenced by iuup_fsm_init_on_enter().
|
static |
References IUUP_AN_NACK, IUUP_MSGB_SIZE, IUUP_PDU_T_CONTROL, len, msgb_l2, osmo_iuup_compute_header_crc(), osmo_iuup_tnl_prim_alloc(), OSMO_IUUP_TNL_UNITDATA, and PRIM_OP_REQUEST.
Referenced by iuup_rx_initialization().
const struct osmo_crc16gen_code iuup_data_crc_code |
Referenced by osmo_iuup_compute_payload_crc().
Referenced by __attribute__(), and osmo_iuup_instance_alloc().
|
static |
|
static |
const struct osmo_crc8gen_code iuup_hdr_crc_code |
Referenced by osmo_iuup_compute_header_crc().