Defines | Functions

wapi.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <sys/ioctl.h>
#include <glib.h>
#include <glib-object.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <linux/types.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
#include <linux/if_ether.h>
#include <dbus/dbus.h>
#include <eap-dbus.h>
#include <wlancond.h>
#include "wpa.h"
#include "wapi.h"
#include "common.h"
#include "dbus-handler.h"
#include "log.h"
Include dependency graph for wapi.c:

Go to the source code of this file.

Defines

#define DBUS_API_SUBJECT_TO_CHANGE
#define COUNT_LE(p, s)   *p++ = (unsigned char)(s & 0x00ff); *p++ = (unsigned char)((s & 0xff00) >> 8);

Functions

static guint parse_wapi_key_mgmt_suite (guint8 *suite)
static guint parse_wapi_cipher_suite (guint8 *suite)
int generate_wapi_ie (guint32 encryption, struct wlan_status_t *wlan_status)
int parse_wapi_ie (unsigned char *wapi_ie, unsigned int wapi_ie_len, struct ap_info_t *ap_info)

Detailed Description

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

Author:
Usman Rahim <usman.rahim@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 wapi.c.


Function Documentation

int generate_wapi_ie ( guint32  encryption,
struct wlan_status_t wlan_status 
)

Generate WAPI Information Element.

Parameters:
encryption Encryption settings.
wlan_status Wlan status information.
Returns:
status.

Definition at line 87 of file wapi.c.

References find_pmkid_from_pmk_cache(), and update_own_ie().

Referenced by associate().

Here is the call graph for this function:

static guint parse_wapi_cipher_suite ( guint8 *  suite  )  [static]

Parse wapi cipher suite.

Parameters:
suite Cipher suite.
Returns:
status.

Definition at line 73 of file wapi.c.

Referenced by parse_wapi_ie().

int parse_wapi_ie ( unsigned char *  wapi_ie,
unsigned int  wapi_ie_len,
struct ap_info_t ap_info 
)

Parse WAPI IE.

Parameters:
wapi_ie WPA IE.
wapi_ie_len WPA IE length.
ap_info AP Information pointer.
Returns:
status.

Definition at line 190 of file wapi.c.

References parse_wapi_cipher_suite(), and parse_wapi_key_mgmt_suite().

Referenced by nl80211_parse_ies().

Here is the call graph for this function:

static guint parse_wapi_key_mgmt_suite ( guint8 *  suite  )  [static]

Parse wapi authentication and key management cipher suite.

Parameters:
suite Authentication and management suite.
Returns:
status.

Definition at line 57 of file wapi.c.

Referenced by parse_wapi_ie().