4 #include <netlink/netlink.h>
6 #define SLSI_NAN_MAX_NDP 5
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: */
24 nlattr
*newNlVendorMsg(int subcmd
, WifiRequest
&request
);
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
);
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
);
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
);
44 int processResponse(WifiEvent
&reply
, NanResponseMsg
*response
);
45 void requestSuccess(u16 id
, void *data
, int subcmd
);
46 int getDataPathNLMsg(u16 id
, void *data
, int subcmd
, WifiRequest
&request
);
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
);