[Listener] Minor fixes, mostly cosmetic

This commit is contained in:
Matteo Cypriani 2013-04-23 18:30:53 -04:00
parent 6ea849625c
commit e7b639a020
2 changed files with 6 additions and 6 deletions

View File

@ -159,7 +159,7 @@ enum {MODE_ACTIVE = 'a', MODE_PASSIVE = 'p', MODE_MIXED = 'm'} ;
#define RTAP_L_HLENGTH 2 // Header length
#define RTAP_L_PRESENTFLAGS 4 // Present flags
#define RTAP_L_MACTS 8 // MAC timestamp (Time Synchronization Function Timer)
#define RTAP_L_FLAGS 1 // autre champ de flags
#define RTAP_L_FLAGS 1 // Flags
#define RTAP_L_RATE 1 // Data rate
#define RTAP_L_CHANNEL 2 // Channel frequency
#define RTAP_L_CHANNELTYPE 2 // Channel type

View File

@ -468,7 +468,7 @@ int parse_config_file(int argc, char **argv)
{
case CFG_FILE_ERROR :
fprintf(stderr,
"Error! Cannot open configuration file \"%s\": %s.\n",
"Warning! Cannot open configuration file \"%s\": %s.\n",
config_file, strerror(errno)) ;
break ;
case CFG_PARSE_ERROR :
@ -1215,8 +1215,7 @@ void read_packet(const struct pcap_pkthdr *pkt_header,
mobile_ip_str,
request_time_str,
capture_time_str,
rtap_fields[RTAP_ANTENNASIGNALDBM] ?
request.ss_dbm - 256 : 0,
rtap_fields[RTAP_ANTENNASIGNALDBM] ? request.ss_dbm - 256 : 0,
owl_ntohf(request.x_position),
owl_ntohf(request.y_position),
owl_ntohf(request.z_position),
@ -1323,6 +1322,7 @@ void extract_radiotap_data(const u_char *pkt_data,
rtap_position += RTAP_L_RATE ;
break ;
case RTAP_CHANNEL:
rtap_fields[RTAP_CHANNEL] = owl_true ;
rtap_position += RTAP_L_CHANNEL ;
rtap_position += RTAP_L_CHANNELTYPE ;
break ;
@ -1331,9 +1331,9 @@ void extract_radiotap_data(const u_char *pkt_data,
rtap_position += RTAP_L_FHSS ;
break ;
case RTAP_ANTENNASIGNALDBM:
rtap_fields[RTAP_ANTENNASIGNALDBM] = owl_true ;
memcpy(&request->ss_dbm,
&pkt_data[rtap_position], RTAP_L_ANTENNASIGNALDBM) ;
rtap_fields[RTAP_ANTENNASIGNALDBM] = owl_true;
if (VERBOSE_INFO)
printf("Antenna signal: %d dBm\n",
request->ss_dbm - 256);
@ -1680,7 +1680,7 @@ void print_usage()
" configuration\n\t\t\tfile (%s).\n\t\t\tAvailable only if the"
" program was linked against\n\t\t\tlibconfuse.\n"
"\t-D\t\tDaemon mode.\n"
"\t-v\t\tBe verbose. You can use this option up to 3 times to"
"\t-v\t\tBe verbose. You can use this option up to 4 times to"
"\n\t\t\tincrease the level of verbosity (1 = warnings,"
"\n\t\t\t2 = useful information, 3 = a lot of information,"
"\n\t\t\t4 = display each captured packet).\n"