2
This file is part of Kismet
4
Kismet is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; either version 2 of the License, or
7
(at your option) any later version.
9
Kismet is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public License
15
along with Kismet; if not, write to the Free Software
16
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
// pcapsource is probably the most complex source handing the largest number of
20
// card types. Ideally, everything should be part of the pcap source except
23
#ifndef __AIRPCAPSOURCE_H__
24
#define __AIRPCAPSOURCE_H__
28
#if defined(HAVE_LIBPCAP) && defined(HAVE_LIBAIRPCAP) && defined(SYS_CYGWIN)
30
#include "pcapsource.h"
32
// This is a bad thing to do, but windows.h totally breaks c++ strings,
33
// which is also unacceptable.
36
// Some Windows-specific definitions. They are normally imported by
37
// including windows.h, but we don't do it because of conflicts with the
39
typedef unsigned int ULONG, *PULONG;
40
typedef int LONG, *PLONG;
41
typedef unsigned int UINT, *PUINT;
42
typedef int INT, *PINT;
43
typedef int BOOL, *PBOOL;
44
typedef unsigned short USHORT, *PUSHORT;
45
typedef short SHORT, *PSHORT;
46
typedef unsigned char UCHAR, *PUCHAR;
47
typedef signed char CHAR, *PCHAR;
48
typedef unsigned char BYTE, *PBYTE;
49
typedef void VOID, *PVOID;
55
#include "cygwin_utils.h"
57
class AirPcapSource : public PcapSource {
59
AirPcapSource(string in_name, string in_dev) : PcapSource(in_name, in_dev) {
61
virtual int OpenSource();
62
virtual int FetchPacket(kis_packet *packet, uint8_t *data, uint8_t *moddata);
63
virtual int FetchDescriptor();
64
virtual int SetChannel(unsigned int in_ch, char *in_err);
67
virtual int FetchSignalLevels(int *in_siglev, int *in_noiselev);
68
PAirpcapHandle airpcap_handle;
69
HANDLE winpcap_evthandle;
73
KisPacketSource *airpcapsource_registrant(string in_name, string in_device,
75
KisPacketSource *airpcapsourceq_registrant(string in_name, string in_device,
77
int chancontrol_airpcap(const char *in_dev, int in_ch, char *in_err, void *in_ext);