include.h File Reference

#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
#include <limits.h>
#include <string.h>
#include <sys/time.h>
#include <time.h>
#include <sys/timeb.h>
#include <sys/socket.h>
#include <sys/resource.h>
#include <sys/ioctl.h>
#include <asm/types.h>
#include <linux/netlink.h>
#include <errno.h>
#include <ctype.h>
#include <linux/if.h>
#include <linux/wireless.h>
#include <net/bpf.h>
#include <ncurses.h>
#include <pthread.h>
#include <pcap.h>
#include <wlan/p80211hdr.h>

Include dependency graph for include.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bit_field_description
struct  p80211_caphdr
struct  FixedField_t
struct  ScanResult_t
struct  ClientInfo_t
struct  Statistics_t
struct  CaptureArg_t
struct  ConfigStruct
struct  ManufData_t

Defines

#define ABSTRACTION_LAYER
#define FALSE   (UINT8) 0
#define TRUE   (UINT8) 1
#define UINT8_MAX   (0xffUL)
#define UINT16_MAX   (0xffffUL)
#define UINT32_MAX   (0xffffffffUL)
#define INT8_MAX   (0x7fL)
#define INT16_MAX   (0x7fffL)
#define INT32_MAX   (0x7fffffffL)
#define __WLAN_ATTRIB_PACK__   __attribute__ ((packed))
#define __WLAN_PRAGMA_PACK1__
#define __WLAN_PRAGMA_PACKDFLT__
#define __WLAN_INLINE__   inline
#define WIFISCANNER_VERSION   WIFISCANNER_VERSION_NUM
#define MAX_BUFFER_SIZE   4096
#define MAX_PACKET_LEN   (MAX_BUFFER_SIZE - 2)
#define DEVNAME_LEN   16
#define MCAST_GRP_SNIFF   0x00000002
#define WLAN_STR_ADDR_LEN   18
#define MAXSIZE_OTHERINFORMATION   0x100
#define HISTORY_SIZE   4
#define MAX_NUMBER_OF_DETECTED_CLIENT   8192
#define KEYBOARD_BUFFER   8
#define MANUF_MAXSTRINGLENGTH   32
#define UINT8_to_UINT16(a, b)   ( b + (a << 8))
#define UINT8_to_UINT32(a, b, c, d)   ( UINT8_to_UINT16(c,d) + (UINT8_to_UINT16(a,b) << 16))
#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))
#define UINT8_data(a, offset)   (a[offset])
#define UINT16_data(a, offset)   (UINT8_to_UINT16(a[offset], a[offset + 1]))
#define UINT32_data(a, offset)   (UINT8_to_UINT32(a[offset], a[offset + 1], a[offset + 2], a[offset + 3]))
#define UINT64_data(a, offset)
#define TIME_TO_SLEEP_BEFORE_CHANGE_CHANNEL   (1000/(14*1))
#define TIMEOUT_TRY_TO_READ_PAQUET   (1000000/(14/2))
#define MIN_OF(x, y)   ((x) < (y) ? (x) : (y))
#define MAX_OF(x, y)   ((x) > (y) ? (x) : (y))
#define GET_BIT(a, n)   ((a >> n) & 1)
#define SET_BIT(a, n)   (a|=(1<<n))
#define CLR_BIT(a, n)   (a&=~(1<<n))
#define SWITCH_BIT(a, n)   (a^=(1<<n))
#define IS_BIT_SET(a, n)   (a & (1<<n))
#define IS_BIT_CLR(a, n)   (~(a & (1<<n)))
#define TYPE_BIT_AP   0
#define TYPE_BIT_BEACON   1
#define TYPE_BIT_P2P   2
#define TYPE_BIT_DATA   3
#define TYPE_BIT_TODS   4
#define TYPE_BIT_FROMDS   5
#define SET_TYPE_BIT_AP(x)   SET_BIT(x, TYPE_BIT_AP)
#define SET_TYPE_BIT_BEACON(x)   SET_BIT(x, TYPE_BIT_BEACON)
#define SET_TYPE_BIT_P2P(x)   SET_BIT(x, TYPE_BIT_P2P)
#define SET_TYPE_BIT_DATA(x)   SET_BIT(x, TYPE_BIT_DATA)
#define SET_TYPE_BIT_TODS(x)   SET_BIT(x, TYPE_BIT_TODS)
#define SET_TYPE_BIT_FROMDS(x)   SET_BIT(x, TYPE_BIT_FROMDS)
#define CLEAR_TYPE_BIT_AP(x)   CLR_BIT(x, TYPE_BIT_AP)
#define CLEAR_TYPE_BIT_BEACON(x)   CLR_BIT(x, TYPE_BIT_BEACON)
#define CLEAR_TYPE_BIT_P2P(x)   CLR_BIT(x, TYPE_BIT_P2P)
#define CLEAR_TYPE_BIT_DATA(x)   CLR_BIT(x, TYPE_BIT_DATA)
#define CLEAR_TYPE_BIT_TODS(x)   CLR_BIT(x, TYPE_BIT_TODS)
#define CLEAR_TYPE_BIT_FROMDS(x)   CLR_BIT(x, TYPE_BIT_FROMDS)
#define GET_TYPE_BIT_AP(x)   GET_BIT(x, TYPE_BIT_AP)
#define GET_TYPE_BIT_BEACON(x)   GET_BIT(x, TYPE_BIT_BEACON)
#define GET_TYPE_BIT_P2P(x)   GET_BIT(x, TYPE_BIT_P2P)
#define GET_TYPE_BIT_DATA(x)   GET_BIT(x, TYPE_BIT_DATA)
#define GET_TYPE_BIT_TODS(x)   GET_BIT(x, TYPE_BIT_TODS)
#define GET_TYPE_BIT_FROMDS(x)   GET_BIT(x, TYPE_BIT_FROMDS)
#define TYPE_BIT_00   "Client"
#define TYPE_BIT_01   "AP Base"
#define TYPE_BIT_02   "AP Base (STA in master mode)"
#define TYPE_BIT_03   "AP Base (dedicated)"
#define TYPE_BIT_04   "Ad-Hoc STA"
#define TYPE_BIT_05   "???5"
#define TYPE_BIT_06   "Ad-Hoc STA (beacon)"
#define TYPE_BIT_07   "Ad-Hoc STA"
#define TYPE_BIT_08   "STA Activity"
#define TYPE_BIT_09   "???9 Reserved"
#define TYPE_BIT_0A   "???A Reserved"
#define TYPE_BIT_0B   "???B Reserved"
#define TYPE_BIT_0C   "???C Reserved"
#define TYPE_BIT_0D   "???D Reserved"
#define TYPE_BIT_0E   "???E Reserved"
#define TYPE_BIT_0F   "???F Reserved"
#define SUBTYPE_BIT_00   "Radio only"
#define SUBTYPE_BIT_01   "Data To DS"
#define SUBTYPE_BIT_02   "Data From DS"
#define SUBTYPE_BIT_03   "Data AP to AP"
#define SUBTYPE_BIT_04   "???4 Reserved"
#define SUBTYPE_BIT_05   "???5 Reserved"
#define SUBTYPE_BIT_06   "???6 Reserved"
#define SUBTYPE_BIT_07   "???7 Reserved"
#define SUBTYPE_BIT_08   "???8 Reserved"
#define SUBTYPE_BIT_09   "???9 Reserved"
#define SUBTYPE_BIT_0A   "???A Reserved"
#define SUBTYPE_BIT_0B   "???B Reserved"
#define SUBTYPE_BIT_0C   "???C Reserved"
#define SUBTYPE_BIT_0D   "???D Reserved"
#define SUBTYPE_BIT_0E   "???E Reserved"
#define SUBTYPE_BIT_0F   "???F Reserved"
#define WLAN_SIZEOF_TYPEOFPACKET   (6+4+1)
#define STR_YES   "Yes"
#define STR_NO   "No"
#define STR_WEP   "Cry"
#define STR_WPA   "WPA"
#define STR_NOWEP   "---"
#define STR_STA   "STA"
#define STR_sta   "sta"
#define STR_AP   "AP"
#define WLAN_FSTYPE_ACTION   0x0D
#define WLAN_FSTYPE_BLOCK_ACK_REQ   0x08
#define WLAN_FSTYPE_BLOCK_ACK   0x09
#define MAX_DEBUG_LEVEL   3
#define DEBUG_POINT   debug(3, "%s:%d\n", __FUNCTION__, __LINE__);
#define HELPTEXT1
#define HELPTEXT
#define DISPLAY_ACK_BIT   0
#define DISPLAY_BEACON_BIT   1
#define DISPLAY_CONTROL_BIT   2
#define DISPLAY_DATA_BIT   3
#define DISPLAY_PROBE_BIT   4
#define DISPLAY_STATION_BIT   5
#define IS_DISPLAY_ACK(x)   ( IS_BIT_SET(x, DISPLAY_ACK_BIT))
#define IS_DISPLAY_BEACON(x)   ( IS_BIT_SET(x, DISPLAY_BEACON_BIT))
#define IS_DISPLAY_CONTROL(x)   ( IS_BIT_SET(x, DISPLAY_CONTROL_BIT))
#define IS_DISPLAY_DATA(x)   ( IS_BIT_SET(x, DISPLAY_DATA_BIT))
#define IS_DISPLAY_PROBE(x)   ( IS_BIT_SET(x, DISPLAY_PROBE_BIT))
#define IS_DISPLAY_STATION(x)   ( IS_BIT_SET(x, DISPLAY_STATION_BIT))
#define WLAN_NG_CARD   1
#define CISCO_CARD   2
#define LUCENT_CARD   3
#define WLAN_NG_CARD_AVS_CFF2   4
#define PCAP_VIRTUAL_CARD   5
#define HOSTAP_CARD   6
#define CISCO_CVS_CARD   7
#define ATHEROS_CARD   8
#define PRISM54G_CARD   9
#define AIRJACK_CARD   10
#define IPW_CARD   11
#define MADWIFI_NG_CARD   12
#define phytype_fhss_dot11_97   1
#define phytype_dsss_dot11_97   2
#define phytype_irbaseband   3
#define phytype_dsss_dot11_b   4
#define phytype_pbcc_dot11_b   5
#define phytype_ofdm_dot11_g   6
#define phytype_pbcc_dot11_g   7
#define phytype_ofdm_dot11_a   8
#define IW_MAX_PRIV_DEF   256
#define WLAN_ETHADDR_LEN   6
#define WLAN_IEEE_OUI_LEN   3
#define WLAN_ETHCONV_ENCAP   1
#define WLAN_ETHCONV_RFC1042   2
#define WLAN_ETHCONV_8021h   3
#define WLAN_MIN_ETHFRM_LEN   60
#define WLAN_MAX_ETHFRM_LEN   1514
#define WLAN_ETHHDR_LEN   14
#define WLAN_SSID_MAXLEN   32
#define P80211CAPTURE_VERSION   0x80211001

