Harald Welte | f5d6fee | 2016-01-13 22:29:10 +0100 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <stdint.h> |
| 4 | |
| 5 | enum diag_gsm_cmd { |
| 6 | GSM_DIAG_VERNO_F = 0, |
| 7 | GSM_STATUS_F = 1, |
| 8 | GSM_TMC_STATE_RETRIEVAL_F = 2, |
| 9 | GSM_DIAG_CALL_ORIG_F = 3, |
| 10 | GSM_DIAG_CALL_END_F = 4, |
| 11 | GSM_GPRS_LOG_PACKET_REQ_F = 5, |
| 12 | DIAG_GSM_MAX_F = 6, |
| 13 | }; |
| 14 | |
| 15 | /* LOG_GSM_RR_SIGNALING_MESSAGE_C */ |
| 16 | struct diag_gsm_rr_msg { |
| 17 | uint8_t chan_type; |
| 18 | uint8_t msg_type; |
| 19 | uint8_t length; |
| 20 | uint8_t data[0]; |
| 21 | } __attribute__((packed)); |
| 22 | |
| 23 | enum diag_gsm_rr_st { |
| 24 | DIAG_RR_ST_INACTIVE = 0, |
| 25 | DIAG_RR_ST_GOING_ACTIVE = 1, |
| 26 | DIAG_RR_ST_GOING_INACTIVE = 2, |
| 27 | DIAG_RR_ST_CELL_SELECTION = 3, |
| 28 | DIAG_RR_ST_PLMN_LIST_CONSTRUCTION = 4, |
| 29 | DIAG_RR_ST_IDLE = 5, |
| 30 | DIAG_RR_ST_CELL_RESELECTION = 6, |
| 31 | DIAG_RR_ST_CONNECTION_PENDING = 7, |
| 32 | DIAG_RR_ST_CHOOSE_CELL = 8, |
| 33 | DIAG_RR_ST_DATA_TRANSFER = 9, |
| 34 | DIAG_RR_ST_NO_CHANNELS = 10, |
| 35 | DIAG_RR_ST_CONNECTION_RELEASE = 11, |
| 36 | DIAG_RR_ST_EARLY_CAMPED_WAIT_FOR_SI= 12, |
| 37 | DIAG_RR_ST_W2G_INTERRAT_HO_PROGRESS= 13, |
| 38 | DIAG_RR_ST_W2G_INTERRAT_RESELECTION_PROGRESS = 14, |
| 39 | DIAG_RR_ST_W2G_INTERRAT_CC_ORDER_PROGRESS = 15, |
| 40 | DIAG_RR_ST_G2W_INTERRAT_RESELECTION_PROGRESS = 16, |
| 41 | DIAG_RR_ST_WAIT_FOR_EARLY_PSCAN = 17, |
| 42 | DIAG_RR_ST_GRR = 18, |
| 43 | DIAG_RR_ST_G2W_INTERRAT_HO_PROGRESS = 20, |
| 44 | DIAG_RR_ST_BACKGROUND_PLMN_SEARCH = 21, |
| 45 | DIAG_RR_ST_W2G_SERVICE_REDIR_IN_PROGRESS = 22, |
| 46 | DIAG_RR_ST_RESET = 23, |
| 47 | DIAG_RR_ST_W2G_BACKGROUND_PLN_SEARCH = 24, |
| 48 | }; |
| 49 | extern const struct value_string diag_gsm_rr_st_vals[25]; |
| 50 | |
| 51 | /* LOG_GSM_RR_STATE_C */ |
| 52 | struct diag_gsm_rr_state { |
| 53 | uint8_t state; |
| 54 | uint8_t substate; |
| 55 | uint8_t status; |
| 56 | uint8_t mode; |
| 57 | } __attribute__((packed)); |
| 58 | |
| 59 | enum diag_gprs_grr_st { |
| 60 | DIAG_GRR_ST_NULL = 0, |
| 61 | DIAG_GRR_ST_ACQUIRE = 1, |
| 62 | DIAG_GRR_ST_CAMPED = 2, |
| 63 | DIAG_GRR_ST_CONN_PEND = 3, |
| 64 | DIAG_GRR_ST_CELL_RESEL = 4, |
| 65 | DIAG_GRR_ST_CELL_RESEL_G2W = 6, |
| 66 | DIAG_GRR_ST_BG_PLMN_SEARCH = 7, |
| 67 | DIAG_GRR_ST_PCCO = 8, |
| 68 | }; |
| 69 | extern const struct value_string diag_gprs_grr_st_vals[9]; |
| 70 | |
| 71 | /* LOG_GPRS_GRR_STATE_C */ |
| 72 | struct diag_gprs_grr_state { |
| 73 | uint8_t active_state; |
| 74 | uint8_t grr_state; |
| 75 | } __attribute__((packed)); |
| 76 | |
| 77 | |
| 78 | enum diag_gprs_llme_state { |
| 79 | DIAG_GPRS_LLMES_TLLI_UNASS = 0, |
| 80 | DIAG_GPRS_LLMES_TLLI_ASS = 1, |
| 81 | DIAG_GPRS_LLMES_TEST_MODE = 2, |
| 82 | }; |
| 83 | const struct value_string diag_gprs_llme_st_vals[4]; |
| 84 | |
| 85 | /* LOG_GPRS_LLC_ME_INFO_C */ |
| 86 | struct diag_gprs_llme_info { |
| 87 | uint8_t state; |
| 88 | uint8_t xid_version; |
| 89 | uint32_t tlli_new; |
| 90 | uint32_t tlli_old; |
| 91 | uint8_t enc_alg; |
| 92 | uint8_t enc_key[8]; |
| 93 | uint32_t input_offset_iov_ui; |
| 94 | } __attribute__((packed)); |
| 95 | |
| 96 | /* LOG_GPRS_LLC_PDU_STATS_C */ |
| 97 | struct diag_gprs_llc_stats { |
| 98 | uint8_t sapi; |
| 99 | uint32_t ack_l3pdu_tx; |
| 100 | uint32_t ack_octet_tx; |
| 101 | uint32_t ack_l3pdu_retrans; |
| 102 | uint32_t ack_octet_retrans; |
| 103 | uint32_t ack_l3pdu_rx; |
| 104 | uint32_t ack_octet_rx; |
| 105 | uint32_t unack_l3pdu_tx; |
| 106 | uint32_t unack_octet_tx; |
| 107 | uint32_t unack_l3pdu_rx; |
| 108 | uint32_t unack_octet_rx; |
| 109 | uint32_t llpdu_tx; |
| 110 | uint32_t llpdu_rx; |
| 111 | uint32_t llpdu_fcs_err; |
| 112 | uint32_t llpdu_frm_rej; |
| 113 | uint32_t llpdu_tlli_err; |
| 114 | uint32_t llpdu_addr_err; |
| 115 | uint32_t llpdu_short_err; |
| 116 | } __attribute__((packed)); |
| 117 | |
| 118 | int diag_gsm_make_log_pack_req(uint16_t log_code, uint8_t zero_stats, uint8_t addl_info); |