1#ifndef MOBILEAPPLE80211_H
2#define MOBILEAPPLE80211_H
3
4/*
5 * MobileApple80211 interface for iPhone/iPod touch
6 * These functions are available from Aeropuerto.
7 */
8
9struct Apple80211;
10typedef struct Apple80211 *Apple80211Ref;
11
12int Apple80211Open(Apple80211Ref *ctx);
13int Apple80211Close(Apple80211Ref ctx);
14int Apple80211GetIfListCopy(Apple80211Ref handle, CFArrayRef *list);
15int Apple80211BindToInterface(Apple80211Ref handle,
16			      CFStringRef interface);
17int Apple80211GetInterfaceNameCopy(Apple80211Ref handle,
18				   CFStringRef *name);
19int Apple80211GetInfoCopy(Apple80211Ref handle,
20			  CFDictionaryRef *info);
21int Apple80211GetPower(Apple80211Ref handle, char *pwr);
22int Apple80211SetPower(Apple80211Ref handle, char pwr);
23
24/* parameters can be NULL; returns scan results in CFArrayRef *list;
25 * caller will need to free with CFRelease() */
26int Apple80211Scan(Apple80211Ref handle, CFArrayRef *list,
27		   CFDictionaryRef parameters);
28
29int Apple80211Associate(Apple80211Ref handle, CFDictionaryRef bss,
30			CFStringRef password);
31int Apple80211AssociateAndCopyInfo(Apple80211Ref handle, CFDictionaryRef bss,
32				   CFStringRef password,
33				   CFDictionaryRef *info);
34
35enum {
36	APPLE80211_VALUE_SSID = 1,
37	APPLE80211_VALUE_BSSID = 9
38};
39
40int Apple80211CopyValue(Apple80211Ref handle, int field, CFDictionaryRef arg2,
41			void *value);
42
43#endif /* MOBILEAPPLE80211_H */
44