]>
git.ipfire.org Git - thirdparty/hostap.git/blob - src/drivers/scan_helpers.c
2 * WPA Supplicant - Helper functions for scan result processing
3 * Copyright (c) 2007-2008, Jouni Malinen <j@w1.fi>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
9 * Alternatively, this software may be distributed under the terms of BSD
12 * See README and COPYING for more details.
18 #include "drivers/driver.h"
19 #include "common/ieee802_11_defs.h"
22 const u8
* wpa_scan_get_ie(const struct wpa_scan_res
*res
, u8 ie
)
26 pos
= (const u8
*) (res
+ 1);
27 end
= pos
+ res
->ie_len
;
29 while (pos
+ 1 < end
) {
30 if (pos
+ 2 + pos
[1] > end
)
41 void wpa_scan_results_free(struct wpa_scan_results
*res
)
48 for (i
= 0; i
< res
->num
; i
++)