Loading...
Searching...
No Matches
gsm48_rest_octets.h
Go to the documentation of this file.
#pragma once
#include <stdbool.h>
#include <osmocom/gsm/sysinfo.h>
#include <osmocom/gprs/protocol/gsm_04_60.h>
/* 16 is the max. number of SI2quater messages according to 3GPP TS 44.018 Table 10.5.2.33b.1:
4-bit index is used (2#1111 = 10#15) */
#define SI2Q_MAX_NUM 16
/* length in bits (for single SI2quater message) */
#define SI2Q_MAX_LEN 160
#define SI2Q_MIN_LEN 18
/* generate SI1 rest octets */
int osmo_gsm48_rest_octets_si1_encode(uint8_t *data, uint8_t *nch_pos, int is1800_net);
int osmo_gsm48_rest_octets_si2quater_encode(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);
struct osmo_gsm48_si_pch_nch_info {
bool present;
bool paging_channel_restructuring;
uint8_t nln_sacch;
bool call_priority_present;
uint8_t call_priority;
bool nln_status_sacch;
};
struct osmo_gsm48_si_vbs_vgcs_options {
bool present;
bool inband_notifications;
bool inband_pagings;
};
struct osmo_gsm48_si_dtm_support {
bool present;
uint8_t rac;
uint8_t max_lapdm;
};
struct osmo_gsm48_si_gprs_ms_txpwr_max_ccch {
bool present;
uint8_t max_txpwr;
};
struct osmo_gsm48_si6_ro_info {
struct osmo_gsm48_si_pch_nch_info pch_nch_info;
struct osmo_gsm48_si_vbs_vgcs_options vbs_vgcs_options;
struct osmo_gsm48_si_dtm_support dtm_support;
bool band_indicator_1900;
struct osmo_gsm48_si_gprs_ms_txpwr_max_ccch gprs_ms_txpwr_max_ccch;
/* MBMS: not supported in Osmocom */
/* AMR config (group channel): not supported in Osmocom */
};
int osmo_gsm48_rest_octets_si6_encode(uint8_t *data, const struct osmo_gsm48_si6_ro_info *in);
struct osmo_gsm48_si_selection_params {
uint16_t penalty_time:5,
temp_offs:3,
cell_resel_off:6,
cbq:1,
present:1;
};
struct osmo_gsm48_si_power_offset {
uint8_t power_offset:2,
present:1;
};
struct osmo_gsm48_si3_gprs_ind {
uint8_t si13_position:1,
ra_colour:3,
present:1;
};
struct osmo_gsm48_lsa_params {
uint32_t prio_thr:3,
lsa_offset:3,
mcc:12,
mnc:12;
unsigned int present;
};
struct osmo_gsm48_si_ro_info {
struct osmo_gsm48_si_selection_params selection_params;
struct osmo_gsm48_si_power_offset power_offset;
bool si2ter_indicator;
bool early_cm_ctrl;
struct {
uint8_t where:3,
present:1;
} scheduling;
struct osmo_gsm48_si3_gprs_ind gprs_ind;
/* SI 3 specific */
bool early_cm_restrict_3g;
bool si2quater_indicator;
/* SI 4 specific */
struct osmo_gsm48_lsa_params lsa_params;
uint16_t cell_id;
uint8_t break_ind; /* do we have SI7 + SI8 ? */
};
/* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */
int osmo_gsm48_rest_octets_si3_encode(uint8_t *data, const struct osmo_gsm48_si_ro_info *si3);
/* Generate SI4 Rest Octets (Chapter 10.5.2.35) */
int osmo_gsm48_rest_octets_si4_encode(uint8_t *data, const struct osmo_gsm48_si_ro_info *si4, int len);
struct osmo_gsm48_si13_info {
struct osmo_gprs_cell_options cell_opts;
struct osmo_gprs_power_ctrl_pars pwr_ctrl_pars;
uint8_t bcch_change_mark;
uint8_t si_change_field;
uint8_t rac;
uint8_t spgc_ccch_sup;
uint8_t net_ctrl_ord;
uint8_t prio_acc_thr;
};
/* Parse/Generate SI13 Rest Octests (Chapter 10.5.2.37b) */
int osmo_gsm48_rest_octets_si13_decode(struct osmo_gsm48_si13_info *si13, const uint8_t *data);
int osmo_gsm48_rest_octets_si13_encode(uint8_t *data, const struct osmo_gsm48_si13_info *si13);
/* Parse SI3 Rest Octets */
void osmo_gsm48_rest_octets_si3_decode(struct osmo_gsm48_si_ro_info *si3, const uint8_t *data);
/* Parse SI4 Rest Octets */
void osmo_gsm48_rest_octets_si4_decode(struct osmo_gsm48_si_ro_info *si4, const uint8_t *data, int len);
osmo_gsm48_rest_octets_si4_encode
int osmo_gsm48_rest_octets_si4_encode(uint8_t *data, const struct osmo_gsm48_si_ro_info *si4, int len)
Definition gsm48_rest_octets.c:635
osmo_gsm48_rest_octets_si1_encode
int osmo_gsm48_rest_octets_si1_encode(uint8_t *data, uint8_t *nch_pos, int is1800_net)
Definition gsm48_rest_octets.c:38
osmo_gsm48_rest_octets_si13_encode
int osmo_gsm48_rest_octets_si13_encode(uint8_t *data, const struct osmo_gsm48_si13_info *si13)
Definition gsm48_rest_octets.c:1064
osmo_gsm48_rest_octets_si4_decode
void osmo_gsm48_rest_octets_si4_decode(struct osmo_gsm48_si_ro_info *si4, const uint8_t *data, int len)
Definition gsm48_rest_octets.c:1189
osmo_gsm48_rest_octets_si6_encode
int osmo_gsm48_rest_octets_si6_encode(uint8_t *data, const struct osmo_gsm48_si6_ro_info *in)
Definition gsm48_rest_octets.c:697
osmo_gsm48_rest_octets_si13_decode
int osmo_gsm48_rest_octets_si13_decode(struct osmo_gsm48_si13_info *si13, const uint8_t *data)
Decode SI13 Rest Octests (04.08 Chapter 10.5.2.37b).
Definition gsm48_rest_octets.c:824
osmo_gsm48_rest_octets_si3_decode
void osmo_gsm48_rest_octets_si3_decode(struct osmo_gsm48_si_ro_info *si3, const uint8_t *data)
Decode SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72).
Definition gsm48_rest_octets.c:1114
osmo_gsm48_rest_octets_si3_encode
int osmo_gsm48_rest_octets_si3_encode(uint8_t *data, const struct osmo_gsm48_si_ro_info *si3)
Definition gsm48_rest_octets.c:574
osmo_gsm48_rest_octets_si2quater_encode
int osmo_gsm48_rest_octets_si2quater_encode(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)
Definition gsm48_rest_octets.c:464
len
uint8_t len
Definition gsm_04_11.h:0
gsm_04_60.h
osmo_earfcn_si2q
Definition sysinfo.h:48
osmo_gprs_cell_options
osmo_gprs_power_ctrl_pars
osmo_gsm48_lsa_params
Definition gsm48_rest_octets.h:79
osmo_gsm48_lsa_params::present
unsigned int present
Definition gsm48_rest_octets.h:84
osmo_gsm48_lsa_params::mcc
uint32_t mcc
Definition gsm48_rest_octets.h:82
osmo_gsm48_lsa_params::lsa_offset
uint32_t lsa_offset
Definition gsm48_rest_octets.h:81
osmo_gsm48_lsa_params::mnc
uint32_t mnc
Definition gsm48_rest_octets.h:83
osmo_gsm48_lsa_params::prio_thr
uint32_t prio_thr
Definition gsm48_rest_octets.h:80
osmo_gsm48_si13_info
Definition gsm48_rest_octets.h:112
osmo_gsm48_si13_info::bcch_change_mark
uint8_t bcch_change_mark
Definition gsm48_rest_octets.h:115
osmo_gsm48_si13_info::rac
uint8_t rac
Definition gsm48_rest_octets.h:117
osmo_gsm48_si13_info::cell_opts
struct osmo_gprs_cell_options cell_opts
Definition gsm48_rest_octets.h:113
osmo_gsm48_si13_info::spgc_ccch_sup
uint8_t spgc_ccch_sup
Definition gsm48_rest_octets.h:118
osmo_gsm48_si13_info::net_ctrl_ord
uint8_t net_ctrl_ord
Definition gsm48_rest_octets.h:119
osmo_gsm48_si13_info::pwr_ctrl_pars
struct osmo_gprs_power_ctrl_pars pwr_ctrl_pars
Definition gsm48_rest_octets.h:114
osmo_gsm48_si13_info::si_change_field
uint8_t si_change_field
Definition gsm48_rest_octets.h:116
osmo_gsm48_si13_info::prio_acc_thr
uint8_t prio_acc_thr
Definition gsm48_rest_octets.h:120
osmo_gsm48_si3_gprs_ind
Definition gsm48_rest_octets.h:73
osmo_gsm48_si3_gprs_ind::present
uint8_t present
Definition gsm48_rest_octets.h:76
osmo_gsm48_si3_gprs_ind::ra_colour
uint8_t ra_colour
Definition gsm48_rest_octets.h:75
osmo_gsm48_si3_gprs_ind::si13_position
uint8_t si13_position
Definition gsm48_rest_octets.h:74
osmo_gsm48_si6_ro_info
Definition gsm48_rest_octets.h:48
osmo_gsm48_si6_ro_info::band_indicator_1900
bool band_indicator_1900
Definition gsm48_rest_octets.h:52
osmo_gsm48_si6_ro_info::vbs_vgcs_options
struct osmo_gsm48_si_vbs_vgcs_options vbs_vgcs_options
Definition gsm48_rest_octets.h:50
osmo_gsm48_si6_ro_info::dtm_support
struct osmo_gsm48_si_dtm_support dtm_support
Definition gsm48_rest_octets.h:51
osmo_gsm48_si6_ro_info::pch_nch_info
struct osmo_gsm48_si_pch_nch_info pch_nch_info
Definition gsm48_rest_octets.h:49
osmo_gsm48_si6_ro_info::gprs_ms_txpwr_max_ccch
struct osmo_gsm48_si_gprs_ms_txpwr_max_ccch gprs_ms_txpwr_max_ccch
Definition gsm48_rest_octets.h:53
osmo_gsm48_si_dtm_support
Definition gsm48_rest_octets.h:37
osmo_gsm48_si_dtm_support::rac
uint8_t rac
Definition gsm48_rest_octets.h:39
osmo_gsm48_si_dtm_support::present
bool present
Definition gsm48_rest_octets.h:38
osmo_gsm48_si_dtm_support::max_lapdm
uint8_t max_lapdm
Definition gsm48_rest_octets.h:40
osmo_gsm48_si_gprs_ms_txpwr_max_ccch
Definition gsm48_rest_octets.h:43
osmo_gsm48_si_gprs_ms_txpwr_max_ccch::max_txpwr
uint8_t max_txpwr
Definition gsm48_rest_octets.h:45
osmo_gsm48_si_gprs_ms_txpwr_max_ccch::present
bool present
Definition gsm48_rest_octets.h:44
osmo_gsm48_si_pch_nch_info
Definition gsm48_rest_octets.h:22
osmo_gsm48_si_pch_nch_info::nln_status_sacch
bool nln_status_sacch
Definition gsm48_rest_octets.h:28
osmo_gsm48_si_pch_nch_info::nln_sacch
uint8_t nln_sacch
Definition gsm48_rest_octets.h:25
osmo_gsm48_si_pch_nch_info::paging_channel_restructuring
bool paging_channel_restructuring
Definition gsm48_rest_octets.h:24
osmo_gsm48_si_pch_nch_info::present
bool present
Definition gsm48_rest_octets.h:23
osmo_gsm48_si_pch_nch_info::call_priority_present
bool call_priority_present
Definition gsm48_rest_octets.h:26
osmo_gsm48_si_pch_nch_info::call_priority
uint8_t call_priority
Definition gsm48_rest_octets.h:27
osmo_gsm48_si_power_offset
Definition gsm48_rest_octets.h:68
osmo_gsm48_si_power_offset::power_offset
uint8_t power_offset
Definition gsm48_rest_octets.h:69
osmo_gsm48_si_power_offset::present
uint8_t present
Definition gsm48_rest_octets.h:70
osmo_gsm48_si_ro_info
Definition gsm48_rest_octets.h:87
osmo_gsm48_si_ro_info::si2ter_indicator
bool si2ter_indicator
Definition gsm48_rest_octets.h:90
osmo_gsm48_si_ro_info::break_ind
uint8_t break_ind
Definition gsm48_rest_octets.h:103
osmo_gsm48_si_ro_info::power_offset
struct osmo_gsm48_si_power_offset power_offset
Definition gsm48_rest_octets.h:89
osmo_gsm48_si_ro_info::si2quater_indicator
bool si2quater_indicator
Definition gsm48_rest_octets.h:99
osmo_gsm48_si_ro_info::present
uint8_t present
Definition gsm48_rest_octets.h:94
osmo_gsm48_si_ro_info::early_cm_restrict_3g
bool early_cm_restrict_3g
Definition gsm48_rest_octets.h:98
osmo_gsm48_si_ro_info::lsa_params
struct osmo_gsm48_lsa_params lsa_params
Definition gsm48_rest_octets.h:101
osmo_gsm48_si_ro_info::where
uint8_t where
Definition gsm48_rest_octets.h:93
osmo_gsm48_si_ro_info::early_cm_ctrl
bool early_cm_ctrl
Definition gsm48_rest_octets.h:91
osmo_gsm48_si_ro_info::selection_params
struct osmo_gsm48_si_selection_params selection_params
Definition gsm48_rest_octets.h:88
osmo_gsm48_si_ro_info::scheduling
struct osmo_gsm48_si_ro_info::@8 scheduling
osmo_gsm48_si_ro_info::cell_id
uint16_t cell_id
Definition gsm48_rest_octets.h:102
osmo_gsm48_si_ro_info::gprs_ind
struct osmo_gsm48_si3_gprs_ind gprs_ind
Definition gsm48_rest_octets.h:96
osmo_gsm48_si_selection_params
Definition gsm48_rest_octets.h:60
osmo_gsm48_si_selection_params::cell_resel_off
uint16_t cell_resel_off
Definition gsm48_rest_octets.h:63
osmo_gsm48_si_selection_params::penalty_time
uint16_t penalty_time
Definition gsm48_rest_octets.h:61
osmo_gsm48_si_selection_params::present
uint16_t present
Definition gsm48_rest_octets.h:65
osmo_gsm48_si_selection_params::temp_offs
uint16_t temp_offs
Definition gsm48_rest_octets.h:62
osmo_gsm48_si_selection_params::cbq
uint16_t cbq
Definition gsm48_rest_octets.h:64
osmo_gsm48_si_vbs_vgcs_options
Definition gsm48_rest_octets.h:31
osmo_gsm48_si_vbs_vgcs_options::inband_notifications
bool inband_notifications
Definition gsm48_rest_octets.h:33
osmo_gsm48_si_vbs_vgcs_options::present
bool present
Definition gsm48_rest_octets.h:32
osmo_gsm48_si_vbs_vgcs_options::inband_pagings
bool inband_pagings
Definition gsm48_rest_octets.h:34
sysinfo.h