200 #include <linux/wireless.h>
201 #include <linux/if_ether.h>
210 #define IW_HANDLER_VERSION 8
251 #define IW_WIRELESS_SPY
252 #define IW_WIRELESS_THRSPY
256 #define EIWCOMMIT EINPROGRESS
259 #define IW_REQUEST_FLAG_COMPAT 0x0001
262 #define IW_HEADER_TYPE_NULL 0
263 #define IW_HEADER_TYPE_CHAR 2
264 #define IW_HEADER_TYPE_UINT 4
265 #define IW_HEADER_TYPE_FREQ 5
266 #define IW_HEADER_TYPE_ADDR 6
267 #define IW_HEADER_TYPE_POINT 8
268 #define IW_HEADER_TYPE_PARAM 9
269 #define IW_HEADER_TYPE_QUAL 10
274 #define IW_DESCR_FLAG_NONE 0x0000
276 #define IW_DESCR_FLAG_DUMP 0x0001
277 #define IW_DESCR_FLAG_EVENT 0x0002
278 #define IW_DESCR_FLAG_RESTRICT 0x0004
280 #define IW_DESCR_FLAG_NOMAX 0x0008
282 #define IW_DESCR_FLAG_WAIT 0x0100
333 #ifdef CONFIG_WEXT_PRIV
336 __u16 num_private_args;
483 return IW_EV_COMPAT_LCP_LEN;
492 return IW_EV_COMPAT_POINT_LEN;
497 static inline int iwe_stream_event_len_adjust(
struct iw_request_info *info,
503 event_len += IW_EV_COMPAT_LCP_LEN;
515 iwe_stream_add_event(
struct iw_request_info *info,
char *stream,
char *ends,
516 struct iw_event *iwe,
int event_len)
518 int lcp_len = iwe_stream_lcp_len(info);
520 event_len = iwe_stream_event_len_adjust(info, event_len);
523 if(
likely((stream + event_len) < ends)) {
524 iwe->
len = event_len;
527 memcpy(stream + lcp_len, &iwe->
u,
528 event_len - lcp_len);
540 iwe_stream_add_point(
struct iw_request_info *info,
char *stream,
char *ends,
543 int event_len = iwe_stream_point_len(info) + iwe->
u.
data.length;
544 int point_len = iwe_stream_point_len(info);
545 int lcp_len = iwe_stream_lcp_len(info);
548 if(
likely((stream + event_len) < ends)) {
549 iwe->
len = event_len;
554 memcpy(stream + point_len, extra, iwe->
u.
data.length);
568 char *ends,
struct iw_event *iwe,
int event_len)
570 int lcp_len = iwe_stream_lcp_len(info);
576 if(
likely((value + event_len) < ends)) {
578 memcpy(value, &iwe->
u, event_len);
582 memcpy(event, (
char *) iwe, lcp_len);