aboutsummaryrefslogtreecommitdiff
path: root/libqcdm/src/dm-commands.h
diff options
context:
space:
mode:
Diffstat (limited to 'libqcdm/src/dm-commands.h')
-rw-r--r--libqcdm/src/dm-commands.h250
1 files changed, 125 insertions, 125 deletions
diff --git a/libqcdm/src/dm-commands.h b/libqcdm/src/dm-commands.h
index d43f4013..e4bbc6ee 100644
--- a/libqcdm/src/dm-commands.h
+++ b/libqcdm/src/dm-commands.h
@@ -211,83 +211,83 @@ enum {
/* Generic DM command header */
struct DMCmdHeader {
- guint8 code;
+ u_int8_t code;
} __attribute__ ((packed));
typedef struct DMCmdHeader DMCmdHeader;
/* DIAG_CMD_SUBSYS */
struct DMCmdSubsysHeader {
- guint8 code;
- guint8 subsys_id;
- guint16 subsys_cmd;
+ u_int8_t code;
+ u_int8_t subsys_id;
+ u_int16_t subsys_cmd;
} __attribute__ ((packed));
typedef struct DMCmdSubsysHeader DMCmdSubsysHeader;
/* DIAG_CMD_NV_READ / DIAG_CMD_NV_WRITE */
struct DMCmdNVReadWrite {
- guint8 code;
- guint16 nv_item;
- guint8 data[128];
- guint16 status;
+ u_int8_t code;
+ u_int16_t nv_item;
+ u_int8_t data[128];
+ u_int16_t status;
} __attribute__ ((packed));
typedef struct DMCmdNVReadWrite DMCmdNVReadWrite;
/* DIAG_CMD_VERSION_INFO */
struct DMCmdVersionInfoRsp {
- guint8 code;
+ u_int8_t code;
char comp_date[11];
char comp_time[8];
char rel_date[11];
char rel_time[8];
char model[8];
- guint8 scm;
- guint8 mob_cai_rev;
- guint8 mob_model;
- guint16 mob_firmware_rev;
- guint8 slot_cycle_index;
- guint8 msm_ver;
- guint8 _unknown;
+ u_int8_t scm;
+ u_int8_t mob_cai_rev;
+ u_int8_t mob_model;
+ u_int16_t mob_firmware_rev;
+ u_int8_t slot_cycle_index;
+ u_int8_t msm_ver;
+ u_int8_t _unknown;
} __attribute__ ((packed));
typedef struct DMCmdVersionInfoRsp DMCmdVersionInfoRsp;
/* DIAG_CMD_ESN */
struct DMCmdEsnRsp {
- guint8 code;
- guint8 esn[4];
+ u_int8_t code;
+ u_int8_t esn[4];
} __attribute__ ((packed));
typedef struct DMCmdEsnRsp DMCmdEsnRsp;
/* DIAG_CMD_STATUS */
struct DMCmdStatusRsp {
- guint8 code;
- guint8 _unknown[3];
- guint8 esn[4];
- guint16 rf_mode;
- guint8 min1_analog[4];
- guint8 min1_cdma[4];
- guint8 min2_analog[2];
- guint8 min2_cdma[2];
- guint8 _unknown1;
- guint16 cdma_rx_state;
- guint8 good_frames;
- guint16 analog_corrected_frames;
- guint16 analog_bad_frames;
- guint16 analog_word_syncs;
- guint16 entry_reason;
- guint16 curr_chan;
- guint8 cdma_code_chan;
- guint16 pilot_base;
- guint16 sid;
- guint16 nid;
- guint16 analog_locaid;
- guint16 analog_rssi;
- guint8 analog_power;
+ u_int8_t code;
+ u_int8_t _unknown[3];
+ u_int8_t esn[4];
+ u_int16_t rf_mode;
+ u_int8_t min1_analog[4];
+ u_int8_t min1_cdma[4];
+ u_int8_t min2_analog[2];
+ u_int8_t min2_cdma[2];
+ u_int8_t _unknown1;
+ u_int16_t cdma_rx_state;
+ u_int8_t good_frames;
+ u_int16_t analog_corrected_frames;
+ u_int16_t analog_bad_frames;
+ u_int16_t analog_word_syncs;
+ u_int16_t entry_reason;
+ u_int16_t curr_chan;
+ u_int8_t cdma_code_chan;
+ u_int16_t pilot_base;
+ u_int16_t sid;
+ u_int16_t nid;
+ u_int16_t analog_locaid;
+ u_int16_t analog_rssi;
+ u_int8_t analog_power;
} __attribute__ ((packed));
typedef struct DMCmdStatusRsp DMCmdStatusRsp;
/* DIAG_CMD_SW_VERSION */
struct DMCmdSwVersionRsp {
- guint8 code;
+ u_int8_t code;
char version[20];
char comp_date[11];
char comp_time[8];
@@ -296,55 +296,55 @@ typedef struct DMCmdSwVersionRsp DMCmdSwVersionRsp;
/* DIAG_CMD_STATUS_SNAPSHOT */
struct DMCmdStatusSnapshotRsp {
- guint8 code;
- guint8 esn[4];
- guint8 imsi_s1[4];
- guint8 imsi_s2[2];
- guint8 imsi_s[8];
- guint8 imsi_11_12;
- guint16 mcc;
- guint8 imsi_addr_num;
- guint16 sid;
- guint16 nid;
- guint8 prev;
- guint8 prev_in_use;
- guint8 mob_prev;
- guint8 band_class;
- guint16 frequency;
- guint8 oper_mode;
- guint8 state;
- guint8 sub_state;
+ u_int8_t code;
+ u_int8_t esn[4];
+ u_int8_t imsi_s1[4];
+ u_int8_t imsi_s2[2];
+ u_int8_t imsi_s[8];
+ u_int8_t imsi_11_12;
+ u_int16_t mcc;
+ u_int8_t imsi_addr_num;
+ u_int16_t sid;
+ u_int16_t nid;
+ u_int8_t prev;
+ u_int8_t prev_in_use;
+ u_int8_t mob_prev;
+ u_int8_t band_class;
+ u_int16_t frequency;
+ u_int8_t oper_mode;
+ u_int8_t state;
+ u_int8_t sub_state;
} __attribute__ ((packed));
typedef struct DMCmdStatusSnapshotRsp DMCmdStatusSnapshotRsp;
/* DIAG_SUBSYS_CM_STATE_INFO subsys command */
struct DMCmdSubsysCMStateInfoRsp {
DMCmdSubsysHeader header;
- guint32 call_state;
- guint32 oper_mode;
- guint32 system_mode;
- guint32 mode_pref;
- guint32 band_pref;
- guint32 roam_pref;
- guint32 srv_domain_pref;
- guint32 acq_order_pref;
- guint32 hybrid_pref;
- guint32 network_sel_mode_pref;
+ u_int32_t call_state;
+ u_int32_t oper_mode;
+ u_int32_t system_mode;
+ u_int32_t mode_pref;
+ u_int32_t band_pref;
+ u_int32_t roam_pref;
+ u_int32_t srv_domain_pref;
+ u_int32_t acq_order_pref;
+ u_int32_t hybrid_pref;
+ u_int32_t network_sel_mode_pref;
} __attribute__ ((packed));
typedef struct DMCmdSubsysCMStateInfoRsp DMCmdSubsysCMStateInfoRsp;
/* DIAG_SUBSYS_HDR_STATE_INFO subsys command */
struct DMCmdSubsysHDRStateInfoRsp {
DMCmdSubsysHeader header;
- guint8 at_state;
- guint8 session_state;
- guint8 almp_state;
- guint8 init_state;
- guint8 idle_state;
- guint8 connected_state;
- guint8 route_update_state;
- guint8 overhead_msg_state;
- guint8 hdr_hybrid_mode;
+ u_int8_t at_state;
+ u_int8_t session_state;
+ u_int8_t almp_state;
+ u_int8_t init_state;
+ u_int8_t idle_state;
+ u_int8_t connected_state;
+ u_int8_t route_update_state;
+ u_int8_t overhead_msg_state;
+ u_int8_t hdr_hybrid_mode;
} __attribute__ ((packed));
typedef struct DMCmdSubsysHDRStateInfoRsp DMCmdSubsysHDRStateInfoRsp;
@@ -352,92 +352,92 @@ typedef struct DMCmdSubsysHDRStateInfoRsp DMCmdSubsysHDRStateInfoRsp;
/* DIAG_SUBSYS_ZTE_STATUS subsys command */
struct DMCmdSubsysZteStatusRsp {
DMCmdSubsysHeader header;
- guint8 _unknown1[8];
- guint8 signal_ind;
- guint8 _unknown2;
+ u_int8_t _unknown1[8];
+ u_int8_t signal_ind;
+ u_int8_t _unknown2;
} __attribute__ ((packed));
typedef struct DMCmdSubsysZteStatusRsp DMCmdSubsysZteStatusRsp;
/* DIAG_CMD_PILOT_SETS command */
struct DMCmdPilotSetsSet {
- guint16 pn_offset;
- guint16 ecio;
+ u_int16_t pn_offset;
+ u_int16_t ecio;
} __attribute__ ((packed));
typedef struct DMCmdPilotSetsSet DMCmdPilotSetsSet;
struct DMCmdPilotSetsRsp {
- guint8 code;
- guint16 pilot_inc;
- guint8 active_count;
- guint8 candidate_count;
- guint8 neighbor_count;
+ u_int8_t code;
+ u_int16_t pilot_inc;
+ u_int8_t active_count;
+ u_int8_t candidate_count;
+ u_int8_t neighbor_count;
DMCmdPilotSetsSet sets[52];
} __attribute__ ((packed));
typedef struct DMCmdPilotSetsRsp DMCmdPilotSetsRsp;
struct DMCmdExtLogMask {
- guint8 code;
+ u_int8_t code;
/* Bit number of highest '1' in 'mask'; set to 0 to get current mask. */
- guint16 len;
+ u_int16_t len;
/* Bitfield of log messages to receive */
- guint8 mask[512];
+ u_int8_t mask[512];
} __attribute__ ((packed));
typedef struct DMCmdExtLogMask DMCmdExtLogMask;
struct DMCmdEventReport {
- guint8 code;
- guint8 on;
+ u_int8_t code;
+ u_int8_t on;
} __attribute__ ((packed));
typedef struct DMCmdEventReport DMCmdEventReport;
struct DMCmdEventReportRsp {
- guint8 code;
- guint16 len;
- guint16 event_id;
- guint8 data[0];
+ u_int8_t code;
+ u_int16_t len;
+ u_int16_t event_id;
+ u_int8_t data[0];
} __attribute__ ((packed));
typedef struct DMCmdEventReportRsp DMCmdEventReportRsp;
/* DIAG_SUBSYS_NW_CONTROL_* subsys command */
struct DMCmdSubsysNwSnapshotReq {
DMCmdSubsysHeader hdr;
- guint8 technology; /* DIAG_SUBSYS_NW_CONTROL_MODEM_SNAPSHOT_TECH_* */
- guint32 snapshot_mask;
+ u_int8_t technology; /* DIAG_SUBSYS_NW_CONTROL_MODEM_SNAPSHOT_TECH_* */
+ u_int32_t snapshot_mask;
} __attribute__ ((packed));
typedef struct DMCmdSubsysNwSnapshotReq DMCmdSubsysNwSnapshotReq;
/* DIAG_SUBSYS_NW_CONTROL_MODEM_SNAPSHOT response */
struct DMCmdSubsysNwSnapshotRsp {
DMCmdSubsysHeader hdr;
- guint8 response_code;
- guint32 bitfield1;
- guint32 bitfield2;
- guint8 data[100];
+ u_int8_t response_code;
+ u_int32_t bitfield1;
+ u_int32_t bitfield2;
+ u_int8_t data[100];
} __attribute__ ((packed));
typedef struct DMCmdSubsysNwSnapshotRsp DMCmdSubsysNwSnapshotRsp;
struct DMCmdSubsysNwSnapshotCdma {
- guint32 rssi;
- guint32 battery_level;
- guint8 call_info;
- guint8 new_sms_ind;
- guint8 missed_calls;
- guint32 voicemail_ind;
- guint8 pkt_call_ctrl_state;
- guint8 mip_rrp_err_code;
- guint8 cur_packet_zone_id;
- guint8 prev;
- guint8 band_class;
- guint8 eri;
- guint8 eri_alert_id;
- guint32 cur_call_total_time;
- guint32 cur_call_active_time;
- guint32 cur_call_tx_ip_bytes;
- guint32 cur_call_rx_ip_bytes;
- guint8 connection_status;
- guint16 dominant_pn;
- guint8 wdisable_mask;
- guint8 hdr_rev;
+ u_int32_t rssi;
+ u_int32_t battery_level;
+ u_int8_t call_info;
+ u_int8_t new_sms_ind;
+ u_int8_t missed_calls;
+ u_int32_t voicemail_ind;
+ u_int8_t pkt_call_ctrl_state;
+ u_int8_t mip_rrp_err_code;
+ u_int8_t cur_packet_zone_id;
+ u_int8_t prev;
+ u_int8_t band_class;
+ u_int8_t eri;
+ u_int8_t eri_alert_id;
+ u_int32_t cur_call_total_time;
+ u_int32_t cur_call_active_time;
+ u_int32_t cur_call_tx_ip_bytes;
+ u_int32_t cur_call_rx_ip_bytes;
+ u_int8_t connection_status;
+ u_int16_t dominant_pn;
+ u_int8_t wdisable_mask;
+ u_int8_t hdr_rev;
} __attribute__ ((packed));
typedef struct DMCmdSubsysNwSnapshotCdma DMCmdSubsysNwSnapshotCdma;