14 #ifndef __AIRPCAP_LOADER_H__ 15 #define __AIRPCAP_LOADER_H__ 17 #include <epan/crypt/dot11decrypt_system.h> 24 #define CANT_GET_AIRPCAP_INTERFACE_LIST 0 25 #define NO_AIRPCAP_INTERFACES_FOUND 1 26 #define AIRPCAP_NOT_LOADED 2 28 #define AIRPCAP_CHANNEL_ANY_NAME "ANY" 30 #define AIRPCAP_WEP_KEY_STRING "WEP" 34 #define AIRPCAP_WPA_PWD_KEY_STRING "WPA-PWD" 35 #define AIRPCAP_WPA_BIN_KEY_STRING "WPA-PSK" 37 #define AIRPCAP_DLL_OK 0 38 #define AIRPCAP_DLL_OLD 1 39 #define AIRPCAP_DLL_ERROR 2 40 #define AIRPCAP_DLL_NOT_FOUND 3 44 typedef gchar * (*AirpcapGetLastErrorHandler)(PAirpcapHandle AdapterHandle);
47 typedef PAirpcapHandle (*AirpcapOpenHandler)(gchar * DeviceName, gchar * Ebuf);
48 typedef void (*AirpcapCloseHandler)(PAirpcapHandle AdapterHandle);
49 typedef gboolean (*AirpcapGetLinkTypeHandler)(PAirpcapHandle AdapterHandle, PAirpcapLinkType PLinkType);
50 typedef gboolean (*AirpcapSetLinkTypeHandler)(PAirpcapHandle AdapterHandle,
AirpcapLinkType NewLinkType);
51 typedef gboolean (*AirpcapSetKernelBufferHandler)(PAirpcapHandle AdapterHandle, guint BufferSize);
52 typedef gboolean (*AirpcapSetFilterHandler)(PAirpcapHandle AdapterHandle,
void * Instructions, guint Len);
53 typedef gboolean (*AirpcapGetMacAddressHandler)(PAirpcapHandle AdapterHandle,
PAirpcapMacAddress PMacAddress);
54 typedef gboolean (*AirpcapSetMinToCopyHandler)(PAirpcapHandle AdapterHandle, guint MinToCopy);
55 typedef gboolean (*AirpcapGetReadEventHandler)(PAirpcapHandle AdapterHandle,
void *** PReadEvent);
56 typedef gboolean (*AirpcapReadHandler)(PAirpcapHandle AdapterHandle, guint8 *
Buffer, guint BufSize, guint * PReceievedBytes);
57 typedef gboolean (*AirpcapGetStatsHandler)(PAirpcapHandle AdapterHandle,
PAirpcapStats PStats);
58 typedef gboolean (*AirpcapTurnLedOnHandler)(PAirpcapHandle AdapterHandle, guint LedNumber);
59 typedef gboolean (*AirpcapTurnLedOffHandler)(PAirpcapHandle AdapterHandle, guint LedNumber);
60 typedef gboolean (*AirpcapSetDeviceChannelHandler)(PAirpcapHandle AdapterHandle, guint Channel);
61 typedef gboolean (*AirpcapGetDeviceChannelHandler)(PAirpcapHandle AdapterHandle, guint * PChannel);
62 typedef gboolean (*AirpcapSetFcsPresenceHandler)(PAirpcapHandle AdapterHandle, gboolean IsFcsPresent);
63 typedef gboolean (*AirpcapGetFcsPresenceHandler)(PAirpcapHandle AdapterHandle, gboolean * PIsFcsPresent);
64 typedef gboolean (*AirpcapSetFcsValidationHandler)(PAirpcapHandle AdapterHandle,
AirpcapValidationType ValidationType);
65 typedef gboolean (*AirpcapGetFcsValidationHandler)(PAirpcapHandle AdapterHandle, PAirpcapValidationType PValidationType);
66 typedef gboolean (*AirpcapSetDeviceKeysHandler)(PAirpcapHandle AdapterHandle,
PAirpcapKeysCollection KeysCollection);
67 typedef gboolean (*AirpcapGetDeviceKeysHandler)(PAirpcapHandle AdapterHandle,
PAirpcapKeysCollection KeysCollection, guint * PKeysCollectionSize);
68 typedef gboolean (*AirpcapSetDriverKeysHandler)(PAirpcapHandle AdapterHandle,
PAirpcapKeysCollection KeysCollection);
69 typedef gboolean (*AirpcapGetDriverKeysHandler)(PAirpcapHandle AdapterHandle,
PAirpcapKeysCollection KeysCollection, guint * PKeysCollectionSize);
70 typedef gboolean (*AirpcapSetDecryptionStateHandler)(PAirpcapHandle AdapterHandle,
AirpcapDecryptionState Enable);
71 typedef gboolean (*AirpcapGetDecryptionStateHandler)(PAirpcapHandle AdapterHandle, PAirpcapDecryptionState PEnable);
72 typedef gboolean (*AirpcapSetDriverDecryptionStateHandler)(PAirpcapHandle AdapterHandle,
AirpcapDecryptionState Enable);
73 typedef gboolean (*AirpcapGetDriverDecryptionStateHandler)(PAirpcapHandle AdapterHandle, PAirpcapDecryptionState PEnable);
74 typedef gboolean (*AirpcapStoreCurConfigAsAdapterDefaultHandler)(PAirpcapHandle AdapterHandle);
75 typedef void (*AirpcapGetVersionHandler)(guint * VersionMajor, guint * VersionMinor, guint * VersionRev, guint * VersionBuild);
76 typedef gboolean (*AirpcapSetDeviceChannelExHandler)(PAirpcapHandle AdapterHandle,
AirpcapChannelInfo ChannelInfo);
77 typedef gboolean (*AirpcapGetDeviceChannelExHandler)(PAirpcapHandle AdapterHandle,
PAirpcapChannelInfo PChannelInfo);
78 typedef gboolean (*AirpcapGetDeviceSupportedChannelsHandler)(PAirpcapHandle AdapterHandle,
AirpcapChannelInfo **ppChannelInfo, guint32 * pNumChannelInfo);
80 #define FLAG_CAN_BE_LOW 0x00000001 81 #define FLAG_CAN_BE_HIGH 0x00000002 82 #define FLAG_IS_BG_CHANNEL 0x00000004 83 #define FLAG_IS_A_CHANNEL 0x00000008 103 gboolean IsFcsPresent;
107 guint keysCollectionSize;
113 guint32 numSupportedChannels;
126 extern GList *g_airpcap_if_list;
146 airpcap_get_if_string_number_from_description(gchar* description);
152 free_airpcap_interface_list(GList *if_list);
164 airpcap_if_store_cur_config_as_adapter_default(PAirpcapHandle ah);
194 airpcap_if_get_fcs_validation(PAirpcapHandle ah, PAirpcapValidationType val);
207 airpcap_if_get_decryption_state(PAirpcapHandle ah, PAirpcapDecryptionState val);
219 airpcap_if_get_fcs_presence(PAirpcapHandle ah, gboolean * ch);
225 airpcap_if_set_fcs_presence(PAirpcapHandle ah, gboolean ch);
231 airpcap_if_get_link_type(PAirpcapHandle ah, PAirpcapLinkType lt);
243 airpcap_if_get_device_channel(PAirpcapHandle ah, guint * ch);
249 airpcap_if_get_device_supported_channels(PAirpcapHandle ah,
AirpcapChannelInfo **cInfo, guint32 * nInfo);
255 airpcap_if_get_device_supported_channels_array(PAirpcapHandle ah, guint32 * pNumSupportedChannels);
261 airpcap_if_set_device_channel(PAirpcapHandle ah, guint ch);
278 PAirpcapHandle airpcap_if_open(gchar * name, gchar * err);
283 void airpcap_if_close(PAirpcapHandle handle);
289 airpcap_get_dll_state(
void);
294 gboolean airpcap_if_turn_led_on(PAirpcapHandle AdapterHandle, guint LedNumber);
299 gboolean airpcap_if_turn_led_off(PAirpcapHandle AdapterHandle, guint LedNumber);
315 int load_airpcap(
void);
321 GList* get_airpcap_interface_list(
int *err,
char **err_str);
351 airpcap_if_get_device_keys(PAirpcapHandle AdapterHandle,
PAirpcapKeysCollection KeysCollection, guint * PKeysCollectionSize);
363 airpcap_if_get_driver_keys(PAirpcapHandle AdapterHandle,
PAirpcapKeysCollection KeysCollection, guint * PKeysCollectionSize);
369 airpcap_if_get_driver_decryption_state(PAirpcapHandle ah, PAirpcapDecryptionState PEnable);
398 get_compiled_airpcap_version(GString *str);
401 get_runtime_airpcap_version(GString *str);
Definition: airpcap_loader.h:119
Entry in the list returned by AirpcapGetDeviceList();.
Definition: airpcap.h:67
Capture statistics. Returned by AirpcapGetStats();.
Definition: airpcap.h:241
enum _AirpcapDecryptionState AirpcapDecryptionState
Type of decryption the adapter performs. An adapter can be instructed to turn decryption (based on th...
Storage for a MAC address.
Definition: airpcap.h:144
Definition: airpcap_loader.h:96
Channel information. Used by AirpcapSetDeviceChannelEx(), AirpcapGetDeviceChannelEx(), AirpcapGetDeviceSupportedChannels()
Definition: airpcap.h:258
This structure is used to store a collection of WEP keys. Note that the definition of the structure h...
Definition: airpcap.h:173
Definition: airpcap_loader.h:85
enum _AirpcapValidationType AirpcapValidationType
Type of frame validation the adapter performs. An adapter can be instructed to accept different kind ...
enum _AirpcapLinkType AirpcapLinkType
Link type. AirPcap supports two kind of 802.11 linktypes: plain 802.11 and radiotap.