Loading...
Searching...
No Matches
gsm_utils.c File Reference
`#include <osmocom/core/utils.h>`
`#include <osmocom/core/bitvec.h>`
`#include <osmocom/gsm/gsm_utils.h>`
`#include <osmocom/gsm/meas_rep.h>`
`#include <osmocom/gsm/protocol/gsm_04_08.h>`
`#include <stdlib.h>`
`#include <stdint.h>`
`#include <string.h>`
`#include <stdbool.h>`
`#include <stdio.h>`
`#include <errno.h>`
`#include <ctype.h>`
`#include <inttypes.h>`
`#include <time.h>`
`#include <unistd.h>`
`#include "../../config.h"`
`#include <sys/syscall.h>`
`#include <gnutls/gnutls.h>`
`#include <gnutls/crypto.h>`

## Data Structures

struct | gsm_freq_range

## Macros

#define | GRND_NONBLOCK 0x0001

## Functions

| __attribute__ ((constructor))
| __attribute__ ((destructor))
static int | gsm_septet_lookup (uint8_t ch)
uint8_t | gsm_get_octet_len (const uint8_t sept_len)
| Compute number of octets from number of septets.
int | gsm_7bit_decode_n_hdr (char *text, size_t n, const uint8_t *user_data, uint8_t septet_l, uint8_t ud_hdr_ind)
| TS 03.38 7-bit Character unpacking (6.2.1)
int | gsm_7bit_decode_n (char *text, size_t n, const uint8_t *user_data, uint8_t septet_l)
| Decode 7bit GSM Alphabet.
int | gsm_7bit_decode_n_ussd (char *text, size_t n, const uint8_t *user_data, uint8_t length)
| Decode 7bit GSM Alphabet (USSD)
int | gsm_septet_encode (uint8_t *result, const char *data)
| Encode a ASCII characterrs as 7-bit GSM alphabet (TS 03.38)
int | gsm_septet_pack (uint8_t *result, const uint8_t *rdata, size_t septet_len, uint8_t padding)
| GSM Default Alphabet 7bit to octet packing.
int | gsm_septets2octets (uint8_t *result, const uint8_t *rdata, uint8_t septet_len, uint8_t padding)
| Backwards compatibility wrapper for gsm_septets_pack(), deprecated.
int | gsm_7bit_encode_n (uint8_t *result, size_t n, const char *data, int *octets)
| GSM 7-bit alphabet TS 03.38 6.2.1 Character packing.
int | gsm_7bit_encode_n_ussd (uint8_t *result, size_t n, const char *data, int *octets)
| Encode according to GSM 7-bit alphabet (TS 03.38 6.2.1) for USSD.
int | osmo_get_rand_id (uint8_t *out, size_t len)
| Generate random identifier We use /dev/urandom (default when GRND_RANDOM flag is not set).
size_t | gsm0858_rsl_ul_meas_enc (const struct gsm_meas_rep_unidir *mru, bool dtxd_used, uint8_t *buf)
| Build the RSL uplink measurement IE (3GPP TS 08.58 § 9.3.25)
int | ms_class_gmsk_dbm (enum gsm_band band, int class)
| Convert power class to dBm according to GSM TS 05.05.
int | ms_pwr_ctl_lvl (enum gsm_band band, unsigned int dbm)
| determine power control level for given dBm value, as indicated by the tables in chapter 4.1.1 of GSM TS 05.05
int | ms_pwr_dbm (enum gsm_band band, uint8_t lvl)
| Convert TS 05.05 power level to absolute dBm value.
int | rxlev2dbm (uint8_t rxlev)
| Convert TS 05.08 RxLev to dBm (TS 05.08 Chapter 8.1.4)
uint8_t | dbm2rxlev (int dbm)
| Convert RF signal level in dBm to TS 05.08 RxLev (TS 05.08 Chapter 8.1.4)
const char * | gsm_band_name (enum gsm_band band)
| Return string name of a given GSM Band.
enum gsm_band | gsm_band_parse (const char *mhz)
| Parse string name of a GSM band.
int | gsm_arfcn2band_rc (uint16_t arfcn, enum gsm_band *band)
| Resolve GSM band from ARFCN.
enum gsm_band | gsm_arfcn2band (uint16_t arfcn)
| Resolve GSM band from ARFCN, aborts process on invalid ARFCN.
uint16_t | gsm_arfcn2freq10 (uint16_t arfcn, int uplink)
| Convert an ARFCN to the frequency in MHz * 10.
uint16_t | gsm_freq102arfcn (uint16_t freq10, int uplink)
| Convert a Frequency in MHz * 10 to ARFCN.
void | gsm_fn2gsmtime (struct gsm_time *time, uint32_t fn)
| Parse GSM Frame Number into struct gsm_time.
char * | gsm_fn_as_gsmtime_str (uint32_t fn)
| Parse GSM Frame Number into printable string.
uint32_t | gsm_gsmtime2fn (struct gsm_time *time)
| Encode decoded gsm_time to Frame Number.
char * | osmo_dump_gsmtime_buf (char *buf, size_t buf_len, const struct gsm_time *tm)
char * | osmo_dump_gsmtime (const struct gsm_time *tm)
char * | osmo_dump_gsmtime_c (const void *ctx, const struct gsm_time *tm)
void | bitvec_add_range1024 (struct bitvec *bv, const struct gsm48_range_1024 *r)
| append range1024 encoded data to bit vector
int | gprs_tlli_type (uint32_t tlli)
| Determine GPRS TLLI Type (TS 23.003 Chapter 2.6)
uint32_t | gprs_tmsi2tlli (uint32_t p_tmsi, enum gprs_tlli_type type)
| Determine TLLI from P-TMSI.
int | gsm_7bit_decode (char *text, const uint8_t *user_data, uint8_t septet_l)
int | gsm_7bit_decode_ussd (char *text, const uint8_t *user_data, uint8_t length)
int | gsm_7bit_encode (uint8_t *result, const char *data)
int | gsm_7bit_encode_ussd (uint8_t *result, const char *data, int *octets)
int | gsm_7bit_encode_oct (uint8_t *result, const char *data, int *octets)

