Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

scanner.c File Reference

#include <include.h>
#include <src/interface.h>
#include <src/driver.h>
#include <src/functions.h>
#include <src/analyse.h>
#include <src/scanner.h>
#include <src/crt_io.h>
#include <src/conversion.h>
#include <wtap.h>

Include dependency graph for scanner.c:

Go to the source code of this file.

Defines

#define CLEAR_KEYBOARD_BUFFER   memset (keystring, 0, KEYBOARD_BUFFER);keyindex = 0;

Functions

void Bye (void)
void HelpAndBye (void)
void VersionAndBye (void)
void DispConf (ConfigStruct *config)
void parse_keystring ()
void check_keys ()
void stop_signal (void)
void ChangeChannel_th (void *ptr1)
void check_keys_th ()
int main (int argc, char **argv)

Variables

static UINT8 ID []
ConfigStruct config
ScanResult_t Res
WINDOW * Title_WND
WINDOW * Panel_WND
WINDOW * Sum_WND
WINDOW * RealTime_WND
Statistics_t Stats
UINT8 CursesIsInUse = (UINT8) 0
pthread_mutex_t screen_mutex = PTHREAD_MUTEX_INITIALIZER
 MUTEX for lock screen, so only one func write to it at the same time.
pthread_t thread_ChgChan
pthread_t thread_RefreshRTW
pthread_t thread_checkkey
UINT8 stop_sniffing = (UINT8) 0
char keystring [8]
int keyindex = 0


Define Documentation

#define CLEAR_KEYBOARD_BUFFER   memset (keystring, 0, KEYBOARD_BUFFER);keyindex = 0;
 

Definition at line 690 of file scanner.c.

Referenced by parse_keystring().


Function Documentation

void Bye void   ) 
 

void HelpAndBye void   ) 
 

void VersionAndBye void   ) 
 

void DispConf ConfigStruct config  ) 
 

Definition at line 1302 of file functions.c.

References ConfigStruct::CheckScreenSize, CISCO_CVS_CARD, config, ConfigStruct::DateFormat, ConfigStruct::DebugLevel, ConfigStruct::devname, ConfigStruct::devname2, ConfigStruct::IDS_is_ON, MAX_DEBUG_LEVEL, ConfigStruct::MaxPacket, ConfigStruct::OutDotFileName, ConfigStruct::OutDumpFileName, ConfigStruct::OutFileName, ConfigStruct::SendAlert2Syslog, ConfigStruct::SingleChannel, ConfigStruct::TimeToSleepBeforeChangeChannel, and ConfigStruct::TypeOfCard.

Referenced by main().

void parse_keystring  ) 
 

Definition at line 692 of file scanner.c.

References CHANNEL_MAX, ConfigStruct::ChannelHop, CLEAR_KEYBOARD_BUFFER, config, debug, ConfigStruct::DebugLevel, ConfigStruct::devname, ConfigStruct::DoNotDisplay, ConfigStruct::FirstNIC, HOP_MAX, HOP_MIN, KEYBOARD_BUFFER, keyindex, keystring, MAX_DEBUG_LEVEL, screen_mutex, selectChannel(), ConfigStruct::SingleChannel, stop_sniffing, SWITCH_BIT, TIME_TO_SLEEP_BEFORE_CHANGE_CHANNEL, ConfigStruct::TimeToSleepBeforeChangeChannel, and warning().

Referenced by check_keys_th().

void check_keys  ) 
 

Referenced by main().

void stop_signal void   ) 
 

Signal Handler

Definition at line 79 of file scanner.c.

References screen_mutex, stop_sniffing, and warning().

Referenced by main().

void ChangeChannel_th void *  ptr1  ) 
 

Definition at line 111 of file scanner.c.

References ConfigStruct::ChannelHop, config, debug, NextChannel(), ConfigStruct::SingleChannel, stop_sniffing, ConfigStruct::TimeToSleepBeforeChangeChannel, and UINT32.

Referenced by main().

void check_keys_th  ) 
 

Definition at line 160 of file scanner.c.

References debug, KEYBOARD_BUFFER, keyindex, keystring, parse_keystring(), screen_mutex, stop_sniffing, Sum_WND, and TRUE.

Referenced by main().

int main int  argc,
char **  argv
 

Write it also on file if wanted

A little mark for better view :)

Exit from curses environment

Close file if needed, it's better clean

Close file if needed, it's better clean

Close RaxSocket

put card in a normal state

Write the summary

And the .dot file also

Definition at line 208 of file scanner.c.

