White space changes.
[obnox/wireshark/wip.git] / airpcap.h
index 7bc4a8820995e09863d6894796ae75488878c771..f872565e84e89ffd04c021365495fcb78fa19179 100644 (file)
--- a/airpcap.h
+++ b/airpcap.h
@@ -37,7 +37,7 @@
 extern "C" {
 #endif
 
-/*!
+/*
        \mainpage AirPcap interface documentation
 
        \section Introduction
@@ -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
@@ -92,11 +92,12 @@ typedef struct _AirpcapDeviceDescription
 #define WEP_KEY_MAX_SIZE 32            ///< Maximum size of a WEP key, in bytes. This is the size of an entry in the
                                                                ///< AirpcapWepKeysCollection structure
 
+#ifdef _WIN32
 #ifndef __MINGW32__
 #pragma pack(push)
 #pragma pack(1)
 #endif // __MINGW32__
-
+#endif
 
 #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.
@@ -107,9 +108,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__))
@@ -137,7 +138,7 @@ typedef enum _AirpcapValidationType
 {
     AIRPCAP_VT_ACCEPT_EVERYTHING = 1,          ///< Accept all the frames the device captures
     AIRPCAP_VT_ACCEPT_CORRECT_FRAMES = 2,      ///< Accept correct frames only, i.e. frames with correct Frame Check Sequence (FCS).
-    AIRPCAP_VT_ACCEPT_CORRUPT_FRAMES = 3,      ///< Accept corrupt frames only, i.e. frames with worng Frame Check Sequence (FCS).
+    AIRPCAP_VT_ACCEPT_CORRUPT_FRAMES = 3,      ///< Accept corrupt frames only, i.e. frames with wrong Frame Check Sequence (FCS).
        AIRPCAP_VT_UNKNOWN = 4                                  ///< Unknown validation type. You should see it only in case of error.
 }AirpcapValidationType, *PAirpcapValidationType;
 
@@ -158,7 +159,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 +173,7 @@ AirpcapMacAddress, *PAirpcapMacAddress;
 
   \code
        PAirpcapKeysCollection KeysCollection;
-       UINT KeysCollectionSize;
+       guint KeysCollectionSize;
 
        KeysCollectionSize = sizeof(AirpcapKeysCollection) + NumKeys * sizeof(AirpcapKey);
 
@@ -185,22 +186,22 @@ 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;
 
 /*!
   \brief Packet header.
 
-  This structure defines the BPF that preceeds every packet delivered to the application.
+  This structure defines the BPF that precedes every packet delivered to the application.
 */
 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__))
@@ -211,9 +212,11 @@ AirpcapBpfHeader, *PAirpcapBpfHeader;
 #define AIRPCAP_ALIGNMENT sizeof(int)
 #define AIRPCAP_WORDALIGN(x) (((x)+(AIRPCAP_ALIGNMENT-1))&~(AIRPCAP_ALIGNMENT-1))
 
+#ifdef _WIN32
 #ifndef __MINGW32__
 #pragma pack(pop)
 #endif // __MINGW32__
+#endif
 
 #define AIRPCAP_ERRBUF_SIZE 512                ///< Size of the error buffer, in bytes
 
@@ -246,14 +249,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 +266,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 +277,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 +296,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 +314,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 +334,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 +348,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
@@ -377,13 +380,13 @@ VOID AirpcapClose(PAirpcapHandle AdapterHandle);
 
   The main reason to turn monitor mode off is that, when not in monitor mode, the adapter will acknowledge the
   data frames sent to its address. This is useful when the adapter needs to interact with other devices on the
-  802.11 network, bacause handling the ACKs in software is too slow.
+  802.11 network, because handling the ACKs in software is too slow.
 
   \note When an adapter is plugged into the system, it's always configured with monitor mode ON. The monitor mode
         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 +398,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
@@ -414,9 +417,9 @@ BOOL AirpcapGetMonitorMode(PAirpcapHandle AdapterHandle, PBOOL PMonitorModeEnabl
   the developer's pack can be used as a reference on how to decode 802.11 frames with radiotap headers.
   - \ref AIRPCAP_LT_802_11_PLUS_PPI, to capture 802.11 frames (including control frames) with a Per Packet Information (PPI)
        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).
+       be found 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 +437,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 +452,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
@@ -457,14 +460,14 @@ BOOL AirpcapSetFcsPresence(PAirpcapHandle AdapterHandle, BOOL IsFcsPresent);
   \param PIsFcsPresent User-provided variable that will be set to true if the adapter is including the FCS.
   \return TRUE if the operation is successful. FALSE otherwise.
 