## Variables

static unsigned char | gsm_7bit_alphabet []
static struct gsm_freq_range | gsm_ranges []
const struct value_string | osmo_rat_type_names []

## Macro Definition Documentation

## GRND_NONBLOCK

#define GRND_NONBLOCK 0x0001

## Function Documentation

## __attribute__() [1/2]

__attribute__ | ( | (constructor) |  | ) |

References __attribute__, and len.

## __attribute__() [2/2]

__attribute__ | ( | (destructor) |  | ) |

References __attribute__, and len.

## dbm2rxlev()

uint8_t dbm2rxlev | ( | int | dbm | ) |

Convert RF signal level in dBm to TS 05.08 RxLev (TS 05.08 Chapter 8.1.4)

Parameters

  [in] | dbm | RF signal level in dBm

Returns
  TS 05.08 RxLev value

References len.

## gprs_tlli_type()

int gprs_tlli_type | ( | uint32_t | tlli | ) |

Determine GPRS TLLI Type (TS 23.003 Chapter 2.6)

References tlli, TLLI_AUXILIARY, TLLI_FOREIGN, TLLI_G_RNTI, TLLI_LOCAL, TLLI_RAND_G_RNTI, TLLI_RANDOM, and TLLI_RESERVED.

## gprs_tmsi2tlli()

uint32_t gprs_tmsi2tlli | ( | uint32_t | p_tmsi,
|  | enum gprs_tlli_type | type
| ) |  |

Determine TLLI from P-TMSI.

Parameters

  [in] | p_tmsi | P-TMSI
  [in] | type | TLLI Type we want to derive from p_tmsi

Returns
  TLLI of given type

References len, tlli, TLLI_FOREIGN, TLLI_LOCAL, and type.

## gsm0858_rsl_ul_meas_enc()

size_t gsm0858_rsl_ul_meas_enc | ( | const struct gsm_meas_rep_unidir * | mru,
|  | bool | dtxd_used,
|  | uint8_t * | buf
| ) |  |

Build the RSL uplink measurement IE (3GPP TS 08.58 § 9.3.25)

Parameters

  [in] | mru | Unidirectional measurement report structure
  [in] | dtxd_used | Indicates if DTXd was used during measurement report period
  [out] | buf | Pre-allocated bufer for storing IE

Returns
  Number of bytes filled in buf

References len.

## gsm_7bit_decode()

int gsm_7bit_decode | ( | char * | text,
|  | const uint8_t * | user_data,
|  | uint8_t | septet_l
| ) |  |

References gsm_7bit_decode_n(), GSM_7BIT_LEGACY_MAX_BUFFER_SIZE, and len.

## gsm_7bit_decode_n()

