airpcap.h File Reference


Data Structures

struct  _AirpcapDeviceDescription
 Entry in the list returned by AirpcapGetDeviceList();. More...
struct  _AirpcapKey
 WEP key container. More...
struct  _AirpcapMacAddress
 Storage for a MAC address. More...
struct  _AirpcapKeysCollection
 This structure is used to store a collection of WEP keys. Note that the definition of the structure doesn't contain any key, so be careful to allocate a buffer with the size of the key, like in the following example:. More...
struct  _AirpcapBpfHeader
 Packet header. More...
struct  _AirpcapStats
 Capture statistics. Returned by AirpcapGetStats();. More...

Defines

#define AIRPCAP_H__EAE405F5_0171_9592_B3C2_C19EC426AD34__INCLUDED_
#define AIRPCAP_DEVICE_NAME_PREFIX   "\\\\.\\airpcap"
 This string is the fixed prefix in the airpcap adapter name. It can be used to parse the name field in an AirpcapDeviceDescription structure.
#define AIRPCAP_DEVICE_NUMBER_EXTRACT_STRING   "\\\\.\\airpcap%u"
 This string is the scanf modifier to extract the adapter number from an adapter name. It can be used to parse the name field in an AirpcapDeviceDescription structure with scanf.
#define WEP_KEY_MAX_SIZE   32
 AirpcapWepKeysCollection structure.
#define AIRPCAP_KEYTYPE_WEP   0
 Key type: WEP. The key can have an arbitrary length smaller than 32 bytes.
#define AIRPCAP_KEYTYPE_TKIP   1
 Key type: TKIP (WPA). NOT SUPPORTED YET.
#define AIRPCAP_KEYTYPE_CCMP   2
 Key type: CCMP (WPA2). NOT SUPPORTED YET.
#define AIRPCAP_ALIGNMENT   sizeof(int)
 Helper macros to extract packets coming from the driver. Rounds up to the next even multiple of AIRPCAP_ALIGNMENT.
#define AIRPCAP_WORDALIGN(x)   (((x)+(AIRPCAP_ALIGNMENT-1))&~(AIRPCAP_ALIGNMENT-1))
#define AIRPCAP_ERRBUF_SIZE   512
 Size of the error buffer, in bytes.
#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_

Typedefs

typedef _AirpcapDeviceDescription AirpcapDeviceDescription
 Entry in the list returned by AirpcapGetDeviceList();.
typedef _AirpcapDeviceDescriptionPAirpcapDeviceDescription
 Entry in the list returned by AirpcapGetDeviceList();.
typedef _AirpcapKey AirpcapKey
 WEP key container.
typedef _AirpcapKeyPAirpcapKey
 WEP key container.
typedef enum _AirpcapValidationType AirpcapValidationType
 Type of frame validation the adapter performs. An adapter can be instructed to accept different kind of frames: correct frames only, frames with wrong Frame Check Sequence (FCS) only, all frames.
typedef enum _AirpcapValidationTypePAirpcapValidationType
 Type of frame validation the adapter performs. An adapter can be instructed to accept different kind of frames: correct frames only, frames with wrong Frame Check Sequence (FCS) only, all frames.
typedef enum _AirpcapDecryptionState AirpcapDecryptionState
 Type of decryption the adapter performs. An adapter can be instructed to turn decryption (based on the device-configured keys configured with AirpcapSetDeviceKeys()) on or off.
typedef enum _AirpcapDecryptionStatePAirpcapDecryptionState
 Type of decryption the adapter performs. An adapter can be instructed to turn decryption (based on the device-configured keys configured with AirpcapSetDeviceKeys()) on or off.
typedef _AirpcapMacAddress AirpcapMacAddress
 Storage for a MAC address.
typedef _AirpcapMacAddressPAirpcapMacAddress
 Storage for a MAC address.
