libosmogsm  0.9.3
Osmocom GSM library
l1sap.h
1 #pragma once
2 
3 #include <osmocom/core/prim.h>
4 
6 enum osmo_ph_prim {
7  PRIM_PH_DATA,
8  PRIM_PH_RACH,
9  PRIM_PH_CONN,
10  PRIM_PH_EMPTY_FRAME,
11  PRIM_PH_RTS,
12  PRIM_MPH_INFO,
13  PRIM_TCH,
14  PRIM_TCH_RTS,
15 };
16 
18 enum osmo_mph_info_type {
19  PRIM_INFO_TIME,
20  PRIM_INFO_MEAS,
21  PRIM_INFO_ACTIVATE,
22  PRIM_INFO_DEACTIVATE,
23  PRIM_INFO_MODIFY,
24  PRIM_INFO_ACT_CIPH,
25  PRIM_INFO_DEACT_CIPH,
26 };
27 
30  uint8_t ra;
31  uint8_t ta;
32  uint8_t tx_power;
34  uint16_t offset;
35 };
36 
39  uint8_t chan_nr;
40  uint8_t ra;
41  uint8_t acc_delay;
42  uint32_t fn;
43 };
44 
46 struct ph_data_param {
47  uint8_t link_id;
48  uint8_t chan_nr;
49  uint32_t fn;
50  int8_t rssi;
51 };
52 
54 struct ph_tch_param {
55  uint8_t chan_nr;
56  uint32_t fn;
57  int8_t rssi;
58 };
59 
62  uint32_t fn;
63 };
64 
67  uint32_t fn;
68 };
69 
72  uint8_t chan_nr;
73  uint16_t ber10k;
74  int16_t ta_offs_qbits;
75  int16_t c_i_cb;
76  uint8_t is_sub:1;
77  uint8_t inv_rssi;
78 };
79 
82  uint8_t chan_nr;
83  uint8_t sacch_only;
84 };
85 
88  uint8_t chan_nr;
89  uint8_t cause;
90 };
91 
94  uint8_t chan_nr;
95  uint8_t downlink;
96  uint8_t uplink;
97 };
98 
101  enum osmo_mph_info_type type;
102  union {
103  struct info_time_ind_param time_ind;
104  struct info_meas_ind_param meas_ind;
105  struct info_act_req_param act_req;
106  struct info_act_cnf_param act_cnf;
107  struct info_ciph_req_param ciph_req;
108  } u;
109 };
110 
113  struct osmo_prim_hdr oph;
114  union {
115  struct ph_data_param data;
116  struct ph_tch_param tch;
117  struct ph_rach_req_param rach_req;
118  struct ph_rach_ind_param rach_ind;
119  struct ph_conn_ind_param conn_ind;
120  struct mph_info_param info;
121  } u;
122 };