int gsm_7bit_decode_n | ( | char * | text,
|  | size_t | n,
|  | const uint8_t * | user_data,
|  | uint8_t | septet_l
| ) |  |

Decode 7bit GSM Alphabet.

Decode a sequence of GSM 03.38 encoded 7 bit characters.

References gsm_7bit_decode_n_hdr(), len, and n.

Referenced by gsm_7bit_decode().

## gsm_7bit_decode_n_hdr()

int gsm_7bit_decode_n_hdr | ( | char * | text,
|  | size_t | n,
|  | const uint8_t * | user_data,
|  | uint8_t | septet_l,
|  | uint8_t | ud_hdr_ind
| ) |  |

TS 03.38 7-bit Character unpacking (6.2.1)

Parameters

  [out] | text | Caller-provided output text buffer
  [in] | n | Length of text
  [in] | user_data | Input Data (septets)
  [in] | septet_l | Number of septets in user_data
  [in] | ud_hdr_ind | User Data Header present in data

Returns
  number of bytes written to text

References gsm_7bit_alphabet, gsm_get_octet_len(), gsm_septet_lookup(), l, len, n, and OSMO_ASSERT.

Referenced by gsm_7bit_decode_n(), and gsm_7bit_decode_n_ussd().

## gsm_7bit_decode_n_ussd()

int gsm_7bit_decode_n_ussd | ( | char * | text,
|  | size_t | n,
|  | const uint8_t * | user_data,
|  | uint8_t | length
| ) |  |

Decode 7bit GSM Alphabet (USSD)

Decode a sequence of 7 bit characters (USSD encoding).

References gsm_7bit_decode_n_hdr(), gsm_get_octet_len(), len, length, and n.

Referenced by gsm_7bit_decode_ussd(), and parse_process_uss_req().

## gsm_7bit_decode_ussd()

int gsm_7bit_decode_ussd | ( | char * | text,
|  | const uint8_t * | user_data,
|  | uint8_t | length
| ) |  |

References gsm_7bit_decode_n_ussd(), GSM_7BIT_LEGACY_MAX_BUFFER_SIZE, and length.

## gsm_7bit_encode()

int gsm_7bit_encode | ( | uint8_t * | result,
|  | const char * | data
| ) |  |

References data, gsm_7bit_encode_n(), GSM_7BIT_LEGACY_MAX_BUFFER_SIZE, and len.

## gsm_7bit_encode_n()

int gsm_7bit_encode_n | ( | uint8_t * | result,
|  | size_t | n,
|  | const char * | data,
|  | int * | octets
| ) |  |

GSM 7-bit alphabet TS 03.38 6.2.1 Character packing.

Encode a text string into GSM 03.38 encoded 7 bit characters.

Parameters

  [out] | result | Caller-provided output buffer
  [in] | n | Maximum length of result in bytes
  [in] | data | octet-aligned string
  [out] | octets | Number of octets encoded

Returns
  number of septets encoded

References data, gsm_septet_encode(), gsm_septet_pack(), len, and n.

Referenced by gsm340_gen_oa(), gsm_7bit_encode(), gsm_7bit_encode_n_ussd(), and gsm_7bit_encode_oct().

## gsm_7bit_encode_n_ussd()

int gsm_7bit_encode_n_ussd | ( | uint8_t * | result,
|  | size_t | n,
|  | const char * | data,
|  | int * | octets
| ) |  |

Encode according to GSM 7-bit alphabet (TS 03.38 6.2.1) for USSD.

Encode a text string into GSM 03.38 encoded 7 bit characters (USSD encoding).

Parameters

  [out] | result | Caller-provided output buffer
  [in] | n | Maximum length of result in bytes
  [in] | data | octet-aligned string
  [out] | octets | Number of octets encoded

Returns
  number of septets encoded

References data, gsm_7bit_encode_n(), len, and n.

Referenced by gsm0480_create_notifySS(), gsm0480_create_unstructuredSS_Notify(), gsm0480_gen_ussd_resp_7bit(), and gsm_7bit_encode_ussd().

## gsm_7bit_encode_oct()

int gsm_7bit_encode_oct | ( | uint8_t * | result,
|  | const char * | data,
|  | int * | octets
| ) |  |

References data, gsm_7bit_encode_n(), GSM_7BIT_LEGACY_MAX_BUFFER_SIZE, and len.

## gsm_7bit_encode_ussd()

int gsm_7bit_encode_ussd | ( | uint8_t * | result,
|  | const char * | data,
|  | int * | octets
| ) |  |

