forked from osmocom/wireshark
Replace all Windows types by glib types - hopefully the
correct ones. Use buildbot as a compile test on Windows. This makes "configure --enable-airpcap && make" succeed on Linux. It crashes the moment you click the wireless settings button because some relevant information isn't present (nullpointer deref). svn path=/trunk/; revision=28340
This commit is contained in:
parent
797bd60ef7
commit
e699ac6498
126
airpcap.h
126
airpcap.h
|
@ -83,8 +83,8 @@ extern "C" {
|
|||
typedef struct _AirpcapDeviceDescription
|
||||
{
|
||||
struct _AirpcapDeviceDescription *next; ///< Next element in the list
|
||||
PCHAR Name; ///< Device name
|
||||
PCHAR Description; ///< Device description
|
||||
gchar * Name; ///< Device name
|
||||
gchar * Description; ///< Device description
|
||||
} AirpcapDeviceDescription, *PAirpcapDeviceDescription;
|
||||
|
||||
#define MAX_ENCRYPTION_KEYS 64
|
||||
|
@ -107,9 +107,9 @@ typedef struct _AirpcapDeviceDescription
|
|||
*/
|
||||
typedef struct _AirpcapKey
|
||||
{
|
||||
UINT KeyType; ///< Type of key, can be on of: \ref AIRPCAP_KEYTYPE_WEP, \ref AIRPCAP_KEYTYPE_TKIP, \ref AIRPCAP_KEYTYPE_CCMP. Only AIRPCAP_KEYTYPE_WEP is supported by the driver at the moment.
|
||||
UINT KeyLen; ///< Length of the key, in bytes
|
||||
BYTE KeyData[WEP_KEY_MAX_SIZE]; ///< Key Data
|
||||
guint KeyType; ///< Type of key, can be on of: \ref AIRPCAP_KEYTYPE_WEP, \ref AIRPCAP_KEYTYPE_TKIP, \ref AIRPCAP_KEYTYPE_CCMP. Only AIRPCAP_KEYTYPE_WEP is supported by the driver at the moment.
|
||||
guint KeyLen; ///< Length of the key, in bytes
|
||||
guint8 KeyData[WEP_KEY_MAX_SIZE]; ///< Key Data
|
||||
}
|
||||
#ifdef __MINGW32__
|
||||
__attribute__((__packed__))
|
||||
|
@ -158,7 +158,7 @@ typedef enum _AirpcapDecryptionState
|
|||
*/
|
||||
typedef struct _AirpcapMacAddress
|
||||
{
|
||||
BYTE Address[6]; ///< MAC address bytes
|
||||
guint8 Address[6]; ///< MAC address bytes
|
||||
}
|
||||
#ifdef __MINGW32__
|
||||
__attribute__((__packed__))
|
||||
|
@ -172,7 +172,7 @@ AirpcapMacAddress, *PAirpcapMacAddress;
|
|||
|
||||
\code
|
||||
PAirpcapKeysCollection KeysCollection;
|
||||
UINT KeysCollectionSize;
|
||||
guint KeysCollectionSize;
|
||||
|
||||
KeysCollectionSize = sizeof(AirpcapKeysCollection) + NumKeys * sizeof(AirpcapKey);
|
||||
|
||||
|
@ -185,7 +185,7 @@ AirpcapMacAddress, *PAirpcapMacAddress;
|
|||
*/
|
||||
typedef struct _AirpcapKeysCollection
|
||||
{
|
||||
UINT nKeys; ///< Number of keys in the collection
|
||||
guint nKeys; ///< Number of keys in the collection
|
||||
AirpcapKey Keys[0]; ///< Array of nKeys keys.
|
||||
} AirpcapKeysCollection, *PAirpcapKeysCollection;
|
||||
|
||||
|
@ -196,11 +196,11 @@ typedef struct _AirpcapKeysCollection
|
|||
*/
|
||||
typedef struct _AirpcapBpfHeader
|
||||
{
|
||||
UINT TsSec; ///< Timestamp associated with the captured packet. SECONDS.
|
||||
UINT TsUsec; ///< Timestamp associated with the captured packet. MICROSECONDS.
|
||||
UINT Caplen; ///< Length of captured portion. The captured portion <b>can be different</b> from the original packet, because it is possible (with a proper filter) to instruct the driver to capture only a portion of the packets.
|
||||
UINT Originallen; ///< Original length of packet
|
||||
USHORT Hdrlen; ///< Length of bpf header (this struct plus alignment padding). In some cases, a padding could be added between the end of this structure and the packet data for performance reasons. This field can be used to retrieve the actual data of the packet.
|
||||
guint TsSec; ///< Timestamp associated with the captured packet. SECONDS.
|
||||
guint TsUsec; ///< Timestamp associated with the captured packet. MICROSECONDS.
|
||||
guint Caplen; ///< Length of captured portion. The captured portion <b>can be different</b> from the original packet, because it is possible (with a proper filter) to instruct the driver to capture only a portion of the packets.
|
||||
guint Originallen; ///< Original length of packet
|
||||
guint16 Hdrlen; ///< Length of bpf header (this struct plus alignment padding). In some cases, a padding could be added between the end of this structure and the packet data for performance reasons. This field can be used to retrieve the actual data of the packet.
|
||||
}
|
||||
#ifdef __MINGW32__
|
||||
__attribute__((__packed__))
|
||||
|
@ -246,14 +246,14 @@ typedef struct _AirpcapHandle AirpcapHandle, *PAirpcapHandle;
|
|||
*/
|
||||
typedef struct _AirpcapStats
|
||||
{
|
||||
UINT Recvs; ///< Number of packets that the driver received by the adapter
|
||||
guint Recvs; ///< Number of packets that the driver received by the adapter
|
||||
///< from the beginning of the current capture. This value includes the packets
|
||||
///< dropped because of buffer full.
|
||||
UINT Drops; ///< number of packets that the driver dropped from the beginning of a capture.
|
||||
guint Drops; ///< number of packets that the driver dropped from the beginning of a capture.
|
||||
///< A packet is lost when the the buffer of the driver is full.
|
||||
UINT IfDrops; ///< Packets dropped by the card before going to the USB bus.
|
||||
guint IfDrops; ///< Packets dropped by the card before going to the USB bus.
|
||||
///< Not supported at the moment.
|
||||
UINT Capt; ///< number of packets that pass the BPF filter, find place in the kernel buffer and
|
||||
guint Capt; ///< number of packets that pass the BPF filter, find place in the kernel buffer and
|
||||
///< therefore reach the application.
|
||||
}AirpcapStats, *PAirpcapStats;
|
||||
|
||||
|
@ -263,7 +263,7 @@ typedef struct _AirpcapStats
|
|||
*/
|
||||
typedef struct _AirpcapChannelInfo
|
||||
{
|
||||
UINT Frequency; ///< Channel frequency, in MHz.
|
||||
guint Frequency; ///< Channel frequency, in MHz.
|
||||
/*!
|
||||
\brief 802.11n specific. Offset of the extension channel in case of 40MHz channels.
|
||||
|
||||
|
@ -274,8 +274,8 @@ typedef struct _AirpcapChannelInfo
|
|||
|
||||
In case of 802.11a/b/g channels (802.11n legacy mode), this field should be set to 0.
|
||||
*/
|
||||
CHAR ExtChannel;
|
||||
UCHAR Reserved[3]; ///< Reserved. It should be set to {0,0,0}.
|
||||
gchar ExtChannel;
|
||||
guint8 Reserved[3]; ///< Reserved. It should be set to {0,0,0}.
|
||||
}
|
||||
AirpcapChannelInfo, *PAirpcapChannelInfo;
|
||||
|
||||
|
@ -293,14 +293,14 @@ typedef struct _AirpcapChannelInfo
|
|||
\param VersionRev Pointer to a variable that will be filled with the revision number.
|
||||
\param VersionBuild Pointer to a variable that will be filled with the build number.
|
||||
*/
|
||||
void AirpcapGetVersion(PUINT VersionMajor, PUINT VersionMinor, PUINT VersionRev, PUINT VersionBuild);
|
||||
void AirpcapGetVersion(guint * VersionMajor, guint * VersionMinor, guint * VersionRev, guint * VersionBuild);
|
||||
|
||||
/*!
|
||||
\brief Return the last error related to the specified handle
|
||||
\param AdapterHandle Handle to an open adapter.
|
||||
\return The string with the last error.
|
||||
*/
|
||||
PCHAR AirpcapGetLastError(PAirpcapHandle AdapterHandle);
|
||||
gchar * AirpcapGetLastError(PAirpcapHandle AdapterHandle);
|
||||
|
||||
/*!
|
||||
\brief Return the list of available devices
|
||||
|
@ -311,7 +311,7 @@ PCHAR AirpcapGetLastError(PAirpcapHandle AdapterHandle);
|
|||
Here's a snippet of code that shows how to use AirpcapGetDeviceList():
|
||||
|
||||
\code
|
||||
CHAR Ebuf[AIRPCAP_ERRBUF_SIZE];
|
||||
gchar Ebuf[AIRPCAP_ERRBUF_SIZE];
|
||||
AirpcapDeviceDescription *Desc, *tDesc;
|
||||
|
||||
if(AirpcapGetDeviceList(&Desc, Ebuf) == -1)
|
||||
|
@ -331,13 +331,13 @@ PCHAR AirpcapGetLastError(PAirpcapHandle AdapterHandle);
|
|||
AirpcapFreeDeviceList(Desc);
|
||||
\endcode
|
||||
*/
|
||||
BOOL AirpcapGetDeviceList(PAirpcapDeviceDescription *PPAllDevs, PCHAR Ebuf);
|
||||
gboolean AirpcapGetDeviceList(PAirpcapDeviceDescription *PPAllDevs, gchar * Ebuf);
|
||||
|
||||
/*!
|
||||
\brief Free a list of devices returned by AirpcapGetDeviceList()
|
||||
\param PAllDevs Head of the list of devices returned by \ref AirpcapGetDeviceList().
|
||||
*/
|
||||
VOID AirpcapFreeDeviceList(PAirpcapDeviceDescription PAllDevs);
|
||||
void AirpcapFreeDeviceList(PAirpcapDeviceDescription PAllDevs);
|
||||
|
||||
/*!
|
||||
\brief Open an adapter
|
||||
|
@ -345,13 +345,13 @@ VOID AirpcapFreeDeviceList(PAirpcapDeviceDescription PAllDevs);
|
|||
\param Ebuf String that will contain error information in case of failure. The size of the string must be AIRPCAP_ERRBUF_SIZE bytes.
|
||||
\return A PAirpcapHandle handle on success. NULL is returned on failure, in which case Ebuf is filled in with an appropriate error message.
|
||||
*/
|
||||
PAirpcapHandle AirpcapOpen(PCHAR DeviceName, PCHAR Ebuf);
|
||||
PAirpcapHandle AirpcapOpen(gchar * DeviceName, gchar * Ebuf);
|
||||
|
||||
/*!
|
||||
\brief Close an adapter
|
||||
\param AdapterHandle Handle to the adapter to close.
|
||||
*/
|
||||
VOID AirpcapClose(PAirpcapHandle AdapterHandle);
|
||||
void AirpcapClose(PAirpcapHandle AdapterHandle);
|
||||
|
||||
/*!
|
||||
\brief Sets the monitor mode for the specified adapter
|
||||
|
@ -383,7 +383,7 @@ VOID AirpcapClose(PAirpcapHandle AdapterHandle);
|
|||
configuration is not stored persistently, so if you want to turn monitor mode off, you will need to do it
|
||||
every time you open the adapter.
|
||||
*/
|
||||
BOOL AirpcapSetMonitorMode(PAirpcapHandle AdapterHandle, BOOL MonitorModeEnabled);
|
||||
gboolean AirpcapSetMonitorMode(PAirpcapHandle AdapterHandle, gboolean MonitorModeEnabled);
|
||||
|
||||
/*!
|
||||
\brief Returns TRUE if the specified adapter is in monitor mode.
|
||||
|
@ -395,7 +395,7 @@ BOOL AirpcapSetMonitorMode(PAirpcapHandle AdapterHandle, BOOL MonitorModeEnabled
|
|||
configuration is not stored persistently, so if you want to turn monitor mode off, you will need to do it
|
||||
every time you open the adapter.
|
||||
*/
|
||||
BOOL AirpcapGetMonitorMode(PAirpcapHandle AdapterHandle, PBOOL PMonitorModeEnabled);
|
||||
gboolean AirpcapGetMonitorMode(PAirpcapHandle AdapterHandle, gboolean * PMonitorModeEnabled);
|
||||
|
||||
/*!
|
||||
\brief Set the link type of an adapter
|
||||
|
@ -416,7 +416,7 @@ BOOL AirpcapGetMonitorMode(PAirpcapHandle AdapterHandle, PBOOL PMonitorModeEnabl
|
|||
header that contains per-packet meta information like channel and power information. More details on the PPI header can
|
||||
be founf in the PPI online documentation (TODO).
|
||||
*/
|
||||
BOOL AirpcapSetLinkType(PAirpcapHandle AdapterHandle, AirpcapLinkType NewLinkType);
|
||||
gboolean AirpcapSetLinkType(PAirpcapHandle AdapterHandle, AirpcapLinkType NewLinkType);
|
||||
|
||||
/*!
|
||||
\brief Get the link type of the specified adapter
|
||||
|
@ -434,7 +434,7 @@ BOOL AirpcapSetLinkType(PAirpcapHandle AdapterHandle, AirpcapLinkType NewLinkTyp
|
|||
\ref radiotap section. Moreover, the "Capture_radio" example application in
|
||||
the developer's pack can be used as a reference on how to decode 802.11 frames with radiotap headers.
|
||||
*/
|
||||
BOOL AirpcapGetLinkType(PAirpcapHandle AdapterHandle, PAirpcapLinkType PLinkType);
|
||||
gboolean AirpcapGetLinkType(PAirpcapHandle AdapterHandle, PAirpcapLinkType PLinkType);
|
||||
|
||||
/*!
|
||||
\brief Configures the adapter on whether to include the MAC Frame Check Sequence in the captured packets.
|
||||
|
@ -449,7 +449,7 @@ BOOL AirpcapGetLinkType(PAirpcapHandle AdapterHandle, PAirpcapLinkType PLinkType
|
|||
that precedes each frame has two additional fields at the end: Padding and FCS. These two fields are not present
|
||||
when FCS inclusion is off.
|
||||
*/
|
||||
BOOL AirpcapSetFcsPresence(PAirpcapHandle AdapterHandle, BOOL IsFcsPresent);
|
||||
gboolean AirpcapSetFcsPresence(PAirpcapHandle AdapterHandle, gboolean IsFcsPresent);
|
||||
|
||||
/*!
|
||||
\brief Returns TRUE if the specified adapter includes the MAC Frame Check Sequence in the captured packets
|
||||
|
@ -464,7 +464,7 @@ BOOL AirpcapSetFcsPresence(PAirpcapHandle AdapterHandle, BOOL IsFcsPresent);
|
|||
that precedes each frame has two additional fields at the end: Padding and FCS. These two fields are not present
|
||||
when FCS inclusion is off.
|
||||
*/
|
||||
BOOL AirpcapGetFcsPresence(PAirpcapHandle AdapterHandle, PBOOL PIsFcsPresent);
|
||||
gboolean AirpcapGetFcsPresence(PAirpcapHandle AdapterHandle, gboolean * PIsFcsPresent);
|
||||
|
||||
/*!
|
||||
\brief Configures the adapter to accept or drop frames with an incorrect Frame Check sequence (FCS).
|
||||
|
@ -474,7 +474,7 @@ BOOL AirpcapGetFcsPresence(PAirpcapHandle AdapterHandle, PBOOL PIsFcsPresent);
|
|||
|
||||
\note By default, the driver is configured in \ref AIRPCAP_VT_ACCEPT_EVERYTHING mode.
|
||||
*/
|
||||
BOOL AirpcapSetFcsValidation(PAirpcapHandle AdapterHandle, AirpcapValidationType ValidationType);
|
||||
gboolean AirpcapSetFcsValidation(PAirpcapHandle AdapterHandle, AirpcapValidationType ValidationType);
|
||||
|
||||
/*!
|
||||
\brief Checks if the specified adapter is configured to capture frames with incorrect an incorrect Frame Check Sequence (FCS).
|
||||
|
@ -484,7 +484,7 @@ BOOL AirpcapSetFcsValidation(PAirpcapHandle AdapterHandle, AirpcapValidationType
|
|||
|
||||
\note By default, the driver is configured in \ref AIRPCAP_VT_ACCEPT_EVERYTHING mode.
|
||||
*/
|
||||
BOOL AirpcapGetFcsValidation(PAirpcapHandle AdapterHandle, PAirpcapValidationType ValidationType);
|
||||
gboolean AirpcapGetFcsValidation(PAirpcapHandle AdapterHandle, PAirpcapValidationType ValidationType);
|
||||
|
||||
/*!
|
||||
\brief Set the list of decryption keys that the driver is going to use with the specified device.
|
||||
|
@ -507,7 +507,7 @@ BOOL AirpcapGetFcsValidation(PAirpcapHandle AdapterHandle, PAirpcapValidationTyp
|
|||
\note: when you change the set of keys from an open capture instance, the change will be
|
||||
immediately reflected on all the other capture instances.
|
||||
*/
|
||||
BOOL AirpcapSetDeviceKeys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection);
|
||||
gboolean AirpcapSetDeviceKeys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection);
|
||||
|
||||
/*!
|
||||
\brief Returns the list of decryption keys in the driver that are currently associated with the specified device
|
||||
|
@ -533,7 +533,7 @@ BOOL AirpcapSetDeviceKeys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection K
|
|||
|
||||
At this time, the only supported decryption method is WEP.
|
||||
*/
|
||||
BOOL AirpcapGetDeviceKeys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection, PUINT PKeysCollectionSize);
|
||||
gboolean AirpcapGetDeviceKeys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection, guint * PKeysCollectionSize);
|
||||
|
||||
/*!
|
||||
\brief Set the global list of decryption keys that the driver is going to use with all the devices.
|
||||
|
@ -556,7 +556,7 @@ BOOL AirpcapGetDeviceKeys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection K
|
|||
\note: when you change the set of keys from an open capture instance, the change will be
|
||||
immediately reflected on all the other capture instances.
|
||||
*/
|
||||
BOOL AirpcapSetDriverKeys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection);
|
||||
gboolean AirpcapSetDriverKeys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection);
|
||||
|
||||
/*!
|
||||
\brief Returns the global list of decryption keys in the driver that are associated with all the devices.
|
||||
|
@ -578,7 +578,7 @@ BOOL AirpcapSetDriverKeys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection K
|
|||
|
||||
At this time, the only supported decryption method is WEP.
|
||||
*/
|
||||
BOOL AirpcapGetDriverKeys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection, PUINT PKeysCollectionSize);
|
||||
gboolean AirpcapGetDriverKeys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection, guint * PKeysCollectionSize);
|
||||
|
||||
/*!
|
||||
\brief Turns on or off the decryption of the incoming frames with the <b>adapter-specific</b> keys.
|
||||
|
@ -589,7 +589,7 @@ BOOL AirpcapGetDriverKeys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection K
|
|||
The adapter-specific decryption keys can be configured with the \ref AirpcapSetDeviceKeys() function.
|
||||
\note By default, the driver is configured with \ref AIRPCAP_DECRYPTION_ON.
|
||||
*/
|
||||
BOOL AirpcapSetDecryptionState(PAirpcapHandle AdapterHandle, AirpcapDecryptionState Enable);
|
||||
gboolean AirpcapSetDecryptionState(PAirpcapHandle AdapterHandle, AirpcapDecryptionState Enable);
|
||||
|
||||
/*!
|
||||
\brief Tells if this open instance is configured to perform the decryption of the incoming frames with the <b>adapter-specific</b> keys.
|
||||
|
@ -600,7 +600,7 @@ BOOL AirpcapSetDecryptionState(PAirpcapHandle AdapterHandle, AirpcapDecryptionSt
|
|||
The adapter-specific decryption keys can be configured with the \ref AirpcapSetDeviceKeys() function.
|
||||
\note By default, the driver is configured with \ref AIRPCAP_DECRYPTION_ON.
|
||||
*/
|
||||
BOOL AirpcapGetDecryptionState(PAirpcapHandle AdapterHandle, PAirpcapDecryptionState PEnable);
|
||||
gboolean AirpcapGetDecryptionState(PAirpcapHandle AdapterHandle, PAirpcapDecryptionState PEnable);
|
||||
|
||||
/*!
|
||||
\brief Turns on or off the decryption of the incoming frames with the <b>global driver</b> set of keys.
|
||||
|
@ -611,7 +611,7 @@ BOOL AirpcapGetDecryptionState(PAirpcapHandle AdapterHandle, PAirpcapDecryptionS
|
|||
The global decryption keys can be configured with the \ref AirpcapSetDriverKeys() function.
|
||||
\note By default, the driver is configured with \ref AIRPCAP_DECRYPTION_ON.
|
||||
*/
|
||||
BOOL AirpcapSetDriverDecryptionState(PAirpcapHandle AdapterHandle, AirpcapDecryptionState Enable);
|
||||
gboolean AirpcapSetDriverDecryptionState(PAirpcapHandle AdapterHandle, AirpcapDecryptionState Enable);
|
||||
|
||||
/*!
|
||||
\brief Tells if this open instance is configured to perform the decryption of the incoming frames with the <b>global driver</b> set of keys.
|
||||
|
@ -622,7 +622,7 @@ BOOL AirpcapSetDriverDecryptionState(PAirpcapHandle AdapterHandle, AirpcapDecryp
|
|||
The global decryption keys can be configured with the \ref AirpcapSetDriverKeys() function.
|
||||
\note By default, the driver is configured with \ref AIRPCAP_DECRYPTION_ON.
|
||||
*/
|
||||
BOOL AirpcapGetDriverDecryptionState(PAirpcapHandle AdapterHandle, PAirpcapDecryptionState PEnable);
|
||||
gboolean AirpcapGetDriverDecryptionState(PAirpcapHandle AdapterHandle, PAirpcapDecryptionState PEnable);
|
||||
|
||||
/*!
|
||||
\brief Set the radio channel of a device
|
||||
|
@ -635,7 +635,7 @@ BOOL AirpcapGetDriverDecryptionState(PAirpcapHandle AdapterHandle, PAirpcapDecry
|
|||
\note this is a device-related function: when you change the channel from an open capture instance, the change will be
|
||||
immediately reflected on all the other capture instances.
|
||||
*/
|
||||
BOOL AirpcapSetDeviceChannel(PAirpcapHandle AdapterHandle, UINT Channel);
|
||||
gboolean AirpcapSetDeviceChannel(PAirpcapHandle AdapterHandle, guint Channel);
|
||||
|
||||
/*!
|
||||
\brief Get the radio channel of a device
|
||||
|
@ -648,7 +648,7 @@ BOOL AirpcapSetDeviceChannel(PAirpcapHandle AdapterHandle, UINT Channel);
|
|||
\note this is a device-related function: when you change the channel from an open capture instance, the change will be
|
||||
immediately reflected on all the other capture instances.
|
||||
*/
|
||||
BOOL AirpcapGetDeviceChannel(PAirpcapHandle AdapterHandle, PUINT PChannel);
|
||||
gboolean AirpcapGetDeviceChannel(PAirpcapHandle AdapterHandle, guint * PChannel);
|
||||
|
||||
/*!
|
||||
\brief Set the size of the kernel packet buffer for this adapter
|
||||
|
@ -664,7 +664,7 @@ BOOL AirpcapGetDeviceChannel(PAirpcapHandle AdapterHandle, PUINT PChannel);
|
|||
\note don't use this function unless you know what you are doing. Due to caching issues and bigger non-paged
|
||||
memory consumption, bigger buffer sizes can decrease the capture performace instead of improving it.
|
||||
*/
|
||||
BOOL AirpcapSetKernelBuffer(PAirpcapHandle AdapterHandle, UINT BufferSize);
|
||||
gboolean AirpcapSetKernelBuffer(PAirpcapHandle AdapterHandle, guint BufferSize);
|
||||
|
||||
/*!
|
||||
\brief Get the size of the kernel packet buffer for this adapter
|
||||
|
@ -675,7 +675,7 @@ BOOL AirpcapSetKernelBuffer(PAirpcapHandle AdapterHandle, UINT BufferSize);
|
|||
Every AirPcap open instance has an associated kernel buffer, whose default size is 1 Mbyte.
|
||||
This function can be used to get the size of this buffer.
|
||||
*/
|
||||
BOOL AirpcapGetKernelBufferSize(PAirpcapHandle AdapterHandle, PUINT PSizeBytes);
|
||||
gboolean AirpcapGetKernelBufferSize(PAirpcapHandle AdapterHandle, guint * PSizeBytes);
|
||||
|
||||
/*!
|
||||
\brief Saves the configuration of the specified adapter in the registry, so that it becomes the default for this adapter.
|
||||
|
@ -714,7 +714,7 @@ BOOL AirpcapGetKernelBufferSize(PAirpcapHandle AdapterHandle, PUINT PSizeBytes);
|
|||
AirpcapStoreCurConfigAsAdapterDefault() needs administrator privileges. It will fail if the calling user
|
||||
is not a local machine administrator.
|
||||
*/
|
||||
BOOL AirpcapStoreCurConfigAsAdapterDefault(PAirpcapHandle AdapterHandle);
|
||||
gboolean AirpcapStoreCurConfigAsAdapterDefault(PAirpcapHandle AdapterHandle);
|
||||
|
||||
/*!
|
||||
\brief Set the BPF kernel filter for an adapter
|
||||
|
@ -734,7 +734,7 @@ BOOL AirpcapStoreCurConfigAsAdapterDefault(PAirpcapHandle AdapterHandle);
|
|||
with the -d or -dd or -ddd flags to obtain the pseudocode.
|
||||
|
||||
*/
|
||||
BOOL AirpcapSetFilter(PAirpcapHandle AdapterHandle, PVOID Instructions, UINT Len);
|
||||
gboolean AirpcapSetFilter(PAirpcapHandle AdapterHandle, void * Instructions, guint Len);
|
||||
|
||||
/*!
|
||||
\brief Return the MAC address of an adapter.
|
||||
|
@ -743,7 +743,7 @@ BOOL AirpcapSetFilter(PAirpcapHandle AdapterHandle, PVOID Instructions, UINT Len
|
|||
The size of this buffer needs to be at least 6 bytes.
|
||||
\return TRUE on success.
|
||||
*/
|
||||
BOOL AirpcapGetMacAddress(PAirpcapHandle AdapterHandle, PAirpcapMacAddress PMacAddress);
|
||||
gboolean AirpcapGetMacAddress(PAirpcapHandle AdapterHandle, PAirpcapMacAddress PMacAddress);
|
||||
|
||||
/*!
|
||||
\brief Set the mintocopy parameter for an open adapter
|
||||
|
@ -758,7 +758,7 @@ BOOL AirpcapGetMacAddress(PAirpcapHandle AdapterHandle, PAirpcapMacAddress PMacA
|
|||
A low MinToCopy results in good responsiveness since the driver will signal the application close to the arrival time of
|
||||
the packet. This has higher CPU loading over the first approach.
|
||||
*/
|
||||
BOOL AirpcapSetMinToCopy(PAirpcapHandle AdapterHandle, UINT MinToCopy);
|
||||
gboolean AirpcapSetMinToCopy(PAirpcapHandle AdapterHandle, guint MinToCopy);
|
||||
|
||||
/*!
|
||||
\brief Gets an event that is signaled when that is signalled when packets are available in the kernel buffer (see \ref AirpcapSetMinToCopy()).
|
||||
|
@ -770,7 +770,7 @@ BOOL AirpcapSetMinToCopy(PAirpcapHandle AdapterHandle, UINT MinToCopy);
|
|||
This event can be used by WaitForSingleObject() and WaitForMultipleObjects() to create blocking behavior when reading
|
||||
packets from one or more adapters (see \ref AirpcapRead()).
|
||||
*/
|
||||
BOOL AirpcapGetReadEvent(PAirpcapHandle AdapterHandle, HANDLE* PReadEvent);
|
||||
gboolean AirpcapGetReadEvent(PAirpcapHandle AdapterHandle, void *** PReadEvent);
|
||||
|
||||
/*!
|
||||
\brief Fills a user-provided buffer with zero or more packets that have been captured on the referenced adapter.
|
||||
|
@ -789,7 +789,7 @@ BOOL AirpcapGetReadEvent(PAirpcapHandle AdapterHandle, HANDLE* PReadEvent);
|
|||
\note this function is NOT blocking. Blocking behavior can be obtained using the event returned
|
||||
by \ref AirpcapGetReadEvent(). See also \ref AirpcapSetMinToCopy().
|
||||
*/
|
||||
BOOL AirpcapRead(PAirpcapHandle AdapterHandle, PBYTE Buffer, UINT BufSize, PUINT PReceievedBytes);
|
||||
gboolean AirpcapRead(PAirpcapHandle AdapterHandle, guint8 * Buffer, guint BufSize, guint * PReceievedBytes);
|
||||
|
||||
/*!
|
||||
\brief Transmits a packet.
|
||||
|
@ -808,7 +808,7 @@ BOOL AirpcapRead(PAirpcapHandle AdapterHandle, PBYTE Buffer, UINT BufSize, PUINT
|
|||
header followed by the 802.11 packet. AirpcapWrite will use the rate information in the radiotap header when
|
||||
transmitting the packet.
|
||||
*/
|
||||
BOOL AirpcapWrite(PAirpcapHandle AdapterHandle, PCHAR TxPacket, ULONG PacketLen);
|
||||
gboolean AirpcapWrite(PAirpcapHandle AdapterHandle, gchar * TxPacket, guint32 PacketLen);
|
||||
|
||||
/*!
|
||||
\brief Get per-adapter WinPcap-compatible capture statistics.
|
||||
|
@ -816,7 +816,7 @@ BOOL AirpcapWrite(PAirpcapHandle AdapterHandle, PCHAR TxPacket, ULONG PacketLen)
|
|||
\param PStats pointer to a user-allocated AirpcapStats structure that will be filled with statistical information.
|
||||
\return TRUE on success.
|
||||
*/
|
||||
BOOL AirpcapGetStats(PAirpcapHandle AdapterHandle, PAirpcapStats PStats);
|
||||
gboolean AirpcapGetStats(PAirpcapHandle AdapterHandle, PAirpcapStats PStats);
|
||||
|
||||
/*!
|
||||
\brief Get the number of LEDs the referenced adapter has available.
|
||||
|
@ -824,7 +824,7 @@ BOOL AirpcapGetStats(PAirpcapHandle AdapterHandle, PAirpcapStats PStats);
|
|||
\param NumberOfLeds Number of LEDs available on this adapter.
|
||||
\return TRUE on success.
|
||||
*/
|
||||
BOOL AirpcapGetLedsNumber(PAirpcapHandle AdapterHandle, PUINT NumberOfLeds);
|
||||
gboolean AirpcapGetLedsNumber(PAirpcapHandle AdapterHandle, guint * NumberOfLeds);
|
||||
|
||||
/*!
|
||||
\brief Turn on one of the adapter's LEDs.
|
||||
|
@ -832,7 +832,7 @@ BOOL AirpcapGetLedsNumber(PAirpcapHandle AdapterHandle, PUINT NumberOfLeds);
|
|||
\param LedNumber zero-based identifier of the LED to turn on.
|
||||
\return TRUE on success.
|
||||
*/
|
||||
BOOL AirpcapTurnLedOn(PAirpcapHandle AdapterHandle, UINT LedNumber);
|
||||
gboolean AirpcapTurnLedOn(PAirpcapHandle AdapterHandle, guint LedNumber);
|
||||
|
||||
/*!
|
||||
\brief Turn off one of the adapter's LEDs.
|
||||
|
@ -840,7 +840,7 @@ BOOL AirpcapTurnLedOn(PAirpcapHandle AdapterHandle, UINT LedNumber);
|
|||
\param LedNumber zero-based identifier of the LED to turn off.
|
||||
\return TRUE on success.
|
||||
*/
|
||||
BOOL AirpcapTurnLedOff(PAirpcapHandle AdapterHandle, UINT LedNumber);
|
||||
gboolean AirpcapTurnLedOff(PAirpcapHandle AdapterHandle, guint LedNumber);
|
||||
|
||||
/*!
|
||||
\brief Set the channel of a device through its radio frequency. In case of 802.11n enabled devices, it sets the extension channel, if used.
|
||||
|
@ -851,7 +851,7 @@ BOOL AirpcapTurnLedOff(PAirpcapHandle AdapterHandle, UINT LedNumber);
|
|||
\note this is a device-related function: when you change the channel from an open capture instance, the change will be
|
||||
immediately reflected on all the other capture instances.
|
||||
*/
|
||||
BOOL AirpcapSetDeviceChannelEx(PAirpcapHandle AdapterHandle, AirpcapChannelInfo ChannelInfo);
|
||||
gboolean AirpcapSetDeviceChannelEx(PAirpcapHandle AdapterHandle, AirpcapChannelInfo ChannelInfo);
|
||||
|
||||
/*!
|
||||
\brief Get the channel of a device through its radiofrequency. In case of 802.11n enabled devices, it gets the extension channel, if in use.
|
||||
|
@ -862,7 +862,7 @@ BOOL AirpcapSetDeviceChannelEx(PAirpcapHandle AdapterHandle, AirpcapChannelInfo
|
|||
\note this is a device-related function: when you change the channel from an open capture instance, the change will be
|
||||
immediately reflected on all the other capture instances.
|
||||
*/
|
||||
BOOL AirpcapGetDeviceChannelEx(PAirpcapHandle AdapterHandle, PAirpcapChannelInfo PChannelInfo);
|
||||
gboolean AirpcapGetDeviceChannelEx(PAirpcapHandle AdapterHandle, PAirpcapChannelInfo PChannelInfo);
|
||||
|
||||
/*!
|
||||
\brief Get the list of supported channels for a given device. In case of a 802.11n capable device, information related to supported extension channels is also reported.
|
||||
|
@ -878,7 +878,7 @@ BOOL AirpcapGetDeviceChannelEx(PAirpcapHandle AdapterHandle, PAirpcapChannelInfo
|
|||
|
||||
\note The supported channels are not listed in any specific order.
|
||||
*/
|
||||
BOOL AirpcapGetDeviceSupportedChannels(PAirpcapHandle AdapterHandle, PAirpcapChannelInfo *ppChannelInfo, PUINT pNumChannelInfo);
|
||||
gboolean AirpcapGetDeviceSupportedChannels(PAirpcapHandle AdapterHandle, PAirpcapChannelInfo *ppChannelInfo, guint * pNumChannelInfo);
|
||||
|
||||
/*!
|
||||
\brief Converts a given frequency to the corresponding channel.
|
||||
|
@ -888,7 +888,7 @@ BOOL AirpcapGetDeviceSupportedChannels(PAirpcapHandle AdapterHandle, PAirpcapCha
|
|||
\param PBand Pointer to a user-supplied variable that will contain the band (a or b/g) of the given channel.
|
||||
\return TRUE on success, i.e. the frequency corresponds to a valid a or b/g channel.
|
||||
*/
|
||||
BOOL AirpcapConvertFrequencyToChannel(UINT Frequency, PUINT PChannel, PAirpcapChannelBand PBand);
|
||||
gboolean AirpcapConvertFrequencyToChannel(guint Frequency, guint * PChannel, PAirpcapChannelBand PBand);
|
||||
|
||||
/*!
|
||||
\brief Converts a given channel to the corresponding frequency.
|
||||
|
@ -897,7 +897,7 @@ BOOL AirpcapConvertFrequencyToChannel(UINT Frequency, PUINT PChannel, PAirpcapCh
|
|||
\param PFrequency Pointer to a user-supplied variable that will contain the channel frequency in MHz on success.
|
||||
\return TRUE on success, i.e. the given channel number exists.
|
||||
*/
|
||||
BOOL AirpcapConvertChannelToFrequency(UINT Channel, PUINT PFrequency);
|
||||
gboolean AirpcapConvertChannelToFrequency(guint Channel, guint * PFrequency);
|
||||
|
||||
|
||||
/*@}*/
|
||||
|
|
114
airpcap_loader.c
114
airpcap_loader.c
|
@ -58,7 +58,7 @@
|
|||
* We load dynamically the dag library in order link it only when
|
||||
* it's present on the system
|
||||
*/
|
||||
static HMODULE AirpcapLib = NULL;
|
||||
static void ** AirpcapLib = NULL;
|
||||
|
||||
/*
|
||||
* Set to TRUE if the DLL was successfully loaded AND all functions
|
||||
|
@ -117,7 +117,7 @@ airpcap_if_info_t *airpcap_if_active = NULL;
|
|||
module_t *wlan_prefs = NULL;
|
||||
|
||||
Dot11Channel *pSupportedChannels;
|
||||
ULONG numSupportedChannels;
|
||||
guint32 numSupportedChannels;
|
||||
|
||||
static AirpcapChannelInfo LegacyChannels[] =
|
||||
{
|
||||
|
@ -137,7 +137,7 @@ static AirpcapChannelInfo LegacyChannels[] =
|
|||
{2484, 0, {0,0,0}},
|
||||
};
|
||||
|
||||
static ULONG num_legacy_channels = 14;
|
||||
static guint32 num_legacy_channels = 14;
|
||||
|
||||
/*
|
||||
* Callback used by the load_wlan_keys() routine in order to read a WEP decryption key
|
||||
|
@ -261,7 +261,7 @@ set_wep_key(pref_t *pref, gpointer ud _U_)
|
|||
* Function used to read the Decryption Keys from the preferences and store them
|
||||
* properly into the airpcap adapter.
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
load_wlan_driver_wep_keys()
|
||||
{
|
||||
keys_cb_data_t* user_data;
|
||||
|
@ -316,16 +316,16 @@ load_wlan_driver_wep_keys()
|
|||
* This function will tell the airpcap driver the key list to use
|
||||
* This will be stored into the registry...
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
write_wlan_wep_keys_to_registry(airpcap_if_info_t* info_if, GList* key_list)
|
||||
{
|
||||
UINT i,j;
|
||||
guint i,j;
|
||||
GString *new_key;
|
||||
gchar s[3];
|
||||
PAirpcapKeysCollection KeysCollection;
|
||||
ULONG KeysCollectionSize;
|
||||
UCHAR KeyByte;
|
||||
UINT keys_in_list = 0;
|
||||
guint32 KeysCollectionSize;
|
||||
guint8 KeyByte;
|
||||
guint keys_in_list = 0;
|
||||
decryption_key_t* key_item = NULL;
|
||||
|
||||
keys_in_list = g_list_length(key_list);
|
||||
|
@ -370,7 +370,7 @@ write_wlan_wep_keys_to_registry(airpcap_if_info_t* info_if, GList* key_list)
|
|||
s[0] = new_key->str[j];
|
||||
s[1] = new_key->str[j+1];
|
||||
s[2] = '\0';
|
||||
KeyByte = (UCHAR)strtol(s, NULL, 16);
|
||||
KeyByte = (guint8)strtol(s, NULL, 16);
|
||||
KeysCollection->Keys[i].KeyData[j / 2] = KeyByte;
|
||||
}
|
||||
|
||||
|
@ -406,16 +406,16 @@ write_wlan_wep_keys_to_registry(airpcap_if_info_t* info_if, GList* key_list)
|
|||
* This function will tell the airpcap driver the key list to use
|
||||
* This will be stored into the registry...
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
write_wlan_driver_wep_keys_to_registry(GList* key_list)
|
||||
{
|
||||
UINT i,j,k,n,y;
|
||||
guint i,j,k,n,y;
|
||||
GString *new_key;
|
||||
gchar s[3];
|
||||
PAirpcapKeysCollection KeysCollection;
|
||||
ULONG KeysCollectionSize;
|
||||
UCHAR KeyByte;
|
||||
UINT keys_in_list = 0;
|
||||
guint32 KeysCollectionSize;
|
||||
guint8 KeyByte;
|
||||
guint keys_in_list = 0;
|
||||
decryption_key_t* key_item = NULL;
|
||||
airpcap_if_info_t* fake_info_if = NULL;
|
||||
|
||||
|
@ -491,7 +491,7 @@ write_wlan_driver_wep_keys_to_registry(GList* key_list)
|
|||
s[0] = new_key->str[j];
|
||||
s[1] = new_key->str[j+1];
|
||||
s[2] = '\0';
|
||||
KeyByte = (UCHAR)strtol(s, NULL, 16);
|
||||
KeyByte = (guint8)strtol(s, NULL, 16);
|
||||
KeysCollection->Keys[y].KeyData[j / 2] = KeyByte;
|
||||
}
|
||||
/* XXX - Change when WPA will be supported!!! */
|
||||
|
@ -687,7 +687,7 @@ cant_get_airpcap_if_list_error_message(const char *err_str)
|
|||
/*
|
||||
* Airpcap wrapper, used to store the current settings for the selected adapter
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_store_cur_config_as_adapter_default(PAirpcapHandle ah)
|
||||
{
|
||||
if (!AirpcapLoaded) return FALSE;
|
||||
|
@ -698,7 +698,7 @@ airpcap_if_store_cur_config_as_adapter_default(PAirpcapHandle ah)
|
|||
* Airpcap wrapper, used to open an airpcap adapter
|
||||
*/
|
||||
PAirpcapHandle
|
||||
airpcap_if_open(PCHAR name, PCHAR err)
|
||||
airpcap_if_open(gchar * name, gchar * err)
|
||||
{
|
||||
if (!AirpcapLoaded) return NULL;
|
||||
if (name == NULL) return NULL;
|
||||
|
@ -708,7 +708,7 @@ airpcap_if_open(PCHAR name, PCHAR err)
|
|||
/*
|
||||
* Airpcap wrapper, used to close an airpcap adapter
|
||||
*/
|
||||
VOID
|
||||
void
|
||||
airpcap_if_close(PAirpcapHandle handle)
|
||||
{
|
||||
if (!AirpcapLoaded) return;
|
||||
|
@ -727,8 +727,8 @@ airpcap_get_dll_state()
|
|||
/*
|
||||
* Airpcap wrapper, used to turn on the led of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
airpcap_if_turn_led_on(PAirpcapHandle AdapterHandle, UINT LedNumber)
|
||||
gboolean
|
||||
airpcap_if_turn_led_on(PAirpcapHandle AdapterHandle, guint LedNumber)
|
||||
{
|
||||
if (!AirpcapLoaded) return FALSE;
|
||||
return g_PAirpcapTurnLedOn(AdapterHandle,LedNumber);
|
||||
|
@ -737,8 +737,8 @@ airpcap_if_turn_led_on(PAirpcapHandle AdapterHandle, UINT LedNumber)
|
|||
/*
|
||||
* Airpcap wrapper, used to turn off the led of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
airpcap_if_turn_led_off(PAirpcapHandle AdapterHandle, UINT LedNumber)
|
||||
gboolean
|
||||
airpcap_if_turn_led_off(PAirpcapHandle AdapterHandle, guint LedNumber)
|
||||
{
|
||||
if (!AirpcapLoaded) return FALSE;
|
||||
return g_PAirpcapTurnLedOff(AdapterHandle,LedNumber);
|
||||
|
@ -747,8 +747,8 @@ airpcap_if_turn_led_off(PAirpcapHandle AdapterHandle, UINT LedNumber)
|
|||
/*
|
||||
* Airpcap wrapper, used to get the channel of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
airpcap_if_get_device_channel(PAirpcapHandle ah, PUINT ch)
|
||||
gboolean
|
||||
airpcap_if_get_device_channel(PAirpcapHandle ah, guint * ch)
|
||||
{
|
||||
if (!AirpcapLoaded) return FALSE;
|
||||
return g_PAirpcapGetDeviceChannel(ah,ch);
|
||||
|
@ -757,8 +757,8 @@ airpcap_if_get_device_channel(PAirpcapHandle ah, PUINT ch)
|
|||
/*
|
||||
* Airpcap wrapper, used to get the supported channels of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
airpcap_if_get_device_supported_channels(PAirpcapHandle ah, AirpcapChannelInfo **cInfo, PULONG nInfo)
|
||||
gboolean
|
||||
airpcap_if_get_device_supported_channels(PAirpcapHandle ah, AirpcapChannelInfo **cInfo, guint32 * nInfo)
|
||||
{
|
||||
if (!AirpcapLoaded) return FALSE;
|
||||
if (airpcap_get_dll_state() == AIRPCAP_DLL_OLD){
|
||||
|
@ -776,10 +776,10 @@ airpcap_if_get_device_supported_channels(PAirpcapHandle ah, AirpcapChannelInfo *
|
|||
* Airpcap wrapper, used to get the supported channels of an airpcap adapter
|
||||
*/
|
||||
Dot11Channel*
|
||||
airpcap_if_get_device_supported_channels_array(PAirpcapHandle ah, PULONG pNumSupportedChannels)
|
||||
airpcap_if_get_device_supported_channels_array(PAirpcapHandle ah, guint32 * pNumSupportedChannels)
|
||||
{
|
||||
AirpcapChannelInfo *chanInfo;
|
||||
ULONG i=0, j=0, numInfo = 0;
|
||||
guint32 i=0, j=0, numInfo = 0;
|
||||
|
||||
if (!AirpcapLoaded)
|
||||
return NULL;
|
||||
|
@ -797,7 +797,7 @@ airpcap_if_get_device_supported_channels_array(PAirpcapHandle ah, PULONG pNumSup
|
|||
|
||||
for (i = 0; i < numInfo; i++)
|
||||
{
|
||||
ULONG supportedChannel = 0xFFFFFFFF;
|
||||
guint32 supportedChannel = 0xFFFFFFFF;
|
||||
|
||||
/*
|
||||
* search if we have it already
|
||||
|
@ -887,8 +887,8 @@ airpcap_if_get_device_supported_channels_array(PAirpcapHandle ah, PULONG pNumSup
|
|||
/*
|
||||
* Airpcap wrapper, used to set the channel of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
airpcap_if_set_device_channel(PAirpcapHandle ah, UINT ch)
|
||||
gboolean
|
||||
airpcap_if_set_device_channel(PAirpcapHandle ah, guint ch)
|
||||
{
|
||||
if (!AirpcapLoaded) return FALSE;
|
||||
return g_PAirpcapSetDeviceChannel(ah,ch);
|
||||
|
@ -897,7 +897,7 @@ airpcap_if_set_device_channel(PAirpcapHandle ah, UINT ch)
|
|||
/*
|
||||
* Airpcap wrapper, used to set the frequency of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_set_device_channel_ex(PAirpcapHandle ah, AirpcapChannelInfo ChannelInfo)
|
||||
{
|
||||
if (!AirpcapLoaded) return FALSE;
|
||||
|
@ -920,7 +920,7 @@ airpcap_if_set_device_channel_ex(PAirpcapHandle ah, AirpcapChannelInfo ChannelIn
|
|||
/*
|
||||
* Airpcap wrapper, used to get the frequency of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_get_device_channel_ex(PAirpcapHandle ah, PAirpcapChannelInfo pChannelInfo)
|
||||
{
|
||||
if (!AirpcapLoaded) return FALSE;
|
||||
|
@ -933,7 +933,7 @@ airpcap_if_get_device_channel_ex(PAirpcapHandle ah, PAirpcapChannelInfo pChannel
|
|||
|
||||
if (airpcap_get_dll_state() == AIRPCAP_DLL_OLD){
|
||||
guint channel = 0;
|
||||
ULONG chan_freq = 0;
|
||||
guint32 chan_freq = 0;
|
||||
|
||||
if (!airpcap_if_get_device_channel(ah, &channel)) return FALSE;
|
||||
|
||||
|
@ -951,7 +951,7 @@ airpcap_if_get_device_channel_ex(PAirpcapHandle ah, PAirpcapChannelInfo pChannel
|
|||
/*
|
||||
* Airpcap wrapper, used to get the link type of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_get_link_type(PAirpcapHandle ah, PAirpcapLinkType lt)
|
||||
{
|
||||
if (!AirpcapLoaded) return FALSE;
|
||||
|
@ -961,7 +961,7 @@ airpcap_if_get_link_type(PAirpcapHandle ah, PAirpcapLinkType lt)
|
|||
/*
|
||||
* Airpcap wrapper, used to set the link type of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_set_link_type(PAirpcapHandle ah, AirpcapLinkType lt)
|
||||
{
|
||||
if (!AirpcapLoaded) return FALSE;
|
||||
|
@ -971,8 +971,8 @@ airpcap_if_set_link_type(PAirpcapHandle ah, AirpcapLinkType lt)
|
|||
/*
|
||||
* Airpcap wrapper, used to get the fcs presence of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
airpcap_if_get_fcs_presence(PAirpcapHandle ah, PBOOL fcs)
|
||||
gboolean
|
||||
airpcap_if_get_fcs_presence(PAirpcapHandle ah, gboolean * fcs)
|
||||
{
|
||||
if (!AirpcapLoaded) return FALSE;
|
||||
return g_PAirpcapGetFcsPresence(ah,fcs);
|
||||
|
@ -981,8 +981,8 @@ airpcap_if_get_fcs_presence(PAirpcapHandle ah, PBOOL fcs)
|
|||
/*
|
||||
* Airpcap wrapper, used to set the fcs presence of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
airpcap_if_set_fcs_presence(PAirpcapHandle ah, BOOL fcs)
|
||||
gboolean
|
||||
airpcap_if_set_fcs_presence(PAirpcapHandle ah, gboolean fcs)
|
||||
{
|
||||
if (!AirpcapLoaded) return FALSE;
|
||||
return g_PAirpcapSetFcsPresence(ah,fcs);
|
||||
|
@ -991,7 +991,7 @@ airpcap_if_set_fcs_presence(PAirpcapHandle ah, BOOL fcs)
|
|||
/*
|
||||
* Airpcap wrapper, used to get the decryption enabling of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_get_decryption_state(PAirpcapHandle ah, PAirpcapDecryptionState PEnable)
|
||||
{
|
||||
if (!AirpcapLoaded) return FALSE;
|
||||
|
@ -1001,7 +1001,7 @@ airpcap_if_get_decryption_state(PAirpcapHandle ah, PAirpcapDecryptionState PEnab
|
|||
/*
|
||||
* Airpcap wrapper, used to set the decryption enabling of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_set_decryption_state(PAirpcapHandle ah, AirpcapDecryptionState Enable)
|
||||
{
|
||||
if (!AirpcapLoaded) return FALSE;
|
||||
|
@ -1011,7 +1011,7 @@ airpcap_if_set_decryption_state(PAirpcapHandle ah, AirpcapDecryptionState Enable
|
|||
/*
|
||||
* Airpcap wrapper, used to get the decryption enabling of an airpcap driver
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_get_driver_decryption_state(PAirpcapHandle ah, PAirpcapDecryptionState PEnable)
|
||||
{
|
||||
if (!AirpcapLoaded || (g_PAirpcapGetDriverDecryptionState==NULL)) return FALSE;
|
||||
|
@ -1021,7 +1021,7 @@ airpcap_if_get_driver_decryption_state(PAirpcapHandle ah, PAirpcapDecryptionStat
|
|||
/*
|
||||
* Airpcap wrapper, used to set the decryption enabling of an airpcap driver
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_set_driver_decryption_state(PAirpcapHandle ah, AirpcapDecryptionState Enable)
|
||||
{
|
||||
if (!AirpcapLoaded || (g_PAirpcapSetDriverDecryptionState==NULL)) return FALSE;
|
||||
|
@ -1031,7 +1031,7 @@ airpcap_if_set_driver_decryption_state(PAirpcapHandle ah, AirpcapDecryptionState
|
|||
/*
|
||||
* Airpcap wrapper, used to get the fcs validation of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_get_fcs_validation(PAirpcapHandle ah, PAirpcapValidationType val)
|
||||
{
|
||||
if (!AirpcapLoaded) return FALSE;
|
||||
|
@ -1041,7 +1041,7 @@ airpcap_if_get_fcs_validation(PAirpcapHandle ah, PAirpcapValidationType val)
|
|||
/*
|
||||
* Airpcap wrapper, used to set the fcs validation of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_set_fcs_validation(PAirpcapHandle ah, AirpcapValidationType val)
|
||||
{
|
||||
if (!AirpcapLoaded) return FALSE;
|
||||
|
@ -1051,7 +1051,7 @@ airpcap_if_set_fcs_validation(PAirpcapHandle ah, AirpcapValidationType val)
|
|||
/*
|
||||
* Airpcap wrapper, used to save the settings for the selected_if
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_set_device_keys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection)
|
||||
{
|
||||
if (!AirpcapLoaded) return FALSE;
|
||||
|
@ -1061,8 +1061,8 @@ airpcap_if_set_device_keys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection
|
|||
/*
|
||||
* Airpcap wrapper, used to save the settings for the selected_if
|
||||
*/
|
||||
BOOL
|
||||
airpcap_if_get_device_keys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection, PUINT PKeysCollectionSize)
|
||||
gboolean
|
||||
airpcap_if_get_device_keys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection, guint * PKeysCollectionSize)
|
||||
{
|
||||
if (!AirpcapLoaded) return FALSE;
|
||||
return g_PAirpcapGetDeviceKeys(AdapterHandle,KeysCollection,PKeysCollectionSize);
|
||||
|
@ -1071,7 +1071,7 @@ airpcap_if_get_device_keys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection
|
|||
/*
|
||||
* Airpcap wrapper, used to save the driver's set of keys
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_set_driver_keys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection)
|
||||
{
|
||||
if (!AirpcapLoaded || (g_PAirpcapSetDriverKeys==NULL)) return FALSE;
|
||||
|
@ -1081,8 +1081,8 @@ airpcap_if_set_driver_keys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection
|
|||
/*
|
||||
* Airpcap wrapper, used to load the driver's set of keys
|
||||
*/
|
||||
BOOL
|
||||
airpcap_if_get_driver_keys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection, PUINT PKeysCollectionSize)
|
||||
gboolean
|
||||
airpcap_if_get_driver_keys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection, guint * PKeysCollectionSize)
|
||||
{
|
||||
if (!AirpcapLoaded || (g_PAirpcapGetDriverKeys==NULL)) return FALSE;
|
||||
return g_PAirpcapGetDriverKeys(AdapterHandle,KeysCollection,PKeysCollectionSize);
|
||||
|
@ -1230,7 +1230,7 @@ airpcap_if_info_print(airpcap_if_info_t* if_info)
|
|||
/*
|
||||
* Function used to load the WEP keys for a selected interface
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_load_keys(PAirpcapHandle ad, airpcap_if_info_t *if_info)
|
||||
{
|
||||
if(!if_info) return FALSE;
|
||||
|
@ -1267,7 +1267,7 @@ airpcap_if_load_keys(PAirpcapHandle ad, airpcap_if_info_t *if_info)
|
|||
/*
|
||||
* Function used to load the WEP keys for a selected interface
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_load_driver_keys(PAirpcapHandle ad, airpcap_if_info_t *if_info)
|
||||
{
|
||||
if_info->keysCollectionSize = 0;
|
||||
|
@ -2453,8 +2453,8 @@ set_airpcap_decryption(gboolean on_off)
|
|||
*/
|
||||
int load_airpcap(void)
|
||||
{
|
||||
BOOL base_functions = TRUE;
|
||||
BOOL eleven_n_functions = TRUE;
|
||||
gboolean base_functions = TRUE;
|
||||
gboolean eleven_n_functions = TRUE;
|
||||
|
||||
#ifdef _WIN32
|
||||
if((AirpcapLib = LoadLibrary(TEXT("airpcap.dll"))) == NULL)
|
||||
|
|
156
airpcap_loader.h
156
airpcap_loader.h
|
@ -49,41 +49,41 @@
|
|||
#define AIRPCAP_DLL_ERROR 2
|
||||
#define AIRPCAP_DLL_NOT_FOUND 3
|
||||
|
||||
typedef PCHAR (*AirpcapGetLastErrorHandler)(PAirpcapHandle AdapterHandle);
|
||||
typedef BOOL (*AirpcapGetDeviceListHandler)(PAirpcapDeviceDescription *PPAllDevs, PCHAR Ebuf);
|
||||
typedef VOID (*AirpcapFreeDeviceListHandler)(PAirpcapDeviceDescription PAllDevs);
|
||||
typedef PAirpcapHandle (*AirpcapOpenHandler)(PCHAR DeviceName, PCHAR Ebuf);
|
||||
typedef VOID (*AirpcapCloseHandler)(PAirpcapHandle AdapterHandle);
|
||||
typedef BOOL (*AirpcapGetLinkTypeHandler)(PAirpcapHandle AdapterHandle, PAirpcapLinkType PLinkType);
|
||||
typedef BOOL (*AirpcapSetLinkTypeHandler)(PAirpcapHandle AdapterHandle, AirpcapLinkType NewLinkType);
|
||||
typedef BOOL (*AirpcapSetKernelBufferHandler)(PAirpcapHandle AdapterHandle, UINT BufferSize);
|
||||
typedef BOOL (*AirpcapSetFilterHandler)(PAirpcapHandle AdapterHandle, PVOID Instructions, UINT Len);
|
||||
typedef BOOL (*AirpcapGetMacAddressHandler)(PAirpcapHandle AdapterHandle, PAirpcapMacAddress PMacAddress);
|
||||
typedef BOOL (*AirpcapSetMinToCopyHandler)(PAirpcapHandle AdapterHandle, UINT MinToCopy);
|
||||
typedef BOOL (*AirpcapGetReadEventHandler)(PAirpcapHandle AdapterHandle, HANDLE* PReadEvent);
|
||||
typedef BOOL (*AirpcapReadHandler)(PAirpcapHandle AdapterHandle, PBYTE Buffer, UINT BufSize, PUINT PReceievedBytes);
|
||||
typedef BOOL (*AirpcapGetStatsHandler)(PAirpcapHandle AdapterHandle, PAirpcapStats PStats);
|
||||
typedef BOOL (*AirpcapTurnLedOnHandler)(PAirpcapHandle AdapterHandle, UINT LedNumber);
|
||||
typedef BOOL (*AirpcapTurnLedOffHandler)(PAirpcapHandle AdapterHandle, UINT LedNumber);
|
||||
typedef BOOL (*AirpcapSetDeviceChannelHandler)(PAirpcapHandle AdapterHandle, UINT Channel);
|
||||
typedef BOOL (*AirpcapGetDeviceChannelHandler)(PAirpcapHandle AdapterHandle, PUINT PChannel);
|
||||
typedef BOOL (*AirpcapSetFcsPresenceHandler)(PAirpcapHandle AdapterHandle, BOOL IsFcsPresent);
|
||||
typedef BOOL (*AirpcapGetFcsPresenceHandler)(PAirpcapHandle AdapterHandle, PBOOL PIsFcsPresent);
|
||||
typedef BOOL (*AirpcapSetFcsValidationHandler)(PAirpcapHandle AdapterHandle, AirpcapValidationType ValidationType);
|
||||
typedef BOOL (*AirpcapGetFcsValidationHandler)(PAirpcapHandle AdapterHandle, PAirpcapValidationType PValidationType);
|
||||
typedef BOOL (*AirpcapSetDeviceKeysHandler)(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection);
|
||||
typedef BOOL (*AirpcapGetDeviceKeysHandler)(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection, PUINT PKeysCollectionSize);
|
||||
typedef BOOL (*AirpcapSetDriverKeysHandler)(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection);
|
||||
typedef BOOL (*AirpcapGetDriverKeysHandler)(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection, PUINT PKeysCollectionSize);
|
||||
typedef BOOL (*AirpcapSetDecryptionStateHandler)(PAirpcapHandle AdapterHandle, AirpcapDecryptionState Enable);
|
||||
typedef BOOL (*AirpcapGetDecryptionStateHandler)(PAirpcapHandle AdapterHandle, PAirpcapDecryptionState PEnable);
|
||||
typedef BOOL (*AirpcapSetDriverDecryptionStateHandler)(PAirpcapHandle AdapterHandle, AirpcapDecryptionState Enable);
|
||||
typedef BOOL (*AirpcapGetDriverDecryptionStateHandler)(PAirpcapHandle AdapterHandle, PAirpcapDecryptionState PEnable);
|
||||
typedef BOOL (*AirpcapStoreCurConfigAsAdapterDefaultHandler)(PAirpcapHandle AdapterHandle);
|
||||
typedef VOID (*AirpcapGetVersionHandler)(PUINT VersionMajor, PUINT VersionMinor, PUINT VersionRev, PUINT VersionBuild);
|
||||
typedef BOOL (*AirpcapSetDeviceChannelExHandler)(PAirpcapHandle AdapterHandle, AirpcapChannelInfo ChannelInfo);
|
||||
typedef BOOL (*AirpcapGetDeviceChannelExHandler)(PAirpcapHandle AdapterHandle, PAirpcapChannelInfo PChannelInfo);
|
||||
typedef BOOL (*AirpcapGetDeviceSupportedChannelsHandler)(PAirpcapHandle AdapterHandle, AirpcapChannelInfo **ppChannelInfo, PULONG pNumChannelInfo);
|
||||
typedef gchar * (*AirpcapGetLastErrorHandler)(PAirpcapHandle AdapterHandle);
|
||||
typedef gboolean (*AirpcapGetDeviceListHandler)(PAirpcapDeviceDescription *PPAllDevs, gchar * Ebuf);
|
||||
typedef void (*AirpcapFreeDeviceListHandler)(PAirpcapDeviceDescription PAllDevs);
|
||||
typedef PAirpcapHandle (*AirpcapOpenHandler)(gchar * DeviceName, gchar * Ebuf);
|
||||
typedef void (*AirpcapCloseHandler)(PAirpcapHandle AdapterHandle);
|
||||
typedef gboolean (*AirpcapGetLinkTypeHandler)(PAirpcapHandle AdapterHandle, PAirpcapLinkType PLinkType);
|
||||
typedef gboolean (*AirpcapSetLinkTypeHandler)(PAirpcapHandle AdapterHandle, AirpcapLinkType NewLinkType);
|
||||
typedef gboolean (*AirpcapSetKernelBufferHandler)(PAirpcapHandle AdapterHandle, guint BufferSize);
|
||||
typedef gboolean (*AirpcapSetFilterHandler)(PAirpcapHandle AdapterHandle, void * Instructions, guint Len);
|
||||
typedef gboolean (*AirpcapGetMacAddressHandler)(PAirpcapHandle AdapterHandle, PAirpcapMacAddress PMacAddress);
|
||||
typedef gboolean (*AirpcapSetMinToCopyHandler)(PAirpcapHandle AdapterHandle, guint MinToCopy);
|
||||
typedef gboolean (*AirpcapGetReadEventHandler)(PAirpcapHandle AdapterHandle, void *** PReadEvent);
|
||||
typedef gboolean (*AirpcapReadHandler)(PAirpcapHandle AdapterHandle, guint8 * Buffer, guint BufSize, guint * PReceievedBytes);
|
||||
typedef gboolean (*AirpcapGetStatsHandler)(PAirpcapHandle AdapterHandle, PAirpcapStats PStats);
|
||||
typedef gboolean (*AirpcapTurnLedOnHandler)(PAirpcapHandle AdapterHandle, guint LedNumber);
|
||||
typedef gboolean (*AirpcapTurnLedOffHandler)(PAirpcapHandle AdapterHandle, guint LedNumber);
|
||||
typedef gboolean (*AirpcapSetDeviceChannelHandler)(PAirpcapHandle AdapterHandle, guint Channel);
|
||||
typedef gboolean (*AirpcapGetDeviceChannelHandler)(PAirpcapHandle AdapterHandle, guint * PChannel);
|
||||
typedef gboolean (*AirpcapSetFcsPresenceHandler)(PAirpcapHandle AdapterHandle, gboolean IsFcsPresent);
|
||||
typedef gboolean (*AirpcapGetFcsPresenceHandler)(PAirpcapHandle AdapterHandle, gboolean * PIsFcsPresent);
|
||||
typedef gboolean (*AirpcapSetFcsValidationHandler)(PAirpcapHandle AdapterHandle, AirpcapValidationType ValidationType);
|
||||
typedef gboolean (*AirpcapGetFcsValidationHandler)(PAirpcapHandle AdapterHandle, PAirpcapValidationType PValidationType);
|
||||
typedef gboolean (*AirpcapSetDeviceKeysHandler)(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection);
|
||||
typedef gboolean (*AirpcapGetDeviceKeysHandler)(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection, guint * PKeysCollectionSize);
|
||||
typedef gboolean (*AirpcapSetDriverKeysHandler)(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection);
|
||||
typedef gboolean (*AirpcapGetDriverKeysHandler)(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection, guint * PKeysCollectionSize);
|
||||
typedef gboolean (*AirpcapSetDecryptionStateHandler)(PAirpcapHandle AdapterHandle, AirpcapDecryptionState Enable);
|
||||
typedef gboolean (*AirpcapGetDecryptionStateHandler)(PAirpcapHandle AdapterHandle, PAirpcapDecryptionState PEnable);
|
||||
typedef gboolean (*AirpcapSetDriverDecryptionStateHandler)(PAirpcapHandle AdapterHandle, AirpcapDecryptionState Enable);
|
||||
typedef gboolean (*AirpcapGetDriverDecryptionStateHandler)(PAirpcapHandle AdapterHandle, PAirpcapDecryptionState PEnable);
|
||||
typedef gboolean (*AirpcapStoreCurConfigAsAdapterDefaultHandler)(PAirpcapHandle AdapterHandle);
|
||||
typedef void (*AirpcapGetVersionHandler)(guint * VersionMajor, guint * VersionMinor, guint * VersionRev, guint * VersionBuild);
|
||||
typedef gboolean (*AirpcapSetDeviceChannelExHandler)(PAirpcapHandle AdapterHandle, AirpcapChannelInfo ChannelInfo);
|
||||
typedef gboolean (*AirpcapGetDeviceChannelExHandler)(PAirpcapHandle AdapterHandle, PAirpcapChannelInfo PChannelInfo);
|
||||
typedef gboolean (*AirpcapGetDeviceSupportedChannelsHandler)(PAirpcapHandle AdapterHandle, AirpcapChannelInfo **ppChannelInfo, guint32 * pNumChannelInfo);
|
||||
|
||||
#define FLAG_CAN_BE_LOW 0x00000001
|
||||
#define FLAG_CAN_BE_HIGH 0x00000002
|
||||
|
@ -92,9 +92,9 @@ typedef BOOL (*AirpcapGetDeviceSupportedChannelsHandler)(PAirpcapHandle AdapterH
|
|||
|
||||
typedef struct _Dot11Channel
|
||||
{
|
||||
UINT Channel;
|
||||
ULONG Frequency;
|
||||
ULONG Flags;
|
||||
guint Channel;
|
||||
guint32 Frequency;
|
||||
guint32 Flags;
|
||||
} Dot11Channel;
|
||||
|
||||
/*
|
||||
|
@ -108,17 +108,17 @@ typedef struct {
|
|||
gboolean loopback; /* TRUE if loopback, FALSE otherwise */
|
||||
AirpcapLinkType linkType; /* The link layer type */
|
||||
AirpcapChannelInfo channelInfo; /* Channel Information */
|
||||
BOOL IsFcsPresent; /* Include 802.11 CRC in frames */
|
||||
gboolean IsFcsPresent; /* Include 802.11 CRC in frames */
|
||||
AirpcapValidationType CrcValidationOn; /* Capture Frames with Wrong CRC */
|
||||
AirpcapDecryptionState DecryptionOn; /* TRUE if decryption is on, FALSE otherwise */
|
||||
PAirpcapKeysCollection keysCollection; /* WEP Key collection for the adapter */
|
||||
UINT keysCollectionSize; /* Size of the key collection */
|
||||
guint keysCollectionSize; /* Size of the key collection */
|
||||
gboolean blinking; /* TRUE if is blinkng, FALSE otherwise */
|
||||
gboolean led; /* TRUE if on, FALSE if off */
|
||||
gboolean saved; /* TRUE if current configuration has been saved, FALSE otherwise */
|
||||
gint tag; /* int for the gtk blinking callback */
|
||||
Dot11Channel *pSupportedChannels;
|
||||
ULONG numSupportedChannels;
|
||||
guint32 numSupportedChannels;
|
||||
} airpcap_if_info_t;
|
||||
|
||||
/*
|
||||
|
@ -146,13 +146,13 @@ extern airpcap_if_info_t *airpcap_if_active;
|
|||
* Function used to read the Decryption Keys from the preferences and store them
|
||||
* properly into the airpcap adapter.
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
load_wlan_driver_wep_keys();
|
||||
|
||||
/*
|
||||
* Function used to save to the prefereces file the Decryption Keys.
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
save_wlan_wep_keys(airpcap_if_info_t* info_if);
|
||||
|
||||
/*
|
||||
|
@ -199,19 +199,19 @@ airpcap_if_info_t* get_airpcap_if_from_name(GList* if_list, const gchar* name);
|
|||
/*
|
||||
* Airpcap wrapper, used to store the current settings for the selected adapter
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_store_cur_config_as_adapter_default(PAirpcapHandle ah);
|
||||
|
||||
/*
|
||||
* Function used to load the WEP keys for a selected interface
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_load_keys(PAirpcapHandle ad, airpcap_if_info_t *if_info);
|
||||
|
||||
/*
|
||||
* Function used to load the WEP keys from the global driver list
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_load_driver_keys(PAirpcapHandle ad, airpcap_if_info_t *if_info);
|
||||
|
||||
/*
|
||||
|
@ -229,96 +229,96 @@ airpcap_if_save_driver_keys(PAirpcapHandle ad, airpcap_if_info_t *if_info);
|
|||
/*
|
||||
* Airpcap wrapper, used to get the fcs validation of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_get_fcs_validation(PAirpcapHandle ah, PAirpcapValidationType val);
|
||||
|
||||
/*
|
||||
* Airpcap wrapper, used to set the fcs validation of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_set_fcs_validation(PAirpcapHandle ah, AirpcapValidationType val);
|
||||
|
||||
/*
|
||||
* Airpcap wrapper, used to get the decryption enabling of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_get_decryption_state(PAirpcapHandle ah, PAirpcapDecryptionState val);
|
||||
|
||||
/*
|
||||
* Airpcap wrapper, used to set the decryption enabling of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_set_decryption_state(PAirpcapHandle ah, AirpcapDecryptionState val);
|
||||
|
||||
/*
|
||||
* Airpcap wrapper, used to get the fcs presence of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
airpcap_if_get_fcs_presence(PAirpcapHandle ah, PBOOL ch);
|
||||
gboolean
|
||||
airpcap_if_get_fcs_presence(PAirpcapHandle ah, gboolean * ch);
|
||||
|
||||
/*
|
||||
* Airpcap wrapper, used to set the fcs presence of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
airpcap_if_set_fcs_presence(PAirpcapHandle ah, BOOL ch);
|
||||
gboolean
|
||||
airpcap_if_set_fcs_presence(PAirpcapHandle ah, gboolean ch);
|
||||
|
||||
/*
|
||||
* Airpcap wrapper, used to get the link type of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_get_link_type(PAirpcapHandle ah, PAirpcapLinkType lt);
|
||||
|
||||
/*
|
||||
* Airpcap wrapper, used to set the link type of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_set_link_type(PAirpcapHandle ah, AirpcapLinkType lt);
|
||||
|
||||
/*
|
||||
* Airpcap wrapper, used to get the channel of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
airpcap_if_get_device_channel(PAirpcapHandle ah, PUINT ch);
|
||||
gboolean
|
||||
airpcap_if_get_device_channel(PAirpcapHandle ah, guint * ch);
|
||||
|
||||
/*
|
||||
* Airpcap wrapper, get the channels supported by the adapter
|
||||
*/
|
||||
BOOL
|
||||
airpcap_if_get_device_supported_channels(PAirpcapHandle ah, AirpcapChannelInfo **cInfo, PULONG nInfo);
|
||||
gboolean
|
||||
airpcap_if_get_device_supported_channels(PAirpcapHandle ah, AirpcapChannelInfo **cInfo, guint32 * nInfo);
|
||||
|
||||
/*
|
||||
* Airpcap wrapper, get supported channels formatted into an array
|
||||
*/
|
||||
Dot11Channel*
|
||||
airpcap_if_get_device_supported_channels_array(PAirpcapHandle ah, PULONG pNumSupportedChannels);
|
||||
airpcap_if_get_device_supported_channels_array(PAirpcapHandle ah, guint32 * pNumSupportedChannels);
|
||||
|
||||
/*
|
||||
* Airpcap wrapper, used to set the channel of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
airpcap_if_set_device_channel(PAirpcapHandle ah, UINT ch);
|
||||
gboolean
|
||||
airpcap_if_set_device_channel(PAirpcapHandle ah, guint ch);
|
||||
|
||||
/*
|
||||
* Airpcap wrapper, used to get the frequency of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_get_device_channel_ex(PAirpcapHandle ah, PAirpcapChannelInfo pChannelInfo);
|
||||
|
||||
/*
|
||||
* Airpcap wrapper, used to set the frequency of an airpcap adapter
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_set_device_channel_ex(PAirpcapHandle ah, AirpcapChannelInfo ChannelInfo);
|
||||
|
||||
/*
|
||||
* Airpcap wrapper, used to open an airpcap adapter
|
||||
*/
|
||||
PAirpcapHandle airpcap_if_open(PCHAR name, PCHAR err);
|
||||
PAirpcapHandle airpcap_if_open(gchar * name, gchar * err);
|
||||
|
||||
/*
|
||||
* Airpcap wrapper, used to close an airpcap adapter
|
||||
*/
|
||||
VOID airpcap_if_close(PAirpcapHandle handle);
|
||||
void airpcap_if_close(PAirpcapHandle handle);
|
||||
|
||||
/*
|
||||
* Retrieve the state of the Airpcap DLL
|
||||
|
@ -329,12 +329,12 @@ airpcap_get_dll_state();
|
|||
/*
|
||||
* Airpcap wrapper, used to turn on the led of an airpcap adapter
|
||||
*/
|
||||
BOOL airpcap_if_turn_led_on(PAirpcapHandle AdapterHandle, UINT LedNumber);
|
||||
gboolean airpcap_if_turn_led_on(PAirpcapHandle AdapterHandle, guint LedNumber);
|
||||
|
||||
/*
|
||||
* Airpcap wrapper, used to turn off the led of an airpcap adapter
|
||||
*/
|
||||
BOOL airpcap_if_turn_led_off(PAirpcapHandle AdapterHandle, UINT LedNumber);
|
||||
gboolean airpcap_if_turn_led_off(PAirpcapHandle AdapterHandle, guint LedNumber);
|
||||
|
||||
/*
|
||||
* This function will create a new airpcap_if_info_t using a name and a description
|
||||
|
@ -392,36 +392,36 @@ airpcap_get_default_if(GList* airpcap_if_list);
|
|||
/*
|
||||
* Airpcap wrapper, used to save the settings for the selected_if
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_set_device_keys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection);
|
||||
|
||||
/*
|
||||
* Airpcap wrapper, used to save the settings for the selected_if
|
||||
*/
|
||||
BOOL
|
||||
airpcap_if_get_device_keys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection, PUINT PKeysCollectionSize);
|
||||
gboolean
|
||||
airpcap_if_get_device_keys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection, guint * PKeysCollectionSize);
|
||||
|
||||
/*
|
||||
* Airpcap wrapper, used to save the settings for the selected_if
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_set_driver_keys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection);
|
||||
|
||||
/*
|
||||
* Airpcap wrapper, used to save the settings for the selected_if
|
||||
*/
|
||||
BOOL
|
||||
airpcap_if_get_driver_keys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection, PUINT PKeysCollectionSize);
|
||||
gboolean
|
||||
airpcap_if_get_driver_keys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection KeysCollection, guint * PKeysCollectionSize);
|
||||
|
||||
/*
|
||||
* Airpcap wrapper, used to get the decryption enabling of an airpcap driver
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_get_driver_decryption_state(PAirpcapHandle ah, PAirpcapDecryptionState PEnable);
|
||||
/*
|
||||
* Airpcap wrapper, used to set the decryption enabling of an airpcap driver
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
airpcap_if_set_driver_decryption_state(PAirpcapHandle ah, AirpcapDecryptionState Enable);
|
||||
|
||||
/*
|
||||
|
@ -440,7 +440,7 @@ airpcap_if_info_free(airpcap_if_info_t *if_info);
|
|||
* This function will tell the airpcap driver the key list to use
|
||||
* This will be stored into the registry...
|
||||
*/
|
||||
BOOL
|
||||
gboolean
|
||||
write_wlan_driver_wep_keys_to_registry(GList* key_list);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue