资源简介
wpa_supplicant is sourcode for wireless authentication,
代码片段和文件信息
/*
* IEEE 802.11 Common routines
* Copyright (c) 2002-2008 Jouni Malinen
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Alternatively this software may be distributed under the terms of BSD
* license.
*
* See README and COPYING for more details.
*/
#include “includes.h“
#include “common.h“
#include “ieee802_11_defs.h“
#include “ieee802_11_common.h“
static int ieee802_11_parse_vendor_specific(u8 *pos size_t elen
struct ieee802_11_elems *elems
int show_errors)
{
unsigned int oui;
/* first 3 bytes in vendor specific information element are the IEEE
* OUI of the vendor. The following byte is used a vendor specific
* sub-type. */
if (elen < 4) {
if (show_errors) {
wpa_printf(MSG_MSGDUMP “short vendor specific “
“information element ignored (len=%lu)“
(unsigned long) elen);
}
return -1;
}
oui = WPA_GET_BE24(pos);
switch (oui) {
case OUI_MICROSOFT:
/* Microsoft/Wi-Fi information elements are further typed and
* subtyped */
switch (pos[3]) {
case 1:
/* Microsoft OUI (00:50:F2) with OUI Type 1:
* real WPA information element */
elems->wpa_ie = pos;
elems->wpa_ie_len = elen;
break;
case WMM_OUI_TYPE:
/* WMM information element */
if (elen < 5) {
wpa_printf(MSG_MSGDUMP “short WMM “
“information element ignored “
“(len=%lu)“
(unsigned long) elen);
return -1;
}
switch (pos[4]) {
case WMM_OUI_SUBTYPE_INFORMATION_ELEMENT:
case WMM_OUI_SUBTYPE_PARAMETER_ELEMENT:
/*
* Share same pointer since only one of these
* is used and they start with same data.
* Length field can be used to distinguish the
* IEs.
*/
elems->wmm = pos;
elems->wmm_len = elen;
break;
case WMM_OUI_SUBTYPE_TSPEC_ELEMENT:
elems->wmm_tspec = pos;
elems->wmm_tspec_len = elen;
break;
default:
wpa_printf(MSG_MSGDUMP “unknown WMM “
“information element ignored “
“(subtype=%d len=%lu)“
pos[4] (unsigned long) elen);
return -1;
}
break;
case 4:
/* Wi-Fi Protected Setup (WPS) IE */
elems->wps_ie = pos;
elems->wps_ie_len = elen;
break;
default:
wpa_printf(MSG_MSGDUMP “Unknown Microsoft “
“information element ignored “
“(type=%d len=%lu)\n“
pos[3] (unsigned long) elen);
return -1;
}
break;
case OUI_BROADCOM:
switch (pos[3]) {
case VENDOR_HT_CAPAB_OUI_TYPE:
elems->vendor_ht_cap = pos;
elems->vendor_ht_cap_len = elen;
break;
default:
wpa_printf(MSG_MSGDUMP “Unknown Broadcom “
“information element ignored “
“(type=%d len=%lu)\n“
pos[3] (unsigned long) elen);
return -1;
}
break;
default:
wpa_printf(MSG_MSGDUMP “unknown vendor specific information “
“element ignored (vendor OUI %02x:%02x:%02x “
“
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2012-02-09 11:55 wpa_supplicant-0.6.10\
文件 18009 2010-01-12 22:55 wpa_supplicant-0.6.10\COPYING
目录 0 2012-02-09 11:55 wpa_supplicant-0.6.10\patches\
文件 15014 2010-01-12 22:55 wpa_supplicant-0.6.10\patches\openssl-0.9.8-tls-extensions.patch
文件 15070 2010-01-12 22:55 wpa_supplicant-0.6.10\patches\openssl-0.9.8d-tls-extensions.patch
文件 12165 2010-01-12 22:55 wpa_supplicant-0.6.10\patches\openssl-0.9.8e-tls-extensions.patch
文件 11137 2010-01-12 22:55 wpa_supplicant-0.6.10\patches\openssl-0.9.8g-tls-extensions.patch
文件 11668 2010-01-12 22:55 wpa_supplicant-0.6.10\patches\openssl-0.9.8h-tls-extensions.patch
文件 12931 2010-01-12 22:55 wpa_supplicant-0.6.10\patches\openssl-0.9.8i-tls-extensions.patch
文件 12376 2010-01-12 22:55 wpa_supplicant-0.6.10\patches\openssl-0.9.9-session-ticket.patch
文件 729 2010-01-12 22:55 wpa_supplicant-0.6.10\README
目录 0 2012-02-09 11:55 wpa_supplicant-0.6.10\src\
目录 0 2012-02-09 11:55 wpa_supplicant-0.6.10\src\common\
文件 6193 2010-01-12 22:55 wpa_supplicant-0.6.10\src\common\defs.h
文件 1124 2010-01-12 22:55 wpa_supplicant-0.6.10\src\common\eapol_common.h
文件 6190 2010-01-12 22:55 wpa_supplicant-0.6.10\src\common\ieee802_11_common.c
文件 1635 2010-01-12 22:55 wpa_supplicant-0.6.10\src\common\ieee802_11_common.h
文件 18615 2010-01-12 22:55 wpa_supplicant-0.6.10\src\common\ieee802_11_defs.h
文件 144 2010-01-12 22:55 wpa_supplicant-0.6.10\src\common\Makefile
文件 55604 2010-01-12 22:55 wpa_supplicant-0.6.10\src\common\nl80211_copy.h
文件 1671 2010-01-12 22:55 wpa_supplicant-0.6.10\src\common\privsep_commands.h
文件 90 2010-01-12 22:55 wpa_supplicant-0.6.10\src\common\version.h
文件 41392 2010-01-12 22:55 wpa_supplicant-0.6.10\src\common\wireless_copy.h
文件 15490 2010-01-12 22:55 wpa_supplicant-0.6.10\src\common\wpa_common.c
文件 10252 2010-01-12 22:55 wpa_supplicant-0.6.10\src\common\wpa_common.h
文件 9859 2010-01-12 22:55 wpa_supplicant-0.6.10\src\common\wpa_ctrl.c
文件 8488 2010-01-12 22:55 wpa_supplicant-0.6.10\src\common\wpa_ctrl.h
目录 0 2012-02-09 11:55 wpa_supplicant-0.6.10\src\crypto\
文件 49625 2010-01-12 22:55 wpa_supplicant-0.6.10\src\crypto\aes.c
文件 742 2010-01-12 22:55 wpa_supplicant-0.6.10\src\crypto\aes.h
文件 12186 2010-01-12 22:55 wpa_supplicant-0.6.10\src\crypto\aes_wrap.c
............此处省略458个文件信息
- 上一篇:socat源码加了中文注释
- 下一篇:IP175C芯片及5口网络交换机原理介绍
评论
共有 条评论