References BoolToStaAp(), BoolToWepNoWep(), ScanResult_t::BssId, Bye(), ChangeChannel_th(), ScanResult_t::Channel, ConfigStruct::ChannelHop, ChannelToStr(), check_keys(), check_keys_th(), ConfigStruct::CheckScreenSize, CISCO_CARD, CISCO_CVS_CARD, closePacket(), config, CursesIsInUse, ConfigStruct::DateFormat, debug, ConfigStruct::DebugLevel, ScanResult_t::DestMac, ConfigStruct::devname, ConfigStruct::devname2, DispConf(), DO_NOT_DISPLAY_ACK, DO_NOT_DISPLAY_BEACON, DO_NOT_DISPLAY_CONTROL, DO_NOT_DISPLAY_DATA, DumpHexPaquets(), EndCurses(), FALSE, fatal(), GET_TYPE_BIT_AP, getPacket(), ScanResult_t::hasWep, IDS(), ConfigStruct::IDS_is_ON, ids_warning, InitConfiguration(), InitScreen(), Statistics_t::INVLD, LogWriteDOT(), LogWriteHisto(), LogWriteReport(), MAX_BUFFER_SIZE, MAX_NUMBER_OF_DETECTED_CLIENT, ConfigStruct::MaxPacket, Statistics_t::MaxSignal, NextChannel(), ScanResult_t::Noise, openCard(), openPacket(), ConfigStruct::OutDotFileName, ConfigStruct::OutDumpFileName, ConfigStruct::OutFileName, Statistics_t::Packets, Panel_WND, ParseCommandLine(), processPacket(), ScanResult_t::Rate, RateToString(), RealTime_WND, RefreshRealTime_WND(), RefreshRealTime_WND_th(), Res, ROW_WND_PANEL, ScanResult_t::SChannel, screen_mutex, selectChannel(), shutCard(), ScanResult_t::Signal, ConfigStruct::SingleChannel, ScanResult_t::SrcMac, ScanResult_t::SSID, Stats, stop_signal(), stop_sniffing, SubTypeOfClientToString(), Sum_WND, thread_checkkey, thread_ChgChan, thread_RefreshRTW, TIMEOUT_TRY_TO_READ_PAQUET, ConfigStruct::TimeToSleepBeforeChangeChannel, TRUE, ConfigStruct::TypeOfCard, ScanResult_t::TypeOfClient, TypeOfClientToString(), ScanResult_t::TypeOfPacket, warning(), WIFISCANNER_VERSION, WritePanel(), and WriteSummary().


Variable Documentation

UINT8 ID[] [static]
 

Initial value:

    "$Id: scanner.c,v 1.54 2005/02/23 11:36:53 poggij Exp $"

Definition at line 51 of file scanner.c.

ConfigStruct config
 

Definition at line 57 of file scanner.c.

ScanResult_t Res
 

Definition at line 59 of file scanner.c.

WINDOW* Title_WND
 

Definition at line 60 of file scanner.c.

WINDOW * Panel_WND
 

Definition at line 60 of file scanner.c.

WINDOW * Sum_WND
 

Definition at line 60 of file scanner.c.

WINDOW * RealTime_WND
 

Definition at line 60 of file scanner.c.

Statistics_t Stats
 

Definition at line 61 of file scanner.c.

UINT8 CursesIsInUse = (UINT8) 0
 

Definition at line 62 of file scanner.c.

pthread_mutex_t screen_mutex = PTHREAD_MUTEX_INITIALIZER
 

MUTEX for lock screen, so only one func write to it at the same time.

Definition at line 66 of file scanner.c.

pthread_t thread_ChgChan
 

Definition at line 67 of file scanner.c.

Referenced by main().

pthread_t thread_RefreshRTW
 

Definition at line 67 of file scanner.c.

Referenced by main().

pthread_t thread_checkkey
 

Definition at line 67 of file scanner.c.

Referenced by main().

UINT8 stop_sniffing = (UINT8) 0
 

Definition at line 68 of file scanner.c.

Referenced by ChangeChannel_th(), check_keys_th(), main(), parse_keystring(), RefreshRealTime_WND_th(), and stop_signal().

char keystring[8]
 

Definition at line 73 of file scanner.c.

Referenced by check_keys_th(), and parse_keystring().

int keyindex = 0
 

Definition at line 74 of file scanner.c.

Referenced by check_keys_th(), and parse_keystring().


Generated on Fri Feb 25 12:03:09 2005 for WifiScanner by  doxygen 1.4.1