Typedefs

typedef struct p80211_caphdr p80211_caphdr_t
typedef struct CaptureArg_t CaptureArg

Enumerations

enum  {
  NO_ERROR = 0, ERROR_CANT_CREATE_SOCKET, ERROR_COULDNT_FIND_A_FREE_IFACE, ERROR_CANT_OPEN_PCAP,
  ERROR_UNKNOWN_INTERFACE, ERROR_CANT_SET_CHANNEL, ERROR_CANT_SET_MODE, ERROR_CANT_SET_SSID,
  ERROR_CHANNEL_OUT_OF_BOUND, ERROR_HOP_OUT_OF_BOUND, ERROR_DONT_TRY_TO_SLEEP_ON_THE_KEYBOARD, ERROR_UNKNOWN_INTERFACE_TYPE,
  ERROR_BAD_PARAMETER, ERROR_MISSING_PCAP_FILE, ERROR_NOT_ROOT, ERROR_PCAP_CANT_OPEN,
  ERROR_PQT_TYPE_IS_UNKNOWN, ERROR_CANT_OPEN_FILE, ERROR_SIG_HANDLER, ERROR_THREAD_CANT_INIT,
  ERROR_IF_CANT_INIT, ALL_CHANNEL_ARE_LOCKED, EXIT_BY_CTRLC, EXIT_PB_WITH_CHANNEL_HOP,
  EXIT_PB_WITH_CHANNEL_INIT, EXIT_CANT_SAVE_DATA, EXIT_MAX_PACKET_REACHED, EXIT_WITH_Q,
  TYPE_OF_CARD_IS_UNKNOWN, MADWIFING_ERROR_NO_DEVICE_PRESENT, MADWIFING_ERROR_CANT_CREATE_SOCKET, MADWIFING_ERROR_CANT_DESTROY_VAP,
  MADWIFING_ERROR_NO_VAP_CREATED, MADWIFING_ERROR_CANT_SET_IFFLAGS, MADWIFING_ERROR_NO_INTERFACE_AVAILABLE, CISCO_PROC_FILE_ERROR,
  IWPRIV_FAILED_TO_RETREIVE_IOCTL_LIST, IWPRIV_FAILED_TO_FIND_IOCTL, IWPRIV_FAILED_TO_FIND_SUBIOCTL, IWPRIV_FAILED_TO_SET_VALUE,
  IWPRIV_DOES_NOT_ACCEPT_INTEGER, IWPRIV_NEED_MORE_THAN_2_ARG, IWPRIV_FAILED_TO_SET_IOCTL, GPSD_UNKNOWN_HOST,
  GPSD_CANT_OPEN_SOCKET, GPSD_CANT_BIND_PORT, GPSD_CANT_CONNECT, GPSD_WRITE_ERROR,
  ERROR_UNKNOWN
}


