Loading...
Searching...
No Matches
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 __attribute__, len, msg, msgb_data(), and PTR_ALIGNMENT_BYTES.

## __attribute__() [2/2]

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

static

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

## irp_init_ind_alloc()

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

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

## itp_copy_c()

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

static

References len, msg, msgb_copy_c(), and msgb_data().

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

## iuup_fsm_init()

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

static

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_LAST_INIT_ACK, IUUP_FSM_ST_NULL, IUUP_FSM_ST_SMpSDU_DATA_XFER_READY, iuup_rx_initialization(), len, LOGL_NOTICE, LOGPFSML, OSMO_ASSERT, osmo_fsm_inst_state_chg, osmo_timer_del(), osmo_fsm_inst::priv, retransmit_initialization(), and osmo_fsm_inst::timer.

## 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_instance::fi, len, osmo_fsm_inst::priv, retransmit_initialization(), and tnp_ctrl_init_alloc().

## iuup_fsm_null()

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

static

References osmo_iuup_rnl_prim::data, osmo_iuup_instance::fi, IUUP_FSM_EVT_IUUP_CONFIG_REQ, IUUP_FSM_ST_INIT, IUUP_FSM_ST_TrM_DATA_XFER_READY, len, osmo_fsm_inst_state_chg, and osmo_fsm_inst::priv.

## 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(), len, osmo_fsm_inst_state_chg, osmo_fsm_inst::priv, rnl_to_tnl_data(), and tnl_to_rnl_data().

## iuup_fsm_timer_cb()

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

static

References osmo_iuup_instance::fi, 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, len, OSMO_ASSERT, osmo_fsm_inst::priv, retransmit_initialization(), osmo_fsm_inst::state, and osmo_fsm_inst::T.

## 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 len, and 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 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().

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

## 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(), len, 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 iuup_fsm, len, LOGL_DEBUG, and osmo_fsm_inst_alloc().

## osmo_iuup_instance_free()

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

References len, 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 len.

## 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 len.

## 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, 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 len, msg, osmo_iuup_msgb_alloc_c(), 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 IUUP_FSM_EVT_IUUP_CONFIG_REQ, IUUP_FSM_EVT_IUUP_DATA_REQ, IUUP_FSM_EVT_IUUP_STATUS_REQ, len, msgb_free(), 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 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().

## osmo_iuup_tnl_prim_up()

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.

## retransmit_initialization()

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

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

## 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 IUUP_PDU_T_DATA_CRC, IUUP_PDU_T_DATA_NOCRC, len, msg, msgb_l2, 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, PRIM_OP_REQUEST, and SAP_IUUP_TNL.

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

## tnp_ctrl_init_alloc()

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

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

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

## 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:805
iuup_fsm_timer_cb
static int iuup_fsm_timer_cb(struct osmo_fsm_inst *fi)
Definition iuup.c:778

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