-  In the default configuration, the adatper has FCS inclusion turned on. The MAC Frame Check Sequence is 4 bytes
+  In the default configuration, the adapter has FCS inclusion turned on. The MAC Frame Check Sequence is 4 bytes
   and is located at the end of the 802.11 packet, with both AIRPCAP_LT_802_11 and AIRPCAP_LT_802_11_PLUS_RADIO
   link types.
   When the FCS inclusion is turned on, and if the link type is AIRPCAP_LT_802_11_PLUS_RADIO, the radiotap header
   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,17 +477,17 @@ 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).
   \param AdapterHandle Handle to the adapter.
   \param ValidationType Pointer to a user supplied variable that will contain the type of validation the driver will perform. See the documentation of \ref AirpcapValidationType for details.
-  \return TRUE if the operation is succesful. FALSE otherwise.
+  \return TRUE if the operation is successful. FALSE otherwise.
 
   \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 +510,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
@@ -515,7 +518,7 @@ BOOL AirpcapSetDeviceKeys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection K
   \param KeysCollection User-allocated PAirpcapKeysCollection structure that will be filled with the keys.
   \param PKeysCollectionSize \b IN: pointer to a user-allocated variable that contains the length of the KeysCollection structure, in bytes.
                                                \b OUT: amount of data moved by the driver in the buffer pointed by KeysBuffer, in bytes.
-  \return TRUE if the operation is succesful. If an error occurs, the return value is FALSE and KeysCollectionSize is zero.
+  \return TRUE if the operation is successful. If an error occurs, the return value is FALSE and KeysCollectionSize is zero.
   If the provided buffer is too small to contain the keys, the return value is FALSE and KeysCollectionSize contains the
   needed KeysCollection length, in bytes. If the device doesn't have any decryption key configured, the return value is TRUE, and
   KeysCollectionSize will be zero.
@@ -533,7 +536,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 +559,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.
@@ -564,7 +567,7 @@ BOOL AirpcapSetDriverKeys(PAirpcapHandle AdapterHandle, PAirpcapKeysCollection K
   \param KeysCollection User-allocated PAirpcapKeysCollection structure that will be filled with the keys.
   \param PKeysCollectionSize \b IN: pointer to a user-allocated variable that contains the length of the KeysCollection structure, in bytes.
                                                \b OUT: amount of data moved by the driver in the buffer pointed by KeysBuffer, in bytes.
-  \return TRUE if the operation is succesful. If an error occurs, the return value is FALSE and KeysCollectionSize is zero.
+  \return TRUE if the operation is successful. If an error occurs, the return value is FALSE and KeysCollectionSize is zero.
   If the provided buffer is too small to contain the keys, the return value is FALSE and KeysCollectionSize contains the
   needed KeysCollection length, in bytes. If the device doesn't have any decryption key configured, the return value is TRUE, and
   KeysCollectionSize will be zero.
@@ -578,7 +581,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,18 +592,18 @@ 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.
   \param AdapterHandle Handle to the adapter.
   \param PEnable Pointer to a user supplied variable that will contain the decryption configuration. See \ref PAirpcapDecryptionState for details.
-  \return TRUE if the operation is succesful. FALSE otherwise.
+  \return TRUE if the operation is successful. FALSE otherwise.
 
   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 +614,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 +625,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 +638,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 +651,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
@@ -662,9 +665,9 @@ BOOL AirpcapGetDeviceChannel(PAirpcapHandle AdapterHandle, PUINT PChannel);
   application is busy, at the cost of higher kernel memory usage.
 
   \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.
+  memory consumption, bigger buffer sizes can decrease the capture performance 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 +678,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 +717,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
@@ -726,7 +729,7 @@ BOOL AirpcapStoreCurConfigAsAdapterDefault(PAirpcapHandle AdapterHandle);
   \return TRUE on success.
 
   The AirPcap driver is able to perform kernel-level filtering using the standard BPF pseudo-machine format. You can read
-  the WinPcap documentation at http://www.winpcap.org/devel.htm for more details on the BPF filtering mechaism.
+  the WinPcap documentation at http://www.winpcap.org/devel.htm for more details on the BPF filtering mechanism.
 
   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.
@@ -734,7 +737,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 +746,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 +761,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 +773,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 +792,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 +811,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 +819,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 +827,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 +835,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 +843,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 +854,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 +865,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 +881,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 +891,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 +900,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);
 
 
 /*@}*/