References data, gsm_7bit_encode_n_ussd(), GSM_7BIT_LEGACY_MAX_BUFFER_SIZE, and len.

## gsm_arfcn2band()

enum gsm_band gsm_arfcn2band | ( | uint16_t | arfcn | ) |

Resolve GSM band from ARFCN, aborts process on invalid ARFCN.

In Osmocom, we use the highest bit of the arfcn to indicate PCS. DEPRECATED: Use gsm_arfcn2band_rc instead.

Parameters

  [in] | arfcn | Osmocom ARFCN, highest bit determines PCS mode

Returns
  GSM Band if ARFCN is valid (part of any valid band), aborts otherwise

References arfcn, gsm_arfcn2band_rc(), len, and osmo_panic().

## gsm_arfcn2band_rc()

int gsm_arfcn2band_rc | ( | uint16_t | arfcn,
|  | enum gsm_band * | band
| ) |  |

Resolve GSM band from ARFCN.

In Osmocom, we use the highest bit of the arfcn to indicate PCS

Parameters

  [in] | arfcn | Osmocom ARFCN, highest bit determines PCS mode
  [out] | band | GSM Band containing \arfcn if arfcn is valid, undetermined otherwise

Returns
  0 if arfcn is valid and band was set, negative on error

References arfcn, ARFCN_PCS, GSM_BAND_1800, GSM_BAND_1900, GSM_BAND_450, GSM_BAND_480, GSM_BAND_750, GSM_BAND_810, GSM_BAND_850, GSM_BAND_900, and len.

Referenced by gsm_arfcn2band().

## gsm_arfcn2freq10()

uint16_t gsm_arfcn2freq10 | ( | uint16_t | arfcn,
|  | int | uplink
| ) |  |

Convert an ARFCN to the frequency in MHz * 10.

Parameters

  [in] | arfcn | GSM ARFCN to convert
  [in] | uplink | Uplink (1) or Downlink (0) frequency

Returns
  Frequency in units of 1/10ths of MHz (100kHz)

References arfcn, ARFCN_FLAG_MASK, gsm_freq_range::arfcn_last, gsm_freq_range::flags, gsm_freq_range::freq_ul_first, gsm_ranges, and len.

## gsm_band_name()

const char * gsm_band_name | ( | enum gsm_band | band | ) |

Return string name of a given GSM Band.

References GSM_BAND_1800, GSM_BAND_1900, GSM_BAND_450, GSM_BAND_480, GSM_BAND_750, GSM_BAND_810, GSM_BAND_850, GSM_BAND_900, and len.

## gsm_band_parse()

enum gsm_band gsm_band_parse | ( | const char * | mhz | ) |

Parse string name of a GSM band.

References GSM_BAND_1800, GSM_BAND_1900, GSM_BAND_450, GSM_BAND_480, GSM_BAND_750, GSM_BAND_810, GSM_BAND_850, GSM_BAND_900, and len.

## gsm_fn2gsmtime()

void gsm_fn2gsmtime | ( | struct gsm_time * | time,
|  | uint32_t | fn
| ) |  |

Parse GSM Frame Number into struct gsm_time.

Parameters

  [out] | time | Caller-provided memory for gsm_time
  [in] | fn | GSM Frame Number

References time.

Referenced by gsm_fn_as_gsmtime_str(), l2_ph_chan_conf(), and l2_ph_rach_ind().

## gsm_fn_as_gsmtime_str()

char * gsm_fn_as_gsmtime_str | ( | uint32_t | fn | ) |

Parse GSM Frame Number into printable string.

Parameters

  [in] | fn | GSM Frame Number

Returns
  pointer to printable string

References gsm_time::fn, gsm_fn2gsmtime(), osmo_dump_gsmtime(), and time.

## gsm_freq102arfcn()

uint16_t gsm_freq102arfcn | ( | uint16_t | freq10,
|  | int | uplink
| ) |  |

Convert a Frequency in MHz * 10 to ARFCN.

Parameters

  [in] | freq10 | Frequency in units of 1/10ths of MHz (100kHz)
  [in] | uplink | Frequency is Uplink (1) or Downlink (0)

Returns
  ARFCN in case of success; 0xffff on error

References arfcn, ARFCN_UPLINK, gsm_freq_range::freq_ul_first, gsm_ranges, and len.

## gsm_get_octet_len()

uint8_t gsm_get_octet_len | ( | const uint8_t | sept_len | ) |

Compute number of octets from number of septets.

