aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/mlme.h
blob: f1c8abadfbd0cefd04332920657efd4dec18d1d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/*
 * WPA Supplicant - Client mode MLME
 * Copyright (c) 2003-2007, Jouni Malinen <j@w1.fi>
 * Copyright (c) 2004, Instant802 Networks, Inc.
 * Copyright (c) 2005-2006, Devicescape Software, Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * Alternatively, this software may be distributed under the terms of BSD
 * license.
 *
 * See README and COPYING for more details.
 */

#ifndef MLME_H
#define MLME_H

struct wpa_supplicant;

#ifdef CONFIG_CLIENT_MLME

int ieee80211_sta_init(struct wpa_supplicant *wpa_s);
void ieee80211_sta_deinit(struct wpa_supplicant *wpa_s);
int ieee80211_sta_req_scan(struct wpa_supplicant *wpa_s, const u8 *ssid,
			   size_t ssid_len);
int ieee80211_sta_deauthenticate(struct wpa_supplicant *wpa_s, u16 reason);
int ieee80211_sta_disassociate(struct wpa_supplicant *wpa_s, u16 reason);
int ieee80211_sta_associate(struct wpa_supplicant *wpa_s,
			    struct wpa_driver_associate_params *params);
int ieee80211_sta_get_ssid(struct wpa_supplicant *wpa_s, u8 *ssid,
			   size_t *len);
void ieee80211_sta_free_hw_features(struct hostapd_hw_modes *hw_features,
				    size_t num_hw_features);
void ieee80211_sta_rx(struct wpa_supplicant *wpa_s, const u8 *buf, size_t len,
		      struct ieee80211_rx_status *rx_status);
struct wpa_scan_results *
ieee80211_sta_get_scan_results(struct wpa_supplicant *wpa_s);
int ieee80211_sta_update_ft_ies(struct wpa_supplicant *wpa_s, const u8 *md,
				const u8 *ies, size_t ies_len);
int ieee80211_sta_send_ft_action(struct wpa_supplicant *wpa_s, u8 action,
				 const u8 *target_ap,
				 const u8 *ies, size_t ies_len);
int ieee80211_sta_set_probe_req_ie(struct wpa_supplicant *wpa_s, const u8 *ies,
				   size_t ies_len);

#else /* CONFIG_CLIENT_MLME */

static inline int ieee80211_sta_init(struct wpa_supplicant *wpa_s)
{
	return 0;
}

static inline void ieee80211_sta_deinit(struct wpa_supplicant *wpa_s)
{
}

static inline int ieee80211_sta_req_scan(struct wpa_supplicant *wpa_s,
					 const u8 *ssid, size_t ssid_len)
{
	return -1;
}

static inline int ieee80211_sta_deauthenticate(struct wpa_supplicant *wpa_s,
					       u16 reason)
{
	return -1;
}

static inline int ieee80211_sta_disassociate(struct wpa_supplicant *wpa_s,
					     u16 reason)
{
	return -1;
}

static inline int
ieee80211_sta_associate(struct wpa_supplicant *wpa_s,
			struct wpa_driver_associate_params *params)
{
	return -1;
}

static inline int ieee80211_sta_get_ssid(struct wpa_supplicant *wpa_s,
					 u8 *ssid, size_t *len)
{
	return -1;
}

static inline void
ieee80211_sta_free_hw_features(struct wpa_hw_modes *hw_features,
			       size_t num_hw_features)
{
}

static inline void
ieee80211_sta_rx(struct wpa_supplicant *wpa_s, const u8 *buf, size_t len,
		 struct ieee80211_rx_status *rx_status)
{
}

static inline struct wpa_scan_results *
ieee80211_sta_get_scan_results(struct wpa_supplicant *wpa_s)
{
	return NULL;
}

static inline int
ieee80211_sta_update_ft_ies(struct wpa_supplicant *wpa_s, const u8 *md,
			    const u8 *ies, size_t ies_len)
{
	return -1;
}

static inline int
ieee80211_sta_send_ft_action(struct wpa_supplicant *wpa_s, u8 action,
			     const u8 *target_ap,
			     const u8 *ies, size_t ies_len)
{
	return -1;
}

static inline int
ieee80211_sta_set_probe_req_ie(struct wpa_supplicant *wpa_s, const u8 *ies,
			       size_t ies_len)
{
	return -1;
}

#endif /* CONFIG_CLIENT_MLME */

#endif /* MLME_H */