MobileApple80211.h 1.3 KB

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