For instance: 47 septets need 41,125 = 42 octets.

Parameters

  [in] | sept_len | Number of septets

Returns
  Number of octets required

References len.

Referenced by gsm_7bit_decode_n_hdr(), and gsm_7bit_decode_n_ussd().

## gsm_gsmtime2fn()

uint32_t gsm_gsmtime2fn | ( | struct gsm_time * | time | ) |

Encode decoded gsm_time to Frame Number.

Parameters

  [in] | time | GSM Time in decoded structure

Returns
  GSM Frame Number

References time.

## gsm_septet_encode()

int gsm_septet_encode | ( | uint8_t * | result,
|  | const char * | data
| ) |  |

Encode a ASCII characterrs as 7-bit GSM alphabet (TS 03.38)

This function converts a zero-terminated input string data from ASCII into octet-aligned 7-bit GSM characters. No packing is performed.

Parameters

  [out] | result | caller-allocated output buffer
  [in] | data | input data, ASCII

Returns
  number of octets used in result

References data, gsm_7bit_alphabet, and len.

Referenced by gsm_7bit_encode_n().

## gsm_septet_lookup()

static int gsm_septet_lookup | ( | uint8_t | ch | ) |

static

References gsm_7bit_alphabet, and len.

Referenced by gsm_7bit_decode_n_hdr().

## gsm_septet_pack()

int gsm_septet_pack | ( | uint8_t * | result,
|  | const uint8_t * | rdata,
|  | size_t | septet_len,
|  | uint8_t | padding
| ) |  |

GSM Default Alphabet 7bit to octet packing.

Parameters

  [out] | result | Caller-provided output buffer
  [in] | rdata | Input data septets
  [in] | septet_len | Length of rdata
  [in] | padding | padding bits at start

Returns
  number of bytes used in result

References data, and len.

## gsm_septets2octets()

int gsm_septets2octets | ( | uint8_t * | result,
|  | const uint8_t * | rdata,
|  | uint8_t | septet_len,
|  | uint8_t | padding
| ) |  |

Backwards compatibility wrapper for gsm_septets_pack(), deprecated.

References gsm_septet_pack(), and len.

## ms_class_gmsk_dbm()

int ms_class_gmsk_dbm | ( | enum gsm_band | band,
|  | int | class
| ) |  |

Convert power class to dBm according to GSM TS 05.05.

Parameters

  [in] | band | GSM frequency band
  [in] | class | GSM power class

Returns
  maximum transmit power of power class in dBm, negative on error

References GSM_BAND_1800, GSM_BAND_1900, GSM_BAND_450, GSM_BAND_480, GSM_BAND_750, GSM_BAND_810, GSM_BAND_850, GSM_BAND_900, and len.

## ms_pwr_ctl_lvl()

int ms_pwr_ctl_lvl | ( | enum gsm_band | band,
|  | unsigned int | dbm
| ) |  |

determine power control level for given dBm value, as indicated by the tables in chapter 4.1.1 of GSM TS 05.05

Parameters

  [in] | GSM | frequency band
  [in] | dbm | RF power value in dBm

Returns
  TS 05.05 power control level

References GSM_BAND_1800, GSM_BAND_1900, GSM_BAND_450, GSM_BAND_480, GSM_BAND_750, GSM_BAND_810, GSM_BAND_850, GSM_BAND_900, and len.

## ms_pwr_dbm()

int ms_pwr_dbm | ( | enum gsm_band | band,
|  | uint8_t | lvl
| ) |  |

Convert TS 05.05 power level to absolute dBm value.

Parameters

  [in] | band | GSM frequency band
  [in] | lvl | TS 05.05 power control level

Returns
  RF power level in dBm

References GSM_BAND_1800, GSM_BAND_1900, GSM_BAND_450, GSM_BAND_480, GSM_BAND_750, GSM_BAND_810, GSM_BAND_850, GSM_BAND_900, and len.

## osmo_dump_gsmtime()

char * osmo_dump_gsmtime | ( | const struct gsm_time * | tm | ) |

References len, and osmo_dump_gsmtime_buf().

Referenced by gsm_fn_as_gsmtime_str().

## osmo_dump_gsmtime_buf()

char * osmo_dump_gsmtime_buf | ( | char * | buf,
|  | size_t | buf_len,
|  | const struct gsm_time * | tm
| ) |  |

References len.

Referenced by osmo_dump_gsmtime(), and osmo_dump_gsmtime_c().

## osmo_dump_gsmtime_c()

