*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __AIRPCAP_LOADER_H__
#include <epan/crypt/airpdcap_user.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Error values from "get_airpcap_interface_list()". */
-#define CANT_GET_AIRPCAP_INTERFACE_LIST 0 /* error getting list */
-#define NO_AIRPCAP_INTERFACES_FOUND 1 /* list is empty */
-#define AIRPCAP_NOT_LOADED 2 /* Airpcap DLL not loaded */
+#define CANT_GET_AIRPCAP_INTERFACE_LIST 0 /* error getting list */
+#define NO_AIRPCAP_INTERFACES_FOUND 1 /* list is empty */
+#define AIRPCAP_NOT_LOADED 2 /* Airpcap DLL not loaded */
#define AIRPCAP_CHANNEL_ANY_NAME "ANY"
#define AIRPCAP_WPA_PWD_KEY_STRING "WPA-PWD"
#define AIRPCAP_WPA_BIN_KEY_STRING "WPA-PSK"
-#define AIRPCAP_DLL_OK 0
-#define AIRPCAP_DLL_OLD 1
-#define AIRPCAP_DLL_ERROR 2
-#define AIRPCAP_DLL_NOT_FOUND 3
+#define AIRPCAP_DLL_OK 0
+#define AIRPCAP_DLL_OLD 1
+#define AIRPCAP_DLL_ERROR 2
+#define AIRPCAP_DLL_NOT_FOUND 3
typedef gchar * (*AirpcapGetLastErrorHandler)(PAirpcapHandle AdapterHandle);
typedef gboolean (*AirpcapGetDeviceListHandler)(PAirpcapDeviceDescription *PPAllDevs, gchar * Ebuf);
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
-#define FLAG_IS_BG_CHANNEL 0x00000004
-#define FLAG_IS_A_CHANNEL 0x00000008
+#define FLAG_CAN_BE_LOW 0x00000001
+#define FLAG_CAN_BE_HIGH 0x00000002
+#define FLAG_IS_BG_CHANNEL 0x00000004
+#define FLAG_IS_A_CHANNEL 0x00000008
typedef struct _Dot11Channel
{
- guint Channel;
- guint32 Frequency;
- guint32 Flags;
+ guint Channel;
+ guint32 Frequency;
+ guint32 Flags;
} Dot11Channel;
/*
* a list of these structures.
*/
typedef struct {
- char *name; /* e.g. "eth0" */
- char *description; /* from OS, e.g. "Local Area Connection" or NULL */
- GSList *ip_addr; /* containing address values of if_addr_t */
- gboolean loopback; /* TRUE if loopback, FALSE otherwise */
- AirpcapLinkType linkType; /* The link layer type */
- AirpcapChannelInfo channelInfo; /* Channel Information */
- 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 */
- 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;
- guint32 numSupportedChannels;
+ char *name; /* e.g. "eth0" */
+ char *description; /* from OS, e.g. "Local Area Connection" or NULL */
+ GSList *ip_addr; /* containing address values of if_addr_t */
+ gboolean loopback; /* TRUE if loopback, FALSE otherwise */
+ AirpcapLinkType linkType; /* The link layer type */
+ AirpcapChannelInfo channelInfo; /* Channel Information */
+ 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 */
+ 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;
+ guint32 numSupportedChannels;
} airpcap_if_info_t;
/*
* properly into the airpcap adapter.
*/
gboolean
-load_wlan_driver_wep_keys();
+load_wlan_driver_wep_keys(void);
/*
* Function used to save to the prefereces file the Decryption Keys.
* Retrieve the state of the Airpcap DLL
*/
int
-airpcap_get_dll_state();
+airpcap_get_dll_state(void);
/*
* Airpcap wrapper, used to turn on the led of an airpcap adapter
/*
* This function will create a new fake drivers' interface, to load global keys...
*/
-airpcap_if_info_t* airpcap_driver_fake_if_info_new();
+airpcap_if_info_t* airpcap_driver_fake_if_info_new(void);
/*
* Used to dinamically load the airpcap library in order link it only when
* Function used to save to the preference file the Decryption Keys.
*/
int
-save_wlan_driver_wep_keys();
+save_wlan_driver_wep_keys(void);
/*
* Function used to save to the preference file the Decryption Keys.
* keys for the global AirPcap driver... returns NULL if no keys are found.
*/
GList*
-get_airpcap_driver_keys();
+get_airpcap_driver_keys(void);
/*
* Returns the list of the decryption keys specified for wireshark, NULL if
* no key is found
*/
GList*
-get_wireshark_keys();
+get_wireshark_keys(void);
/*
* Tests if two collection of keys are equal or not, to be considered equals, they have to
* Returns TRUE if the Wireshark decryption is active, FALSE otherwise
*/
gboolean
-wireshark_decryption_on();
+wireshark_decryption_on(void);
/*
* Returns TRUE if the AirPcap decryption for the current adapter is active, FALSE otherwise
*/
gboolean
-airpcap_decryption_on();
+airpcap_decryption_on(void);
/*
* Enables decryption for Wireshark if on_off is TRUE, disables it otherwise.
void
get_runtime_airpcap_version(GString *str);
+#ifdef __cplusplus
+}
#endif
+
+#endif /* __AIRPCAP_LOADER_H__ */