-
Notifications
You must be signed in to change notification settings - Fork 32
/
MPQMUX.h
3498 lines (3122 loc) · 115 KB
/
MPQMUX.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*===========================================================================
M P Q M U X. H
DESCRIPTION:
This file provides support for QMUX.
INITIALIZATION AND SEQUENCING REQUIREMENTS:
Copyright (C) 2011 by Qualcomm Technologies, Incorporated. All Rights Reserved.
===========================================================================*/
#ifndef MPQMUX_H
#define MPQMUX_H
#include "MPQMI.h"
#pragma pack(push, 1)
#define QMIWDS_SET_EVENT_REPORT_REQ 0x0001
#define QMIWDS_SET_EVENT_REPORT_RESP 0x0001
#define QMIWDS_EVENT_REPORT_IND 0x0001
#define QMIWDS_START_NETWORK_INTERFACE_REQ 0x0020
#define QMIWDS_START_NETWORK_INTERFACE_RESP 0x0020
#define QMIWDS_STOP_NETWORK_INTERFACE_REQ 0x0021
#define QMIWDS_STOP_NETWORK_INTERFACE_RESP 0x0021
#define QMIWDS_GET_PKT_SRVC_STATUS_REQ 0x0022
#define QMIWDS_GET_PKT_SRVC_STATUS_RESP 0x0022
#define QMIWDS_GET_PKT_SRVC_STATUS_IND 0x0022
#define QMIWDS_GET_CURRENT_CHANNEL_RATE_REQ 0x0023
#define QMIWDS_GET_CURRENT_CHANNEL_RATE_RESP 0x0023
#define QMIWDS_GET_PKT_STATISTICS_REQ 0x0024
#define QMIWDS_GET_PKT_STATISTICS_RESP 0x0024
#define QMIWDS_MODIFY_PROFILE_SETTINGS_REQ 0x0028
#define QMIWDS_MODIFY_PROFILE_SETTINGS_RESP 0x0028
#define QMIWDS_GET_PROFILE_SETTINGS_REQ 0x002B
#define QMIWDS_GET_PROFILE_SETTINGS_RESP 0x002B
#define QMIWDS_GET_DEFAULT_SETTINGS_REQ 0x002C
#define QMIWDS_GET_DEFAULT_SETTINGS_RESP 0x002C
#define QMIWDS_GET_RUNTIME_SETTINGS_REQ 0x002D
#define QMIWDS_GET_RUNTIME_SETTINGS_RESP 0x002D
#define QMIWDS_GET_MIP_MODE_REQ 0x002F
#define QMIWDS_GET_MIP_MODE_RESP 0x002F
#define QMIWDS_GET_DATA_BEARER_REQ 0x0037
#define QMIWDS_GET_DATA_BEARER_RESP 0x0037
#define QMIWDS_DUN_CALL_INFO_REQ 0x0038
#define QMIWDS_DUN_CALL_INFO_RESP 0x0038
#define QMIWDS_DUN_CALL_INFO_IND 0x0038
#define QMIWDS_SET_CLIENT_IP_FAMILY_PREF_REQ 0x004D
#define QMIWDS_SET_CLIENT_IP_FAMILY_PREF_RESP 0x004D
#define QMIWDS_SET_AUTO_CONNECT_REQ 0x0051
#define QMIWDS_SET_AUTO_CONNECT_RESP 0x0051
#define QMIWDS_BIND_MUX_DATA_PORT_REQ 0x00A2
#define QMIWDS_BIND_MUX_DATA_PORT_RESP 0x00A2
// Stats masks
#define QWDS_STAT_MASK_TX_PKT_OK 0x00000001
#define QWDS_STAT_MASK_RX_PKT_OK 0x00000002
#define QWDS_STAT_MASK_TX_PKT_ER 0x00000004
#define QWDS_STAT_MASK_RX_PKT_ER 0x00000008
#define QWDS_STAT_MASK_TX_PKT_OF 0x00000010
#define QWDS_STAT_MASK_RX_PKT_OF 0x00000020
// TLV Types for xfer statistics
#define TLV_WDS_TX_GOOD_PKTS 0x10
#define TLV_WDS_RX_GOOD_PKTS 0x11
#define TLV_WDS_TX_ERROR 0x12
#define TLV_WDS_RX_ERROR 0x13
#define TLV_WDS_TX_OVERFLOW 0x14
#define TLV_WDS_RX_OVERFLOW 0x15
#define TLV_WDS_CHANNEL_RATE 0x16
#define TLV_WDS_DATA_BEARER 0x17
#define TLV_WDS_DORMANCY_STATUS 0x18
#define QWDS_PKT_DATA_UNKNOW 0x00
#define QWDS_PKT_DATA_DISCONNECTED 0x01
#define QWDS_PKT_DATA_CONNECTED 0x02
#define QWDS_PKT_DATA_SUSPENDED 0x03
#define QWDS_PKT_DATA_AUTHENTICATING 0x04
#define QMIWDS_ADMIN_SET_DATA_FORMAT_REQ 0x0020
#define QMIWDS_ADMIN_SET_DATA_FORMAT_RESP 0x0020
#define QMIWDS_ADMIN_GET_DATA_FORMAT_REQ 0x0021
#define QMIWDS_ADMIN_GET_DATA_FORMAT_RESP 0x0021
#define QMIWDS_ADMIN_SET_QMAP_SETTINGS_REQ 0x002B
#define QMIWDS_ADMIN_SET_QMAP_SETTINGS_RESP 0x002B
#define QMIWDS_ADMIN_GET_QMAP_SETTINGS_REQ 0x002C
#define QMIWDS_ADMIN_GET_QMAP_SETTINGS_RESP 0x002C
#define QMI_WDA_SET_LOOPBACK_CONFIG_REQ 0x002F
#define QMI_WDA_SET_LOOPBACK_CONFIG_RESP 0x002F
#define QMI_WDA_SET_LOOPBACK_CONFIG_IND 0x002F
#define NETWORK_DESC_ENCODING_OCTET 0x00
#define NETWORK_DESC_ENCODING_EXTPROTOCOL 0x01
#define NETWORK_DESC_ENCODING_7BITASCII 0x02
#define NETWORK_DESC_ENCODING_IA5 0x03
#define NETWORK_DESC_ENCODING_UNICODE 0x04
#define NETWORK_DESC_ENCODING_SHIFTJIS 0x05
#define NETWORK_DESC_ENCODING_KOREAN 0x06
#define NETWORK_DESC_ENCODING_LATINH 0x07
#define NETWORK_DESC_ENCODING_LATIN 0x08
#define NETWORK_DESC_ENCODING_GSM7BIT 0x09
#define NETWORK_DESC_ENCODING_GSMDATA 0x0A
#define NETWORK_DESC_ENCODING_UNKNOWN 0xFF
typedef struct _QMIWDS_ADMIN_SET_DATA_FORMAT
{
USHORT Type; // QMUX type 0x0000
USHORT Length;
} __attribute__ ((packed)) QMIWDS_ADMIN_SET_DATA_FORMAT, *PQMIWDS_ADMIN_SET_DATA_FORMAT;
typedef struct _QMIWDS_ADMIN_SET_DATA_FORMAT_TLV_QOS
{
UCHAR TLVType;
USHORT TLVLength;
UCHAR QOSSetting;
} __attribute__ ((packed)) QMIWDS_ADMIN_SET_DATA_FORMAT_TLV_QOS, *PQMIWDS_ADMIN_SET_DATA_FORMAT_TLV_QOS;
typedef struct _QMIWDS_ADMIN_SET_DATA_FORMAT_TLV
{
UCHAR TLVType;
USHORT TLVLength;
ULONG Value;
} __attribute__ ((packed)) QMIWDS_ADMIN_SET_DATA_FORMAT_TLV, *PQMIWDS_ADMIN_SET_DATA_FORMAT_TLV;
typedef struct _QMIWDS_ENDPOINT_TLV
{
UCHAR TLVType;
USHORT TLVLength;
ULONG ep_type;
ULONG iface_id;
} __attribute__ ((packed)) QMIWDS_ENDPOINT_TLV, *PQMIWDS_ENDPOINT_TLV;
typedef struct _QMIWDS_ADMIN_SET_DATA_FORMAT_REQ_MSG
{
USHORT Type;
USHORT Length;
QMIWDS_ADMIN_SET_DATA_FORMAT_TLV_QOS QosDataFormatTlv;
QMIWDS_ADMIN_SET_DATA_FORMAT_TLV UnderlyingLinkLayerProtocolTlv;
QMIWDS_ADMIN_SET_DATA_FORMAT_TLV UplinkDataAggregationProtocolTlv;
QMIWDS_ADMIN_SET_DATA_FORMAT_TLV DownlinkDataAggregationProtocolTlv;
QMIWDS_ADMIN_SET_DATA_FORMAT_TLV DownlinkDataAggregationMaxDatagramsTlv;
QMIWDS_ADMIN_SET_DATA_FORMAT_TLV DownlinkDataAggregationMaxSizeTlv;
QMIWDS_ENDPOINT_TLV epTlv;
#ifdef QUECTEL_UL_DATA_AGG
QMIWDS_ADMIN_SET_DATA_FORMAT_TLV DlMinimumPassingTlv;
QMIWDS_ADMIN_SET_DATA_FORMAT_TLV UplinkDataAggregationMaxDatagramsTlv;
QMIWDS_ADMIN_SET_DATA_FORMAT_TLV UplinkDataAggregationMaxSizeTlv;
#endif
} __attribute__ ((packed)) QMIWDS_ADMIN_SET_DATA_FORMAT_REQ_MSG, *PQMIWDS_ADMIN_SET_DATA_FORMAT_REQ_MSG;
typedef struct _QMI_U8_TLV
{
UCHAR TLVType;
USHORT TLVLength;
UCHAR TLVVaule;
} __attribute__ ((packed)) QMI_U8_TLV, *PQMI_U8_TLV;
typedef struct _QMI_U32_TLV
{
UCHAR TLVType;
USHORT TLVLength;
ULONG TLVVaule;
} __attribute__ ((packed)) QMI_U32_TLV, *PQMI_U32_TLV;
typedef struct _QMI_WDA_SET_LOOPBACK_CONFIG_REQ_MSG {
USHORT Type;
USHORT Length;
QMI_U8_TLV loopback_state; //0x01
QMI_U32_TLV replication_factor; //0x10
} __attribute__ ((packed)) QMI_WDA_SET_LOOPBACK_CONFIG_REQ_MSG, *PQMI_WDA_SET_LOOPBACK_CONFIG_REQ_MSG;
typedef struct _QMI_WDA_SET_LOOPBACK_CONFIG_IND_MSG
{
USHORT Type;
USHORT Length;
QMI_U8_TLV loopback_state; //0x01
QMI_U32_TLV replication_factor; //0x10
} __attribute__ ((packed)) QMI_WDA_SET_LOOPBACK_CONFIG_IND_MSG, *PQMI_WDA_SET_LOOPBACK_CONFIG_IND_MSG;
#if 0
typedef enum _QMI_RETURN_CODES {
QMI_SUCCESS = 0,
QMI_SUCCESS_NOT_COMPLETE,
QMI_FAILURE
}QMI_RETURN_CODES;
typedef struct _QMIWDS_GET_PKT_SRVC_STATUS_REQ_MSG
{
USHORT Type; // 0x0022
USHORT Length; // 0x0000
} QMIWDS_GET_PKT_SRVC_STATUS_REQ_MSG, *PQMIWDS_GET_PKT_SRVC_STATUS_REQ_MSG;
typedef struct _QMIWDS_GET_PKT_SRVC_STATUS_RESP_MSG
{
USHORT Type;
USHORT Length;
UCHAR TLVType;
USHORT TLVLength;
USHORT QMUXResult;
USHORT QMUXError;
UCHAR TLVType2;
USHORT TLVLength2;
UCHAR ConnectionStatus; // 0x01: QWDS_PKT_DATAC_DISCONNECTED
// 0x02: QWDS_PKT_DATA_CONNECTED
// 0x03: QWDS_PKT_DATA_SUSPENDED
// 0x04: QWDS_PKT_DATA_AUTHENTICATING
} QMIWDS_GET_PKT_SRVC_STATUS_RESP_MSG, *PQMIWDS_GET_PKT_SRVC_STATUS_RESP_MSG;
typedef struct _QMIWDS_GET_PKT_SRVC_STATUS_IND_MSG
{
USHORT Type;
USHORT Length;
UCHAR TLVType;
USHORT TLVLength;
UCHAR ConnectionStatus; // 0x01: QWDS_PKT_DATAC_DISCONNECTED
// 0x02: QWDS_PKT_DATA_CONNECTED
// 0x03: QWDS_PKT_DATA_SUSPENDED
UCHAR ReconfigRequired; // 0x00: No need to reconfigure
// 0x01: Reconfiguration required
} QMIWDS_GET_PKT_SRVC_STATUS_IND_MSG, *PQMIWDS_GET_PKT_SRVC_STATUS_IND_MSG;
typedef struct _WDS_PKT_SRVC_IP_FAMILY_TLV
{
UCHAR TLVType; // 0x12
USHORT TLVLength; // 1
UCHAR IpFamily; // IPV4-0x04, IPV6-0x06
} WDS_PKT_SRVC_IP_FAMILY_TLV, *PWDS_PKT_SRVC_IP_FAMILY_TLV;
typedef struct _QMIWDS_DUN_CALL_INFO_REQ_MSG
{
USHORT Type;
USHORT Length;
UCHAR TLVType;
USHORT TLVLength;
ULONG Mask;
UCHAR TLV2Type;
USHORT TLV2Length;
UCHAR ReportConnectionStatus;
} QMIWDS_DUN_CALL_INFO_REQ_MSG, *PQMIWDS_DUN_CALL_INFO_REQ_MSG;
typedef struct _QMIWDS_DUN_CALL_INFO_RESP_MSG
{
USHORT Type;
USHORT Length;
UCHAR TLVType;
USHORT TLVLength;
USHORT QMUXResult;
USHORT QMUXError;
} QMIWDS_DUN_CALL_INFO_RESP_MSG, *PQMIWDS_DUN_CALL_INFO_RESP_MSG;
typedef struct _QMIWDS_DUN_CALL_INFO_IND_MSG
{
UCHAR TLVType;
USHORT TLVLength;
UCHAR ConnectionStatus;
} QMIWDS_DUN_CALL_INFO_IND_MSG, *PQMIWDS_DUN_CALL_INFO_IND_MSG;
typedef struct _QMIWDS_GET_CURRENT_CHANNEL_RATE_REQ_MSG
{
USHORT Type; // QMUX type 0x0040
USHORT Length;
} QMIWDS_GET_CURRENT_CHANNEL_RATE_REQ_MSG, *PQMIWDS_GET_CURRENT_CHANNEL_RATE_REQ_MSG;
typedef struct _QMIWDS_GET_CURRENT_CHANNEL_RATE_RESP_MSG
{
USHORT Type; // QMUX type 0x0040
USHORT Length;
UCHAR TLVType; // 0x02
USHORT TLVLength; // 4
USHORT QMUXResult; // QMI_RESULT_SUCCESS
// QMI_RESULT_FAILURE
USHORT QMUXError; // QMI_ERR_INVALID_ARG
// QMI_ERR_NO_MEMORY
// QMI_ERR_INTERNAL
// QMI_ERR_FAULT
UCHAR TLV2Type; // 0x01
USHORT TLV2Length; // 16
//ULONG CallHandle; // Context corresponding to reported channel
ULONG CurrentTxRate; // bps
ULONG CurrentRxRate; // bps
ULONG ServingSystemTxRate; // bps
ULONG ServingSystemRxRate; // bps
} QMIWDS_GET_CURRENT_CHANNEL_RATE_RESP_MSG, *PQMIWDS_GET_CURRENT_CHANNEL_RATE_RESP;
#define QWDS_EVENT_REPORT_MASK_RATES 0x01
#define QWDS_EVENT_REPORT_MASK_STATS 0x02
#ifdef QCUSB_MUX_PROTOCOL
#error code not present
#endif // QCUSB_MUX_PROTOCOL
typedef struct _QMIWDS_SET_EVENT_REPORT_REQ_MSG
{
USHORT Type; // QMUX type 0x0042
USHORT Length;
UCHAR TLVType; // 0x10 -- current channel rate indicator
USHORT TLVLength; // 1
UCHAR Mode; // 0-do not report; 1-report when rate changes
UCHAR TLV2Type; // 0x11
USHORT TLV2Length; // 5
UCHAR StatsPeriod; // seconds between reports; 0-do not report
ULONG StatsMask; //
UCHAR TLV3Type; // 0x12 -- current data bearer indicator
USHORT TLV3Length; // 1
UCHAR Mode3; // 0-do not report; 1-report when changes
UCHAR TLV4Type; // 0x13 -- dormancy status indicator
USHORT TLV4Length; // 1
UCHAR DormancyStatus; // 0-do not report; 1-report when changes
} QMIWDS_SET_EVENT_REPORT_REQ_MSG, *PQMIWDS_SET_EVENT_REPORT_REQ_MSG;
typedef struct _QMIWDS_SET_EVENT_REPORT_RESP_MSG
{
USHORT Type; // QMUX type 0x0042
USHORT Length;
UCHAR TLVType; // 0x02 result code
USHORT TLVLength; // 4
USHORT QMUXResult; // QMI_RESULT_SUCCESS
// QMI_RESULT_FAILURE
USHORT QMUXError; // QMI_ERR_INVALID_ARG
// QMI_ERR_NO_MEMORY
// QMI_ERR_INTERNAL
// QMI_ERR_NO_BATTERY
// QMI_ERR_FAULT
} QMIWDS_SET_EVENT_REPORT_RESP_MSG, *PQMIWDS_SET_EVENT_REPORT_RESP_MSG;
typedef struct _QMIWDS_EVENT_REPORT_IND_MSG
{
USHORT Type; // QMUX type 0x0001
USHORT Length;
} QMIWDS_EVENT_REPORT_IND_MSG, *PQMIWDS_EVENT_REPORT_IND_MSG;
// PQCTLV_PKT_STATISTICS
typedef struct _QMIWDS_EVENT_REPORT_IND_CHAN_RATE_TLV
{
UCHAR Type;
USHORT Length; // 8
ULONG TxRate;
ULONG RxRate;
} QMIWDS_EVENT_REPORT_IND_CHAN_RATE_TLV, *PQMIWDS_EVENT_REPORT_IND_CHAN_RATE_TLV;
#ifdef QCUSB_MUX_PROTOCOL
#error code not present
#endif // QCUSB_MUX_PROTOCOL
typedef struct _QMIWDS_GET_PKT_STATISTICS_REQ_MSG
{
USHORT Type; // QMUX type 0x0041
USHORT Length;
UCHAR TLVType; // 0x01
USHORT TLVLength; // 4
ULONG StateMask; // 0x00000001 tx success packets
// 0x00000002 rx success packets
// 0x00000004 rx packet errors (checksum)
// 0x00000008 rx packets dropped (memory)
} QMIWDS_GET_PKT_STATISTICS_REQ_MSG, *PQMIWDS_GET_PKT_STATISTICS_REQ_MSG;
typedef struct _QMIWDS_GET_PKT_STATISTICS_RESP_MSG
{
USHORT Type; // QMUX type 0x0041
USHORT Length;
UCHAR TLVType; // 0x02
USHORT TLVLength; // 4
USHORT QMUXResult; // QMI_RESULT_SUCCESS
// QMI_RESULT_FAILURE
USHORT QMUXError; // QMI_ERR_INVALID_ARG
// QMI_ERR_NO_MEMORY
// QMI_ERR_INTERNAL
// QMI_ERR_FAULT
} QMIWDS_GET_PKT_STATISTICS_RESP_MSG, *PQMIWDS_GET_PKT_STATISTICS_RESP_MSG;
// optional TLV for stats
typedef struct _QCTLV_PKT_STATISTICS
{
UCHAR TLVType; // see above definitions for TLV types
USHORT TLVLength; // 4
ULONG Count;
} QCTLV_PKT_STATISTICS, *PQCTLV_PKT_STATISTICS;
#endif
//#ifdef QC_IP_MODE
/*
• Bit 0 – Profile identifier
• Bit 1 – Profile name
• Bit 2 – PDP type
• Bit 3 – APN name
• Bit 4 – DNS address
• Bit 5 – UMTS/GPRS granted QoS
• Bit 6 – Username
• Bit 7 – Authentication Protocol
• Bit 8 – IP address
• Bit 9 – Gateway information (address and subnet mask)
• Bit 10 – PCSCF address using a PCO flag
• Bit 11 – PCSCF server address list
• Bit 12 – PCSCF domain name list
• Bit 13 – MTU
• Bit 14 – Domain name list
• Bit 15 – IP family
• Bit 16 – IM_CM flag
• Bit 17 – Technology name
• Bit 18 – Operator reserved PCO
*/
#define QMIWDS_GET_RUNTIME_SETTINGS_MASK_IPV4DNS_ADDR (1 << 4)
#define QMIWDS_GET_RUNTIME_SETTINGS_MASK_IPV4_ADDR (1 << 8)
#define QMIWDS_GET_RUNTIME_SETTINGS_MASK_IPV4GATEWAY_ADDR (1 << 9)
#define QMIWDS_GET_RUNTIME_SETTINGS_MASK_MTU (1 << 13)
#define QMIWDS_GET_RUNTIME_SETTINGS_MASK_PCSCF_SV_ADDR (1 << 11)
#define QMIWDS_GET_RUNTIME_SETTINGS_MASK_PCSCF_DOM_NAME (1 << 14)
typedef struct _QMIWDS_GET_RUNTIME_SETTINGS_REQ_MSG
{
USHORT Type; // QMIWDS_GET_RUNTIME_SETTINGS_REQ
USHORT Length;
UCHAR TLVType; // 0x10
USHORT TLVLength; // 0x0004
ULONG Mask; // mask, bit 8: IP addr -- 0x0100
} __attribute__ ((packed)) QMIWDS_GET_RUNTIME_SETTINGS_REQ_MSG, *PQMIWDS_GET_RUNTIME_SETTINGS_REQ_MSG;
typedef struct _QMIWDS_BIND_MUX_DATA_PORT_REQ_MSG
{
USHORT Type;
USHORT Length;
UCHAR TLVType;
USHORT TLVLength;
ULONG ep_type;
ULONG iface_id;
UCHAR TLV2Type;
USHORT TLV2Length;
UCHAR MuxId;
UCHAR TLV3Type;
USHORT TLV3Length;
ULONG client_type;
} __attribute__ ((packed)) QMIWDS_BIND_MUX_DATA_PORT_REQ_MSG, *PQMIWDS_BIND_MUX_DATA_PORT_REQ_MSG;
#define QMIWDS_GET_RUNTIME_SETTINGS_TLV_TYPE_IPV4PRIMARYDNS 0x15
#define QMIWDS_GET_RUNTIME_SETTINGS_TLV_TYPE_IPV4SECONDARYDNS 0x16
#define QMIWDS_GET_RUNTIME_SETTINGS_TLV_TYPE_IPV4 0x1E
#define QMIWDS_GET_RUNTIME_SETTINGS_TLV_TYPE_IPV4GATEWAY 0x20
#define QMIWDS_GET_RUNTIME_SETTINGS_TLV_TYPE_IPV4SUBNET 0x21
#define QMIWDS_GET_RUNTIME_SETTINGS_TLV_TYPE_IPV6 0x25
#define QMIWDS_GET_RUNTIME_SETTINGS_TLV_TYPE_IPV6GATEWAY 0x26
#define QMIWDS_GET_RUNTIME_SETTINGS_TLV_TYPE_IPV6PRIMARYDNS 0x27
#define QMIWDS_GET_RUNTIME_SETTINGS_TLV_TYPE_IPV6SECONDARYDNS 0x28
#define QMIWDS_GET_RUNTIME_SETTINGS_TLV_TYPE_MTU 0x29
typedef struct _QMIWDS_GET_RUNTIME_SETTINGS_TLV_MTU
{
UCHAR TLVType; // QMIWDS_GET_RUNTIME_SETTINGS_TLV_TYPE_MTU
USHORT TLVLength; // 4
ULONG Mtu; // MTU
} __attribute__ ((packed)) QMIWDS_GET_RUNTIME_SETTINGS_TLV_MTU, *PQMIWDS_GET_RUNTIME_SETTINGS_TLV_MTU;
typedef struct _QMIWDS_GET_RUNTIME_SETTINGS_TLV_IPV4_ADDR
{
UCHAR TLVType; // QMIWDS_GET_RUNTIME_SETTINGS_TLV_TYPE_IPV4
USHORT TLVLength; // 4
ULONG IPV4Address; // address
} __attribute__ ((packed)) QMIWDS_GET_RUNTIME_SETTINGS_TLV_IPV4_ADDR, *PQMIWDS_GET_RUNTIME_SETTINGS_TLV_IPV4_ADDR;
typedef struct _QMIWDS_GET_RUNTIME_SETTINGS_TLV_IPV6_ADDR
{
UCHAR TLVType; // QMIWDS_GET_RUNTIME_SETTINGS_TLV_TYPE_IPV6
USHORT TLVLength; // 16
UCHAR IPV6Address[16]; // address
UCHAR PrefixLength; // prefix length
} __attribute__ ((packed)) QMIWDS_GET_RUNTIME_SETTINGS_TLV_IPV6_ADDR, *PQMIWDS_GET_RUNTIME_SETTINGS_TLV_IPV6_ADDR;
typedef struct _QMIWDS_GET_RUNNING_SETTINGS_PCSCF_IPV6_ADDR
{
UCHAR TLVType;
USHORT TLVLength;
UCHAR PCSCFNumber;
} __attribute__ ((packed)) QMIWDS_GET_RUNNING_SETTINGS_PCSCF_IPV6_ADDR, *PQMIWDS_GET_RUNNING_SETTINGS_PCSCF_IPV6_ADDR;
typedef struct _QMIWDS_GET_RUNNING_SETTINGS_PCSCF_IPV4_ADDR
{
UCHAR TLVType;
USHORT TLVLength;
UCHAR PCSCFNumber;
} __attribute__ ((packed)) QMIWDS_GET_RUNNING_SETTINGS_PCSCF_IPV4_ADDR, *PQMIWDS_GET_RUNNING_SETTINGS_PCSCF_IPV4_ADDR;
typedef struct _QMIWDS_GET_RUNTIME_SETTINGS_RESP_MSG
{
USHORT Type; // QMIWDS_GET_RUNTIME_SETTINGS_RESP
USHORT Length;
UCHAR TLVType; // QCTLV_TYPE_RESULT_CODE
USHORT TLVLength; // 0x0004
USHORT QMUXResult; // result code
USHORT QMUXError; // error code
} __attribute__ ((packed)) QMIWDS_GET_RUNTIME_SETTINGS_RESP_MSG, *PQMIWDS_GET_RUNTIME_SETTINGS_RESP_MSG;
//#endif // QC_IP_MODE
typedef struct _QMIWDS_IP_FAMILY_TLV
{
UCHAR TLVType; // 0x12
USHORT TLVLength; // 1
UCHAR IpFamily; // IPV4-0x04, IPV6-0x06
} __attribute__ ((packed)) QMIWDS_IP_FAMILY_TLV, *PQMIWDS_IP_FAMILY_TLV;
typedef struct _QMIWDS_PKT_SRVC_TLV
{
UCHAR TLVType;
USHORT TLVLength;
UCHAR ConnectionStatus;
UCHAR ReconfigReqd;
} __attribute__ ((packed)) QMIWDS_PKT_SRVC_TLV, *PQMIWDS_PKT_SRVC_TLV;
typedef struct _QMIWDS_CALL_END_REASON_TLV
{
UCHAR TLVType;
USHORT TLVLength;
USHORT CallEndReason;
} __attribute__ ((packed)) QMIWDS_CALL_END_REASON_TLV, *PQMIWDS_CALL_END_REASON_TLV;
typedef struct _QMIWDS_CALL_END_REASON_V_TLV
{
UCHAR TLVType;
USHORT TLVLength;
USHORT CallEndReasonType;
USHORT CallEndReason;
} __attribute__ ((packed)) QMIWDS_CALL_END_REASON_V_TLV, *PQMIWDS_CALL_END_REASON_V_TLV;
typedef struct _QMIWDS_SET_CLIENT_IP_FAMILY_PREF_REQ_MSG
{
USHORT Type; // QMUX type 0x004D
USHORT Length;
UCHAR TLVType; // 0x01
USHORT TLVLength; // 1
UCHAR IpPreference; // IPV4-0x04, IPV6-0x06
} __attribute__ ((packed)) QMIWDS_SET_CLIENT_IP_FAMILY_PREF_REQ_MSG, *PQMIWDS_SET_CLIENT_IP_FAMILY_PREF_REQ_MSG;
typedef struct _QMIWDS_SET_CLIENT_IP_FAMILY_PREF_RESP_MSG
{
USHORT Type; // QMUX type 0x0037
USHORT Length;
UCHAR TLVType; // 0x02
USHORT TLVLength; // 4
USHORT QMUXResult; // QMI_RESULT_SUCCESS, QMI_RESULT_FAILURE
USHORT QMUXError; // QMI_ERR_INTERNAL, QMI_ERR_MALFORMED_MSG, QMI_ERR_INVALID_ARG
} __attribute__ ((packed)) QMIWDS_SET_CLIENT_IP_FAMILY_PREF_RESP_MSG, *PQMIWDS_SET_CLIENT_IP_FAMILY_PREF_RESP_MSG;
typedef struct _QMIWDS_SET_AUTO_CONNECT_REQ_MSG
{
USHORT Type; // QMUX type 0x0051
USHORT Length;
UCHAR TLVType; // 0x01
USHORT TLVLength; // 1
UCHAR autoconnect_setting; // 0x00 ?C Disabled, 0x01 ?C Enabled, 0x02 ?C Paused (resume on power cycle)
} __attribute__ ((packed)) QMIWDS_SET_AUTO_CONNECT_REQ_MSG, *PQMIWDS_SET_AUTO_CONNECT_REQ_MSG;
#if 0
typedef struct _QMIWDS_GET_MIP_MODE_REQ_MSG
{
USHORT Type; // QMUX type 0x0040
USHORT Length;
} QMIWDS_GET_MIP_MODE_REQ_MSG, *PQMIWDS_GET_MIP_MODE_REQ_MSG;
typedef struct _QMIWDS_GET_MIP_MODE_RESP_MSG
{
USHORT Type; // QMUX type 0x0040
USHORT Length;
UCHAR TLVType; // 0x02
USHORT TLVLength; // 4
USHORT QMUXResult; // QMI_RESULT_SUCCESS
// QMI_RESULT_FAILURE
USHORT QMUXError; // QMI_ERR_INVALID_ARG
// QMI_ERR_NO_MEMORY
// QMI_ERR_INTERNAL
// QMI_ERR_FAULT
UCHAR TLV2Type; // 0x01
USHORT TLV2Length; // 20
UCHAR MipMode; //
} QMIWDS_GET_MIP_MODE_RESP_MSG, *PQMIWDS_GET_MIP_MODE_RESP_MSG;
#endif
typedef struct _QMIWDS_TECHNOLOGY_PREFERECE
{
UCHAR TLVType;
USHORT TLVLength;
UCHAR TechPreference;
} __attribute__ ((packed)) QMIWDS_TECHNOLOGY_PREFERECE, *PQMIWDS_TECHNOLOGY_PREFERECE;
typedef struct _QMIWDS_PROFILE_IDENTIFIER
{
UCHAR TLVType;
USHORT TLVLength;
UCHAR ProfileIndex;
} __attribute__ ((packed)) QMIWDS_PROFILE_IDENTIFIER, *PQMIWDS_PROFILE_IDENTIFIER;
#if 0
typedef struct _QMIWDS_IPADDRESS
{
UCHAR TLVType;
USHORT TLVLength;
ULONG IPv4Address;
}QMIWDS_IPADDRESS, *PQMIWDS_IPADDRESS;
/*
typedef struct _QMIWDS_UMTS_QOS
{
UCHAR TLVType;
USHORT TLVLength;
UCHAR TrafficClass;
ULONG MaxUplinkBitRate;
ULONG MaxDownlinkBitRate;
ULONG GuarUplinkBitRate;
ULONG GuarDownlinkBitRate;
UCHAR QOSDevOrder;
ULONG MAXSDUSize;
UCHAR SDUErrorRatio;
UCHAR ResidualBerRatio;
UCHAR DeliveryErrorSDUs;
ULONG TransferDelay;
ULONG TrafficHndPri;
}QMIWDS_UMTS_QOS, *PQMIWDS_UMTS_QOS;
typedef struct _QMIWDS_GPRS_QOS
{
UCHAR TLVType;
USHORT TLVLength;
ULONG PrecedenceClass;
ULONG DelayClass;
ULONG ReliabilityClass;
ULONG PeekThroClass;
ULONG MeanThroClass;
}QMIWDS_GPRS_QOS, *PQMIWDS_GPRS_QOS;
*/
#endif
typedef struct _QMIWDS_PROFILENAME
{
UCHAR TLVType;
USHORT TLVLength;
UCHAR ProfileName;
} __attribute__ ((packed)) QMIWDS_PROFILENAME, *PQMIWDS_PROFILENAME;
typedef struct _QMIWDS_PDPTYPE
{
UCHAR TLVType;
USHORT TLVLength;
// 0 ?C PDP-IP (IPv4)
// 1 ?C PDP-PPP
// 2 ?C PDP-IPv6
// 3 ?C PDP-IPv4v6
UCHAR PdpType;
} __attribute__ ((packed)) QMIWDS_PDPTYPE, *PQMIWDS_PDPTYPE;
typedef struct _QMIWDS_USERNAME
{
UCHAR TLVType;
USHORT TLVLength;
UCHAR UserName;
} __attribute__ ((packed)) QMIWDS_USERNAME, *PQMIWDS_USERNAME;
typedef struct _QMIWDS_PASSWD
{
UCHAR TLVType;
USHORT TLVLength;
UCHAR Passwd;
} __attribute__ ((packed)) QMIWDS_PASSWD, *PQMIWDS_PASSWD;
typedef struct _QMIWDS_AUTH_PREFERENCE
{
UCHAR TLVType;
USHORT TLVLength;
UCHAR AuthPreference;
} __attribute__ ((packed)) QMIWDS_AUTH_PREFERENCE, *PQMIWDS_AUTH_PREFERENCE;
typedef struct _QMIWDS_APNNAME
{
UCHAR TLVType;
USHORT TLVLength;
UCHAR ApnName;
} __attribute__ ((packed)) QMIWDS_APNNAME, *PQMIWDS_APNNAME;
typedef struct _QMIWDS_AUTOCONNECT
{
UCHAR TLVType;
USHORT TLVLength;
UCHAR AutoConnect;
} __attribute__ ((packed)) QMIWDS_AUTOCONNECT, *PQMIWDS_AUTOCONNECT;
typedef struct _QMIWDS_START_NETWORK_INTERFACE_REQ_MSG
{
USHORT Type;
USHORT Length;
} __attribute__ ((packed)) QMIWDS_START_NETWORK_INTERFACE_REQ_MSG, *PQMIWDS_START_NETWORK_INTERFACE_REQ_MSG;
typedef struct _QMIWDS_CALLENDREASON
{
UCHAR TLVType;
USHORT TLVLength;
USHORT Reason;
}__attribute__ ((packed)) QMIWDS_CALLENDREASON, *PQMIWDS_CALLENDREASON;
typedef struct _QMIWDS_START_NETWORK_INTERFACE_RESP_MSG
{
USHORT Type; // QMUX type 0x0040
USHORT Length;
UCHAR TLVType; // 0x02
USHORT TLVLength; // 4
USHORT QMUXResult; // QMI_RESULT_SUCCESS
// QMI_RESULT_FAILURE
USHORT QMUXError; // QMI_ERR_INVALID_ARG
// QMI_ERR_NO_MEMORY
// QMI_ERR_INTERNAL
// QMI_ERR_FAULT
UCHAR TLV2Type; // 0x01
USHORT TLV2Length; // 20
ULONG Handle; //
} __attribute__ ((packed)) QMIWDS_START_NETWORK_INTERFACE_RESP_MSG, *PQMIWDS_START_NETWORK_INTERFACE_RESP_MSG;
typedef struct _QMIWDS_STOP_NETWORK_INTERFACE_REQ_MSG
{
USHORT Type;
USHORT Length;
UCHAR TLVType;
USHORT TLVLength;
ULONG Handle;
} __attribute__ ((packed)) QMIWDS_STOP_NETWORK_INTERFACE_REQ_MSG, *PQMIWDS_STOP_NETWORK_INTERFACE_REQ_MSG;
typedef struct _QMIWDS_STOP_NETWORK_INTERFACE_RESP_MSG
{
USHORT Type; // QMUX type 0x0040
USHORT Length;
UCHAR TLVType; // 0x02
USHORT TLVLength; // 4
USHORT QMUXResult; // QMI_RESULT_SUCCESS
// QMI_RESULT_FAILURE
USHORT QMUXError; // QMI_ERR_INVALID_ARG
// QMI_ERR_NO_MEMORY
// QMI_ERR_INTERNAL
// QMI_ERR_FAULT
} __attribute__ ((packed)) QMIWDS_STOP_NETWORK_INTERFACE_RESP_MSG, *PQMIWDS_STOP_NETWORK_INTERFACE_RESP_MSG;
typedef struct _QMIWDS_GET_DEFAULT_SETTINGS_REQ_MSG
{
USHORT Type;
USHORT Length;
UCHAR TLVType;
USHORT TLVLength;
UCHAR ProfileType;
} __attribute__ ((packed)) QMIWDS_GET_DEFAULT_SETTINGS_REQ_MSG, *PQMIWDS_GET_DEFAULT_SETTINGS_REQ_MSG;
typedef struct _QMIWDS_GET_DEFAULT_SETTINGS_RESP_MSG
{
USHORT Type;
USHORT Length;
UCHAR TLVType;
USHORT TLVLength;
USHORT QMUXResult;
USHORT QMUXError;
} __attribute__ ((packed)) QMIWDS_GET_DEFAULT_SETTINGS_RESP_MSG, *PQMIWDS_GET_DEFAULT_SETTINGS_RESP_MSG;
typedef struct _QMIWDS_MODIFY_PROFILE_SETTINGS_REQ_MSG
{
USHORT Type;
USHORT Length;
UCHAR TLVType;
USHORT TLVLength;
UCHAR ProfileType;
UCHAR ProfileIndex;
} __attribute__ ((packed)) QMIWDS_MODIFY_PROFILE_SETTINGS_REQ_MSG, *PQMIWDS_MODIFY_PROFILE_SETTINGS_REQ_MSG;
typedef struct _QMIWDS_MODIFY_PROFILE_SETTINGS_RESP_MSG
{
USHORT Type;
USHORT Length;
UCHAR TLVType;
USHORT TLVLength;
USHORT QMUXResult;
USHORT QMUXError;
} __attribute__ ((packed)) QMIWDS_MODIFY_PROFILE_SETTINGS_RESP_MSG, *PQMIWDS_MODIFY_PROFILE_SETTINGS_RESP_MSG;
typedef struct _QMIWDS_GET_PROFILE_SETTINGS_REQ_MSG
{
USHORT Type;
USHORT Length;
UCHAR TLVType;
USHORT TLVLength;
UCHAR ProfileType;
UCHAR ProfileIndex;
} __attribute__ ((packed)) QMIWDS_GET_PROFILE_SETTINGS_REQ_MSG, *PQMIWDS_GET_PROFILE_SETTINGS_REQ_MSG;
#if 0
typedef struct _QMIWDS_EVENT_REPORT_IND_DATA_BEARER_TLV
{
UCHAR Type;
USHORT Length;
UCHAR DataBearer;
} QMIWDS_EVENT_REPORT_IND_DATA_BEARER_TLV, *PQMIWDS_EVENT_REPORT_IND_DATA_BEARER_TLV;
typedef struct _QMIWDS_EVENT_REPORT_IND_DORMANCY_STATUS_TLV
{
UCHAR Type;
USHORT Length;
UCHAR DormancyStatus;
} QMIWDS_EVENT_REPORT_IND_DORMANCY_STATUS_TLV, *PQMIWDS_EVENT_REPORT_IND_DORMANCY_STATUS_TLV;
typedef struct _QMIWDS_GET_DATA_BEARER_REQ_MSG
{
USHORT Type; // QMUX type 0x0037
USHORT Length;
} QMIWDS_GET_DATA_BEARER_REQ_MSG, *PQMIWDS_GET_DATA_BEARER_REQ_MSG;
typedef struct _QMIWDS_GET_DATA_BEARER_RESP_MSG
{
USHORT Type; // QMUX type 0x0037
USHORT Length;
UCHAR TLVType; // 0x02
USHORT TLVLength; // 4
USHORT QMUXResult; // QMI_RESULT_SUCCESS
// QMI_RESULT_FAILURE
USHORT QMUXError; // QMI_ERR_INTERNAL
// QMI_ERR_MALFORMED_MSG
// QMI_ERR_NO_MEMORY
// QMI_ERR_OUT_OF_CALL
// QMI_ERR_INFO_UNAVAILABLE
UCHAR TLV2Type; // 0x01
USHORT TLV2Length; //
UCHAR Technology; //
} QMIWDS_GET_DATA_BEARER_RESP_MSG, *PQMIWDS_GET_DATA_BEARER_RESP_MSG;
#endif
// ======================= DMS ==============================
#define QMIDMS_SET_EVENT_REPORT_REQ 0x0001
#define QMIDMS_SET_EVENT_REPORT_RESP 0x0001
#define QMIDMS_EVENT_REPORT_IND 0x0001
#define QMIDMS_GET_DEVICE_CAP_REQ 0x0020
#define QMIDMS_GET_DEVICE_CAP_RESP 0x0020
#define QMIDMS_GET_DEVICE_MFR_REQ 0x0021
#define QMIDMS_GET_DEVICE_MFR_RESP 0x0021
#define QMIDMS_GET_DEVICE_MODEL_ID_REQ 0x0022
#define QMIDMS_GET_DEVICE_MODEL_ID_RESP 0x0022
#define QMIDMS_GET_DEVICE_REV_ID_REQ 0x0023
#define QMIDMS_GET_DEVICE_REV_ID_RESP 0x0023
#define QMIDMS_GET_MSISDN_REQ 0x0024
#define QMIDMS_GET_MSISDN_RESP 0x0024
#define QMIDMS_GET_DEVICE_SERIAL_NUMBERS_REQ 0x0025
#define QMIDMS_GET_DEVICE_SERIAL_NUMBERS_RESP 0x0025
#define QMIDMS_UIM_SET_PIN_PROTECTION_REQ 0x0027
#define QMIDMS_UIM_SET_PIN_PROTECTION_RESP 0x0027
#define QMIDMS_UIM_VERIFY_PIN_REQ 0x0028
#define QMIDMS_UIM_VERIFY_PIN_RESP 0x0028
#define QMIDMS_UIM_UNBLOCK_PIN_REQ 0x0029
#define QMIDMS_UIM_UNBLOCK_PIN_RESP 0x0029
#define QMIDMS_UIM_CHANGE_PIN_REQ 0x002A
#define QMIDMS_UIM_CHANGE_PIN_RESP 0x002A
#define QMIDMS_UIM_GET_PIN_STATUS_REQ 0x002B
#define QMIDMS_UIM_GET_PIN_STATUS_RESP 0x002B
#define QMIDMS_GET_DEVICE_HARDWARE_REV_REQ 0x002C
#define QMIDMS_GET_DEVICE_HARDWARE_REV_RESP 0x002C
#define QMIDMS_GET_OPERATING_MODE_REQ 0x002D
#define QMIDMS_GET_OPERATING_MODE_RESP 0x002D
#define QMIDMS_SET_OPERATING_MODE_REQ 0x002E
#define QMIDMS_SET_OPERATING_MODE_RESP 0x002E
#define QMIDMS_GET_ACTIVATED_STATUS_REQ 0x0031
#define QMIDMS_GET_ACTIVATED_STATUS_RESP 0x0031
#define QMIDMS_ACTIVATE_AUTOMATIC_REQ 0x0032
#define QMIDMS_ACTIVATE_AUTOMATIC_RESP 0x0032
#define QMIDMS_ACTIVATE_MANUAL_REQ 0x0033
#define QMIDMS_ACTIVATE_MANUAL_RESP 0x0033
#define QMIDMS_UIM_GET_ICCID_REQ 0x003C
#define QMIDMS_UIM_GET_ICCID_RESP 0x003C
#define QMIDMS_UIM_GET_CK_STATUS_REQ 0x0040
#define QMIDMS_UIM_GET_CK_STATUS_RESP 0x0040
#define QMIDMS_UIM_SET_CK_PROTECTION_REQ 0x0041
#define QMIDMS_UIM_SET_CK_PROTECTION_RESP 0x0041
#define QMIDMS_UIM_UNBLOCK_CK_REQ 0x0042
#define QMIDMS_UIM_UNBLOCK_CK_RESP 0x0042
#define QMIDMS_UIM_GET_IMSI_REQ 0x0043
#define QMIDMS_UIM_GET_IMSI_RESP 0x0043
#define QMIDMS_UIM_GET_STATE_REQ 0x0044
#define QMIDMS_UIM_GET_STATE_RESP 0x0044
#define QMIDMS_GET_BAND_CAP_REQ 0x0045
#define QMIDMS_GET_BAND_CAP_RESP 0x0045
#if 0
typedef struct _QMIDMS_GET_DEVICE_MFR_REQ_MSG
{
USHORT Type; // QMUX type 0x0003
USHORT Length;
} QMIDMS_GET_DEVICE_MFR_REQ_MSG, *PQMIDMS_GET_DEVICE_MFR_REQ_MSG;
typedef struct _QMIDMS_GET_DEVICE_MFR_RESP_MSG
{
USHORT Type; // QMUX type 0x0003
USHORT Length;
UCHAR TLVType; // 0x02 - result code
USHORT TLVLength; // 4
USHORT QMUXResult; // QMI_RESULT_SUCCESS
// QMI_RESULT_FAILURE
USHORT QMUXError; // QMI_ERR_INVALID_ARG
// QMI_ERR_NO_MEMORY
// QMI_ERR_INTERNAL
// QMI_ERR_FAULT
UCHAR TLV2Type; // 0x01 - required parameter
USHORT TLV2Length; // length of the mfr string
UCHAR DeviceManufacturer; // first byte of string
} QMIDMS_GET_DEVICE_MFR_RESP_MSG, *PQMIDMS_GET_DEVICE_MFR_RESP_MSG;
typedef struct _QMIDMS_GET_DEVICE_MODEL_ID_REQ_MSG
{
USHORT Type; // QMUX type 0x0004
USHORT Length;
} QMIDMS_GET_DEVICE_MODEL_ID_REQ_MSG, *PQMIDMS_GET_DEVICE_MODEL_ID_REQ_MSG;
typedef struct _QMIDMS_GET_DEVICE_MODEL_ID_RESP_MSG
{
USHORT Type; // QMUX type 0x0004
USHORT Length;
UCHAR TLVType; // 0x02 - result code
USHORT TLVLength; // 4
USHORT QMUXResult; // QMI_RESULT_SUCCESS
// QMI_RESULT_FAILURE
USHORT QMUXError; // QMI_ERR_INVALID_ARG
// QMI_ERR_NO_MEMORY
// QMI_ERR_INTERNAL
// QMI_ERR_FAULT
UCHAR TLV2Type; // 0x01 - required parameter
USHORT TLV2Length; // length of the modem id string
UCHAR DeviceModelID; // device model id
} QMIDMS_GET_DEVICE_MODEL_ID_RESP_MSG, *PQMIDMS_GET_DEVICE_MODEL_ID_RESP_MSG;
#endif
typedef struct _QMIDMS_GET_DEVICE_REV_ID_REQ_MSG
{
USHORT Type; // QMUX type 0x0005
USHORT Length;
} __attribute__ ((packed)) QMIDMS_GET_DEVICE_REV_ID_REQ_MSG, *PQMIDMS_GET_DEVICE_REV_ID_REQ_MSG;
typedef struct _DEVICE_REV_ID
{
UCHAR TLVType;
USHORT TLVLength;
UCHAR RevisionID;
} __attribute__ ((packed)) DEVICE_REV_ID, *PDEVICE_REV_ID;
#if 0
typedef struct _QMIDMS_GET_DEVICE_REV_ID_RESP_MSG
{
USHORT Type; // QMUX type 0x0023
USHORT Length;
UCHAR TLVType; // 0x02 - result code
USHORT TLVLength; // 4
USHORT QMUXResult; // QMI_RESULT_SUCCESS
// QMI_RESULT_FAILURE
USHORT QMUXError; // QMI_ERR_INVALID_ARG
// QMI_ERR_NO_MEMORY
// QMI_ERR_INTERNAL
// QMI_ERR_FAULT
} QMIDMS_GET_DEVICE_REV_ID_RESP_MSG, *PQMIDMS_GET_DEVICE_REV_ID_RESP_MSG;
typedef struct _QMIDMS_GET_MSISDN_REQ_MSG
{
USHORT Type; // QMUX type 0x0024
USHORT Length;
} QMIDMS_GET_MSISDN_REQ_MSG, *PQMIDMS_GET_MSISDN_REQ_MSG;
typedef struct _QCTLV_DEVICE_VOICE_NUMBERS
{
UCHAR TLVType; // as defined above
USHORT TLVLength; // 4/7/7
UCHAR VoideNumberString; // ESN, IMEI, or MEID
} QCTLV_DEVICE_VOICE_NUMBERS, *PQCTLV_DEVICE_VOICE_NUMBERS;
typedef struct _QMIDMS_GET_MSISDN_RESP_MSG
{
USHORT Type; // QMUX type 0x0024
USHORT Length;
UCHAR TLVType; // 0x02 - result code
USHORT TLVLength; // 4
USHORT QMUXResult; // QMI_RESULT_SUCCESS
// QMI_RESULT_FAILURE
USHORT QMUXError; // QMI_ERR_INVALID_ARG
} QMIDMS_GET_MSISDN_RESP_MSG, *PQMIDMS_GET_MSISDN_RESP_MSG;
#endif
typedef struct _QMIDMS_UIM_GET_IMSI_REQ_MSG
{
USHORT Type;