Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame^] | 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 | |
| 9 | struct Apple80211; |
| 10 | typedef struct Apple80211 *Apple80211Ref; |
| 11 | |
| 12 | int Apple80211Open(Apple80211Ref *ctx); |
| 13 | int Apple80211Close(Apple80211Ref ctx); |
| 14 | int Apple80211GetIfListCopy(Apple80211Ref handle, CFArrayRef *list); |
| 15 | int Apple80211BindToInterface(Apple80211Ref handle, |
| 16 | CFStringRef interface); |
| 17 | int Apple80211GetInterfaceNameCopy(Apple80211Ref handle, |
| 18 | CFStringRef *name); |
| 19 | int Apple80211GetInfoCopy(Apple80211Ref handle, |
| 20 | CFDictionaryRef *info); |
| 21 | int Apple80211GetPower(Apple80211Ref handle, char *pwr); |
| 22 | int 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() */ |
| 26 | int Apple80211Scan(Apple80211Ref handle, CFArrayRef *list, |
| 27 | CFDictionaryRef parameters); |
| 28 | |
| 29 | int Apple80211Associate(Apple80211Ref handle, CFDictionaryRef bss, |
| 30 | CFStringRef password); |
| 31 | int Apple80211AssociateAndCopyInfo(Apple80211Ref handle, CFDictionaryRef bss, |
| 32 | CFStringRef password, |
| 33 | CFDictionaryRef *info); |
| 34 | |
| 35 | enum { |
| 36 | APPLE80211_VALUE_SSID = 1, |
| 37 | APPLE80211_VALUE_BSSID = 9 |
| 38 | }; |
| 39 | |
| 40 | int Apple80211CopyValue(Apple80211Ref handle, int field, CFDictionaryRef arg2, |
| 41 | void *value); |
| 42 | |
| 43 | #endif /* MOBILEAPPLE80211_H */ |