sysinfo.h File Reference
`#include <stdbool.h>`
`#include <osmocom/core/defs.h>`
`#include <osmocom/core/utils.h>`
`#include <osmocom/gsm/protocol/gsm_04_08.h>`

Go to the source code of this file.

## Data Structures

struct | osmo_earfcn_si2q

## Macros

#define | OSMO_EARFCN_INVALID 666
#define | OSMO_EARFCN_MEAS_INVALID 0xff

## Typedefs

typedef uint8_t | sysinfo_buf_t[GSM_MACBLOCK_LEN]

## Enumerations

enum

osmo_sysinfo_type {
SYSINFO_TYPE_NONE,
SYSINFO_TYPE_1,
SYSINFO_TYPE_2,
SYSINFO_TYPE_3,
SYSINFO_TYPE_4,
SYSINFO_TYPE_5,
SYSINFO_TYPE_6,
SYSINFO_TYPE_7,
SYSINFO_TYPE_8,
SYSINFO_TYPE_9,
SYSINFO_TYPE_10,
SYSINFO_TYPE_13,
SYSINFO_TYPE_16,
SYSINFO_TYPE_17,
SYSINFO_TYPE_18,
SYSINFO_TYPE_19,
SYSINFO_TYPE_20,
SYSINFO_TYPE_2bis,
SYSINFO_TYPE_2ter,
SYSINFO_TYPE_2quater,
SYSINFO_TYPE_5bis,
SYSINFO_TYPE_5ter,
SYSINFO_TYPE_EMO,
SYSINFO_TYPE_MEAS_INFO,
SYSINFO_TYPE_13alt,
SYSINFO_TYPE_15,
SYSINFO_TYPE_2n,
SYSINFO_TYPE_21,
SYSINFO_TYPE_22,
SYSINFO_TYPE_23,
_MAX_SYSINFO_TYPE
}

## Functions

int | osmo_earfcn_add (struct osmo_earfcn_si2q *e, uint16_t arfcn, uint8_t meas_bw)
| Add pair of arfcn and measurement bandwith value to earfcn struct. More...
int | osmo_earfcn_del (struct osmo_earfcn_si2q *e, uint16_t arfcn)
| Delete arfcn (and corresponding measurement bandwith) from earfcn struct. More...
size_t | osmo_earfcn_bit_size (const struct osmo_earfcn_si2q *e) OSMO_DEPRECATED("Use osmo_earfcn_bit_size_ext()instead.")
| Return number of bits necessary to represent earfcn struct as Repeated E-UTRAN Neighbour Cells IE from 3GPP TS 44.018 Table 10.5.2.33b.1. More...
size_t | osmo_earfcn_bit_size_ext (const struct osmo_earfcn_si2q *e, size_t offset)
| Return number of bits necessary to represent earfcn struct as Repeated E-UTRAN Neighbour Cells IE from 3GPP TS 44.018 Table 10.5.2.33b.1. More...
void | osmo_earfcn_init (struct osmo_earfcn_si2q *e)
| Initialize earfcn struct. More...
uint8_t | osmo_sitype2rsl (enum osmo_sysinfo_type si_type)
enum osmo_sysinfo_type | osmo_rsl2sitype (uint8_t rsl_si)

## Variables

const struct value_string | osmo_sitype_strs [_MAX_SYSINFO_TYPE]

## Macro Definition Documentation

## OSMO_EARFCN_INVALID

#define OSMO_EARFCN_INVALID 666

## OSMO_EARFCN_MEAS_INVALID

#define OSMO_EARFCN_MEAS_INVALID 0xff

## Typedef Documentation

## sysinfo_buf_t

typedef uint8_t sysinfo_buf_t[GSM_MACBLOCK_LEN]

## Enumeration Type Documentation

## osmo_sysinfo_type

enum osmo_sysinfo_type