Define Documentation

#define ABSTRACTION_LAYER

Definition at line 52 of file include.h.

#define FALSE   (UINT8) 0

Definition at line 127 of file include.h.

#define TRUE   (UINT8) 1

Definition at line 130 of file include.h.

#define UINT8_MAX   (0xffUL)

Definition at line 134 of file include.h.

#define UINT16_MAX   (0xffffUL)

Definition at line 135 of file include.h.

#define UINT32_MAX   (0xffffffffUL)

Definition at line 136 of file include.h.

#define INT8_MAX   (0x7fL)

Definition at line 138 of file include.h.

#define INT16_MAX   (0x7fffL)

Definition at line 139 of file include.h.

#define INT32_MAX   (0x7fffffffL)

Definition at line 140 of file include.h.

#define __WLAN_ATTRIB_PACK__   __attribute__ ((packed))

Definition at line 143 of file include.h.

#define __WLAN_PRAGMA_PACK1__

Definition at line 144 of file include.h.

#define __WLAN_PRAGMA_PACKDFLT__

Definition at line 145 of file include.h.

#define __WLAN_INLINE__   inline

Definition at line 146 of file include.h.

#define WIFISCANNER_VERSION   WIFISCANNER_VERSION_NUM

Definition at line 155 of file include.h.

