wps.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 "common.h"
#include "wpa.h"
#include "wps.h"
#include "log.h"

Include dependency graph for wps.c:

Go to the source code of this file.

Defines

#define WPS_VERSION   0x10
#define MAX_DEVICE_NAME   32
#define WPS_STATE_UNCONFIGURED   0x01
#define WPS_STATE_CONFIGURED   0x02
#define WPS_PIN_CODE   0
#define WPS_PUSH_BUTTON   4
#define WPS_VERSION_TLV   0x104A
#define WPS_STATE_TLV   0x1044
#define WPS_APSETUPLOCKED_TLV   0x1057
#define WPS_SELECTEDREGISTRAR_TLV   0x1041
#define WPS_DEVICEPASSWORD_ID_TLV   0x1012
#define WPS_SELECTEDREGISTRARCONFIGMETHODS_TLV   0x1053
#define WPS_DEVICENAME_TLV   0x1011
#define WPS_UUID_E_TLV   0x1047

Functions

static int get_tlv_value (guchar *msg, guint msg_size, guint type, guchar *value, guint value_len)
int handle_wps_ie (unsigned char *p, struct scan_results_t *scan_results, unsigned int length)


Detailed Description

Copyright (C) 2008 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 wps.c.


Function Documentation

static int get_tlv_value ( guchar *  msg,
guint  msg_size,
guint  type,
guchar *  value,
guint  value_len 
) [static]

Get selected TLV value.

Parameters:
msg WPS Information Element.
msg_size Message size.
type Type of TLV value to search.
value Pointer to result.
value_len Result lenght.
Returns:
status.

Definition at line 64 of file wps.c.

Referenced by handle_wps_ie().

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 121 of file wps.c.

References get_tlv_value().

Referenced by handle_wpa_ie_event_binary().

Here is the call graph for this function:


Generated on Mon Jul 5 12:21:41 2010 for WLAN Connection Daemon by  doxygen 1.5.6