-
Notifications
You must be signed in to change notification settings - Fork 68
Expand file tree
/
Copy pathwfa_cmds.h
More file actions
1648 lines (1446 loc) · 34.1 KB
/
wfa_cmds.h
File metadata and controls
1648 lines (1446 loc) · 34.1 KB
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
/****************************************************************************
*
* Copyright (c) 2016 Wi-Fi Alliance
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
* USE OR PERFORMANCE OF THIS SOFTWARE.
*
*****************************************************************************/
/*
* wfa_cmds.h:
* definitions of command types.
*/
#ifndef _WFA_CMDS_H
#define _WFA_CMDS_H
typedef struct _tg_ping_start
{
char dipaddr[IPV6_ADDRESS_STRING_LEN]; /* destination/remote ip address */
int frameSize;
float frameRate;
int duration;
int type;
int qos;
int iptype;
int dscp;
} tgPingStart_t;
typedef struct ca_sta_set_ip_config
{
char intf[WFA_IF_NAME_LEN];
int isDhcp;
char ipaddr[WFA_IP_ADDR_STR_LEN];
char mask[WFA_IP_MASK_STR_LEN];
char defGateway[WFA_IP_ADDR_STR_LEN];
char pri_dns[WFA_IP_ADDR_STR_LEN];
char sec_dns[WFA_IP_ADDR_STR_LEN];
} caStaSetIpConfig_t;
typedef struct ca_sta_verify_ip_connection
{
char dipaddr[WFA_IP_ADDR_STR_LEN];
int timeout;
} caStaVerifyIpConnect_t;
typedef struct ca_sta_set_encryption
{
char intf[WFA_IF_NAME_LEN];
char ssid[WFA_SSID_NAME_LEN];
int encpType;
char keys[4][32]; /* 26 hex */
int activeKeyIdx;
} caStaSetEncryption_t;
typedef enum wfa_enableType
{
eEnable = 1,
eDisable
} wfaEnableType;
typedef struct ca_sta_set_mode
{
char intf[WFA_IF_NAME_LEN];
char ssid[WFA_SSID_NAME_LEN];
char mode;
int encpType;
int channel;
char keys[4][32]; /* 26 hex */
int activeKeyIdx;
} caStaSetMode_t;
typedef struct ca_sta_set_psk
{
char intf[WFA_IF_NAME_LEN];
char ssid[WFA_SSID_NAME_LEN];
BYTE passphrase[64];
char keyMgmtType[16]; /* WPA-PSK */
int encpType; /* TKIP */
int pmf; /* PMF enable or disable */
char micAlg[16];
char prog[16];
BOOL prefer;
} caStaSetPSK_t;
typedef struct ca_sta_set_eaptls
{
char intf[WFA_IF_NAME_LEN];
char ssid[WFA_SSID_NAME_LEN];
char username[32];
char keyMgmtType[8];
char encrptype[9];
char trustedRootCA[128];
char clientCertificate[128];
int pmf; /* PMF enable or disable */
char micAlg[16];
} caStaSetEapTLS_t;
typedef struct ca_sta_set_eapttls
{
char intf[WFA_IF_NAME_LEN];
char ssid[WFA_SSID_NAME_LEN];
char username[32];
char passwd[16];
char keyMgmtType[8];
char encrptype[9];
char trustedRootCA[32];
char clientCertificate[32];
int pmf; /* PMF enable or disable */
char micAlg[16];
char prog[16];
BOOL prefer;
} caStaSetEapTTLS_t;
typedef struct ca_sta_set_eapsim
{
char intf[WFA_IF_NAME_LEN];
char ssid[WFA_SSID_NAME_LEN];
char username[32];
char passwd[96];
char keyMgmtType[8];
char encrptype[9];
char tripletCount;
char tripletSet[3][64];
int pmf; /* PMF enable or disable */
} caStaSetEapSIM_t;
typedef struct ca_sta_set_eappeap
{
char intf[WFA_IF_NAME_LEN];
char ssid[WFA_SSID_NAME_LEN];
char username[32];
char passwd[16];
char keyMgmtType[8];
char encrptype[9];
char trustedRootCA[32];
char innerEAP[16];
int peapVersion;
int pmf; /* PMF enable or disable */
} caStaSetEapPEAP_t;
typedef struct ca_sta_set_eapfast
{
char intf[WFA_IF_NAME_LEN];
char ssid[WFA_SSID_NAME_LEN];
char username[32];
char passwd[16];
char keyMgmtType[8];
char encrptype[9];
char trustedRootCA[32];
char innerEAP[16];
char validateServer;
char pacFileName[32];
int pmf; /* PMF enable or disable */
} caStaSetEapFAST_t;
typedef struct ca_sta_set_eapaka
{
char intf[WFA_IF_NAME_LEN];
char ssid[WFA_SSID_NAME_LEN];
char username[64];
char passwd[96];
char keyMgmtType[8];
char encrptype[9];
char tripletCount;
char tripletSet[3][96];
int pmf; /* PMF enable or disable */
} caStaSetEapAKA_t;
enum sectype {
SEC_TYPE_PSK = 1,
SEC_TYPE_EAPTLS,
SEC_TYPE_EAPTTLS,
SEC_TYPE_EAPPEAP,
SEC_TYPE_EAPSIM,
SEC_TYPE_EAPFAST,
SEC_TYPE_EAPAKA,
};
typedef struct ca_sta_set_security
{
BYTE type; /* PSK, EAPx */
char ssid[WFA_SSID_NAME_LEN];
char keyMgmtType[8];
char encpType[9];
int pmf;
union _security
{
char passphrase[64]; /* PSK */
caStaSetEapTLS_t tls;
caStaSetEapTTLS_t ttls;
caStaSetEapSIM_t sim;
caStaSetEapPEAP_t peap;
caStaSetEapAKA_t aka;
caStaSetEapFAST_t fast;
} secu;
} caStaSetSecurity_t;
typedef struct ca_sta_set_systime
{
BYTE month;
BYTE date;
WORD year;
BYTE hours;
BYTE minutes;
BYTE seconds;
} caStaSetSystime_t;
/* DEV_SEND_FRAME related definitions */
/* DEV_SEND_FRAME LOC */
enum
{
LOC_TYPE_ANQPQUERY = 1,
LOC_TYPE_NeighReportReq,
LOC_TYPE_RadioMsntReq,
};
/* DEV_SEND_FRAME PMF */
enum
{
PMF_TYPE_DISASSOC = 1,
PMF_TYPE_DEAUTH,
PMF_TYPE_SAQUERY,
PMF_TYPE_AUTH,
PMF_TYPE_ASSOCREQ,
PMF_TYPE_REASSOCREQ,
};
enum
{
PMF_PROT_CORRECTKEY = 1,
PMF_PROT_INCORRECTKEY,
PMF_PROT_UNPROTECTED,
};
typedef struct pmf_frame
{
BYTE eFrameName;
BYTE eProtected;
char staid[WFA_MAC_ADDR_STR_LEN]; /* sta mac addr */
/* optional */
unsigned char sender_flag;
char sender[8]; /* ap or sta */
unsigned char bssid_flag;
char bssid[WFA_MAC_ADDR_STR_LEN]; /* ap mac addr */
} pmfFrame_t;
/* DEV_SEND_FRAME TDLS */
enum
{
TDLS_TYPE_DISCOVERY = 1,
TDLS_TYPE_SETUP,
TDLS_TYPE_TEARDOWN,
TDLS_TYPE_CHANNELSWITCH,
TDLS_TYPE_NULLFRAME,
};
typedef struct tdls_frame
{
BYTE eFrameName;
char peer[WFA_MAC_ADDR_STR_LEN];
/* optional in the following */
unsigned char timeout_flag;
int timeout;
unsigned char switchtime_flag;
int switchtime;
unsigned char channel_flag;
int channel;
unsigned char offset_flag;
char offset[4]; /* 20 or 40 Mhz */
unsigned char status_flag;
int status; /* status code */
unsigned char reason_flag;
int reason; /* reason code */
unsigned char bssid_flag;
char bssid[WFA_MAC_ADDR_STR_LEN];
} tdlsFrame_t;
/* DEV_SEND_FRAME VENT, voice ent */
enum
{
VENT_TYPE_NEIGREQ = 1,
VENT_TYPE_TRANSMGMT,
};
typedef struct vent_frame
{
BYTE type;
char ssid[WFA_SSID_NAME_LEN];
} ventFrame_t;
/* DEV_SEND_FRAME WFD */
enum
{
WFD_FRAME_PRBREQ=1,
WFD_FRAME_RTSP,
WFD_FRAME_SERVDISC_REQ,
WFD_FRAME_PRBREQ_TDLS_REQ,
WFD_FRAME_11V_TIMING_MSR_REQ,
};
enum
{
WFD_DEV_TYPE_SOURCE=1,
WFD_DEV_TYPE_PSINK,
WFD_DEV_TYPE_SSINK,
};
enum
{
WFD_RTSP_PAUSE=1,
WFD_RTSP_PLAY,
WFD_RTSP_TEARDOWN,
WFD_RTSP_TRIG_PAUSE,
WFD_RTSP_TRIG_PLAY,
WFD_RTSP_TRIG_TEARDOWN,
WFD_RTSP_SET_PARAMETER,
};
enum setParamsTypes
{
WFD_CAP_UIBC_KEYBOARD=1,
WFD_CAP_UIBC_MOUSE=1,
WFD_CAP_RE_NEGO,
WFD_STANDBY,
WFD_UIBC_SETTINGS_ENABLE,
WFD_UIBC_SETTINGS_DISABLE,
WFD_ROUTE_AUDIO,
WFD_3D_VIDEOPARAM,
WFD_2D_VIDEOPARAM,
};
typedef struct wfd_frame
{
BYTE eframe;
char sa[WFA_MAC_ADDR_STR_LEN];
char da[WFA_MAC_ADDR_STR_LEN];
/* followings are optional */
unsigned char devtype_flag;
BYTE eDevType;
unsigned char rtspmsg_flag;
BYTE eRtspMsgType;
unsigned char wfdsessionid_flag;
char wfdSessionID[WFA_WFD_SESSION_ID_LEN];
unsigned char setparm_flag;
int eSetParams;
unsigned char audioDest_flag;
int eAudioDest;
unsigned char bssid_flag;
char bssid[WFA_MAC_ADDR_STR_LEN];
unsigned char msrReqAction_flag;
int eMsrAction;
unsigned char capReNego_flag;
int ecapReNego;
} wfdFrame_t;
/* DEV_SEND_FRAME HS2-R2 , we are not care HS2 release 1, just imp HS2-R2*/
enum
{
HS2_FRAME_ANQPQuery=1,
HS2_FRAME_DLSRequest,
HS2_FRAME_GARPReq,
HS2_FRAME_GARPRes,
HS2_FRAME_NeighAdv,
HS2_FRAME_ARPProbe,
HS2_FRAME_ARPAnnounce,
HS2_FRAME_NeighSolicitReq,
HS2_FRAME_ARPReply,
};
typedef struct hs2_frame
{
char sDestMac[WFA_MAC_ADDR_STR_LEN];
char padNotUsed1[2];
BYTE eframe;
/* following are optional */
char bAnqpCapList;
char bNaiRealmList;
char b3gppInfo;
char bDomainList;
char bHsCapList;
char bOperName;
char bNaiHomeRealmList;
char bVenueName;
char bRoamingCons;
char bEssDisassocImm;
char bWanMat;
char bOpClass;
char bOsuProviderList;
char bNetAuthType;
char padNotUsed2;
int nDisassocTimer;
int nFrames;
char sSessInfoUrl[WFA_URL_STRING_LEN];
char sDevName[WFA_SSID_NAME_LEN];
char sIconRequest[WFA_SSID_NAME_LEN];
char sSenderMac[WFA_MAC_ADDR_STR_LEN];
char padNotUsed3[2];
char sDestIp[IPV6_ADDRESS_STRING_LEN];
char sSenderIp[IPV6_ADDRESS_STRING_LEN];
} hs2Frame_t;
typedef struct loc_frame
{
char sDestMac[WFA_MAC_ADDR_STR_LEN];
BYTE eframe;
char baskForLocCivic;
char baskForLCI;
char baddress3;
char bmsntType;
char bmaxAgeSubelem;
char brandInterval;
char bminApcount;
char baskForPublicIdentifierURI_FQDN;
} locFrame_t;
enum
{
PROG_TYPE_GEN = 1,
PROG_TYPE_PMF,
PROG_TYPE_TDLS,
PROG_TYPE_VENT,
PROG_TYPE_WFD,
PROG_TYPE_WFDS,
PROG_TYPE_HS2,
PROG_TYPE_HS2_R2,
PROG_TYPE_NAN,
PROG_TYPE_LOC,
};
typedef struct ca_sta_dev_sendframe
{
BYTE program;
union _frametype
{
pmfFrame_t pmf;
tdlsFrame_t tdls;
ventFrame_t vent;
wfdFrame_t wfd;
hs2Frame_t hs2_r2;
locFrame_t loc;
} frameType;
} caStaDevSendFrame_t;
typedef struct ca_sta_start_wfd_conn
{
char intf[WFA_IF_NAME_LEN];
BYTE peer_count;
char peer[2][WFA_P2P_DEVID_LEN];
unsigned char init_wfd_flag;
BYTE init_wfd;
unsigned char intent_val_flag;
BYTE intent_val;
unsigned char oper_chn_flag;
WORD oper_chn;
unsigned char coupledSession_flag;
WORD coupledSession;
} caStaStartWfdConn_t;
typedef struct ca_sta_connect_go_start_wfd
{
char intf[WFA_IF_NAME_LEN];
char grpid[WFA_P2P_GRP_ID_LEN];
char devId[WFA_P2P_DEVID_LEN];
} caStaConnectGoStartWfd_t;
enum
{
eInvitationSend = 1,
eInvitationAccept,
};
typedef struct ca_sta_reinvoke_wfd_session
{
char intf[WFA_IF_NAME_LEN];
unsigned char grpid_flag;
char grpid[WFA_P2P_GRP_ID_LEN];
char peer[WFA_MAC_ADDR_STR_LEN];
BYTE wfdInvitationAction;
} caStaReinvokeWfdSession_t;
enum {
eDiscoveredDevList = 1,
eOpenPorts,
eMasterPref,
};
typedef struct ca_sta_get_parameter
{
char intf[WFA_IF_NAME_LEN];
BYTE program;
BYTE getParamValue;
} caStaGetParameter_t;
typedef struct ca_sta_nfc_action
{
char intf[WFA_IF_NAME_LEN];
WORD nfcOperation;
unsigned char intent_val_flag;
WORD intent_val;
unsigned char oper_chn_flag;
WORD oper_chn;
unsigned char ssid_flag;
char ssid[WFA_SSID_NAME_LEN];
unsigned char nfc_init_flag;
WORD nfc_init;
} caStaNfcAction_t;
enum {
eNfcWriteSelect = 1,
eNfcWriteConfig,
eNfcWritePasswd,
eNfcReadTag,
eNfcHandOver,
eNfcWpsHandOver,
};
enum {
eCmdPrimTypeAdvt = 1,
eCmdPrimTypeSeek,
eCmdPrimTypeCancel,
eCmdPrimTypeConnSession,
eCmdPrimTypeConfirmSession,
eCmdPrimTypeSetSessionReady,
eCmdPrimTypeBoundPort,
eCmdPrimTypeServiceStatusChange,
eCmdPrimTypeCloseSession,
};
enum {
eServiceNameOOB= 1,
eServiceNameSend,
eServiceNameDisplay,
eServiceNamePlay,
eServiceNamePrint,
};
enum {
eServiceRoleTx= 1,
eServiceRoleRx,
};
enum {
ePrimitiveCmdType= 1,
eMessageCmdType,
};
enum {
eMsgReqSession= 1,
eMsgRmvSession,
eMsgRejSession,
eMsgAddedSession,
};
enum {
eSearchResult= 1,
eSearchTerminated,
eAdvertiseStatus,
eSessionRequest,
eConnectStatus,
eSessionStatus,
ePortStatus,
};
typedef struct sta_cmdType_Primitive_Adv
{
WORD PrimType;
unsigned char serviceName_flag;
char serviceName[64];
unsigned char autoAccept_flag;
WORD autoAccpet;
unsigned char serviceInfo_flag;
char serviceInfo[64];
unsigned char serviceStatus_flag;
WORD serviceStaus;
}staCmdTypePrimitiveAdv;
typedef struct sta_cmdType_Primitive_Seek
{
WORD PrimType;
unsigned char serviceName_flag;
char serviceName[64];
unsigned char exactSearch_flag;
char exactSearch;
unsigned char macAddress_flag;
char macaddress[WFA_MAC_ADDR_STR_LEN];
unsigned char serviceInfo_flag;
char serviceInfo[64];
}staCmdTypePrimitiveSeek;
typedef struct sta_cmdType_Primitive_Cancel
{
WORD PrimType;
unsigned char cancelMethod_flag;
WORD cancelMethod; // use the enums of the service to indicate the API's
}staCmdTypePrimitiveCancel;
typedef struct sta_cmdType_Primitive_ConnectSession
{
WORD PrimType;
unsigned char serviceMac_flag;
char serviceMac[WFA_MAC_ADDR_STR_LEN];
unsigned char advId_flag;
long int advID;
unsigned char sessionInfo_flag;
char sessionInfo[64];
unsigned char networkRole_flag;
WORD networkRole;
unsigned char connCapInfo_flag;
WORD connCapInfo;
unsigned char ssid_flag;
char ssid[64];
unsigned char operChn_flag;
int operChn;
}staCmdTypePrimitiveConnectSession;
typedef struct sta_cmdType_Primitive_ConfirmSession
{
WORD PrimType;
unsigned char sessionMac_flag;
char sessionMac[WFA_MAC_ADDR_STR_LEN];
unsigned char sessionID_flag;
long int sessionID;
unsigned char confirmed_flag;
WORD confirmed;
}staCmdTypePrimitiveConfirmSession;
typedef struct sta_cmdType_Primitive_SetSessionReady
{
WORD PrimType;
unsigned char sessionMac_flag;
char sessionMac[WFA_MAC_ADDR_STR_LEN];
unsigned char sessionID_flag;
long int sessionID;
}staCmdTypePrimitiveSetSessionReady;
typedef struct sta_cmdType_Primitive_BoundPort
{
WORD PrimType;
unsigned char sessionMac_flag;
char sessionMac[WFA_MAC_ADDR_STR_LEN];
unsigned char sessionID_flag;
long int sessionID;
unsigned char port_flag;
WORD port;
}staCmdTypePrimitiveBoundPort;
typedef struct sta_cmdType_Primitive_SerivceStatusChange
{
WORD PrimType;
unsigned char advId_flag;
long int advID;
unsigned char serviceStatus_flag;
WORD serviceStatus;
}staCmdTypePrimitiveServiceStatusChange;
typedef struct sta_cmdType_Primitive_CloseSession
{
WORD PrimType;
unsigned char sessionMac_flag;
char sessionMac[WFA_MAC_ADDR_STR_LEN];
unsigned char sessionID_flag;
long int sessionID;
}staCmdTypePrimitiveCloseSession;
typedef struct sta_cmdType_Message
{
WORD opcode;
unsigned char sessionId_flag;
long int sessionID;
unsigned char sessionMac_flag;
char sessionMac[WFA_MAC_ADDR_STR_LEN];
}staCmdTypeMessage;
//typedef struct ca_sta_get_events
//{
// char intf[WFA_IF_NAME_LEN];
// BYTE program;
//} caStaGetEvents_t;
typedef struct ca_sta_get_event_details
{
char intf[WFA_IF_NAME_LEN];
BYTE program;
WORD eventId;
} caStaGetEventDetails_t;
typedef struct ca_sta_invoke_command
{
char intf[WFA_IF_NAME_LEN];
WORD program;
WORD cmdType;
union _InvokeCmds
{
union _PrimType
{
WORD PrimType;
staCmdTypePrimitiveAdv AdvPrim;
staCmdTypePrimitiveSeek SeekPrim;
staCmdTypePrimitiveCancel CancelPrim;
staCmdTypePrimitiveConnectSession ConnSessPrim;
staCmdTypePrimitiveConfirmSession ConfSessPrim;
staCmdTypePrimitiveSetSessionReady SetSessRdyPrim;
staCmdTypePrimitiveBoundPort BoundPortPrim;
staCmdTypePrimitiveServiceStatusChange ServStatusChngPrim;
staCmdTypePrimitiveCloseSession CloseSessPrim;
}primtiveType;
staCmdTypeMessage Msg ;
}InvokeCmds;
} caStaInvokeCmd_t;
enum {
eWfdsMgtActionsTransfer= 1,
eWfdsMgtActionsPause,
eWfdsMgtActionsResume,
eWfdsMgtActionsModify,
eWfdsMgtActionsCancel,
eWfdsMgtActionsAmidClose,
eWfdsMgtActionsClose,
eWfdsMgtActionsReceive,
eWfdsMgtActionsPlay,
eWfdsMgtActionsDisplay,
eWfdsMgtActionsGetPrintAttr,
eWfdsMgtActionsPrintJobOper,
eWfdsMgtActionsGetJobAttr,
eWfdsMgtActionsCreateJobOper,
eWfdsMgtActionsSendPrintDoc,
eWfdsMgtActionsDoNothing,
};
enum {
ePclmPdr= 1,
ePwgPdr,
};
typedef struct sta_wfds_ManageService
{
WORD serviceName;
WORD serviceRole;
//optional args
unsigned char serviceMac_flag;
char serviceMac[WFA_MAC_ADDR_STR_LEN];
unsigned char advId_flag;
long int advID;
unsigned char sessionInfo_flag;
char sessionInfo[64];
unsigned char networkRole_flag;
WORD networkRole;
unsigned char connCapInfo_flag;
WORD connCapInfo;
unsigned char mngActions_flag;
unsigned char numMngActions;
WORD mgtActions[8];
unsigned char sendFileList_flag;
unsigned char numFiles;
char fileList[2][16];
unsigned char modSendFileList_flag;
unsigned char numModFiles;
char modFileList[2][16];
unsigned char PdlType_flag;
WORD PdlType;
} staWfdsMngService;
typedef struct ca_sta_manage_service
{
char intf[WFA_IF_NAME_LEN];
WORD program;
union _MngServiceCmds
{
staWfdsMngService MgtServ;
}MngCmds;
} caStaMngServ_t;
enum {
eUibcGen = 1,
eUibcHid,
eFrameSkip,
eInputContent,
eI2cRead,
eI2cWrite,
eIdrReq,
};
enum
{
eSingleTouchEvent = 1,
eMultiTouchEvent,
eKeyBoardEvent,
eMouseEvent,
eBtEvent,
};
enum
{
eProtected = 1,
eUnprotected,
eProtectedVideoOnly,
};
enum trigger {
eFTMsession = 1,
eANQPQUERY,
};
enum formatBwFTM {
eHT20 = 9,
eHT40_5G = 11,
eVHT20 = 10,
eVHT40 = 12,
eVHT80 = 13,
};
enum event {
eDiscoveryResult = 1,
eReplied,
ePublishTerminated,
eSubscribeTerminated,
eFollowUpReceive,
};
enum method {
ePublish = 1,
eSubscribe,
eFollowUp,
};
enum methodtype {
eUnsolicited = 1,
eSolicited,
eActive,
ePassive,
eCancel,
};
typedef struct wfd_generate_event
{
BYTE type;
BYTE wfdSessionIdflag;
char wfdSessionID[WFA_WFD_SESSION_ID_LEN];
BYTE wfdUibcEventTypeflag;
BYTE wfdUibcEventType;
BYTE wfdUibcEventPrepareflag;
BYTE wfdUibcEventPrepare;
BYTE wfdFrameSkipRateflag;
BYTE wfdInputContentTypeflag;
BYTE wfdInputContentType;
BYTE wfdI2cDataflag;
char wfdI2cData[32];
} caWfdStaGenEvent_t;
typedef struct ca_sta_generate_event
{
char intf[WFA_IF_NAME_LEN];
BYTE program;
caWfdStaGenEvent_t wfdEvent;
} caStaGenEvent_t;
//#ifdef WFA_STA_TB
typedef enum wfa_supplicant_names
{
eWindowsZeroConfig = 1,
eMarvell,
eIntelProset,
eWpaSupplicant,
eCiscoSecureClient,
eOpen1x,
eDefault
} wfaSupplicantName;
typedef struct ca_sta_set_p2p
{
char intf[WFA_IF_NAME_LEN];
unsigned char listen_chn_flag;
WORD listen_chn;
unsigned char p2p_mode_flag;
char p2p_mode[16];
unsigned char presistent_flag;
int presistent;
unsigned char intra_bss_flag;
int intra_bss;
unsigned char noa_duration_flag;
int noa_duration;
unsigned char noa_interval_flag;
int noa_interval;
unsigned char noa_count_flag;
int noa_count;
unsigned char concurrency_flag;
int concurrency;
unsigned char p2p_invitation_flag;
int p2p_invitation;
unsigned char bcn_int_flag;
int bcn_int;
unsigned char ext_listen_time_int_flag;
int ext_listen_time_int;
unsigned char ext_listen_time_period_flag;
int ext_listen_time_period;
unsigned char discoverability_flag;
int discoverability;
unsigned char service_discovry_flag;
int service_discovery;
unsigned char crossconnection_flag;
int crossconnection;
unsigned char p2pmanaged_flag;
int p2pmanaged;
unsigned char go_apsd_flag;
int go_apsd;
unsigned char discover_type_flag;
int discoverType;
} caStaSetP2p_t;
typedef struct ca_sta_p2p_connect
{
char intf[WFA_IF_NAME_LEN];
char grpid[WFA_P2P_GRP_ID_LEN];
char devId[WFA_P2P_DEVID_LEN];
} caStaP2pConnect_t;
typedef struct ca_sta_start_auto_go
{
char intf[WFA_IF_NAME_LEN];
WORD oper_chn;
unsigned char ssid_flag;
char ssid[WFA_SSID_NAME_LEN];
unsigned char rtsp_flag;
WORD rtsp;
} caStaStartAutoGo_t;
typedef struct ca_sta_p2p_start_grp_formation
{
char intf[WFA_IF_NAME_LEN];
char devId[WFA_P2P_DEVID_LEN];
WORD intent_val;
WORD init_go_neg;
unsigned char oper_chn_flag;
WORD oper_chn;
unsigned char ssid_flag;
char ssid[WFA_SSID_NAME_LEN];
} caStaP2pStartGrpForm_t;
typedef struct ca_sta_p2p_dissolve
{
char intf[WFA_IF_NAME_LEN];
char grpId[WFA_P2P_GRP_ID_LEN];
} caStaP2pDissolve_t;
typedef struct ca_sta_send_p2p_inv_req
{
char intf[WFA_IF_NAME_LEN];
char devId[WFA_P2P_DEVID_LEN];
char grpId[WFA_P2P_GRP_ID_LEN];