Referenced by InitScreen(), and main().

#define MAX_BUFFER_SIZE   4096

#define MAX_PACKET_LEN   (MAX_BUFFER_SIZE - 2)

Definition at line 159 of file include.h.

Referenced by openPacketIPW().

#define DEVNAME_LEN   16

Definition at line 160 of file include.h.

Referenced by do_ioctl(), openCardWLAN(), ParseCommandLine(), selectChannelWLAN(), and shutCardWLAN().

#define MCAST_GRP_SNIFF   0x00000002

Definition at line 161 of file include.h.

#define WLAN_STR_ADDR_LEN   18

Definition at line 162 of file include.h.

Referenced by analyseACK(), analyseCTS(), analyseData(), analysePSPOLL(), and analyseRTS().

#define MAXSIZE_OTHERINFORMATION   0x100

Definition at line 163 of file include.h.

Referenced by LogPutOtherInformation(), and UpdateOtherInformation().

#define HISTORY_SIZE   4

#define MAX_NUMBER_OF_DETECTED_CLIENT   8192

Definition at line 165 of file include.h.

Referenced by LogDetectedClient(), and main().

#define KEYBOARD_BUFFER   8

Definition at line 166 of file include.h.

Referenced by check_keys_th(), and parse_keystring().

#define MANUF_MAXSTRINGLENGTH   32

Definition at line 168 of file include.h.

Referenced by LogDetectedClient().

#define UINT8_to_UINT16 ( a,
 )     ( b + (a << 8))

Definition at line 175 of file include.h.

#define UINT8_to_UINT32 ( a,
b,
c,
 )     ( UINT8_to_UINT16(c,d) + (UINT8_to_UINT16(a,b) << 16))

Definition at line 176 of file include.h.

#define UINT8_to_UINT64 ( a,
b,
c,
d,
e,
f,
g,
 )     ( h + (g << 8) + (f << 16) + (e << 24) + (d << 32) + (c << 40) + (b << 48) + (a << 52))

Definition at line 177 of file include.h.

#define UINT8_data ( a,
offset   )     (a[offset])

Definition at line 179 of file include.h.

#define UINT16_data ( a,
offset   )     (UINT8_to_UINT16(a[offset], a[offset + 1]))

Definition at line 180 of file include.h.

#define UINT32_data ( a,
offset   )     (UINT8_to_UINT32(a[offset], a[offset + 1], a[offset + 2], a[offset + 3]))

Definition at line 181 of file include.h.

#define UINT64_data ( a,
offset   ) 

Value:

(UINT8_to_UINT64(a[offset], a[offset + 1], a[offset + 2], a[offset + 3], \
                                                 a[offset + 4], a[offset + 5], a[offset + 6], a[offset + 7] ))

Definition at line 182 of file include.h.

#define TIME_TO_SLEEP_BEFORE_CHANGE_CHANNEL   (1000/(14*1))

Definition at line 195 of file include.h.

Referenced by parse_keystring().

#define TIMEOUT_TRY_TO_READ_PAQUET   (1000000/(14/2))

Definition at line 196 of file include.h.

#define MIN_OF ( x,
 )     ((x) < (y) ? (x) : (y))

#define MAX_OF ( x,
 )     ((x) > (y) ? (x) : (y))

Definition at line 203 of file include.h.

Referenced by getPacketHOSTAP(), getPacketIPW(), getPacketMADWIFI_NG(), and getPacketWLAN().

#define GET_BIT ( a,
 )     ((a >> n) & 1)

Definition at line 205 of file include.h.

#define SET_BIT ( a,
 )     (a|=(1<<n))

Definition at line 206 of file include.h.

Referenced by ParseCommandLine().

#define CLR_BIT ( a,
 )     (a&=~(1<<n))

Definition at line 207 of file include.h.

#define SWITCH_BIT ( a,
 )     (a^=(1<<n))

Definition at line 208 of file include.h.

Referenced by parse_keystring().

#define IS_BIT_SET ( a,
 )     (a & (1<<n))

Definition at line 209 of file include.h.

Referenced by analyseData(), dataIsCrypted(), FillRadioData(), and WriteSummary().

#define IS_BIT_CLR ( a,
 )     (~(a & (1<<n)))

Definition at line 210 of file include.h.

#define TYPE_BIT_AP   0

Definition at line 246 of file include.h.

#define TYPE_BIT_BEACON   1

Definition at line 247 of file include.h.

#define TYPE_BIT_P2P   2

Definition at line 248 of file include.h.

#define TYPE_BIT_DATA   3

Definition at line 249 of file include.h.

#define TYPE_BIT_TODS   4

Definition at line 250 of file include.h.

#define TYPE_BIT_FROMDS   5

