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. |
|
Return a string with the API version.
|
|
Return the last error related to the specified handle.
|
|
Return the list of available devices.
CHAR Ebuf[AIRPCAP_ERRBUF_SIZE]; AirpcapDeviceDescription *Desc, *tDesc; if(AirpcapGetDeviceList(&Desc, Ebuf) == -1) { printf("Unable to get the list of devices: %s\n", Ebuf); return -1; } for(tDesc = Desc; tDesc; tDesc = tDesc->next) { printf("%u) %s (%s)\n", ++i, tDesc->Name, tDesc->Description); } |
|
Free a list of devices returned by AirpcapGetDeviceList().
|
|
Open an adapter.
|
|
Close an adapter.
|
|
Set the link type of an adapter.
|
|
Get the link type of the specified adapter.
|
|
Configures the adapter on whether to include the MAC Frame Check Sequence in the captured packets.
|
|
Returns TRUE if the specified adapter includes the MAC Frame Check Sequence in the captured packets.
|
|
Configures the adapter to accept or drop frames with an incorrect Frame Check sequence (FCS).
|
|
Checks if the specified adapter is configured to capture frames with incorrect an incorrect Frame Check Sequence (FCS).
|
|
Set the list of decryption keys that the driver is going to use with the specified device.
At this time, the only supported decryption method is WEP. The configured decryption keys are device-specific: they will not be used by other airpcap devices besides the specified one. The keys are applied to the packets in the same order they appear in the KeysCollection structure until the packet is correctly decrypted, therefore putting frequently used keys at the beginning of the structure improves performance.
|
|
Returns the list of decryption keys in the driver that are currently associated with the specified device.
The configured decryption keys are device-specific, therefore AirpcapGetDeviceKeys() will return a different set of keys when called on different devices. At this time, the only supported decryption method is WEP.
|
|
Turns on or off the decryption of the incoming frames.
|
|
Tells if this open instance is configured to perform the decryption of the incoming frames.
|
|
Set the radio channel of a device.
|
|
Get the radio channel of a device.
|
|
Set the size of the kernel packet buffer for this adapter.
|
|
Get the size of the kernel packet buffer for this adapter.
|
|
Saves the configuration of the specified adapter in the registry, so that it becomes the default for this adapter.
Exceptions to this rule are the AirpcapSetDeviceChannel() and AirpcapSetDeviceKeys() functions: a channel change is reflected on all the open instances, and remembered until the next call to AirpcapSetDeviceChannel(), until the adapter is unplugged, or until the machine is powered off. Same thing for the configuration of the WEP keys. AirpcapStoreCurConfigAsAdapterDefault() stores the configuration of the give open instance as the default for the adapter: all the instances opened in the future will have the same configuration that this adapter currently has. The configuration is stored in the registry, therefore it is remembered even when the adapter is unplugged or the machine is turned off. However, an adapter doesn't bring its configuration with it from machine to machine. the configuration information saved in the registry includes the following parameters:
The configuration is adapter-specific. This means that changing the configuration of an adapter doesn't modify the one of the other adapters that are currently used or that will be used in the future.
|
|
Set the BPF kernel filter for an adapter.
A filter can be automatically created by using the pcap_compile() function of the WinPcap API. This function converts a human readable text expression with the tcpdump/libpcap syntax into a BPF program. If your program doesn't link wpcap, but you need to generate the code for a particular filter, you can run WinDump with the -d or -dd or -ddd flags to obtain the pseudocode. |
|
Return the MAC address of an adapter.
|
|
Set the mintocopy parameter for an open adapter.
|
|
Gets an event that is signaled when that is signalled when packets are available in the kernel buffer (see AirpcapSetMinToCopy()).
|
|
Fills a user-provided buffer with zero or more packets that have been captured on the referenced adapter.
|
|
Get per-adapter WinPcap-compatible capture statistics.
|
|
Get the number of LEDs the referenced adapter has available.
|
|
Turn on one of the adapter's LEDs.
|
|
Turn off one of the adapter's LEDs.
|
AirPcap documentation. Copyright (c) 2006
CACE Technologies. All rights reserved.