From e7b639a020b76463b8fd8bfe1eeea8a9b4eb868b Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Tue, 23 Apr 2013 18:30:53 -0400 Subject: [PATCH] [Listener] Minor fixes, mostly cosmetic --- owlps-listener/owlps-listener.h | 2 +- owlps-listener/owlps-listenerd.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/owlps-listener/owlps-listener.h b/owlps-listener/owlps-listener.h index 2e1c55b..a9c1370 100644 --- a/owlps-listener/owlps-listener.h +++ b/owlps-listener/owlps-listener.h @@ -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 diff --git a/owlps-listener/owlps-listenerd.c b/owlps-listener/owlps-listenerd.c index f11cf84..b5bfccb 100644 --- a/owlps-listener/owlps-listenerd.c +++ b/owlps-listener/owlps-listenerd.c @@ -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"