typedef _AirpcapKeysCollection AirpcapKeysCollection
 This structure is used to store a collection of WEP keys. Note that the definition of the structure doesn't contain any key, so be careful to allocate a buffer with the size of the key, like in the following example:.
typedef _AirpcapKeysCollectionPAirpcapKeysCollection
 This structure is used to store a collection of WEP keys. Note that the definition of the structure doesn't contain any key, so be careful to allocate a buffer with the size of the key, like in the following example:.
typedef _AirpcapBpfHeader AirpcapBpfHeader
 Packet header.
typedef _AirpcapBpfHeaderPAirpcapBpfHeader
 Packet header.
typedef enum _AirpcapLinkType AirpcapLinkType
 Link type. AirPcap supports two kind of 802.11 linktypes: plain 802.11 and radiotap.
typedef enum _AirpcapLinkTypePAirpcapLinkType
 Link type. AirPcap supports two kind of 802.11 linktypes: plain 802.11 and radiotap.
typedef _AirpcapHandle AirpcapHandle * PAirpcapHandle
 Adapter handle.
typedef _AirpcapStats AirpcapStats
 Capture statistics. Returned by AirpcapGetStats();.
typedef _AirpcapStatsPAirpcapStats
 Capture statistics. Returned by AirpcapGetStats();.

Enumerations

enum  _AirpcapValidationType { AIRPCAP_VT_ACCEPT_EVERYTHING = 1, AIRPCAP_VT_ACCEPT_CORRECT_FRAMES = 2, AIRPCAP_VT_ACCEPT_CORRUPT_FRAMES = 3, AIRPCAP_VT_UNKNOWN = 4 }
 Type of frame validation the adapter performs. An adapter can be instructed to accept different kind of frames: correct frames only, frames with wrong Frame Check Sequence (FCS) only, all frames. More...
enum  _AirpcapDecryptionState { AIRPCAP_DECRYPTION_ON = 1, AIRPCAP_DECRYPTION_OFF = 2 }
 Type of decryption the adapter performs. An adapter can be instructed to turn decryption (based on the device-configured keys configured with AirpcapSetDeviceKeys()) on or off. More...
enum  _AirpcapLinkType { AIRPCAP_LT_802_11 = 1, AIRPCAP_LT_802_11_PLUS_RADIO = 2, AIRPCAP_LT_UNKNOWN = 3 }
 Link type. AirPcap supports two kind of 802.11 linktypes: plain 802.11 and radiotap. More...

Functions

void AirpcapGetVersion (PUINT VersionMajor, PUINT VersionMinor, PUINT VersionRev, PUINT VersionBuild)
 Return a string with the API version.
PCHAR AirpcapGetLastError (PAirpcapHandle AdapterHandle)
 Return the last error related to the specified handle.
BOOL AirpcapGetDeviceList (PAirpcapDeviceDescription *PPAllDevs, PCHAR Ebuf)
 Return the list of available devices.
VOID AirpcapFreeDeviceList (PAirpcapDeviceDescription PAllDevs)
 Free a list of devices returned by AirpcapGetDeviceList().
PAirpcapHandle AirpcapOpen (PCHAR DeviceName, PCHAR Ebuf)
 Open an adapter.
VOID AirpcapClose (PAirpcapHandle AdapterHandle)
 Close an adapter.
BOOL AirpcapSetLinkType (PAirpcapHandle AdapterHandle, AirpcapLinkType NewLinkType)
 Set the link type of an adapter.
BOOL AirpcapGetLinkType (PAirpcapHandle AdapterHandle, PAirpcapLinkType PLinkType)
 Get the link type of the specified adapter.
BOOL AirpcapSetFcsPresence (PAirpcapHandle AdapterHandle, BOOL IsFcsPresent)
 Configures the adapter on whether to include the MAC Frame Check Sequence in the captured packets.
BOOL AirpcapGetFcsPresence (PAirpcapHandle AdapterHandle, PBOOL PIsFcsPresent)
 Returns TRUE if the specified adapter includes the MAC Frame Check Sequence in the captured packets.
