15 #ifndef __AIRPCAP_LOADER_H__
16 #define __AIRPCAP_LOADER_H__
26 #define CANT_GET_AIRPCAP_INTERFACE_LIST 0
27 #define NO_AIRPCAP_INTERFACES_FOUND 1
28 #define AIRPCAP_NOT_LOADED 2
30 #define AIRPCAP_CHANNEL_ANY_NAME "ANY"
32 #define AIRPCAP_WEP_KEY_STRING "WEP"
36 #define AIRPCAP_WPA_PWD_KEY_STRING "WPA-PWD"
37 #define AIRPCAP_WPA_BIN_KEY_STRING "WPA-PSK"
39 #define AIRPCAP_DLL_OK 0
40 #define AIRPCAP_DLL_OLD 1
41 #define AIRPCAP_DLL_ERROR 2
42 #define AIRPCAP_DLL_NOT_FOUND 3
46 typedef char * (*AirpcapGetLastErrorHandler)(PAirpcapHandle AdapterHandle);
49 typedef PAirpcapHandle (*AirpcapOpenHandler)(
char * DeviceName,
char * Ebuf);
50 typedef void (*AirpcapCloseHandler)(PAirpcapHandle AdapterHandle);
51 typedef bool (*AirpcapGetLinkTypeHandler)(PAirpcapHandle AdapterHandle, PAirpcapLinkType PLinkType);
52 typedef bool (*AirpcapSetLinkTypeHandler)(PAirpcapHandle AdapterHandle,
AirpcapLinkType NewLinkType);
53 typedef bool (*AirpcapSetKernelBufferHandler)(PAirpcapHandle AdapterHandle,
unsigned BufferSize);
54 typedef bool (*AirpcapSetFilterHandler)(PAirpcapHandle AdapterHandle,
void * Instructions,
unsigned Len);
55 typedef bool (*AirpcapGetMacAddressHandler)(PAirpcapHandle AdapterHandle,
PAirpcapMacAddress PMacAddress);
56 typedef bool (*AirpcapSetMinToCopyHandler)(PAirpcapHandle AdapterHandle,
unsigned MinToCopy);
57 typedef bool (*AirpcapGetReadEventHandler)(PAirpcapHandle AdapterHandle,
void *** PReadEvent);
58 typedef bool (*AirpcapReadHandler)(PAirpcapHandle AdapterHandle, uint8_t *
Buffer,
unsigned BufSize,
unsigned * PReceievedBytes);
59 typedef bool (*AirpcapGetStatsHandler)(PAirpcapHandle AdapterHandle,
PAirpcapStats PStats);
60 typedef bool (*AirpcapTurnLedOnHandler)(PAirpcapHandle AdapterHandle,
unsigned LedNumber);
61 typedef bool (*AirpcapTurnLedOffHandler)(PAirpcapHandle AdapterHandle,
unsigned LedNumber);
62 typedef bool (*AirpcapSetDeviceChannelHandler)(PAirpcapHandle AdapterHandle,
unsigned Channel);
63 typedef bool (*AirpcapGetDeviceChannelHandler)(PAirpcapHandle AdapterHandle,
unsigned * PChannel);
64 typedef bool (*AirpcapSetFcsPresenceHandler)(PAirpcapHandle AdapterHandle,
bool IsFcsPresent);
65 typedef bool (*AirpcapGetFcsPresenceHandler)(PAirpcapHandle AdapterHandle,
bool * PIsFcsPresent);
66 typedef bool (*AirpcapSetFcsValidationHandler)(PAirpcapHandle AdapterHandle,
AirpcapValidationType ValidationType);
67 typedef bool (*AirpcapGetFcsValidationHandler)(PAirpcapHandle AdapterHandle, PAirpcapValidationType PValidationType);
68 typedef bool (*AirpcapSetDeviceKeysHandler)(PAirpcapHandle AdapterHandle,
PAirpcapKeysCollection KeysCollection);
69 typedef bool (*AirpcapGetDeviceKeysHandler)(PAirpcapHandle AdapterHandle,
PAirpcapKeysCollection KeysCollection,
unsigned * PKeysCollectionSize);
70 typedef bool (*AirpcapSetDriverKeysHandler)(PAirpcapHandle AdapterHandle,
PAirpcapKeysCollection KeysCollection);
71 typedef bool (*AirpcapGetDriverKeysHandler)(PAirpcapHandle AdapterHandle,
PAirpcapKeysCollection KeysCollection,
unsigned * PKeysCollectionSize);
72 typedef bool (*AirpcapSetDecryptionStateHandler)(PAirpcapHandle AdapterHandle,
AirpcapDecryptionState Enable);
73 typedef bool (*AirpcapGetDecryptionStateHandler)(PAirpcapHandle AdapterHandle, PAirpcapDecryptionState PEnable);
74 typedef bool (*AirpcapSetDriverDecryptionStateHandler)(PAirpcapHandle AdapterHandle,
AirpcapDecryptionState Enable);
75 typedef bool (*AirpcapGetDriverDecryptionStateHandler)(PAirpcapHandle AdapterHandle, PAirpcapDecryptionState PEnable);
76 typedef bool (*AirpcapStoreCurConfigAsAdapterDefaultHandler)(PAirpcapHandle AdapterHandle);
77 typedef void (*AirpcapGetVersionHandler)(
unsigned * VersionMajor,
unsigned * VersionMinor,
unsigned * VersionRev,
unsigned * VersionBuild);
78 typedef bool (*AirpcapSetDeviceChannelExHandler)(PAirpcapHandle AdapterHandle,
AirpcapChannelInfo ChannelInfo);
79 typedef bool (*AirpcapGetDeviceChannelExHandler)(PAirpcapHandle AdapterHandle,
PAirpcapChannelInfo PChannelInfo);
80 typedef bool (*AirpcapGetDeviceSupportedChannelsHandler)(PAirpcapHandle AdapterHandle,
AirpcapChannelInfo **ppChannelInfo, uint32_t * pNumChannelInfo);
82 #define FLAG_CAN_BE_LOW 0x00000001
83 #define FLAG_CAN_BE_HIGH 0x00000002
84 #define FLAG_IS_BG_CHANNEL 0x00000004
85 #define FLAG_IS_A_CHANNEL 0x00000008
109 unsigned keysCollectionSize;
115 uint32_t numSupportedChannels;
128 extern GList *g_airpcap_if_list;
148 airpcap_get_if_string_number_from_description(
char* description);
154 free_airpcap_interface_list(GList *if_list);
166 airpcap_if_store_cur_config_as_adapter_default(PAirpcapHandle ah);
196 airpcap_if_get_fcs_validation(PAirpcapHandle ah, PAirpcapValidationType val);
209 airpcap_if_get_decryption_state(PAirpcapHandle ah, PAirpcapDecryptionState val);
221 airpcap_if_get_fcs_presence(PAirpcapHandle ah,
bool * ch);
227 airpcap_if_set_fcs_presence(PAirpcapHandle ah,
bool ch);
233 airpcap_if_get_link_type(PAirpcapHandle ah, PAirpcapLinkType lt);
245 airpcap_if_get_device_channel(PAirpcapHandle ah,
unsigned * ch);
251 airpcap_if_get_device_supported_channels(PAirpcapHandle ah,
AirpcapChannelInfo **cInfo, uint32_t * nInfo);
257 airpcap_if_get_device_supported_channels_array(PAirpcapHandle ah, uint32_t * pNumSupportedChannels);
263 airpcap_if_set_device_channel(PAirpcapHandle ah,
unsigned ch);
280 PAirpcapHandle airpcap_if_open(
char * name,
char * err);
285 void airpcap_if_close(PAirpcapHandle handle);
291 airpcap_get_dll_state(
void);
296 bool airpcap_if_turn_led_on(PAirpcapHandle AdapterHandle,
unsigned LedNumber);
301 bool airpcap_if_turn_led_off(PAirpcapHandle AdapterHandle,
unsigned LedNumber);
317 int load_airpcap(
void);
323 GList* get_airpcap_interface_list(
int *err,
char **err_str);
353 airpcap_if_get_device_keys(PAirpcapHandle AdapterHandle,
PAirpcapKeysCollection KeysCollection,
unsigned * PKeysCollectionSize);
365 airpcap_if_get_driver_keys(PAirpcapHandle AdapterHandle,
PAirpcapKeysCollection KeysCollection,
unsigned * PKeysCollectionSize);
371 airpcap_if_get_driver_decryption_state(PAirpcapHandle ah, PAirpcapDecryptionState PEnable);
400 gather_airpcap_compile_info(feature_list l);
403 gather_airpcap_runtime_info(feature_list l);
enum _AirpcapLinkType AirpcapLinkType
Link type. AirPcap supports two kind of 802.11 linktypes: plain 802.11 and radiotap.
enum _AirpcapDecryptionState AirpcapDecryptionState
Type of decryption the adapter performs. An adapter can be instructed to turn decryption (based on th...
enum _AirpcapValidationType AirpcapValidationType
Type of frame validation the adapter performs. An adapter can be instructed to accept different kind ...
Channel information. Used by AirpcapSetDeviceChannelEx(), AirpcapGetDeviceChannelEx(),...
Definition: airpcap.h:259
Entry in the list returned by AirpcapGetDeviceList();.
Definition: airpcap.h:69
This structure is used to store a collection of WEP keys. Note that the definition of the structure h...
Definition: airpcap.h:174
Storage for a MAC address.
Definition: airpcap.h:145
Capture statistics. Returned by AirpcapGetStats();.
Definition: airpcap.h:242
Definition: airpcap_loader.h:88
Definition: airpcap_loader.h:98
Definition: airpcap_loader.h:121