aboutsummaryrefslogtreecommitdiffstats
path: root/src/rsn_supp/wpa.h
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2013-03-16 17:13:31 (GMT)
committerJouni Malinen <j@w1.fi>2014-01-27 19:44:26 (GMT)
commit25ef8529c1d1c913f931e6261c9cb11cb13ea3cd (patch)
tree7b8fa58270567506c6c663706515a84af385332a /src/rsn_supp/wpa.h
parentfdd48ff6e06582245d01efcf3147b179ffe74b8b (diff)
downloadhostap-25ef8529c1d1c913f931e6261c9cb11cb13ea3cd.zip
hostap-25ef8529c1d1c913f931e6261c9cb11cb13ea3cd.tar.gz
hostap-25ef8529c1d1c913f931e6261c9cb11cb13ea3cd.tar.bz2
P2P: Add support for IP address assignment in 4-way handshake
This new mechanism allows P2P Client to request an IPv4 address from the GO as part of the 4-way handshake to avoid use of DHCP exchange after 4-way handshake. If the new mechanism is used, the assigned IP address is shown in the P2P-GROUP-STARTED event on the client side with following new parameters: ip_addr, ip_mask, go_ip_addr. The assigned IP address is included in the AP-STA-CONNECTED event on the GO side as a new ip_addr parameter. The IP address is valid for the duration of the association. The IP address pool for this new mechanism is configured as global wpa_supplicant configuration file parameters ip_addr_go, ip_addr_mask, ip_addr_star, ip_addr_end. For example: ip_addr_go=192.168.42.1 ip_addr_mask=255.255.255.0 ip_addr_start=192.168.42.2 ip_addr_end=192.168.42.100 DHCP mechanism is expected to be enabled at the same time to support P2P Devices that do not use the new mechanism. The easiest way of managing the IP addresses is by splitting the IP address range into two parts and assign a separate range for wpa_supplicant and DHCP server. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/rsn_supp/wpa.h')
-rw-r--r--src/rsn_supp/wpa.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rsn_supp/wpa.h b/src/rsn_supp/wpa.h
index 9884ce1..20b3f62 100644
--- a/src/rsn_supp/wpa.h
+++ b/src/rsn_supp/wpa.h
@@ -95,6 +95,7 @@ struct rsn_supp_config {
const u8 *ssid;
size_t ssid_len;
int wpa_ptk_rekey;
+ int p2p;
};
#ifndef CONFIG_NO_WPA
@@ -145,6 +146,8 @@ void wpa_sm_update_replay_ctr(struct wpa_sm *sm, const u8 *replay_ctr);
void wpa_sm_pmksa_cache_flush(struct wpa_sm *sm, void *network_ctx);
+int wpa_sm_get_p2p_ip_addr(struct wpa_sm *sm, u8 *buf);
+
#else /* CONFIG_NO_WPA */
static inline struct wpa_sm * wpa_sm_init(struct wpa_sm_ctx *ctx)