00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _WIFISCAN_INCLUDE_H_
00029 #define _WIFISCAN_INCLUDE_H_
00030
00031
00032 #ifdef LWNG_22
00033 #define LWNG_21
00034 #endif
00035
00036 #ifdef LWNG_21
00037 #define LWNG_20
00038 #endif
00039
00040 #ifdef LWNG_20
00041 #define LWNG_16
00042 #endif
00043
00044 #ifdef LWNG_16
00045 #define LWNG_15
00046 #endif
00047
00048 #ifdef LWNG_15
00049 #define LWNG_14
00050 #endif
00051
00052 #define ABSTRACTION_LAYER
00053
00054 #include <config.h>
00055
00056 #include <stdio.h>
00057 #include <stdlib.h>
00058 #include <signal.h>
00059 #include <unistd.h>
00060 #include <limits.h>
00061
00062 #ifdef STDC_HEADERS
00063 # include <string.h>
00064 #else
00065 # ifndef HAVE_MEMSET
00066 # error "You didn't have memset function, try to create it or change your OS"
00067 # endif
00068 #endif
00069
00070 #if TIME_WITH_SYS_TIME
00071 # include <sys/time.h>
00072 # include <time.h>
00073 #else
00074 # if HAVE_SYS_TIME_H
00075 # include <sys/time.h>
00076 # else
00077 # include <time.h>
00078 # endif
00079 #endif
00080
00081 #include <sys/timeb.h>
00082 #include <sys/socket.h>
00083 #include <sys/resource.h>
00084 #include <sys/ioctl.h>
00085 #include <asm/types.h>
00086 #include <linux/netlink.h>
00087 #include <errno.h>
00088 #include <ctype.h>
00089
00090 #include <linux/if.h>
00091 #include <linux/wireless.h>
00092
00093 #ifdef PCAP_IS_INTERNAL
00094 # include <libpcap-0.9.1-kis/pcap.h>
00095 # include <libpcap-0.9.1-kis/pcap-bpf.h>
00096 #else
00097 #ifdef NET_BPH_H_DEBIAN
00098 # include <pcap-bpf.h>
00099 #else
00100 # include <net/bpf.h>
00101 #endif
00102 #endif
00103
00104 #if defined(HAVE_LIBNCURSES) && defined(BUILD_CURSES)
00105 #ifdef HAVE_LIBCURSES
00106 #include <curses.h>
00107 #else
00108 #include <ncurses.h>
00109 #endif
00110 #endif
00111
00112 #ifdef WITH_THREAD
00113 #include <pthread.h>
00114 #else
00115 #define WITHOUT_THREAD
00116 #endif
00117
00118 #include <pcap.h>
00119
00120 #include <wlan/p80211hdr.h>
00121
00122 #ifndef RETSIGTYPE
00123 #define RETSIGTYPE void
00124 #endif
00125
00126 #ifndef FALSE
00127 #define FALSE (UINT8) 0
00128 #endif
00129 #ifndef TRUE
00130 #define TRUE (UINT8) 1
00131 #endif
00132
00133 #ifndef UINT8_MAX
00134 #define UINT8_MAX (0xffUL)
00135 #define UINT16_MAX (0xffffUL)
00136 #define UINT32_MAX (0xffffffffUL)
00137
00138 #define INT8_MAX (0x7fL)
00139 #define INT16_MAX (0x7fffL)
00140 #define INT32_MAX (0x7fffffffL)
00141 #endif
00142
00143 #define __WLAN_ATTRIB_PACK__ __attribute__ ((packed))
00144 #define __WLAN_PRAGMA_PACK1__
00145 #define __WLAN_PRAGMA_PACKDFLT__
00146 #define __WLAN_INLINE__ inline
00147
00148
00149
00150
00151 #ifdef LWNG_13
00152 #error "CODE for this driver version is DEAD and deprecated\nTry to update linux-wlan-ng code"
00153 #endif
00154
00155 #define WIFISCANNER_VERSION WIFISCANNER_VERSION_NUM
00156
00157
00158 #define MAX_BUFFER_SIZE 4096
00159 #define MAX_PACKET_LEN (MAX_BUFFER_SIZE - 2)
00160 #define DEVNAME_LEN 16
00161 #define MCAST_GRP_SNIFF 0x00000002
00162 #define WLAN_STR_ADDR_LEN 18
00163 #define MAXSIZE_OTHERINFORMATION 0x100
00164 #define HISTORY_SIZE 4
00165 #define MAX_NUMBER_OF_DETECTED_CLIENT 8192
00166 #define KEYBOARD_BUFFER 8
00167
00168 #define MANUF_MAXSTRINGLENGTH 32
00169
00170 #ifdef WORDS_BIGENDIAN
00171 #define UINT8_to_UINT16(a,b) ( a + (b << 8))
00172 #define UINT8_to_UINT32(a,b,c,d) ( a + (b << 8) + (c << 16) + (d << 24))
00173 #define UINT8_to_UINT64(a,b,c,d,e,f,g,h) ( a + (b << 8) + (c << 16) + (d << 24) + (e << 32) + (f << 40) + (g << 48) + (h << 52))
00174 #else // It's Little Endian
00175 #define UINT8_to_UINT16(a,b) ( b + (a << 8))
00176 #define UINT8_to_UINT32(a,b,c,d) ( UINT8_to_UINT16(c,d) + (UINT8_to_UINT16(a,b) << 16))
00177 #define UINT8_to_UINT64(a,b,c,d,e,f,g,h) ( h + (g << 8) + (f << 16) + (e << 24) + (d << 32) + (c << 40) + (b << 48) + (a << 52))
00178 #endif
00179 #define UINT8_data(a,offset) (a[offset])
00180 #define UINT16_data(a,offset) (UINT8_to_UINT16(a[offset], a[offset + 1]))
00181 #define UINT32_data(a,offset) (UINT8_to_UINT32(a[offset], a[offset + 1], a[offset + 2], a[offset + 3]))
00182 #define UINT64_data(a,offset) (UINT8_to_UINT64(a[offset], a[offset + 1], a[offset + 2], a[offset + 3], \
00183 a[offset + 4], a[offset + 5], a[offset + 6], a[offset + 7] ))
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195 #define TIME_TO_SLEEP_BEFORE_CHANGE_CHANNEL (1000/(14*1))
00196 #define TIMEOUT_TRY_TO_READ_PAQUET (1000000/(14/2))
00197
00198
00199
00200
00201
00202 #define MIN_OF(x,y) ((x) < (y) ? (x) : (y))
00203 #define MAX_OF(x,y) ((x) > (y) ? (x) : (y))
00204
00205 #define GET_BIT(a,n) ((a >> n) & 1)
00206 #define SET_BIT(a,n) (a|=(1<<n))
00207 #define CLR_BIT(a,n) (a&=~(1<<n))
00208 #define SWITCH_BIT(a,n) (a^=(1<<n))
00209 #define IS_BIT_SET(a,n) (a & (1<<n))
00210 #define IS_BIT_CLR(a,n) (~(a & (1<<n)))
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232 struct bit_field_description {
00233 union {
00234 UINT8 bit_field;
00235 struct {
00236 UINT8 AP:1;
00237 UINT8 BEACON:1;
00238 UINT8 P2P:1;
00239 UINT8 DATA:1;
00240 UINT8 TODS:1;
00241 UINT8 FROMDS:1;
00242 } bit_field2;
00243 } bit_field1;
00244 };
00245
00246 #define TYPE_BIT_AP 0
00247 #define TYPE_BIT_BEACON 1
00248 #define TYPE_BIT_P2P 2
00249 #define TYPE_BIT_DATA 3
00250 #define TYPE_BIT_TODS 4
00251 #define TYPE_BIT_FROMDS 5
00252
00253 #define SET_TYPE_BIT_AP(x) SET_BIT(x, TYPE_BIT_AP)
00254 #define SET_TYPE_BIT_BEACON(x) SET_BIT(x, TYPE_BIT_BEACON)
00255 #define SET_TYPE_BIT_P2P(x) SET_BIT(x, TYPE_BIT_P2P)
00256 #define SET_TYPE_BIT_DATA(x) SET_BIT(x, TYPE_BIT_DATA)
00257 #define SET_TYPE_BIT_TODS(x) SET_BIT(x, TYPE_BIT_TODS)
00258 #define SET_TYPE_BIT_FROMDS(x) SET_BIT(x, TYPE_BIT_FROMDS)
00259
00260 #define CLEAR_TYPE_BIT_AP(x) CLR_BIT(x, TYPE_BIT_AP)
00261 #define CLEAR_TYPE_BIT_BEACON(x) CLR_BIT(x, TYPE_BIT_BEACON)
00262 #define CLEAR_TYPE_BIT_P2P(x) CLR_BIT(x, TYPE_BIT_P2P)
00263 #define CLEAR_TYPE_BIT_DATA(x) CLR_BIT(x, TYPE_BIT_DATA)
00264 #define CLEAR_TYPE_BIT_TODS(x) CLR_BIT(x, TYPE_BIT_TODS)
00265 #define CLEAR_TYPE_BIT_FROMDS(x) CLR_BIT(x, TYPE_BIT_FROMDS)
00266
00267 #define GET_TYPE_BIT_AP(x) GET_BIT(x, TYPE_BIT_AP)
00268 #define GET_TYPE_BIT_BEACON(x) GET_BIT(x, TYPE_BIT_BEACON)
00269 #define GET_TYPE_BIT_P2P(x) GET_BIT(x, TYPE_BIT_P2P)
00270 #define GET_TYPE_BIT_DATA(x) GET_BIT(x, TYPE_BIT_DATA)
00271 #define GET_TYPE_BIT_TODS(x) GET_BIT(x, TYPE_BIT_TODS)
00272 #define GET_TYPE_BIT_FROMDS(x) GET_BIT(x, TYPE_BIT_FROMDS)
00273
00274 #define TYPE_BIT_00 "Client"
00275 #define TYPE_BIT_01 "AP Base"
00276 #define TYPE_BIT_02 "AP Base (STA in master mode)"
00277 #define TYPE_BIT_03 "AP Base (dedicated)"
00278 #define TYPE_BIT_04 "Ad-Hoc STA"
00279 #define TYPE_BIT_05 "???5"
00280 #define TYPE_BIT_06 "Ad-Hoc STA (beacon)"
00281 #define TYPE_BIT_07 "Ad-Hoc STA"
00282 #define TYPE_BIT_08 "STA Activity"
00283 #define TYPE_BIT_09 "???9 Reserved"
00284 #define TYPE_BIT_0A "???A Reserved"
00285 #define TYPE_BIT_0B "???B Reserved"
00286 #define TYPE_BIT_0C "???C Reserved"
00287 #define TYPE_BIT_0D "???D Reserved"
00288 #define TYPE_BIT_0E "???E Reserved"
00289 #define TYPE_BIT_0F "???F Reserved"
00290
00291 #define SUBTYPE_BIT_00 "Radio only"
00292 #define SUBTYPE_BIT_01 "Data To DS"
00293 #define SUBTYPE_BIT_02 "Data From DS"
00294 #define SUBTYPE_BIT_03 "Data AP to AP"
00295 #define SUBTYPE_BIT_04 "???4 Reserved"
00296 #define SUBTYPE_BIT_05 "???5 Reserved"
00297 #define SUBTYPE_BIT_06 "???6 Reserved"
00298 #define SUBTYPE_BIT_07 "???7 Reserved"
00299 #define SUBTYPE_BIT_08 "???8 Reserved"
00300 #define SUBTYPE_BIT_09 "???9 Reserved"
00301 #define SUBTYPE_BIT_0A "???A Reserved"
00302 #define SUBTYPE_BIT_0B "???B Reserved"
00303 #define SUBTYPE_BIT_0C "???C Reserved"
00304 #define SUBTYPE_BIT_0D "???D Reserved"
00305 #define SUBTYPE_BIT_0E "???E Reserved"
00306 #define SUBTYPE_BIT_0F "???F Reserved"
00307
00308 #define WLAN_SIZEOF_TYPEOFPACKET (6+4+1)
00309
00310 #define STR_YES "Yes"
00311 #define STR_NO "No"
00312
00313 #define STR_WEP "Cry"
00314 #define STR_WPA "WPA"
00315 #define STR_NOWEP "---"
00316
00317 #define STR_STA "STA"
00318 #define STR_sta "sta"
00319 #define STR_AP "AP"
00320
00321 #ifndef WLAN_FSTYPE_ACTION
00322 #define WLAN_FSTYPE_ACTION 0x0D
00323 #define WLAN_FSTYPE_BLOCK_ACK_REQ 0x08
00324 #define WLAN_FSTYPE_BLOCK_ACK 0x09
00325 #endif
00326
00328 #define MAX_DEBUG_LEVEL 3
00329 #define DEBUG_POINT debug(3, "%s:%d\n", __FUNCTION__, __LINE__);
00330
00334 #define HELPTEXT1 \
00335 "Call with no parameters or with the following options\n" \
00336 " --help -h - This help page\n" \
00337 " --version -v - Write Version and quit\n" \
00338 " --verbose -V level - For verbose, level 2 is for debugging\n" \
00339 " --card-driver -C - Wireless card driver :\n" \
00340 " 'prism', 'cisco' 'cisco_wifi (eth+wifi)' 'orinoco' 'atheros', 'prism54g', \n"\
00341 " 'ipw2200', 'ipw2100', 'airjack', 'hostap', 'madwifi-ng' or 'pcap'\n" \
00342 " --iface -i device - Name of the interface (default wlan0)\n" \
00343 " - for cisco_wifi driver, give the two interfaces like eth1,wifi0\n" \
00344 " --pcapsrc -r filename - Name of pcap file\n" \
00345 " --output-file -F filename - Save output to a file as well as stdout\n" \
00346 " --device-file -D filename - Create a file of detected devices, in a .dot format\n" \
00347 " --hop -H number - Number of hops do for rotating channel (default 5)\n" \
00348 " --channel -S channel - Only listen on a specific Channel (1-14)\n" \
00349 " --computer-date -d - Write date in machine readable format\n" \
00350 " --ids -I - Activate the IDS functions\n" \
00351 " --max-packets -M number - Max packets to capture before exit\n" \
00352 " (0 = unlimited)\n" \
00353 " --hide-packets -N abcd - Do not display Ack, Beacon, Control, Data\n" \
00354 " --hop-delay -t number - Number of ms before channel change (default=200)\n" \
00355 " --disable-check -c - Do not chek curses screen size\n"
00356
00357 #ifdef WITH_WIRETAP
00358 #define HELPTEXT HELPTEXT1 \
00359 " --pcap-file -W filename - Save sniffed data to a file in PCAP format\n"
00360 #else
00361 #define WITHOUT_WIRETAP
00362 #define HELPTEXT HELPTEXT1
00363 #endif
00364
00365
00366
00367
00368
00369
00370
00372 #define DISPLAY_ACK_BIT 0
00373 #define DISPLAY_BEACON_BIT 1
00374 #define DISPLAY_CONTROL_BIT 2
00375 #define DISPLAY_DATA_BIT 3
00376 #define DISPLAY_PROBE_BIT 4
00377 #define DISPLAY_STATION_BIT 5
00378
00379 #define IS_DISPLAY_ACK(x) ( IS_BIT_SET(x, DISPLAY_ACK_BIT))
00380 #define IS_DISPLAY_BEACON(x) ( IS_BIT_SET(x, DISPLAY_BEACON_BIT))
00381 #define IS_DISPLAY_CONTROL(x) ( IS_BIT_SET(x, DISPLAY_CONTROL_BIT))
00382 #define IS_DISPLAY_DATA(x) ( IS_BIT_SET(x, DISPLAY_DATA_BIT))
00383 #define IS_DISPLAY_PROBE(x) ( IS_BIT_SET(x, DISPLAY_PROBE_BIT))
00384 #define IS_DISPLAY_STATION(x) ( IS_BIT_SET(x, DISPLAY_STATION_BIT))
00385
00387 #define WLAN_NG_CARD 1
00388 #define CISCO_CARD 2
00389 #define LUCENT_CARD 3
00390 #define WLAN_NG_CARD_AVS_CFF2 4
00391 #define PCAP_VIRTUAL_CARD 5
00392 #define HOSTAP_CARD 6
00393 #define CISCO_CVS_CARD 7
00394 #define ATHEROS_CARD 8
00395 #define PRISM54G_CARD 9
00396 #define AIRJACK_CARD 10
00397 #define IPW_CARD 11
00398 #define MADWIFI_NG_CARD 12
00399
00400 #ifndef phytype_fhss_dot11_97
00401 #define phytype_fhss_dot11_97 1
00402 #define phytype_dsss_dot11_97 2
00403 #define phytype_irbaseband 3
00404 #define phytype_dsss_dot11_b 4
00405 #define phytype_pbcc_dot11_b 5
00406 #define phytype_ofdm_dot11_g 6
00407 #define phytype_pbcc_dot11_g 7
00408 #define phytype_ofdm_dot11_a 8
00409 #endif
00410
00411
00412
00413
00414
00415
00416 enum {
00417 NO_ERROR = 0,
00418
00419 ERROR_CANT_CREATE_SOCKET,
00420 ERROR_COULDNT_FIND_A_FREE_IFACE,
00421 ERROR_CANT_OPEN_PCAP,
00422 ERROR_UNKNOWN_INTERFACE,
00423 ERROR_CANT_SET_CHANNEL,
00424 ERROR_CANT_SET_MODE,
00425 ERROR_CANT_SET_SSID,
00426 ERROR_CHANNEL_OUT_OF_BOUND,
00427 ERROR_HOP_OUT_OF_BOUND,
00428 ERROR_DONT_TRY_TO_SLEEP_ON_THE_KEYBOARD,
00429 ERROR_UNKNOWN_INTERFACE_TYPE,
00430 ERROR_BAD_PARAMETER,
00431 ERROR_MISSING_PCAP_FILE,
00432 ERROR_NOT_ROOT,
00433 ERROR_PCAP_CANT_OPEN,
00434 ERROR_PQT_TYPE_IS_UNKNOWN,
00435 ERROR_CANT_OPEN_FILE,
00436 ERROR_SIG_HANDLER,
00437 ERROR_THREAD_CANT_INIT,
00438 ERROR_IF_CANT_INIT,
00439 ALL_CHANNEL_ARE_LOCKED,
00440
00441 EXIT_BY_CTRLC,
00442 EXIT_PB_WITH_CHANNEL_HOP,
00443 EXIT_PB_WITH_CHANNEL_INIT,
00444 EXIT_CANT_SAVE_DATA,
00445 EXIT_MAX_PACKET_REACHED,
00446 EXIT_WITH_Q,
00447
00448 TYPE_OF_CARD_IS_UNKNOWN,
00449
00450 MADWIFING_ERROR_NO_DEVICE_PRESENT,
00451 MADWIFING_ERROR_CANT_CREATE_SOCKET,
00452 MADWIFING_ERROR_CANT_DESTROY_VAP,
00453 MADWIFING_ERROR_NO_VAP_CREATED,
00454 MADWIFING_ERROR_CANT_SET_IFFLAGS,
00455 MADWIFING_ERROR_NO_INTERFACE_AVAILABLE,
00456
00457 CISCO_PROC_FILE_ERROR,
00458
00459 IWPRIV_FAILED_TO_RETREIVE_IOCTL_LIST,
00460 IWPRIV_FAILED_TO_FIND_IOCTL,
00461 IWPRIV_FAILED_TO_FIND_SUBIOCTL,
00462 IWPRIV_FAILED_TO_SET_VALUE,
00463 IWPRIV_DOES_NOT_ACCEPT_INTEGER,
00464 IWPRIV_NEED_MORE_THAN_2_ARG,
00465 IWPRIV_FAILED_TO_SET_IOCTL,
00466
00467 GPSD_UNKNOWN_HOST,
00468 GPSD_CANT_OPEN_SOCKET,
00469 GPSD_CANT_BIND_PORT,
00470 GPSD_CANT_CONNECT,
00471 GPSD_WRITE_ERROR,
00472
00473 ERROR_UNKNOWN
00474 };
00475
00476
00477 #define IW_MAX_PRIV_DEF 256
00478
00479
00480
00481
00482
00483 #define WLAN_ETHADDR_LEN 6
00484 #define WLAN_IEEE_OUI_LEN 3
00485
00486 #define WLAN_ETHCONV_ENCAP 1
00487 #define WLAN_ETHCONV_RFC1042 2
00488 #define WLAN_ETHCONV_8021h 3
00489
00490 #define WLAN_MIN_ETHFRM_LEN 60
00491 #define WLAN_MAX_ETHFRM_LEN 1514
00492 #define WLAN_ETHHDR_LEN 14
00493
00494
00495
00496
00497
00498 #define WLAN_SSID_MAXLEN 32
00499
00500 #ifndef P80211CAPTURE_VERSION
00501
00502 #define P80211CAPTURE_VERSION 0x80211001
00503
00504
00505
00506
00511 __WLAN_PRAGMA_PACK1__ typedef struct p80211_caphdr {
00512 UINT32 version __WLAN_ATTRIB_PACK__;
00513 UINT32 length __WLAN_ATTRIB_PACK__;
00514 UINT64 mactime __WLAN_ATTRIB_PACK__;
00515 UINT64 hosttime __WLAN_ATTRIB_PACK__;
00516 UINT32 phytype __WLAN_ATTRIB_PACK__;
00517 UINT32 channel __WLAN_ATTRIB_PACK__;
00518 UINT32 datarate __WLAN_ATTRIB_PACK__;
00519 UINT32 antenna __WLAN_ATTRIB_PACK__;
00520 UINT32 priority __WLAN_ATTRIB_PACK__;
00521 UINT32 ssi_type __WLAN_ATTRIB_PACK__;
00522 INT32 ssi_signal __WLAN_ATTRIB_PACK__;
00523 INT32 ssi_noise __WLAN_ATTRIB_PACK__;
00524 UINT32 preamble __WLAN_ATTRIB_PACK__;
00525 UINT32 encoding __WLAN_ATTRIB_PACK__;
00526 } p80211_caphdr_t;
00527
00528 __WLAN_PRAGMA_PACKDFLT__
00529 #endif // ifndef P80211CAPTURE_VERSION
00530
00534 typedef struct {
00535 UINT64 ts;
00536 UINT16 bcn_int;
00537 UINT16 cap_info;
00538 } FixedField_t;
00539
00541 typedef struct {
00542 char DestMac[WLAN_STR_ADDR_LEN];
00543 char SrcMac[WLAN_STR_ADDR_LEN];
00544 char BssId[WLAN_STR_ADDR_LEN];
00545 char SSID[WLAN_SSID_MAXLEN + 1];
00546 UINT8 hasWep;
00547 UINT8 hasWPA;
00548
00549 UINT8 Channel;
00550 UINT8 SChannel;
00551 UINT8 Signal;
00552 UINT8 Noise;
00553 UINT8 Rate;
00554 UINT16 TypeOfClient;
00555 char OtherInformation[MAXSIZE_OTHERINFORMATION];
00556 char TypeOfPacket[WLAN_SIZEOF_TYPEOFPACKET];
00557 UINT16 PacketSize;
00558 UINT8 TypeSubtype;
00559 UINT8 IV[4];
00560 } ScanResult_t;
00561
00563 typedef struct {
00564 UINT8 AddMac[WLAN_ADDR_LEN];
00565 UINT8 BSSID[WLAN_ADDR_LEN];
00566 char SSID[WLAN_SSID_MAXLEN + 1];
00567 UINT32 SNMax;
00568 UINT32 SNMin;
00569 UINT32 SNMed;
00570 UINT32 SN[HISTORY_SIZE];
00571 UINT8 RateMax, RateMin;
00572 UINT8 MaxSpeed;
00573 UINT8 hasWep:1;
00574 UINT8 hasWPA:1;
00575 UINT8 hasTKIP:1;
00576 UINT8 hasCCMP:1;
00577 UINT8 hasWPAPSK:1;
00578 UINT8 hasWPA2PSK:1;
00579 UINT8 IsDS:1;
00580 UINT8 IsAP:1;
00581 UINT8 IsP2P:1;
00582 UINT8 Channel;
00583 UINT16 bcn_int[HISTORY_SIZE];
00584 UINT64 TimeStamp[HISTORY_SIZE];
00585 UINT16 SeqNum[HISTORY_SIZE];
00586 UINT16 SeqNumWithAP[HISTORY_SIZE];
00587 char OtherInformation[MAXSIZE_OTHERINFORMATION + 1];
00588 UINT8 LastIV[4];
00589 float coef_a_TS, coef_b_TS;
00590 char Manuf[MANUF_MAXSTRINGLENGTH + 1];
00591 char Model[MANUF_MAXSTRINGLENGTH + 1];
00592 } ClientInfo_t;
00593
00595 typedef struct {
00596 UINT16 AP;
00597 UINT16 STA;
00598 UINT32 Beacon;
00599 UINT16 SSID;
00600 UINT16 Channel;
00601 UINT16 INVLD;
00602 UINT32 WeakIV;
00603 UINT32 CryptedPackets;
00604 UINT32 Packets;
00605 UINT8 IV[4];
00606 UINT8 MaxSignal[14];
00607 } Statistics_t;
00608
00610 typedef struct CaptureArg_t {
00611 pcap_t *pcap;
00612 pcap_dumper_t *dump;
00613 int offset;
00614 int DataLink;
00615 } CaptureArg;
00616
00617
00618 typedef struct {
00619 UINT8 SingleChannel;
00620 char *OutFileName;
00621 char *OutDumpFileName;
00622 char *OutDotFileName;
00623 char *InPcapFileName;
00624 UINT8 DebugLevel;
00625 unsigned int TimeToSleepBeforeChangeChannel;
00626 char devname[DEVNAME_LEN];
00627 char devname2[DEVNAME_LEN];
00628 UINT8 ChannelHop;
00629 UINT64 MaxPacket;
00630 UINT8 DateFormat;
00631 UINT8 DoNotDisplay;
00632 UINT8 IDS_is_ON;
00633 UINT8 SendAlert2Syslog;
00634 UINT8 CheckScreenSize;
00635 UINT8 TypeOfCard;
00636 UINT16 FirstNIC;
00637 UINT8 GPSDisWanted;
00638 char *HostGPSD;
00639 UINT16 PortOfGPSD;
00640 UINT8 JammingNow;
00641 } ConfigStruct;
00642
00643
00644
00645 typedef struct {
00646 char Name[MANUF_MAXSTRINGLENGTH + 1];
00647 char Model[MANUF_MAXSTRINGLENGTH + 1];
00648 } ManufData_t;
00649
00650 #endif