Enumerator
SYSINFO_TYPE_NONE |
SYSINFO_TYPE_1 |
SYSINFO_TYPE_2 |
SYSINFO_TYPE_3 |
SYSINFO_TYPE_4 |
SYSINFO_TYPE_5 |
SYSINFO_TYPE_6 |
SYSINFO_TYPE_7 |
SYSINFO_TYPE_8 |
SYSINFO_TYPE_9 |
SYSINFO_TYPE_10 |
SYSINFO_TYPE_13 |
SYSINFO_TYPE_16 |
SYSINFO_TYPE_17 |
SYSINFO_TYPE_18 |
SYSINFO_TYPE_19 |
SYSINFO_TYPE_20 |
SYSINFO_TYPE_2bis |
SYSINFO_TYPE_2ter |
SYSINFO_TYPE_2quater |
SYSINFO_TYPE_5bis |
SYSINFO_TYPE_5ter |
SYSINFO_TYPE_EMO |
SYSINFO_TYPE_MEAS_INFO |
SYSINFO_TYPE_13alt |
SYSINFO_TYPE_15 |
SYSINFO_TYPE_2n |
SYSINFO_TYPE_21 |
SYSINFO_TYPE_22 |
SYSINFO_TYPE_23 |
_MAX_SYSINFO_TYPE |

## Function Documentation

## osmo_earfcn_add()

int osmo_earfcn_add | ( | struct osmo_earfcn_si2q * | e,
|  | uint16_t | arfcn,
|  | uint8_t | meas_bw
| ) |  |

Add pair of arfcn and measurement bandwith value to earfcn struct.

Parameters

  [in,out] | e | earfcn struct
  [in] | arfcn | EARFCN value, 16 bits
  [in] | meas_bw | measurement bandwith value

Returns
  0 on success, error otherwise

References osmo_earfcn_si2q::arfcn, osmo_earfcn_si2q::length, osmo_earfcn_si2q::meas_bw, and OSMO_EARFCN_INVALID.

## osmo_earfcn_bit_size()

size_t osmo_earfcn_bit_size | ( | const struct osmo_earfcn_si2q * | e | ) |

Return number of bits necessary to represent earfcn struct as Repeated E-UTRAN Neighbour Cells IE from 3GPP TS 44.018 Table 10.5.2.33b.1.

Parameters

  [in,out] | e | earfcn struct

Returns
  number of bits

References osmo_earfcn_bit_size_ext().

## osmo_earfcn_bit_size_ext()

size_t osmo_earfcn_bit_size_ext | ( | const struct osmo_earfcn_si2q * | e,
|  | size_t | offset
| ) |  |

Return number of bits necessary to represent earfcn struct as Repeated E-UTRAN Neighbour Cells IE from 3GPP TS 44.018 Table 10.5.2.33b.1.

Parameters

  [in,out] | e | earfcn struct
  [in] | offset | into earfcn struct: how many EARFCNs to skip while estimating size

Returns
  number of bits

References osmo_earfcn_si2q::arfcn, osmo_earfcn_si2q::length, osmo_earfcn_si2q::meas_bw, OSMO_EARFCN_INVALID, OSMO_EARFCN_MEAS_INVALID, osmo_earfcn_si2q::prio_valid, osmo_earfcn_si2q::qrxlm_valid, and osmo_earfcn_si2q::thresh_lo_valid.

Referenced by osmo_earfcn_bit_size().

## osmo_earfcn_del()

int osmo_earfcn_del | ( | struct osmo_earfcn_si2q * | e,
|  | uint16_t | arfcn
| ) |  |

Delete arfcn (and corresponding measurement bandwith) from earfcn struct.

Parameters

  [in,out] | e | earfcn struct
  [in] | arfcn | EARFCN value, 16 bits

Returns
  0 on success, error otherwise

References osmo_earfcn_si2q::arfcn, osmo_earfcn_si2q::length, osmo_earfcn_si2q::meas_bw, OSMO_EARFCN_INVALID, and OSMO_EARFCN_MEAS_INVALID.

## osmo_earfcn_init()

void osmo_earfcn_init | ( | struct osmo_earfcn_si2q * | e | ) |

Initialize earfcn struct.

Parameters

  [in,out] | e | earfcn struct

References osmo_earfcn_si2q::arfcn, osmo_earfcn_si2q::length, osmo_earfcn_si2q::meas_bw, OSMO_EARFCN_INVALID, and OSMO_EARFCN_MEAS_INVALID.

## osmo_rsl2sitype()

enum osmo_sysinfo_type osmo_rsl2sitype | ( | uint8_t | rsl_si | ) |

References rsl2sitype.

## osmo_sitype2rsl()

uint8_t osmo_sitype2rsl | ( | enum osmo_sysinfo_type | si_type | ) |

References sitype2rsl.

## Variable Documentation

## osmo_sitype_strs

const struct value_string osmo_sitype_strs[_MAX_SYSINFO_TYPE]