From 9e7b55c31793c12924ba2cc855c865e7701edf11 Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Fri, 14 Jun 2013 14:04:05 -0400 Subject: [PATCH] [Listener] Access Point -> Capture Point Same work as for the Aggregator, without any user-visible change. --- owlps-listener/owlps-listenerd.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/owlps-listener/owlps-listenerd.c b/owlps-listener/owlps-listenerd.c index df56ec6..e177319 100644 --- a/owlps-listener/owlps-listenerd.c +++ b/owlps-listener/owlps-listenerd.c @@ -52,8 +52,8 @@ char *program_name = NULL ; -uint8_t my_mac_bytes[ETHER_ADDR_LEN] ; // AP MAC address -char my_ip[INET_ADDRSTRLEN] ; // AP IP address +uint8_t my_mac_bytes[ETHER_ADDR_LEN] ; // CP MAC address +char my_ip[INET_ADDRSTRLEN] ; // CP IP address /* Will we dump the configuration? * Note that we declare this option as a global variable because @@ -1093,11 +1093,11 @@ void read_packet(const struct pcap_pkthdr *pkt_header, memcpy(request.mobile_mac_addr_bytes, &pkt_data[offset], ETHER_ADDR_LEN) ; - // Drop the packet if it comes from the AP itself: + // Drop the packet if it comes from the CP itself: if (owl_mac_equals(my_mac_bytes, request.mobile_mac_addr_bytes)) return ; - // Copy AP MAC : + // Copy CP MAC : memcpy(request.ap_mac_addr_bytes, my_mac_bytes, ETHER_ADDR_LEN) ; // Capture time is in the pcap header (host-endian): owl_timeval_to_timestamp(&pkt_header->ts, &request.capture_time) ; @@ -1324,7 +1324,7 @@ void display_captured_request(owl_captured_request *request, char request_time_str[OWL_TIMESTAMP_STRLEN], capture_time_str[OWL_TIMESTAMP_STRLEN], - ap_mac_addr_str[OWL_ETHER_ADDR_STRLEN], + cp_mac_addr_str[OWL_ETHER_ADDR_STRLEN], mobile_mac_addr_str[OWL_ETHER_ADDR_STRLEN], mobile_ip_str[INET_ADDRSTRLEN] ; @@ -1335,7 +1335,7 @@ void display_captured_request(owl_captured_request *request, owl_ntoh_timestamp(&tmp_time) ; owl_timestamp_to_string(&tmp_time, capture_time_str) ; owl_mac_bytes_to_string_r(request->ap_mac_addr_bytes, - ap_mac_addr_str) ; + cp_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, @@ -1343,11 +1343,11 @@ void display_captured_request(owl_captured_request *request, printf("*** Request to send ***\n" "\tType: %"PRIu8"\n" - "\tMAC AP: %s\n" - "\tMobile MAC: %s\n" - "\tMobile IP: %s\n" + "\tCP's MAC: %s\n" + "\tMobile's MAC: %s\n" + "\tMobile's IP: %s\n" "\tRequest timestamp: %s\n" - "\tRequest arrival time on the AP: %s\n" + "\tRequest arrival time on the CP: %s\n" "\tSignal: %"PRId8" dBm\n" "\tPosition X: %f\n" "\tPosition Y: %f\n" @@ -1357,7 +1357,7 @@ void display_captured_request(owl_captured_request *request, "\tPacket size: %"PRIu32"\n" , request->type, - ap_mac_addr_str, + cp_mac_addr_str, mobile_mac_addr_str, mobile_ip_str, request_time_str,