char * osmo_dump_gsmtime_c | ( | const void * | ctx,
|  | const struct gsm_time * | tm
| ) |  |

References len, and osmo_dump_gsmtime_buf().

## osmo_get_rand_id()

int osmo_get_rand_id | ( | uint8_t * | out,
|  | size_t | len
| ) |  |

Generate random identifier We use /dev/urandom (default when GRND_RANDOM flag is not set).

Both /dev/(u)random numbers are coming from the same CSPRNG anyway (at least on GNU/Linux >= 4.8). See also RFC4086.

Parameters

  [out] | out | Buffer to be filled with random data
  [in] | len | Number of random bytes required

Returns
  0 on success, or a negative error code on error.

References ENOTSUP, GRND_NONBLOCK, len, and OSMO_MAX_RAND_ID_LEN.

## rxlev2dbm()

int rxlev2dbm | ( | uint8_t | rxlev | ) |

Convert TS 05.08 RxLev to dBm (TS 05.08 Chapter 8.1.4)

Parameters

  [in] | rxlev | TS 05.08 RxLev value

Returns
  Received RF power in dBm

References len.

## Variable Documentation

## gsm_7bit_alphabet

unsigned char gsm_7bit_alphabet[]

static

Initial value:
= {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0a, 0xff, 0xff, 0x0d, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0x20, 0x21, 0x22, 0x23, 0x02, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c,
0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b,
0x3c, 0x3d, 0x3e, 0x3f, 0x00, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a,
0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
0x5a, 0x3c, 0x2f, 0x3e, 0x14, 0x11, 0xff, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
0x78, 0x79, 0x7a, 0x28, 0x40, 0x29, 0x3d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0x0c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x5e, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x40, 0xff, 0x01, 0xff,
0x03, 0xff, 0x7b, 0x7d, 0xff, 0xff, 0xff, 0xff, 0xff, 0x5c, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x5b, 0x7e, 0x5d, 0xff, 0x7c, 0xff, 0xff, 0xff,
0xff, 0x5b, 0x0e, 0x1c, 0x09, 0xff, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x5d,
0xff, 0xff, 0xff, 0xff, 0x5c, 0xff, 0x0b, 0xff, 0xff, 0xff, 0x5e, 0xff, 0xff, 0x1e, 0x7f,
0xff, 0xff, 0xff, 0x7b, 0x0f, 0x1d, 0xff, 0x04, 0x05, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff,
0xff, 0x7d, 0x08, 0xff, 0xff, 0xff, 0x7c, 0xff, 0x0c, 0x06, 0xff, 0xff, 0x7e, 0xff, 0xff
}

Referenced by gsm_7bit_decode_n_hdr(), gsm_septet_encode(), and gsm_septet_lookup().

## gsm_ranges

struct gsm_freq_range gsm_ranges[]

static

Initial value:
= {
{ 512, 810, 18502, 800, ARFCN_PCS },
{ 0, 124, 8900, 450, 0 },
{ 955, 1023, 8762, 450, 0 },
{ 128, 251, 8242, 450, 0 },
{ 512, 885, 17102, 950, 0 },
{ 259, 293, 4506, 100, 0 },
{ 306, 340, 4790, 100, 0 },
{ 350, 425, 8060, 450, 0 },
{ 438, 511, 7472, 300, 0 },
{ }
}
ARFCN_PCS
#define ARFCN_PCS
Definition gsm_utils.h:163

Referenced by gsm_arfcn2freq10(), and gsm_freq102arfcn().

## osmo_rat_type_names

const struct value_string osmo_rat_type_names[]

Initial value:
= {
{ OSMO_RAT_UNKNOWN, "unknown" },
{ OSMO_RAT_GERAN_A, "GERAN-A" },
{ OSMO_RAT_UTRAN_IU, "UTRAN-Iu" },
{ OSMO_RAT_EUTRAN_SGS, "EUTRAN-SGs" },
{}
}
OSMO_RAT_UTRAN_IU
@ OSMO_RAT_UTRAN_IU
Definition gsm_utils.h:255
OSMO_RAT_EUTRAN_SGS
@ OSMO_RAT_EUTRAN_SGS
Definition gsm_utils.h:256
OSMO_RAT_UNKNOWN
@ OSMO_RAT_UNKNOWN
Definition gsm_utils.h:253
OSMO_RAT_GERAN_A
@ OSMO_RAT_GERAN_A
Definition gsm_utils.h:254

Referenced by osmo_rat_type_name().