libosmogsm 1.13.1.1-afb4 Osmocom GSM library

Data Structures | Macros | Enumerations | Functions | Variables
iuup.c File Reference
`#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))

## Enumerations
enum | iuup_fsm_state { IUUP_FSM_ST_NULL , IUUP_FSM_ST_INIT , IUUP_FSM_ST_TrM_DATA_XFER_READY , IUUP_FSM_ST_SMpSDU_DATA_XFER_READY }
enum | iuup_fsm_event { IUUP_FSM_EVT_IUUP_CONFIG_REQ , IUUP_FSM_EVT_IUUP_DATA_REQ , IUUP_FSM_EVT_IUUP_DATA_IND , IUUP_FSM_EVT_IUUP_STATUS_REQ , IUUP_FSM_EVT_IUUP_STATUS_IND , IUUP_FSM_EVT_SSASAR_UNITDATA_REQ , IUUP_FSM_EVT_SSASAR_UNITDATA_IND , IUUP_FSM_EVT_IUUP_UNITDATA_REQ , IUUP_FSM_EVT_IUUP_UNITDATA_IND , IUUP_FSM_EVT_INIT , IUUP_FSM_EVT_LAST_INIT_ACK , IUUP_FSM_EVT_INIT_NACK }

## Functions
static int | iuup_get_payload_offset (const uint8_t *iuup_pdu)
int | osmo_iuup_compute_payload_crc (const uint8_t *iuup_pdu, unsigned int pdu_len)
int | osmo_iuup_compute_header_crc (const uint8_t *iuup_pdu, unsigned int pdu_len)
static uint8_t | iuup_get_pdu_type (const uint8_t *data)
static uint8_t | iuup_get_hdr_crc (const uint8_t *data)
static struct msgb * | osmo_iuup_msgb_alloc_c (void *ctx, size_t size)
static | __attribute__ ((assume_aligned(PTR_ALIGNMENT_BYTES)))
struct osmo_iuup_rnl_prim * | osmo_iuup_rnl_prim_alloc (void *ctx, unsigned int primitive, unsigned int operation, unsigned int size)
struct osmo_iuup_tnl_prim * | osmo_iuup_tnl_prim_alloc (void *ctx, unsigned int primitive, unsigned int operation, unsigned int size)
static struct osmo_iuup_tnl_prim * | itp_ctrl_ack_alloc (struct osmo_iuup_instance *iui, enum iuup_procedure proc_ind, uint8_t fn)
static struct osmo_iuup_tnl_prim * | tnp_ctrl_nack_alloc (struct osmo_iuup_instance *iui, enum iuup_procedure proc_ind, enum iuup_error_cause error_cause, uint8_t fn)
static struct osmo_iuup_tnl_prim * | tnp_ctrl_init_alloc (struct osmo_iuup_instance *iui)
static struct osmo_iuup_rnl_prim * | irp_init_ind_alloc (struct osmo_iuup_instance *iui)
static struct osmo_iuup_tnl_prim * | rnl_to_tnl_data (struct osmo_iuup_instance *iui, struct osmo_iuup_rnl_prim *irp)
static struct osmo_iuup_rnl_prim * | tnl_to_rnl_data (struct osmo_iuup_tnl_prim *itp)
static struct osmo_iuup_rnl_prim * | irp_error_event_alloc_c (void *ctx, enum iuup_error_cause cause, enum iuup_error_distance distance)
static struct osmo_iuup_tnl_prim * | itp_copy_c (void *ctx, const struct osmo_iuup_tnl_prim *src_itp)
static void | retransmit_initialization (struct osmo_iuup_instance *iui)
static bool | iuup_rx_initialization (struct osmo_iuup_instance *iui, struct osmo_iuup_tnl_prim *itp)
static void | iuup_fsm_null (struct osmo_fsm_inst *fi, uint32_t event, void *data)
static void | iuup_fsm_trm_data (struct osmo_fsm_inst *fi, uint32_t event, void *data)
static void | iuup_fsm_init_on_enter (struct osmo_fsm_inst *fi, uint32_t prev_state)
static void | iuup_fsm_init (struct osmo_fsm_inst *fi, uint32_t event, void *data)
static void | iuup_fsm_smpsdu_data (struct osmo_fsm_inst *fi, uint32_t event, void *data)
static int | iuup_fsm_timer_cb (struct osmo_fsm_inst *fi)
static int | iuup_verify_pdu (const uint8_t *data, unsigned int len)
int | osmo_iuup_tnl_prim_up (struct osmo_iuup_instance *inst, struct osmo_iuup_tnl_prim *itp)
int | osmo_iuup_rnl_prim_down (struct osmo_iuup_instance *inst, struct osmo_iuup_rnl_prim *irp)
struct osmo_iuup_instance * | osmo_iuup_instance_alloc (void *ctx, const char *id)
void | osmo_iuup_instance_free (struct osmo_iuup_instance *iui)
void | osmo_iuup_instance_set_user_prim_cb (struct osmo_iuup_instance *iui, osmo_prim_cb func, void *priv)
void | osmo_iuup_instance_set_transport_prim_cb (struct osmo_iuup_instance *iui, osmo_prim_cb func, void *priv)
static | __attribute__ ((constructor))

## Variables
const struct osmo_crc8gen_code | iuup_hdr_crc_code
const struct osmo_crc16gen_code | iuup_data_crc_code
static const struct value_string | iuup_fsm_event_names []
static const struct osmo_fsm_state | iuup_fsm_states []
static struct osmo_fsm | iuup_fsm

## Macro Definition Documentation

## ◆ IUUP_MSGB_HEADROOM_MIN_REQUIRED

#define IUUP_MSGB_HEADROOM_MIN_REQUIRED (OSMO_MAX(sizeof(struct osmo_iuup_tnl_prim), sizeof(struct osmo_iuup_rnl_prim)) + (PTR_ALIGNMENT_BYTES - 1))

## ◆ IUUP_MSGB_SIZE

#define IUUP_MSGB_SIZE 4096

## ◆ IUUP_TIMER_INIT

#define IUUP_TIMER_INIT 1

## ◆ IUUP_TIMER_RC

#define IUUP_TIMER_RC 3

## ◆ IUUP_TIMER_TA

#define IUUP_TIMER_TA 2

## ◆ PTR_ALIGNMENT_BYTES

#define PTR_ALIGNMENT_BYTES 8

## ◆ S

#define S | ( |  | x | ) | (1 << (x))

## Enumeration Type Documentation

## ◆ iuup_fsm_event

enum iuup_fsm_event

Enumerator
IUUP_FSM_EVT_IUUP_CONFIG_REQ |
IUUP_FSM_EVT_IUUP_DATA_REQ |
IUUP_FSM_EVT_IUUP_DATA_IND |
IUUP_FSM_EVT_IUUP_STATUS_REQ |
IUUP_FSM_EVT_IUUP_STATUS_IND |
IUUP_FSM_EVT_SSASAR_UNITDATA_REQ |
IUUP_FSM_EVT_SSASAR_UNITDATA_IND |
IUUP_FSM_EVT_IUUP_UNITDATA_REQ |
IUUP_FSM_EVT_IUUP_UNITDATA_IND |
IUUP_FSM_EVT_INIT |
IUUP_FSM_EVT_LAST_INIT_ACK |
IUUP_FSM_EVT_INIT_NACK |

## ◆ iuup_fsm_state

enum iuup_fsm_state

Enumerator
IUUP_FSM_ST_NULL |
IUUP_FSM_ST_INIT |
IUUP_FSM_ST_TrM_DATA_XFER_READY |
IUUP_FSM_ST_SMpSDU_DATA_XFER_READY |

## Function Documentation

## ◆ __attribute__() [1/2]

static __attribute__ | ( | (assume_aligned(PTR_ALIGNMENT_BYTES)) |  | ) |
| inline static

References len, msg, msgb_data(), msgb_push(), and PTR_ALIGNMENT_BYTES.

## ◆ __attribute__() [2/2]

static __attribute__ | ( | (constructor) |  | ) |
| static

References iuup_fsm, OSMO_ASSERT, and osmo_fsm_register().

## ◆ irp_error_event_alloc_c()

static struct osmo_iuup_rnl_prim * irp_error_event_alloc_c | ( | void * | ctx,
|  | enum iuup_error_cause | cause,
|  | enum iuup_error_distance | distance
| ) |  |
| static

References osmo_iuup_rnl_status::cause, cause, osmo_iuup_rnl_status::distance, osmo_iuup_rnl_status::error_event, IUUP_PROC_ERR_EVENT, msg, msgb_alloc_c(), msgb_put(), osmo_iuup_rnl_prim::oph, OSMO_IUUP_RNL_STATUS, osmo_prim_init(), PRIM_OP_INDICATION, osmo_iuup_rnl_status::procedure, SAP_IUUP_RNL, osmo_iuup_rnl_prim::status, osmo_iuup_rnl_status::u, and osmo_iuup_rnl_prim::u.

Referenced by iuup_fsm_init(), and iuup_fsm_timer_cb().

## ◆ irp_init_ind_alloc()

static struct osmo_iuup_rnl_prim * irp_init_ind_alloc | ( | struct osmo_iuup_instance * | iui | ) |
| static

References osmo_iuup_instance::config, osmo_iuup_rnl_config::data_pdu_type, osmo_iuup_rnl_status::data_pdu_type, osmo_iuup_rnl_status::initialization, osmo_iuup_rnl_config::IPTIs_present, osmo_iuup_rnl_status::IPTIs_present, IUUP_MSGB_SIZE, IUUP_PROC_INIT, osmo_iuup_rnl_status::mode_version, osmo_iuup_instance::mode_version, osmo_iuup_rnl_config::num_rfci, osmo_iuup_rnl_status::num_rfci, osmo_iuup_rnl_config::num_subflows, osmo_iuup_rnl_status::num_subflows, osmo_iuup_rnl_prim_alloc(), OSMO_IUUP_RNL_STATUS, PRIM_OP_INDICATION, osmo_iuup_rnl_status::procedure, osmo_iuup_rnl_config::rfci, osmo_iuup_rnl_status::rfci, osmo_iuup_rnl_prim::status, osmo_iuup_rnl_status::u, and osmo_iuup_rnl_prim::u.

## ◆ itp_copy_c()

static struct osmo_iuup_tnl_prim * itp_copy_c | ( | void * | ctx,
|  | const struct osmo_iuup_tnl_prim * | src_itp
| ) |  |
| static

References osmo_prim_hdr::msg, msg, msgb_copy_c(), msgb_data(), and osmo_iuup_tnl_prim::oph.

Referenced by retransmit_initialization().

## ◆ itp_ctrl_ack_alloc()

static struct osmo_iuup_tnl_prim * itp_ctrl_ack_alloc | ( | struct osmo_iuup_instance * | iui,
|  | enum iuup_procedure | proc_ind,
|  | uint8_t | fn
| ) |  |
| static

References iuup_ctrl_ack::hdr, IUUP_AN_ACK, IUUP_MSGB_SIZE, IUUP_PDU_T_CONTROL, msgb::l2h, osmo_iuup_instance::mode_version, osmo_prim_hdr::msg, msgb_l2, msgb_l2len(), msgb_put(), osmo_iuup_tnl_prim::oph, osmo_iuup_compute_header_crc(), osmo_iuup_tnl_prim_alloc(), OSMO_IUUP_TNL_UNITDATA, and PRIM_OP_REQUEST.

## ◆ iuup_fsm_init()

static void iuup_fsm_init | ( | struct osmo_fsm_inst * | fi,
|  | uint32_t | event,
|  | void * | data
| ) |  |
| static

References osmo_iuup_instance::config, data, osmo_iuup_instance::fi, osmo_iuup_instance::init, 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(), LOGL_INFO, LOGL_NOTICE, LOGPFSML, osmo_prim_hdr::msg, msgb_free(), osmo_timer_nt::n, osmo_iuup_rnl_config_timer::n_max, osmo_iuup_rnl_prim::oph, OSMO_ASSERT, osmo_fsm_inst_state_chg, osmo_timer_del(), osmo_fsm_inst::priv, retransmit_initialization(), osmo_iuup_rnl_config::t_init, osmo_fsm_inst::timer, osmo_iuup_instance::timer, osmo_iuup_instance::user_prim_cb, and osmo_iuup_instance::user_prim_priv.

## ◆ iuup_fsm_init_on_enter()

static void iuup_fsm_init_on_enter | ( | struct osmo_fsm_inst * | fi,
|  | uint32_t | prev_state
| ) |  |
| static

References osmo_iuup_rnl_config::active, osmo_iuup_instance::config, osmo_iuup_instance::fi, osmo_iuup_instance::init, osmo_timer_nt::n, osmo_fsm_inst::priv, osmo_timer_nt::retrans_itp, retransmit_initialization(), osmo_iuup_instance::timer, tnp_ctrl_init_alloc(), and osmo_iuup_instance::type14_fn.

## ◆ iuup_fsm_null()

static void iuup_fsm_null | ( | struct osmo_fsm_inst * | fi,
|  | uint32_t | event,
|  | void * | data
| ) |  |
| static

References osmo_iuup_rnl_prim::config, osmo_iuup_instance::config, data, osmo_iuup_instance::fi, IUUP_FSM_EVT_IUUP_CONFIG_REQ, IUUP_FSM_ST_INIT, IUUP_FSM_ST_TrM_DATA_XFER_READY, osmo_fsm_inst_state_chg, osmo_fsm_inst::priv, osmo_iuup_rnl_config::supported_versions_mask, osmo_iuup_rnl_config::transparent, and osmo_iuup_rnl_prim::u.

## ◆ iuup_fsm_smpsdu_data()

static void iuup_fsm_smpsdu_data | ( | struct osmo_fsm_inst * | fi,
|  | uint32_t | event,
|  | void * | data
| ) |  |
| static

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(), osmo_iuup_tnl_prim::oph, osmo_iuup_rnl_prim::oph, osmo_fsm_inst_state_chg, osmo_fsm_inst::priv, rnl_to_tnl_data(), tnl_to_rnl_data(), osmo_iuup_instance::transport_prim_cb, osmo_iuup_instance::transport_prim_priv, osmo_iuup_instance::user_prim_cb, and osmo_iuup_instance::user_prim_priv.

## ◆ iuup_fsm_timer_cb()

static int iuup_fsm_timer_cb | ( | struct osmo_fsm_inst * | fi | ) |
| static

References osmo_iuup_instance::config, osmo_iuup_instance::fi, osmo_iuup_instance::init, irp_error_event_alloc_c(), IUUP_ERR_CAUSE_INIT_FAILURE_NET_TMR, IUUP_ERR_DIST_LOCAL, IUUP_FSM_ST_INIT, IUUP_TIMER_INIT, IUUP_TIMER_RC, IUUP_TIMER_TA, osmo_timer_nt::n, osmo_iuup_rnl_config_timer::n_max, osmo_iuup_rnl_prim::oph, OSMO_ASSERT, osmo_fsm_inst::priv, retransmit_initialization(), osmo_fsm_inst::state, osmo_fsm_inst::T, osmo_iuup_rnl_config::t_init, osmo_iuup_instance::timer, osmo_iuup_instance::user_prim_cb, and osmo_iuup_instance::user_prim_priv.

## ◆ iuup_fsm_trm_data()

static void iuup_fsm_trm_data | ( | struct osmo_fsm_inst * | fi,
|  | uint32_t | event,
|  | void * | data
| ) |  |
| static

References IUUP_FSM_EVT_IUUP_CONFIG_REQ, IUUP_FSM_EVT_IUUP_DATA_IND, IUUP_FSM_EVT_IUUP_DATA_REQ, IUUP_FSM_EVT_IUUP_UNITDATA_IND, IUUP_FSM_EVT_IUUP_UNITDATA_REQ, IUUP_FSM_EVT_SSASAR_UNITDATA_IND, IUUP_FSM_EVT_SSASAR_UNITDATA_REQ, IUUP_FSM_ST_NULL, and osmo_fsm_inst_state_chg.

## ◆ iuup_get_hdr_crc()

static uint8_t iuup_get_hdr_crc | ( | const uint8_t * | data | ) |
| inline static

References data.

Referenced by iuup_verify_pdu().

## ◆ iuup_get_payload_offset()

static int iuup_get_payload_offset | ( | const uint8_t * | iuup_pdu | ) |
| static

References pdu_type.

Referenced by osmo_iuup_compute_payload_crc().

## ◆ iuup_get_pdu_type()

static uint8_t iuup_get_pdu_type | ( | const uint8_t * | data | ) |
| inline static

References data.

Referenced by iuup_verify_pdu(), osmo_iuup_tnl_prim_up(), and tnl_to_rnl_data().

## ◆ iuup_rx_initialization()

static bool iuup_rx_initialization | ( | struct osmo_iuup_instance * | iui,
|  | struct osmo_iuup_tnl_prim * | itp
| ) |  |
| static

References osmo_iuup_instance::config, osmo_iuup_instance::fi, for(), hdr, if(), IUUP_ERR_CAUSE_UNEXPECTED_RFCI, IUUP_ERR_CAUSE_UNEXPECTED_VALUE, IUUP_MAX_RFCIS, LOGL_NOTICE, LOGPFSML, osmo_prim_hdr::msg, msgb_l2, osmo_iuup_tnl_prim::oph, and osmo_iuup_rnl_config::rfci.

Referenced by iuup_fsm_init(), and iuup_fsm_smpsdu_data().

## ◆ iuup_verify_pdu()

static int iuup_verify_pdu | ( | const uint8_t * | data,
|  | unsigned int | len
| ) |  |
| static

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

## ◆ osmo_iuup_compute_header_crc()

int osmo_iuup_compute_header_crc | ( | const uint8_t * | iuup_pdu,
|  | unsigned int | pdu_len
| ) |  |

References iuup_hdr_crc_code, 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().

## ◆ osmo_iuup_compute_payload_crc()

int osmo_iuup_compute_payload_crc | ( | const uint8_t * | iuup_pdu,
|  | unsigned int | pdu_len
| ) |  |

References iuup_data_crc_code, iuup_get_payload_offset(), osmo_crc16gen_compute_bits(), osmo_pbit2ubit(), and pdu_type.

Referenced by iuup_verify_pdu(), rnl_to_tnl_data(), and tnp_ctrl_init_alloc().

## ◆ osmo_iuup_instance_alloc()

struct osmo_iuup_instance * osmo_iuup_instance_alloc | ( | void * | ctx,
|  | const char * | id
| ) |  |

References osmo_iuup_instance::fi, iuup_fsm, LOGL_DEBUG, and osmo_fsm_inst_alloc().

## ◆ osmo_iuup_instance_free()

void osmo_iuup_instance_free | ( | struct osmo_iuup_instance * | iui | ) |

References osmo_iuup_instance::fi, and osmo_fsm_inst_free().

## ◆ osmo_iuup_instance_set_transport_prim_cb()

void osmo_iuup_instance_set_transport_prim_cb | ( | struct osmo_iuup_instance * | iui,
|  | osmo_prim_cb | func,
|  | void * | priv
| ) |  |

References osmo_iuup_instance::transport_prim_cb, and osmo_iuup_instance::transport_prim_priv.

## ◆ osmo_iuup_instance_set_user_prim_cb()

void osmo_iuup_instance_set_user_prim_cb | ( | struct osmo_iuup_instance * | iui,
|  | osmo_prim_cb | func,
|  | void * | priv
| ) |  |

References osmo_iuup_instance::user_prim_cb, and osmo_iuup_instance::user_prim_priv.

## ◆ osmo_iuup_msgb_alloc_c()

static struct msgb * osmo_iuup_msgb_alloc_c | ( | void * | ctx,
|  | size_t | size
| ) |  |
| inline static

References IUUP_MSGB_HEADROOM_MIN_REQUIRED, msgb_alloc_headroom_c(), and OSMO_ASSERT.

Referenced by osmo_iuup_rnl_prim_alloc(), and osmo_iuup_tnl_prim_alloc().

## ◆ osmo_iuup_rnl_prim_alloc()

struct osmo_iuup_rnl_prim * osmo_iuup_rnl_prim_alloc | ( | void * | ctx,
|  | unsigned int | primitive,
|  | unsigned int | operation,
|  | unsigned int | size
| ) |  |

References msg, osmo_iuup_rnl_prim::oph, osmo_iuup_msgb_alloc_c(), osmo_prim_init(), and SAP_IUUP_RNL.

Referenced by irp_init_ind_alloc().

## ◆ osmo_iuup_rnl_prim_down()

int osmo_iuup_rnl_prim_down | ( | struct osmo_iuup_instance * | inst,
|  | struct osmo_iuup_rnl_prim * | irp
| ) |  |

References osmo_iuup_instance::fi, IUUP_FSM_EVT_IUUP_CONFIG_REQ, IUUP_FSM_EVT_IUUP_DATA_REQ, IUUP_FSM_EVT_IUUP_STATUS_REQ, osmo_prim_hdr::msg, msgb_free(), osmo_iuup_rnl_prim::oph, OSMO_ASSERT, osmo_fsm_inst_dispatch, OSMO_IUUP_RNL_CONFIG, OSMO_IUUP_RNL_DATA, OSMO_IUUP_RNL_STATUS, OSMO_PRIM, OSMO_PRIM_HDR, PRIM_OP_REQUEST, osmo_prim_hdr::sap, and SAP_IUUP_RNL.

## ◆ osmo_iuup_tnl_prim_alloc()

struct osmo_iuup_tnl_prim * osmo_iuup_tnl_prim_alloc | ( | void * | ctx,
|  | unsigned int | primitive,
|  | unsigned int | operation,
|  | unsigned int | size
| ) |  |

References msg, osmo_iuup_tnl_prim::oph, osmo_iuup_msgb_alloc_c(), osmo_prim_init(), and SAP_IUUP_TNL.

Referenced by itp_ctrl_ack_alloc(), tnp_ctrl_init_alloc(), and tnp_ctrl_nack_alloc().

## ◆ osmo_iuup_tnl_prim_up()

int osmo_iuup_tnl_prim_up | ( | struct osmo_iuup_instance * | inst,
|  | struct osmo_iuup_tnl_prim * | itp
| ) |  |

References osmo_iuup_instance::fi, 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, LOGL_ERROR, LOGL_NOTICE, LOGPFSML, osmo_prim_hdr::msg, msgb_l2, msgb_l2len(), osmo_iuup_tnl_prim::oph, 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.

## ◆ retransmit_initialization()

static void retransmit_initialization | ( | struct osmo_iuup_instance * | iui | ) |
| static

References osmo_iuup_instance::config, osmo_iuup_instance::fi, osmo_iuup_instance::init, itp_copy_c(), IUUP_TIMER_INIT, osmo_iuup_tnl_prim::oph, osmo_timer_schedule(), osmo_timer_nt::retrans_itp, osmo_fsm_inst::T, osmo_iuup_rnl_config::t_init, osmo_iuup_rnl_config_timer::t_ms, osmo_fsm_inst::timer, osmo_iuup_instance::timer, osmo_iuup_instance::transport_prim_cb, and osmo_iuup_instance::transport_prim_priv.

Referenced by iuup_fsm_init(), iuup_fsm_init_on_enter(), and iuup_fsm_timer_cb().

## ◆ rnl_to_tnl_data()

static struct osmo_iuup_tnl_prim * rnl_to_tnl_data | ( | struct osmo_iuup_instance * | iui,
|  | struct osmo_iuup_rnl_prim * | irp
| ) |  |
| static

References osmo_iuup_instance::config, osmo_iuup_rnl_prim::data, osmo_iuup_rnl_config::data_pdu_type, osmo_iuup_rnl_data::fqc, osmo_iuup_rnl_data::frame_nr, IUUP_PDU_T_DATA_CRC, IUUP_PDU_T_DATA_NOCRC, osmo_prim_hdr::msg, msg, msgb_l2, msgb_l2len(), msgb_pull_to_l3(), msgb_push(), osmo_iuup_tnl_prim::oph, osmo_iuup_rnl_prim::oph, OSMO_ASSERT, osmo_iuup_compute_header_crc(), osmo_iuup_compute_payload_crc(), OSMO_IUUP_RNL_DATA, OSMO_IUUP_TNL_UNITDATA, OSMO_PRIM, OSMO_PRIM_HDR, osmo_prim_init(), PRIM_OP_REQUEST, osmo_iuup_rnl_data::rfci, SAP_IUUP_TNL, and osmo_iuup_rnl_prim::u.

Referenced by iuup_fsm_smpsdu_data().

## ◆ tnl_to_rnl_data()

static struct osmo_iuup_rnl_prim * tnl_to_rnl_data | ( | struct osmo_iuup_tnl_prim * | itp | ) |
| static

References osmo_iuup_rnl_prim::data, osmo_iuup_rnl_data::fqc, osmo_iuup_rnl_data::frame_nr, iuup_get_pdu_type(), IUUP_PDU_T_DATA_CRC, IUUP_PDU_T_DATA_NOCRC, osmo_prim_hdr::msg, msg, msgb_l2, msgb_pull_to_l3(), osmo_iuup_tnl_prim::oph, osmo_iuup_rnl_prim::oph, OSMO_ASSERT, OSMO_IUUP_RNL_DATA, OSMO_IUUP_TNL_UNITDATA, OSMO_PRIM, OSMO_PRIM_HDR, osmo_prim_init(), PRIM_OP_INDICATION, osmo_iuup_rnl_data::rfci, SAP_IUUP_RNL, and osmo_iuup_rnl_prim::u.

Referenced by iuup_fsm_smpsdu_data().

## ◆ tnp_ctrl_init_alloc()

static struct osmo_iuup_tnl_prim * tnp_ctrl_init_alloc | ( | struct osmo_iuup_instance * | iui | ) |
| static

References ARRAY_SIZE, osmo_iuup_instance::config, osmo_iuup_rnl_config::data_pdu_type, DLIUUP, for(), hdr, osmo_iuup_rfci::id, osmo_iuup_rfci::IPTI, osmo_iuup_rnl_config::IPTIs_present, IUUP_AN_PROCEDURE, IUUP_MSGB_SIZE, IUUP_PDU_T_CONTROL, IUUP_PROC_INIT, LOGL_ERROR, LOGP, osmo_prim_hdr::msg, msg, msgb_free(), msgb_l2, msgb_l2len(), msgb_put(), osmo_iuup_rnl_config::num_rfci, osmo_iuup_rnl_config::num_subflows, osmo_iuup_tnl_prim::oph, osmo_iuup_compute_header_crc(), osmo_iuup_compute_payload_crc(), osmo_iuup_tnl_prim_alloc(), OSMO_IUUP_TNL_UNITDATA, PRIM_OP_REQUEST, osmo_iuup_rnl_config::rfci, osmo_iuup_rfci::subflow_sizes, osmo_iuup_rnl_config::supported_versions_mask, osmo_iuup_instance::type14_fn, and osmo_iuup_rfci::used.

Referenced by iuup_fsm_init_on_enter().

## ◆ tnp_ctrl_nack_alloc()

static struct osmo_iuup_tnl_prim * tnp_ctrl_nack_alloc | ( | struct osmo_iuup_instance * | iui,
|  | enum iuup_procedure | proc_ind,
|  | enum iuup_error_cause | error_cause,
|  | uint8_t | fn
| ) |  |
| static

References IUUP_AN_NACK, IUUP_MSGB_SIZE, IUUP_PDU_T_CONTROL, msgb::l2h, osmo_iuup_instance::mode_version, osmo_prim_hdr::msg, msgb_l2, msgb_l2len(), msgb_put(), osmo_iuup_tnl_prim::oph, osmo_iuup_compute_header_crc(), osmo_iuup_tnl_prim_alloc(), OSMO_IUUP_TNL_UNITDATA, and PRIM_OP_REQUEST.

## Variable Documentation

## ◆ iuup_data_crc_code

const struct osmo_crc16gen_code iuup_data_crc_code

Initial value:
= {
.bits = 10,
.poly = 563,
.init = 0,
.remainder = 0,
}

Referenced by osmo_iuup_compute_payload_crc().

## ◆ iuup_fsm

struct osmo_fsm iuup_fsm
| static

Initial value:
= {
.name = "IuUP",
.states = iuup_fsm_states,
.num_states = ARRAY_SIZE(iuup_fsm_states),
.timer_cb = iuup_fsm_timer_cb,
.log_subsys = DLIUUP,
.event_names = iuup_fsm_event_names,
}
DLIUUP
#define DLIUUP
ARRAY_SIZE
#define ARRAY_SIZE(x)
iuup_fsm_event_names
static const struct value_string iuup_fsm_event_names[]
Definition: iuup.c:166
iuup_fsm_states
static const struct osmo_fsm_state iuup_fsm_states[]
Definition: iuup.c:812
iuup_fsm_timer_cb
static int iuup_fsm_timer_cb(struct osmo_fsm_inst *fi)
Definition: iuup.c:785

Referenced by __attribute__(), and osmo_iuup_instance_alloc().

## ◆ iuup_fsm_event_names

const struct value_string iuup_fsm_event_names[]
| static

Initial value:
= {
{ IUUP_FSM_EVT_IUUP_CONFIG_REQ, "IuUP-CONFIG-req" },
{ IUUP_FSM_EVT_IUUP_DATA_REQ, "IuUP-DATA-req" },
{ IUUP_FSM_EVT_IUUP_DATA_IND, "IuUP-DATA-ind" },
{ IUUP_FSM_EVT_IUUP_STATUS_REQ, "IuUP-STATUS-req" },
{ IUUP_FSM_EVT_IUUP_STATUS_IND, "IuUP-STATUS-ind" },
{ IUUP_FSM_EVT_SSASAR_UNITDATA_REQ, "SSSAR-UNITDATA-req" },
{ IUUP_FSM_EVT_SSASAR_UNITDATA_IND, "SSSAR-UNITDATA-ind" },
{ IUUP_FSM_EVT_IUUP_UNITDATA_REQ, "IuUP-UNITDATA-req" },
{ IUUP_FSM_EVT_IUUP_UNITDATA_IND, "IuUP-UNITDATA-ind" },
{ IUUP_FSM_EVT_INIT, "INIT" },
{ IUUP_FSM_EVT_LAST_INIT_ACK, "LAST_INIT_ACK" },
{ IUUP_FSM_EVT_INIT_NACK, "INIT_NACK" },
{ 0, NULL }
}
IUUP_FSM_EVT_IUUP_STATUS_REQ
@ IUUP_FSM_EVT_IUUP_STATUS_REQ
Definition: iuup.c:155
IUUP_FSM_EVT_IUUP_DATA_IND
@ IUUP_FSM_EVT_IUUP_DATA_IND
Definition: iuup.c:154
IUUP_FSM_EVT_IUUP_UNITDATA_IND
@ IUUP_FSM_EVT_IUUP_UNITDATA_IND
Definition: iuup.c:160
IUUP_FSM_EVT_INIT
@ IUUP_FSM_EVT_INIT
Definition: iuup.c:161
IUUP_FSM_EVT_IUUP_UNITDATA_REQ
@ IUUP_FSM_EVT_IUUP_UNITDATA_REQ
Definition: iuup.c:159
IUUP_FSM_EVT_INIT_NACK
@ IUUP_FSM_EVT_INIT_NACK
Definition: iuup.c:163
IUUP_FSM_EVT_LAST_INIT_ACK
@ IUUP_FSM_EVT_LAST_INIT_ACK
Definition: iuup.c:162
IUUP_FSM_EVT_SSASAR_UNITDATA_REQ
@ IUUP_FSM_EVT_SSASAR_UNITDATA_REQ
Definition: iuup.c:157
IUUP_FSM_EVT_SSASAR_UNITDATA_IND
@ IUUP_FSM_EVT_SSASAR_UNITDATA_IND
Definition: iuup.c:158
IUUP_FSM_EVT_IUUP_DATA_REQ
@ IUUP_FSM_EVT_IUUP_DATA_REQ
Definition: iuup.c:153
IUUP_FSM_EVT_IUUP_CONFIG_REQ
@ IUUP_FSM_EVT_IUUP_CONFIG_REQ
Definition: iuup.c:152
IUUP_FSM_EVT_IUUP_STATUS_IND
@ IUUP_FSM_EVT_IUUP_STATUS_IND
Definition: iuup.c:156

## ◆ iuup_fsm_states

const struct osmo_fsm_state iuup_fsm_states[]
| static

## ◆ iuup_hdr_crc_code

const struct osmo_crc8gen_code iuup_hdr_crc_code

Initial value:
= {
.bits = 6,
.poly = 47,
.init = 0,
.remainder = 0,
}

Referenced by osmo_iuup_compute_header_crc().