BOOL AirpcapSetFcsValidation (PAirpcapHandle AdapterHandle, AirpcapValidationType ValidationType)
 Configures the adapter to accept or drop frames with an incorrect Frame Check sequence (FCS).
BOOL AirpcapGetFcsValidation (PAirpcapHandle AdapterHandle, PAirpcapValidationType ValidationType)
 Checks if the specified adapter is configured to capture frames with incorrect an incorrect Frame Check Sequence (FCS).
BOOL AirpcapSetDeviceKeys (PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection)
 Set the list of decryption keys that the driver is going to use with the specified device.
BOOL AirpcapGetDeviceKeys (PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection, PUINT PKeysCollectionSize)
 Returns the list of decryption keys in the driver that are currently associated with the specified device.
BOOL AirpcapSetDecryptionState (PAirpcapHandle AdapterHandle, AirpcapDecryptionState Enable)
 Turns on or off the decryption of the incoming frames.
BOOL AirpcapGetDecryptionState (PAirpcapHandle AdapterHandle, PAirpcapDecryptionState PEnable)
 Tells if this open instance is configured to perform the decryption of the incoming frames.
BOOL AirpcapSetDeviceChannel (PAirpcapHandle AdapterHandle, UINT Channel)
 Set the radio channel of a device.
BOOL AirpcapGetDeviceChannel (PAirpcapHandle AdapterHandle, PUINT PChannel)
 Get the radio channel of a device.
BOOL AirpcapSetKernelBuffer (PAirpcapHandle AdapterHandle, UINT BufferSize)
 Set the size of the kernel packet buffer for this adapter.
BOOL AirpcapGetKernelBufferSize (PAirpcapHandle AdapterHandle, PUINT PSizeBytes)
 Get the size of the kernel packet buffer for this adapter.
BOOL AirpcapStoreCurConfigAsAdapterDefault (PAirpcapHandle AdapterHandle)
 Saves the configuration of the specified adapter in the registry, so that it becomes the default for this adapter.
BOOL AirpcapSetFilter (PAirpcapHandle AdapterHandle, PVOID Instructions, UINT Len)
 Set the BPF kernel filter for an adapter.
BOOL AirpcapGetMacAddress (PAirpcapHandle AdapterHandle, PAirpcapMacAddress PMacAddress)
 Return the MAC address of an adapter.
BOOL AirpcapSetMinToCopy (PAirpcapHandle AdapterHandle, UINT MinToCopy)
 Set the mintocopy parameter for an open adapter.
BOOL AirpcapGetReadEvent (PAirpcapHandle AdapterHandle, HANDLE *PReadEvent)
 Gets an event that is signaled when that is signalled when packets are available in the kernel buffer (see AirpcapSetMinToCopy()).
BOOL AirpcapRead (PAirpcapHandle AdapterHandle, PBYTE Buffer, UINT BufSize, PUINT PReceievedBytes)
 Fills a user-provided buffer with zero or more packets that have been captured on the referenced adapter.
BOOL AirpcapGetStats (PAirpcapHandle AdapterHandle, PAirpcapStats PStats)
 Get per-adapter WinPcap-compatible capture statistics.
BOOL AirpcapGetLedsNumber (PAirpcapHandle AdapterHandle, PUINT NumberOfLeds)
 Get the number of LEDs the referenced adapter has available.
BOOL AirpcapTurnLedOn (PAirpcapHandle AdapterHandle, UINT LedNumber)
 Turn on one of the adapter's LEDs.
BOOL AirpcapTurnLedOff (PAirpcapHandle AdapterHandle, UINT LedNumber)
 Turn off one of the adapter's LEDs.

Define Documentation

#define AIRPCAP_H__EAE405F5_0171_9592_B3C2_C19EC426AD34__INCLUDED_
 


AirPcap documentation. Copyright (c) 2006 CACE Technologies. All rights reserved.