Definition at line 251 of file include.h.

#define SET_TYPE_BIT_AP (  )     SET_BIT(x, TYPE_BIT_AP)

Definition at line 253 of file include.h.

Referenced by analyseBeacon(), analyseData(), analyseProbeRep(), and ProcessTagBits().

#define SET_TYPE_BIT_BEACON (  )     SET_BIT(x, TYPE_BIT_BEACON)

Definition at line 254 of file include.h.

Referenced by analyseBeacon().

#define SET_TYPE_BIT_P2P (  )     SET_BIT(x, TYPE_BIT_P2P)

Definition at line 255 of file include.h.

Referenced by analyseBeacon(), analyseProbeRep(), and ProcessTagBits().

#define SET_TYPE_BIT_DATA (  )     SET_BIT(x, TYPE_BIT_DATA)

Definition at line 256 of file include.h.

Referenced by processPacket().

#define SET_TYPE_BIT_TODS (  )     SET_BIT(x, TYPE_BIT_TODS)

Definition at line 257 of file include.h.

Referenced by analyseData().

#define SET_TYPE_BIT_FROMDS (  )     SET_BIT(x, TYPE_BIT_FROMDS)

Definition at line 258 of file include.h.

Referenced by analyseData().

#define CLEAR_TYPE_BIT_AP (  )     CLR_BIT(x, TYPE_BIT_AP)

Definition at line 260 of file include.h.

Referenced by analyseBeacon(), analyseProbeRep(), and ProcessTagBits().

#define CLEAR_TYPE_BIT_BEACON (  )     CLR_BIT(x, TYPE_BIT_BEACON)

Definition at line 261 of file include.h.

#define CLEAR_TYPE_BIT_P2P (  )     CLR_BIT(x, TYPE_BIT_P2P)

Definition at line 262 of file include.h.

Referenced by analyseBeacon(), and analyseProbeRep().

#define CLEAR_TYPE_BIT_DATA (  )     CLR_BIT(x, TYPE_BIT_DATA)

Definition at line 263 of file include.h.

#define CLEAR_TYPE_BIT_TODS (  )     CLR_BIT(x, TYPE_BIT_TODS)

Definition at line 264 of file include.h.

#define CLEAR_TYPE_BIT_FROMDS (  )     CLR_BIT(x, TYPE_BIT_FROMDS)

Definition at line 265 of file include.h.

#define GET_TYPE_BIT_AP (  )     GET_BIT(x, TYPE_BIT_AP)

Definition at line 267 of file include.h.

Referenced by main().

#define GET_TYPE_BIT_BEACON (  )     GET_BIT(x, TYPE_BIT_BEACON)

Definition at line 268 of file include.h.

#define GET_TYPE_BIT_P2P (  )     GET_BIT(x, TYPE_BIT_P2P)

Definition at line 269 of file include.h.

#define GET_TYPE_BIT_DATA (  )     GET_BIT(x, TYPE_BIT_DATA)

Definition at line 270 of file include.h.

#define GET_TYPE_BIT_TODS (  )     GET_BIT(x, TYPE_BIT_TODS)

Definition at line 271 of file include.h.

#define GET_TYPE_BIT_FROMDS (  )     GET_BIT(x, TYPE_BIT_FROMDS)

Definition at line 272 of file include.h.

Referenced by main().

#define TYPE_BIT_00   "Client"

Definition at line 274 of file include.h.

Referenced by TypeOfClientToString().

#define TYPE_BIT_01   "AP Base"

Definition at line 275 of file include.h.

Referenced by TypeOfClientToString().

#define TYPE_BIT_02   "AP Base (STA in master mode)"

Definition at line 276 of file include.h.

Referenced by TypeOfClientToString().

#define TYPE_BIT_03   "AP Base (dedicated)"

Definition at line 277 of file include.h.

Referenced by TypeOfClientToString().

#define TYPE_BIT_04   "Ad-Hoc STA"

Definition at line 278 of file include.h.

Referenced by TypeOfClientToString().

#define TYPE_BIT_05   "???5"

Definition at line 279 of file include.h.

Referenced by TypeOfClientToString().

#define TYPE_BIT_06   "Ad-Hoc STA (beacon)"

Definition at line 280 of file include.h.

Referenced by TypeOfClientToString().

#define TYPE_BIT_07   "Ad-Hoc STA"

Definition at line 281 of file include.h.

Referenced by TypeOfClientToString().

#define TYPE_BIT_08   "STA Activity"

Definition at line 282 of file include.h.

Referenced by TypeOfClientToString().

#define TYPE_BIT_09   "???9 Reserved"

Definition at line 283 of file include.h.

Referenced by TypeOfClientToString().

#define TYPE_BIT_0A   "???A Reserved"

Definition at line 284 of file include.h.

Referenced by TypeOfClientToString().

#define TYPE_BIT_0B   "???B Reserved"

Definition at line 285 of file include.h.

Referenced by TypeOfClientToString().

