18d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* 28d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * WPA Supplicant - Basic AP mode support routines 38d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Copyright (c) 2003-2009, Jouni Malinen <j@w1.fi> 48d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Copyright (c) 2009, Atheros Communications 58d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 6c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt * This software may be distributed under the terms of the BSD license. 7c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt * See README for more details. 88d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 98d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#ifndef AP_H 118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define AP_H 128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpa_supplicant_create_ap(struct wpa_supplicant *wpa_s, 148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct wpa_ssid *ssid); 158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpa_supplicant_ap_deinit(struct wpa_supplicant *wpa_s); 168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpa_supplicant_ap_rx_eapol(struct wpa_supplicant *wpa_s, 178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *src_addr, const u8 *buf, size_t len); 188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpa_supplicant_ap_wps_pbc(struct wpa_supplicant *wpa_s, const u8 *bssid, 198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *p2p_dev_addr); 208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpa_supplicant_ap_wps_pin(struct wpa_supplicant *wpa_s, const u8 *bssid, 218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const char *pin, char *buf, size_t buflen); 228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpa_supplicant_ap_wps_cancel(struct wpa_supplicant *wpa_s); 238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_wps_ap_pin_disable(struct wpa_supplicant *wpa_s); 248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtconst char * wpas_wps_ap_pin_random(struct wpa_supplicant *wpa_s, int timeout); 258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtconst char * wpas_wps_ap_pin_get(struct wpa_supplicant *wpa_s); 268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpas_wps_ap_pin_set(struct wpa_supplicant *wpa_s, const char *pin, 278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int timeout); 288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint ap_ctrl_iface_sta_first(struct wpa_supplicant *wpa_s, 298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt char *buf, size_t buflen); 308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint ap_ctrl_iface_sta(struct wpa_supplicant *wpa_s, const char *txtaddr, 318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt char *buf, size_t buflen); 328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint ap_ctrl_iface_sta_next(struct wpa_supplicant *wpa_s, const char *txtaddr, 338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt char *buf, size_t buflen); 348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint ap_ctrl_iface_wpa_get_status(struct wpa_supplicant *wpa_s, char *buf, 358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t buflen, int verbose); 368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid ap_tx_status(void *ctx, const u8 *addr, 378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *buf, size_t len, int ack); 381f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidtvoid ap_eapol_tx_status(void *ctx, const u8 *dst, 391f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt const u8 *data, size_t len, int ack); 401f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidtvoid ap_client_poll_ok(void *ctx, const u8 *addr); 411f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidtvoid ap_rx_from_unknown_sta(void *ctx, const u8 *addr, int wds); 428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid ap_mgmt_rx(void *ctx, struct rx_mgmt *rx_mgmt); 438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid ap_mgmt_tx_cb(void *ctx, const u8 *buf, size_t len, u16 stype, int ok); 448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpa_supplicant_ap_update_beacon(struct wpa_supplicant *wpa_s); 458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpa_supplicant_ap_mac_addr_filter(struct wpa_supplicant *wpa_s, 468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *addr); 478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpa_supplicant_ap_pwd_auth_fail(struct wpa_supplicant *wpa_s); 488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#endif /* AP_H */ 50