libosmogsm  1.0.1.85-9f28
Osmocom GSM library
gsm48_rest_octets.c File Reference
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <stdbool.h>
#include <osmocom/core/bitvec.h>
#include <osmocom/gsm/bitvec_gsm.h>
#include <osmocom/gsm/sysinfo.h>
#include <osmocom/gsm/gsm48_arfcn_range_encode.h>
#include <osmocom/gsm/gsm48_rest_octets.h>

Functions

int osmo_gsm48_rest_octets_si1 (uint8_t *data, uint8_t *nch_pos, int is1800_net)
 
static bool append_eutran_neib_cell (struct bitvec *bv, const struct osmo_earfcn_si2q *e, size_t *e_offset, uint8_t budget)
 
static void append_earfcn (struct bitvec *bv, const struct osmo_earfcn_si2q *e, size_t *e_offset, uint8_t budget)
 
static int range_encode (enum osmo_gsm48_range r, int *arfcns, int arfcns_used, int *w, int f0, uint8_t *chan_list)
 
static int f0_helper (int *sc, size_t length, uint8_t *chan_list)
 
static unsigned range1024_p (unsigned n)
 
static int append_utran_fdd_length (uint16_t u, const int *sc, size_t sc_len, size_t length)
 
static int append_utran_fdd (struct bitvec *bv, uint16_t u, int *sc, size_t length)
 
static int try_adding_uarfcn (struct bitvec *bv, uint16_t *scramble_list, size_t uarfcn_length, size_t *u_offset, uint16_t uarfcn, uint8_t num_sc, uint8_t start_pos, uint8_t budget)
 
static void append_uarfcns (struct bitvec *bv, const uint16_t *uarfcn_list, size_t *u_offset, size_t uarfcn_length, uint16_t *scramble_list, uint8_t budget)
 
static size_t si2q_earfcn_count (const struct osmo_earfcn_si2q *e)
 
int osmo_gsm48_rest_octets_si2quater (uint8_t *data, uint8_t si2q_index, uint8_t si2q_count, const uint16_t *uarfcn_list, size_t *u_offset, size_t uarfcn_length, uint16_t *scramble_list, struct osmo_earfcn_si2q *si2quater_neigh_list, size_t *e_offset)
 
static void append_selection_params (struct bitvec *bv, const struct osmo_gsm48_si_selection_params *sp)
 
static void append_power_offset (struct bitvec *bv, const struct osmo_gsm48_si_power_offset *po)
 
static void append_gprs_ind (struct bitvec *bv, const struct osmo_gsm48_si3_gprs_ind *gi)
 
int osmo_gsm48_rest_octets_si2ter (uint8_t *data)
 
int osmo_gsm48_rest_octets_si2bis (uint8_t *data)
 
int osmo_gsm48_rest_octets_si3 (uint8_t *data, const struct osmo_gsm48_si_ro_info *si3)
 
static int append_lsa_params (struct bitvec *bv, const struct osmo_gsm48_lsa_params *lsa_params)
 
int osmo_gsm48_rest_octets_si4 (uint8_t *data, const struct osmo_gsm48_si_ro_info *si4, int len)
 
int osmo_gsm48_rest_octets_si6 (uint8_t *data, bool is1800_net)
 
static int append_gprs_mobile_alloc (struct bitvec *bv)
 
static int encode_t3192 (unsigned int t3192)
 
static int encode_drx_timer (unsigned int drx)
 
static int append_gprs_cell_opt (struct bitvec *bv, const struct osmo_gprs_cell_options *gco)
 
static void append_gprs_pwr_ctrl_pars (struct bitvec *bv, const struct osmo_gprs_power_ctrl_pars *pcp)
 
int osmo_gsm48_rest_octets_si13 (uint8_t *data, const struct osmo_gsm48_si13_info *si13)
 

Function Documentation

static void append_earfcn ( struct bitvec bv,
const struct osmo_earfcn_si2q e,
size_t *  e_offset,
uint8_t  budget 
)
inlinestatic
static int append_gprs_mobile_alloc ( struct bitvec bv)
static
static int append_lsa_params ( struct bitvec bv,
const struct osmo_gsm48_lsa_params lsa_params 
)
static
static void append_power_offset ( struct bitvec bv,
const struct osmo_gsm48_si_power_offset po 
)
static
static void append_uarfcns ( struct bitvec bv,
const uint16_t *  uarfcn_list,
size_t *  u_offset,
size_t  uarfcn_length,
uint16_t *  scramble_list,
uint8_t  budget 
)
inlinestatic
static int append_utran_fdd ( struct bitvec bv,
uint16_t  u,
int *  sc,
size_t  length 
)
inlinestatic
static int append_utran_fdd_length ( uint16_t  u,
const int *  sc,
size_t  sc_len,
size_t  length 
)
inlinestatic

References f0_helper(), and range1024_p().

Referenced by try_adding_uarfcn().

static int encode_drx_timer ( unsigned int  drx)
static

Referenced by append_gprs_cell_opt().

static int encode_t3192 ( unsigned int  t3192)
static

Referenced by append_gprs_cell_opt().

static int f0_helper ( int *  sc,
size_t  length,
uint8_t *  chan_list 
)
inlinestatic
int osmo_gsm48_rest_octets_si1 ( uint8_t *  data,
uint8_t *  nch_pos,
int  is1800_net 
)
int osmo_gsm48_rest_octets_si2bis ( uint8_t *  data)
int osmo_gsm48_rest_octets_si2quater ( uint8_t *  data,
uint8_t  si2q_index,
uint8_t  si2q_count,
const uint16_t *  uarfcn_list,
size_t *  u_offset,
size_t  uarfcn_length,
uint16_t *  scramble_list,
struct osmo_earfcn_si2q si2quater_neigh_list,
size_t *  e_offset 
)
int osmo_gsm48_rest_octets_si2ter ( uint8_t *  data)
int osmo_gsm48_rest_octets_si6 ( uint8_t *  data,
bool  is1800_net 
)
static unsigned range1024_p ( unsigned  n)
static
static int range_encode ( enum osmo_gsm48_range  r,
int *  arfcns,
int  arfcns_used,
int *  w,
int  f0,
uint8_t *  chan_list 
)
static
static size_t si2q_earfcn_count ( const struct osmo_earfcn_si2q e)
static
static int try_adding_uarfcn ( struct bitvec bv,
uint16_t *  scramble_list,
size_t  uarfcn_length,
size_t *  u_offset,
uint16_t  uarfcn,
uint8_t  num_sc,
uint8_t  start_pos,
uint8_t  budget 
)
inlinestatic