AirPcap definitions and data structures


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_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...

Define Documentation

#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.

Maximum size of a WEP key, in bytes. This is the size of an entry in the

#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)+(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_
 


Typedef Documentation

typedef struct _AirpcapDeviceDescription AirpcapDeviceDescription
 

Entry in the list returned by AirpcapGetDeviceList();.

typedef struct _AirpcapDeviceDescription * PAirpcapDeviceDescription
 

Entry in the list returned by AirpcapGetDeviceList();.

typedef struct _AirpcapKey AirpcapKey
 

WEP key container.

typedef struct _AirpcapKey * PAirpcapKey
 

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 _AirpcapValidationType * PAirpcapValidationType
 

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 _AirpcapDecryptionState * PAirpcapDecryptionState
 

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 struct _AirpcapMacAddress AirpcapMacAddress
 

Storage for a MAC address.

typedef struct _AirpcapMacAddress * PAirpcapMacAddress
 

Storage for a MAC address.

typedef struct _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:.

    PAirpcapKeysCollection KeysCollection;
    UINT KeysCollectionSize;
    
    KeysCollectionSize = sizeof(AirpcapKeysCollection) + NumKeys * sizeof(AirpcapKey);
    
    KeysCollection = (PAirpcapKeysCollection)malloc(KeysCollectionSize);
    if(!KeysCollection)
    {
        // Error
    }

typedef struct _AirpcapKeysCollection * PAirpcapKeysCollection
 

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:.

    PAirpcapKeysCollection KeysCollection;
    UINT KeysCollectionSize;
    
    KeysCollectionSize = sizeof(AirpcapKeysCollection) + NumKeys * sizeof(AirpcapKey);
    
    KeysCollection = (PAirpcapKeysCollection)malloc(KeysCollectionSize);
    if(!KeysCollection)
    {
        // Error
    }

typedef struct _AirpcapBpfHeader AirpcapBpfHeader
 

Packet header.

This structure defines the BPF that preceeds every packet delivered to the application.

typedef struct _AirpcapBpfHeader * PAirpcapBpfHeader
 

Packet header.

This structure defines the BPF that preceeds every packet delivered to the application.

typedef enum _AirpcapLinkType AirpcapLinkType
 

Link type. AirPcap supports two kind of 802.11 linktypes: plain 802.11 and radiotap.

typedef enum _AirpcapLinkType * PAirpcapLinkType
 

Link type. AirPcap supports two kind of 802.11 linktypes: plain 802.11 and radiotap.

typedef struct _AirpcapHandle AirpcapHandle* PAirpcapHandle
 

Adapter handle.

typedef struct _AirpcapStats AirpcapStats
 

Capture statistics. Returned by AirpcapGetStats();.

typedef struct _AirpcapStats * PAirpcapStats
 

Capture statistics. Returned by AirpcapGetStats();.


Enumeration Type Documentation

enum _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.

Enumeration values:
AIRPCAP_VT_ACCEPT_EVERYTHING  Accept all the frames the device captures.
AIRPCAP_VT_ACCEPT_CORRECT_FRAMES  Accept correct frames only, i.e. frames with correct Frame Check Sequence (FCS).
AIRPCAP_VT_ACCEPT_CORRUPT_FRAMES  Accept corrupt frames only, i.e. frames with worng Frame Check Sequence (FCS).
AIRPCAP_VT_UNKNOWN  Unknown validation type. You should see it only in case of error.

enum _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.

Enumeration values:
AIRPCAP_DECRYPTION_ON  This adapter performs decryption.
AIRPCAP_DECRYPTION_OFF  This adapter does not perform decryption.

enum _AirpcapLinkType
 

Link type. AirPcap supports two kind of 802.11 linktypes: plain 802.11 and radiotap.

Enumeration values:
AIRPCAP_LT_802_11  plain 802.11 linktype. Every packet in the buffer contains the raw 802.11 frame, including MAC FCS.
AIRPCAP_LT_802_11_PLUS_RADIO  802.11 plus radiotap linktype. Every packet in the buffer contains a radiotap header followed by the 802.11 frame. MAC FCS is included.
AIRPCAP_LT_UNKNOWN  Unknown linktype. You should see it only in case of error.


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