libosmogsm
0.9.3
Osmocom GSM library
|
00001 #pragma once 00002 00003 #include <osmocom/core/prim.h> 00004 00006 enum osmo_ph_prim { 00007 PRIM_PH_DATA, 00008 PRIM_PH_RACH, 00009 PRIM_PH_CONN, 00010 PRIM_PH_EMPTY_FRAME, 00011 PRIM_PH_RTS, 00012 PRIM_MPH_INFO, 00013 PRIM_TCH, 00014 PRIM_TCH_RTS, 00015 }; 00016 00018 enum osmo_mph_info_type { 00019 PRIM_INFO_TIME, 00020 PRIM_INFO_MEAS, 00021 PRIM_INFO_ACTIVATE, 00022 PRIM_INFO_DEACTIVATE, 00023 PRIM_INFO_MODIFY, 00024 PRIM_INFO_ACT_CIPH, 00025 PRIM_INFO_DEACT_CIPH, 00026 }; 00027 00029 struct ph_rach_req_param { 00030 uint8_t ra; 00031 uint8_t ta; 00032 uint8_t tx_power; 00033 uint8_t is_combined_ccch; 00034 uint16_t offset; 00035 }; 00036 00038 struct ph_rach_ind_param { 00039 uint8_t chan_nr; 00040 uint8_t ra; 00041 uint8_t acc_delay; 00042 uint32_t fn; 00043 }; 00044 00046 struct ph_data_param { 00047 uint8_t link_id; 00048 uint8_t chan_nr; 00049 uint32_t fn; 00050 int8_t rssi; 00051 }; 00052 00054 struct ph_tch_param { 00055 uint8_t chan_nr; 00056 uint32_t fn; 00057 int8_t rssi; 00058 }; 00059 00061 struct ph_conn_ind_param { 00062 uint32_t fn; 00063 }; 00064 00066 struct info_time_ind_param { 00067 uint32_t fn; 00068 }; 00069 00071 struct info_meas_ind_param { 00072 uint8_t chan_nr; 00073 uint16_t ber10k; 00074 int16_t ta_offs_qbits; 00075 int16_t c_i_cb; 00076 uint8_t is_sub:1; 00077 uint8_t inv_rssi; 00078 }; 00079 00081 struct info_act_req_param { 00082 uint8_t chan_nr; 00083 uint8_t sacch_only; 00084 }; 00085 00087 struct info_act_cnf_param { 00088 uint8_t chan_nr; 00089 uint8_t cause; 00090 }; 00091 00093 struct info_ciph_req_param { 00094 uint8_t chan_nr; 00095 uint8_t downlink; 00096 uint8_t uplink; 00097 }; 00098 00100 struct mph_info_param { 00101 enum osmo_mph_info_type type; 00102 union { 00103 struct info_time_ind_param time_ind; 00104 struct info_meas_ind_param meas_ind; 00105 struct info_act_req_param act_req; 00106 struct info_act_cnf_param act_cnf; 00107 struct info_ciph_req_param ciph_req; 00108 } u; 00109 }; 00110 00112 struct osmo_phsap_prim { 00113 struct osmo_prim_hdr oph; 00114 union { 00115 struct ph_data_param data; 00116 struct ph_tch_param tch; 00117 struct ph_rach_req_param rach_req; 00118 struct ph_rach_ind_param rach_ind; 00119 struct ph_conn_ind_param conn_ind; 00120 struct mph_info_param info; 00121 } u; 00122 };