#define TYPE_BIT_0C   "???C Reserved"

Definition at line 286 of file include.h.

Referenced by TypeOfClientToString().

#define TYPE_BIT_0D   "???D Reserved"

Definition at line 287 of file include.h.

Referenced by TypeOfClientToString().

#define TYPE_BIT_0E   "???E Reserved"

Definition at line 288 of file include.h.

Referenced by TypeOfClientToString().

#define TYPE_BIT_0F   "???F Reserved"

Definition at line 289 of file include.h.

Referenced by TypeOfClientToString().

#define SUBTYPE_BIT_00   "Radio only"

Definition at line 291 of file include.h.

Referenced by SubTypeOfClientToString().

#define SUBTYPE_BIT_01   "Data To DS"

Definition at line 292 of file include.h.

Referenced by SubTypeOfClientToString().

#define SUBTYPE_BIT_02   "Data From DS"

Definition at line 293 of file include.h.

Referenced by SubTypeOfClientToString().

#define SUBTYPE_BIT_03   "Data AP to AP"

Definition at line 294 of file include.h.

Referenced by SubTypeOfClientToString().

#define SUBTYPE_BIT_04   "???4 Reserved"

Definition at line 295 of file include.h.

Referenced by SubTypeOfClientToString().

#define SUBTYPE_BIT_05   "???5 Reserved"

Definition at line 296 of file include.h.

Referenced by SubTypeOfClientToString().

#define SUBTYPE_BIT_06   "???6 Reserved"

Definition at line 297 of file include.h.

Referenced by SubTypeOfClientToString().

#define SUBTYPE_BIT_07   "???7 Reserved"

Definition at line 298 of file include.h.

Referenced by SubTypeOfClientToString().

#define SUBTYPE_BIT_08   "???8 Reserved"

Definition at line 299 of file include.h.

Referenced by SubTypeOfClientToString().

#define SUBTYPE_BIT_09   "???9 Reserved"

Definition at line 300 of file include.h.

Referenced by SubTypeOfClientToString().

#define SUBTYPE_BIT_0A   "???A Reserved"

Definition at line 301 of file include.h.

Referenced by SubTypeOfClientToString().

#define SUBTYPE_BIT_0B   "???B Reserved"

Definition at line 302 of file include.h.

Referenced by SubTypeOfClientToString().

#define SUBTYPE_BIT_0C   "???C Reserved"

Definition at line 303 of file include.h.

Referenced by SubTypeOfClientToString().

#define SUBTYPE_BIT_0D   "???D Reserved"

Definition at line 304 of file include.h.

Referenced by SubTypeOfClientToString().

#define SUBTYPE_BIT_0E   "???E Reserved"

Definition at line 305 of file include.h.

Referenced by SubTypeOfClientToString().

#define SUBTYPE_BIT_0F   "???F Reserved"

Definition at line 306 of file include.h.

Referenced by SubTypeOfClientToString().

#define WLAN_SIZEOF_TYPEOFPACKET   (6+4+1)

Definition at line 308 of file include.h.

Referenced by processPacket().

#define STR_YES   "Yes"

Definition at line 310 of file include.h.

Referenced by BoolToStr().

#define STR_NO   "No"

Definition at line 311 of file include.h.

Referenced by BoolToStr().

#define STR_WEP   "Cry"

Definition at line 313 of file include.h.

Referenced by BoolToWepNoWep().

#define STR_WPA   "WPA"

Definition at line 314 of file include.h.

Referenced by BoolToWepNoWep().

#define STR_NOWEP   "---"

Definition at line 315 of file include.h.

Referenced by BoolToWepNoWep().

#define STR_STA   "STA"

Definition at line 317 of file include.h.

Referenced by BoolToStaAp().

#define STR_sta   "sta"

Definition at line 318 of file include.h.

Referenced by BoolToStaAp().

#define STR_AP   "AP"

Definition at line 319 of file include.h.

Referenced by BoolToStaAp().

#define WLAN_FSTYPE_ACTION   0x0D

Definition at line 322 of file include.h.

Referenced by processPacket().

#define WLAN_FSTYPE_BLOCK_ACK_REQ   0x08

Definition at line 323 of file include.h.

Referenced by processPacket().

#define WLAN_FSTYPE_BLOCK_ACK   0x09

Definition at line 324 of file include.h.

Referenced by processPacket().

#define MAX_DEBUG_LEVEL   3

The maximum of DEBUG Level

Definition at line 328 of file include.h.

Referenced by DispConf(), parse_keystring(), and ParseCommandLine().

#define DEBUG_POINT   debug(3, "%s:%d\n", __FUNCTION__, __LINE__);

Definition at line 329 of file include.h.

Referenced by main().

#define HELPTEXT1

Value:

