Go to the documentation of this file.00001 #ifndef APPLE80211_H
00002 #define APPLE80211_H
00003
00004
00005
00006
00007
00008
00009
00010
00011 typedef struct __WirelessRef *WirelessRef;
00012 typedef SInt32 WirelessError;
00013 #define errWirelessNoError 0
00014
00015 typedef struct WirelessInfo {
00016 UInt16 link_qual;
00017 UInt16 comms_qual;
00018 UInt16 signal;
00019 UInt16 noise;
00020 UInt16 port_stat;
00021 UInt16 client_mode;
00022 UInt16 res1;
00023 UInt16 power;
00024 UInt16 res2;
00025 UInt8 bssID[6];
00026 UInt8 ssid[34];
00027 } WirelessInfo;
00028
00029 typedef struct WirelessInfo2 {
00030
00031 WirelessInfo info1;
00032 UInt8 macAddress[6];
00033 } WirelessInfo2;
00034
00035 typedef struct WirelessNetworkInfo {
00036 UInt16 channel;
00037 UInt16 noise;
00038 UInt16 signal;
00039 UInt8 bssid[6];
00040 UInt16 beacon_int;
00041 UInt16 capability;
00042 UInt16 ssid_len;
00043 UInt8 ssid[32];
00044 } WirelessNetworkInfo;
00045
00046 typedef int wirelessKeyType;
00047
00048 int WirelessIsAvailable(void);
00049 WirelessError WirelessAttach(WirelessRef *ref, UInt32 res);
00050 WirelessError WirelessDetach(WirelessRef ref);
00051 WirelessError WirelessPrivate(WirelessRef ref, void *in_ptr, int in_bytes,
00052 void *out_ptr, int out_bytes);
00053 WirelessError WirelessSetEnabled(WirelessRef ref, UInt8 enabled);
00054 WirelessError WirelessGetEnabled(WirelessRef ref, UInt8 *enabled);
00055 WirelessError WirelessSetPower(WirelessRef ref, UInt8 power);
00056 WirelessError WirelessGetPower(WirelessRef ref, UInt8 *power);
00057 WirelessError WirelessGetInfo(WirelessRef ref, WirelessInfo *info);
00058 WirelessError WirelessGetInfo2(WirelessRef ref, WirelessInfo2 *info);
00059 WirelessError WirelessScan(WirelessRef ref, CFArrayRef *results,
00060 UInt32 strip_dups);
00061 WirelessError WirelessScanSplit(WirelessRef ref, CFArrayRef *ap_results,
00062 CFArrayRef *ibss_results, UInt32 strip_dups);
00063 WirelessError WirelessDirectedScan(WirelessRef ref, CFArrayRef *results,
00064 UInt32 strip_dups, CFStringRef ssid);
00065 WirelessError WirelessDirectedScan2(WirelessRef ref, CFDataRef ssid,
00066 UInt32 strip_dups, CFArrayRef *results);
00067 WirelessError WirelessJoin(WirelessRef ref, CFStringRef ssid);
00068 WirelessError WirelessJoinWEP(WirelessRef ref, CFStringRef ssid,
00069 CFStringRef passwd);
00070 WirelessError WirelessJoin8021x(WirelessRef ref, CFStringRef ssid);
00071
00072
00073
00074
00075
00076
00077
00078
00079 WirelessError WirelessSetKey(WirelessRef ref, wirelessKeyType type,
00080 int key_idx, int key_len,
00081 const unsigned char *key);
00082
00083
00084
00085
00086
00087
00088
00089 WirelessError WirelessSetWPAKey(WirelessRef ref, wirelessKeyType type,
00090 int key_len, const unsigned char *key);
00091 WirelessError WirelessAssociate(WirelessRef ref, int type, CFDataRef ssid,
00092 CFStringRef key);
00093 WirelessError WirelessAssociate2(WirelessRef ref, CFDictionaryRef scan_res,
00094 CFStringRef key);
00095 WirelessError WirelessDisassociate(WirelessRef ref);
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120 CFDictionaryRef WirelessSafeDirectedScanCopy(WirelessRef ref, CFDataRef ssid);
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135 CFDictionaryRef WirelessGetAssociationInfo(WirelessRef ref);
00136
00137 WirelessError WirelessConfigure(WirelessRef ref);
00138
00139
00140
00141
00142
00143
00144
00145
00146 CFDictionaryRef WirelessGetInfoASP(void);
00147
00148
00149
00150
00151
00152
00153
00154 CFDictionaryRef WirelessCopyInterfaceDict(void);
00155
00156 #endif