wpa.h File Reference

#include <asm/types.h>
#include "common.h"

Include dependency graph for wpa.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  rsn_ie_t
struct  wpa_ie_t
struct  ap_info_t

Defines

#define MAX_WPA_KEY_LEN   32
#define WPA_ELEMENT   0xDD
#define RSN_ELEMENT   0x30
#define WPA_VERSION   1
#define RSN_VERSION   1
#define CIPHER_SUITE_LEN   4
#define WPA_PSK   1
#define WPA_802_1X   2

Functions

gboolean set_encryption_method (guint32 cipher, struct wlan_status_t *wlan_status)
int set_wpa_encryption (int encryption, struct wlan_status_t *wlan_status)
int set_wpa2_encryption (int encryption, struct wlan_status_t *wlan_status)
int handle_mic_failure (gboolean key_type, unsigned char *bssid)
int parse_rsn_ie (unsigned char *wpa_ie, unsigned int wpa_ie_len, struct ap_info_t *ap_info)
int parse_wpa_ie (unsigned char *wpa_ie, unsigned int wpa_ie_len, struct ap_info_t *ap_info)
guint parse_rsn_cipher_suite (guint8 *suite)
guint parse_rsn_key_mgmt_suite (guint8 *suite)
guint parse_wpa_cipher_suite (guint8 *suite)
guint parse_wpa_key_mgmt_suite (guint8 *suite)
int handle_wps_ie (unsigned char *p, struct scan_results_t *scan_results, unsigned int length)
int set_countermeasures (guint on_off)
gboolean is_ap_in_black_list (unsigned char *bssid)
gint compare_bssid (gconstpointer a, gconstpointer b)

Variables

rsn_ie_t packed
wpa_ie_t packed


Detailed Description

Copyright (C) 2004 Nokia Corporation. All rights reserved.

Author:
Janne Ylälehto <janne.ylalehto@nokia.com>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Definition in file wpa.h.


Function Documentation

int handle_mic_failure ( gboolean  key_type,
unsigned char *  bssid 
)

Handle MIC failure.

Parameters:
key_type Key type (pairwise/group).
Returns:
status.

Definition at line 601 of file wpa.c.

References add_ap_to_black_list(), DISCONNECTED_SIGNAL, mic_failure_running_cb(), mic_failure_running_timer_id, MIC_FAILURE_TIMEOUT, mic_failure_timer_cb(), mic_failure_timer_id, mlme_command(), set_wlan_state(), WLANCOND_REASON_MIC_FAILURE, and wpa_mic_failure_event().

Referenced by handle_custom_event().

Here is the call graph for this function:

int handle_wps_ie ( unsigned char *  p,
struct scan_results_t scan_results,
unsigned int  length 
)

Handle Wifi Protected Setup Information Element.

Parameters:
p WPS Information Element.
scan_results Scan results.
length WPS Information Element length.
Returns:
status.

Definition at line 120 of file wps.c.

References scan_results_t::cap_bits, get_tlv_value(), MAX_DEVICE_NAME, MAX_UUID_E_LEN, WPS_APSETUPLOCKED_TLV, WPS_DEVICENAME_TLV, WPS_DEVICEPASSWORD_ID_TLV, WPS_PIN_CODE, WPS_PUSH_BUTTON, WPS_SELECTEDREGISTRAR_TLV, WPS_SELECTEDREGISTRARCONFIGMETHODS_TLV, WPS_STATE_CONFIGURED, WPS_STATE_TLV, WPS_UUID_E_TLV, WPS_VERSION, and WPS_VERSION_TLV.

Referenced by handle_wpa_ie_event_binary().

Here is the call graph for this function:

gboolean is_ap_in_black_list ( unsigned char *  bssid  ) 

Check if access point is in the black list.

Parameters:
bssid BSSID.
Returns:
TRUE if in the list.

Definition at line 558 of file wpa.c.

References ap_black_list, compare_bssid(), and print_mac().

Referenced by find_connection().

Here is the call graph for this function:

int parse_rsn_ie ( unsigned char *  wpa_ie,
unsigned int  wpa_ie_len,
struct ap_info_t ap_info 
)

Parse RSN IE.

Parameters:
wpa_ie WPA IE.
wpa_ie_len WPA IE length.
ap_info AP Information pointer.
Returns:
status.

Definition at line 649 of file wpa.c.

References CIPHER_SUITE_LEN, rsn_ie_t::element_id, ap_info_t::group_cipher, ap_info_t::key_mgmt, ap_info_t::pairwise_cipher, parse_rsn_cipher_suite(), parse_rsn_key_mgmt_suite(), and RSN_ELEMENT.

Referenced by handle_wpa_ie_event_binary().

Here is the call graph for this function:

int parse_wpa_ie ( unsigned char *  wpa_ie,
unsigned int  wpa_ie_len,
struct ap_info_t ap_info 
)

Parse WPA IE.

Parameters:
wpa_ie WPA IE.
wpa_ie_len WPA IE length.
ap_info AP Information pointer.
Returns:
status.

Definition at line 759 of file wpa.c.

References CIPHER_SUITE_LEN, wpa_ie_t::element_id, ap_info_t::group_cipher, ap_info_t::key_mgmt, wpa_ie_t::oui, ap_info_t::pairwise_cipher, parse_wpa_cipher_suite(), parse_wpa_key_mgmt_suite(), and WPA_ELEMENT.

Referenced by handle_wpa_ie_event_binary().

Here is the call graph for this function:

int set_countermeasures ( guint  on_off  ) 

Set WPA countermeasures.

Parameters:
onoff On or Off.
Returns:
status.

Definition at line 391 of file wpa.c.

References set_encryption_method_helper().

Here is the call graph for this function:

gboolean set_encryption_method ( guint32  encryption,
struct wlan_status_t wlan_status 
)

Set encryption settings.

Parameters:
encryption Encryption settings.
wlan_status WLAN status struct.
Returns:
status.

Definition at line 403 of file wpa.c.

References connect_params_t::authentication_type, wlan_status_t::conn, generate_wpa2_ie(), generate_wpa_ie(), group_encryption_to_cipher(), connect_params_t::mode, pairwise_encryption_to_cipher(), set_encryption_method_helper(), set_wpa_ie(), and wlan_status.

Referenced by associate().

Here is the call graph for this function:


Generated on Sat Dec 6 22:17:36 2008 for WLAN Connection Daemon by  doxygen 1.5.1