"Call with no parameters or with the following options\n" \
" --help          -h           - This help page\n" \
" --version       -v           - Write Version and quit\n" \
" --verbose       -V level     - For verbose, level 2 is for debugging\n" \
" --card-driver   -C           - Wireless card driver :\n" \
"                                'prism', 'cisco' 'cisco_wifi (eth+wifi)' 'orinoco' 'atheros', 'prism54g', \n"\
"                                'ipw2200', 'ipw2100', 'airjack', 'hostap', 'madwifi-ng' or 'pcap'\n" \
" --iface         -i device    - Name of the interface (default wlan0)\n" \
"                              - for cisco_wifi driver, give the two interfaces like eth1,wifi0\n" \
" --pcapsrc       -r filename  - Name of pcap file\n" \
" --output-file   -F filename  - Save output to a file as well as stdout\n" \
" --device-file   -D filename  - Create a file of detected devices, in a .dot format\n" \
" --hop           -H number    - Number of hops do for rotating channel (default 5)\n" \
" --channel       -S channel   - Only listen on a specific Channel (1-14)\n" \
" --computer-date -d           - Write date in machine readable format\n" \
" --ids           -I           - Activate the IDS functions\n" \
" --max-packets   -M number    - Max packets to capture before exit\n" \
"                                (0 = unlimited)\n" \
" --hide-packets  -N abcd      - Do not display Ack, Beacon, Control, Data\n" \
" --hop-delay     -t number    - Number of ms before channel change (default=200)\n" \
" --disable-check -c           - Do not chek curses screen size\n"
HELP of the program

Definition at line 334 of file include.h.

#define HELPTEXT

Value:

HELPTEXT1 \
" --pcap-file     -W filename  - Save sniffed data to a file in PCAP format\n"

Definition at line 358 of file include.h.

Referenced by HelpAndBye().

#define DISPLAY_ACK_BIT   0

Functions to determine if we must not display some packet

Definition at line 372 of file include.h.

Referenced by parse_keystring(), ParseCommandLine(), and WriteSummary().

#define DISPLAY_BEACON_BIT   1

Definition at line 373 of file include.h.

Referenced by parse_keystring(), ParseCommandLine(), and WriteSummary().

#define DISPLAY_CONTROL_BIT   2

Definition at line 374 of file include.h.

Referenced by parse_keystring(), ParseCommandLine(), and WriteSummary().

#define DISPLAY_DATA_BIT   3

Definition at line 375 of file include.h.

Referenced by parse_keystring(), ParseCommandLine(), and WriteSummary().

#define DISPLAY_PROBE_BIT   4

Definition at line 376 of file include.h.

Referenced by parse_keystring(), ParseCommandLine(), and WriteSummary().

#define DISPLAY_STATION_BIT   5

Definition at line 377 of file include.h.

Referenced by parse_keystring(), ParseCommandLine(), and WriteSummary().

#define IS_DISPLAY_ACK (  )     ( IS_BIT_SET(x, DISPLAY_ACK_BIT))

Definition at line 379 of file include.h.

#define IS_DISPLAY_BEACON (  )     ( IS_BIT_SET(x, DISPLAY_BEACON_BIT))

Definition at line 380 of file include.h.

#define IS_DISPLAY_CONTROL (  )     ( IS_BIT_SET(x, DISPLAY_CONTROL_BIT))

Definition at line 381 of file include.h.

#define IS_DISPLAY_DATA (  )     ( IS_BIT_SET(x, DISPLAY_DATA_BIT))

Definition at line 382 of file include.h.

#define IS_DISPLAY_PROBE (  )     ( IS_BIT_SET(x, DISPLAY_PROBE_BIT))

Definition at line 383 of file include.h.

#define IS_DISPLAY_STATION (  )     ( IS_BIT_SET(x, DISPLAY_STATION_BIT))

Definition at line 384 of file include.h.

Referenced by WritePanel().

#define WLAN_NG_CARD   1

Captured Frame Format

Definition at line 387 of file include.h.

Referenced by closePacket(), getPacket(), InitConfiguration(), openCard(), openPacket(), ParseCommandLine(), selectChannel(), and shutCard().

#define CISCO_CARD   2

#define LUCENT_CARD   3

#define WLAN_NG_CARD_AVS_CFF2   4

Definition at line 390 of file include.h.

Referenced by closePacket(), getPacket(), openCard(), openPacket(), selectChannel(), and shutCard().

#define PCAP_VIRTUAL_CARD   5

#define HOSTAP_CARD   6

#define CISCO_CVS_CARD   7

#define ATHEROS_CARD   8

#define PRISM54G_CARD   9

#define AIRJACK_CARD   10

#define IPW_CARD   11

#define MADWIFI_NG_CARD   12

#define phytype_fhss_dot11_97   1

Definition at line 401 of file include.h.

#define phytype_dsss_dot11_97   2

Definition at line 402 of file include.h.

#define phytype_irbaseband   3

Definition at line 403 of file include.h.

#define phytype_dsss_dot11_b   4

Definition at line 404 of file include.h.

Referenced by FillRadioData(), getPacketATHEROS(), and getPacketHERMES().

#define phytype_pbcc_dot11_b   5

Definition at line 405 of file include.h.

