wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Functions | Variables
tdls.c File Reference

wpa_supplicant - TDLS More...

#include "utils/includes.h"
#include "utils/common.h"
#include "utils/eloop.h"
#include "utils/os.h"
#include "common/ieee802_11_defs.h"
#include "common/ieee802_11_common.h"
#include "crypto/sha256.h"
#include "crypto/crypto.h"
#include "crypto/aes_wrap.h"
#include "rsn_supp/wpa.h"
#include "rsn_supp/wpa_ie.h"
#include "rsn_supp/wpa_i.h"
#include "drivers/driver.h"
#include "l2_packet/l2_packet.h"

Data Structures

struct  wpa_tdls_ftie
 
struct  wpa_tdls_timeoutie
 
struct  wpa_tdls_lnkid
 
struct  wpa_tdls_frame
 
struct  wpa_tdls_peer
 
struct  wpa_tdls_peer::tpk
 
struct  wpa_tdls_peer::tpk_timer
 

Macros

#define TPK_LIFETIME   43200 /* 12 hours */
 
#define TPK_M1_RETRY_COUNT   3
 
#define TPK_M1_TIMEOUT   5000 /* in milliseconds */
 
#define TPK_M2_RETRY_COUNT   10
 
#define TPK_M2_TIMEOUT   500 /* in milliseconds */
 
#define TDLS_MIC_LEN   16
 
#define TDLS_TIMEOUT_LEN   4
 
#define TDLS_MAX_IE_LEN   80
 
#define IEEE80211_MAX_SUPP_RATES   32
 

Functions

int wpa_tdls_teardown_link (struct wpa_sm *sm, const u8 *addr, u16 reason_code)
 
void wpa_tdls_disable_unreachable_link (struct wpa_sm *sm, const u8 *addr)
 
const char * wpa_tdls_get_link_status (struct wpa_sm *sm, const u8 *addr)
 
int wpa_tdls_send_discovery_request (struct wpa_sm *sm, const u8 *addr)
 
int wpa_tdls_start (struct wpa_sm *sm, const u8 *addr)
 Initiate TDLS handshake (send TPK Handshake Message 1) More...
 
void wpa_tdls_remove (struct wpa_sm *sm, const u8 *addr)
 
int wpa_tdls_init (struct wpa_sm *sm)
 Initialize driver interface parameters for TDLS. More...
 
void wpa_tdls_teardown_peers (struct wpa_sm *sm)
 
void wpa_tdls_deinit (struct wpa_sm *sm)
 Deinitialize driver interface parameters for TDLS. More...
 
void wpa_tdls_assoc (struct wpa_sm *sm)
 
void wpa_tdls_disassoc (struct wpa_sm *sm)
 
void wpa_tdls_ap_ies (struct wpa_sm *sm, const u8 *ies, size_t len)
 
void wpa_tdls_assoc_resp_ies (struct wpa_sm *sm, const u8 *ies, size_t len)
 
void wpa_tdls_enable (struct wpa_sm *sm, int enabled)
 
int wpa_tdls_is_external_setup (struct wpa_sm *sm)
 
int wpa_tdls_enable_chan_switch (struct wpa_sm *sm, const u8 *addr, u8 oper_class, struct hostapd_freq_params *freq_params)
 
int wpa_tdls_disable_chan_switch (struct wpa_sm *sm, const u8 *addr)
 

Variables

struct wpa_tdls_ftie STRUCT_PACKED
 

Detailed Description

wpa_supplicant - TDLS

Function Documentation

void wpa_tdls_deinit ( struct wpa_sm sm)

Deinitialize driver interface parameters for TDLS.

This function is called to recover driver interface parameters for TDLS and frees resources allocated for it.

int wpa_tdls_init ( struct wpa_sm sm)

Initialize driver interface parameters for TDLS.

Parameters
wpa_sPointer to wpa_supplicant data
Returns
0 on success, -1 on failure

This function is called to initialize driver interface parameters for TDLS. wpa_drv_init() must have been called before this function to initialize the driver interface.

int wpa_tdls_start ( struct wpa_sm sm,
const u8 *  addr 
)

Initiate TDLS handshake (send TPK Handshake Message 1)

Parameters
smPointer to WPA state machine data from wpa_sm_init()
peerMAC address of the peer STA
Returns
0 on success, or -1 on failure

Send TPK Handshake Message 1 info to driver to start TDLS handshake with the peer.