Commit | Line | Data |
---|---|---|
c2afddcb JPS |
1 | #ifndef NAN_DATA_H |
2 | #define NAN_DATA_H | |
3 | ||
4 | #include <netlink/netlink.h> | |
5 | ||
6 | #define SLSI_NAN_MAX_NDP 5 | |
7 | ||
8 | class NanDataCommand { | |
9 | ||
10 | int m_ndp_count; | |
11 | u32 m_ndp_instance_id[SLSI_NAN_MAX_NDP]; | |
12 | int m_max_ndp_sessions; | |
13 | int m_data_iface_count; | |
14 | char m_ifaceName[SLSI_NAN_MAX_NDP][IFNAMSIZ+1]; | |
15 | static const int idx_iface_create = 0; | |
16 | static const int idx_iface_delete = 1; | |
17 | static const int idx_ndp_initiator = 2; | |
18 | static const int idx_ndp_responder = 3; | |
19 | static const int idx_ndp_end = 4; | |
20 | static const int idx_max = 5; /* should be the end of idx_* */ | |
21 | u16 transaction_id[idx_max]; /* 5 = no of reqs: */ | |
22 | ||
23 | ||
24 | nlattr *newNlVendorMsg(int subcmd, WifiRequest &request); | |
25 | ||
26 | void dataInterfaceCreated(char *ifaceName); | |
27 | void dataInterfaceDeleted(char *ifaceName); | |
28 | void dataRequestInitiateSuccess(NanDataPathInitiatorRequest *msg); | |
29 | void dataIndicationResponseSuccess(NanDataPathIndicationResponse *msg); | |
30 | void dataEndSuccess(NanDataPathEndRequest *msg); | |
31 | ||
32 | int dataInterfaceCreateDelete(char *ifaceName, int subcmd, WifiRequest &request); | |
33 | int dataRequestInitiate(NanDataPathInitiatorRequest *msg, WifiRequest &request); | |
34 | int dataIndicationResponse(NanDataPathIndicationResponse *msg, WifiRequest &request); | |
35 | int dataEnd(NanDataPathEndRequest *msg, WifiRequest &request); | |
36 | ||
37 | void processNdpChannelInfo(nlattr *nl_data, NanChannelInfo &channel_info); | |
38 | int processNdpReqEvent(WifiEvent &event, NanCallbackHandler &callbackEventHandler); | |
39 | int processNdpCfmEvent(WifiEvent &event, NanCallbackHandler &callbackEventHandler); | |
40 | int processNdpEndEvent(WifiEvent &event, NanCallbackHandler &callbackEventHandler); | |
41 | ||
42 | public: | |
43 | NanDataCommand(); | |
44 | int processResponse(WifiEvent &reply, NanResponseMsg *response); | |
45 | void requestSuccess(u16 id, void *data, int subcmd); | |
082f0000 | 46 | int getDataPathNLMsg(u16 id, void *data, int subcmd, WifiRequest &request); |
c2afddcb JPS |
47 | void setMaxNdpSessions(int max_ndp); |
48 | int handleEvent(WifiEvent &event, NanCallbackHandler &callbackEventHandler); | |
49 | int getResponseTransactionId(NanResponseMsg *res); | |
50 | static int putSecurityInfo(u32 cipher, NanSecurityKeyInfo *key_info, u32 scid_len, | |
51 | u8 *scid, WifiRequest *request); | |
52 | }; | |
53 | #endif |