#define phytype_ofdm_dot11_g   6

Definition at line 406 of file include.h.

#define phytype_pbcc_dot11_g   7

Definition at line 407 of file include.h.

#define phytype_ofdm_dot11_a   8

Definition at line 408 of file include.h.

#define IW_MAX_PRIV_DEF   256

Definition at line 477 of file include.h.

#define WLAN_ETHADDR_LEN   6

Definition at line 483 of file include.h.

#define WLAN_IEEE_OUI_LEN   3

Definition at line 484 of file include.h.

#define WLAN_ETHCONV_ENCAP   1

Definition at line 486 of file include.h.

#define WLAN_ETHCONV_RFC1042   2

Definition at line 487 of file include.h.

#define WLAN_ETHCONV_8021h   3

Definition at line 488 of file include.h.

#define WLAN_MIN_ETHFRM_LEN   60

Definition at line 490 of file include.h.

#define WLAN_MAX_ETHFRM_LEN   1514

Definition at line 491 of file include.h.

#define WLAN_ETHHDR_LEN   14

Definition at line 492 of file include.h.

#define WLAN_SSID_MAXLEN   32

Definition at line 498 of file include.h.

#define P80211CAPTURE_VERSION   0x80211001

Definition at line 502 of file include.h.


Typedef Documentation

typedef struct CaptureArg_t CaptureArg


Enumeration Type Documentation

anonymous enum

Enumerator:
NO_ERROR 
ERROR_CANT_CREATE_SOCKET 
ERROR_COULDNT_FIND_A_FREE_IFACE 
ERROR_CANT_OPEN_PCAP 
ERROR_UNKNOWN_INTERFACE 
ERROR_CANT_SET_CHANNEL 
ERROR_CANT_SET_MODE 
ERROR_CANT_SET_SSID 
ERROR_CHANNEL_OUT_OF_BOUND 
ERROR_HOP_OUT_OF_BOUND 
ERROR_DONT_TRY_TO_SLEEP_ON_THE_KEYBOARD 
ERROR_UNKNOWN_INTERFACE_TYPE 
ERROR_BAD_PARAMETER 
ERROR_MISSING_PCAP_FILE 
ERROR_NOT_ROOT 
ERROR_PCAP_CANT_OPEN 
ERROR_PQT_TYPE_IS_UNKNOWN 
ERROR_CANT_OPEN_FILE 
ERROR_SIG_HANDLER 
ERROR_THREAD_CANT_INIT 
ERROR_IF_CANT_INIT 
ALL_CHANNEL_ARE_LOCKED 
EXIT_BY_CTRLC 
EXIT_PB_WITH_CHANNEL_HOP 
EXIT_PB_WITH_CHANNEL_INIT 
EXIT_CANT_SAVE_DATA 
EXIT_MAX_PACKET_REACHED 
EXIT_WITH_Q 
TYPE_OF_CARD_IS_UNKNOWN 
MADWIFING_ERROR_NO_DEVICE_PRESENT 
MADWIFING_ERROR_CANT_CREATE_SOCKET 
MADWIFING_ERROR_CANT_DESTROY_VAP 
MADWIFING_ERROR_NO_VAP_CREATED 
MADWIFING_ERROR_CANT_SET_IFFLAGS 
MADWIFING_ERROR_NO_INTERFACE_AVAILABLE 
CISCO_PROC_FILE_ERROR 
IWPRIV_FAILED_TO_RETREIVE_IOCTL_LIST 
IWPRIV_FAILED_TO_FIND_IOCTL 
IWPRIV_FAILED_TO_FIND_SUBIOCTL 
IWPRIV_FAILED_TO_SET_VALUE 
IWPRIV_DOES_NOT_ACCEPT_INTEGER 
IWPRIV_NEED_MORE_THAN_2_ARG 
IWPRIV_FAILED_TO_SET_IOCTL 
GPSD_UNKNOWN_HOST 
GPSD_CANT_OPEN_SOCKET 
GPSD_CANT_BIND_PORT 
GPSD_CANT_CONNECT 
GPSD_WRITE_ERROR 
ERROR_UNKNOWN 

Definition at line 416 of file include.h.

00416      {
00417   NO_ERROR = 0,
00418   // Various errors
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   // Standard Exit
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   // In Driver.c
00448   TYPE_OF_CARD_IS_UNKNOWN,
00449   // MADWIFI-NG ERROR
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   // CISCO
00457   CISCO_PROC_FILE_ERROR,
00458   // IWPRIV Command
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   // GPSD
00467   GPSD_UNKNOWN_HOST,
00468   GPSD_CANT_OPEN_SOCKET,
00469   GPSD_CANT_BIND_PORT,
00470   GPSD_CANT_CONNECT,
00471   GPSD_WRITE_ERROR,
00472   // Wilcard :-)
00473   ERROR_UNKNOWN
00474 };


Generated on Fri Jul 25 17:11:04 2008 for WifiScanner by  doxygen 1.5.5