diff --git a/owlps-aggregator/owlps-aggregatord.c b/owlps-aggregator/owlps-aggregatord.c index b5479de..979f683 100644 --- a/owlps-aggregator/owlps-aggregatord.c +++ b/owlps-aggregator/owlps-aggregatord.c @@ -476,16 +476,13 @@ int read_loop(int sockfd) if (VERBOSE_REQUESTS) { - char // Return values of - mobile_ip_str[INET_ADDRSTRLEN], // inet_ntop() - // and owl_timestamp_to_string(): + char request_time_str[OWL_TIMESTAMP_STRLEN], start_time_str[OWL_TIMESTAMP_STRLEN], ap_mac_addr_str[OWL_ETHER_ADDR_STRLEN], - mobile_mac_addr_str[OWL_ETHER_ADDR_STRLEN] ; + mobile_mac_addr_str[OWL_ETHER_ADDR_STRLEN], + mobile_ip_str[INET_ADDRSTRLEN] ; - inet_ntop(AF_INET, &request.mobile_ip_addr_bytes, - mobile_ip_str, INET_ADDRSTRLEN) ; owl_timestamp_to_string(request_time_str, request.request_time) ; owl_timestamp_to_string(start_time_str, request.start_time) ; @@ -493,6 +490,8 @@ int read_loop(int sockfd) ap_mac_addr_str) ; owl_mac_bytes_to_string_r(request.mobile_mac_addr_bytes, mobile_mac_addr_str) ; + inet_ntop(AF_INET, &request.mobile_ip_addr_bytes, + mobile_ip_str, INET_ADDRSTRLEN) ; fprintf(stderr, "\n" diff --git a/owlps-listener/owlps-listenerd.c b/owlps-listener/owlps-listenerd.c index 309d831..2fbff26 100644 --- a/owlps-listener/owlps-listenerd.c +++ b/owlps-listener/owlps-listenerd.c @@ -1022,7 +1022,9 @@ void read_packet(u_char *args, const struct pcap_pkthdr *header, request_time_str[OWL_TIMESTAMP_STRLEN], start_time_str[OWL_TIMESTAMP_STRLEN], ap_mac_addr_str[OWL_ETHER_ADDR_STRLEN], - mobile_mac_addr_str[OWL_ETHER_ADDR_STRLEN] ; + mobile_mac_addr_str[OWL_ETHER_ADDR_STRLEN], + mobile_ip_str[INET_ADDRSTRLEN] ; + owl_timestamp_to_string(request_time_str, owl_ntoh_timestamp(request.request_time)) ; owl_timestamp_to_string(start_time_str, @@ -1031,10 +1033,14 @@ void read_packet(u_char *args, const struct pcap_pkthdr *header, ap_mac_addr_str) ; owl_mac_bytes_to_string_r(request.mobile_mac_addr_bytes, mobile_mac_addr_str) ; + inet_ntop(AF_INET, &request.mobile_ip_addr_bytes, + mobile_ip_str, INET_ADDRSTRLEN) ; + printf("*** Request to send ***\n" "\tType: %"PRIu8"\n" "\tMAC AP: %s\n" "\tMobile MAC: %s\n" + "\tMobile IP: %s\n" "\tSequence number (request time): %s\n" "\tRequest arrival time on the AP: %s\n" "\tSignal: %d dBm\n" @@ -1046,6 +1052,7 @@ void read_packet(u_char *args, const struct pcap_pkthdr *header, request.type, ap_mac_addr_str, mobile_mac_addr_str, + mobile_ip_str, request_time_str, start_time_str, rtap_fields[RTAP_ANTENNASIGNALDBM] ?