From 7671163f62c1ad81c2a7baaa1931f0598dbe65d0 Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Thu, 10 Mar 2011 19:20:40 +0100 Subject: [PATCH] [Listener] Rename my_mac -> my_mac_bytes --- .../owlps-listener/owlps-listenerd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/infrastructure-centred/owlps-listener/owlps-listenerd.c b/infrastructure-centred/owlps-listener/owlps-listenerd.c index 39a6bcc..b5d3d2e 100644 --- a/infrastructure-centred/owlps-listener/owlps-listenerd.c +++ b/infrastructure-centred/owlps-listener/owlps-listenerd.c @@ -8,7 +8,7 @@ char *program_name = NULL ; -uint8_t my_mac[6] ; // AP MAC address +uint8_t my_mac_bytes[6] ; // AP MAC address char my_ip[16] ; // AP IP address int aggregation_sockfd ; @@ -94,8 +94,8 @@ int main(int argc, char *argv[]) action.sa_handler = sigterm_handler ; sigaction(SIGTERM, &action, NULL) ; - get_mac_addr(GET_WIFI_IFACE(), my_mac) ; - mac_string = mac_bytes_to_string(my_mac) ; + get_mac_addr(GET_WIFI_IFACE(), my_mac_bytes) ; + mac_string = mac_bytes_to_string(my_mac_bytes) ; printf("My MAC address is: %s\n", mac_string) ; free(mac_string) ; get_ip_addr(GET_WIFI_IFACE(), my_ip) ; @@ -624,10 +624,10 @@ void read_packet(u_char *args, const struct pcap_pkthdr *header, memcpy(couple.mobile_mac_addr_bytes, &data[rtap_bytes+10], 6) ; // Drop the packet if it comes from the AP itself: - if (mac_equals(my_mac, couple.mobile_mac_addr_bytes)) + if (mac_equals(my_mac_bytes, couple.mobile_mac_addr_bytes)) return ; - memcpy(couple.ap_mac_addr_bytes, my_mac, 6) ; // Copy AP MAC + memcpy(couple.ap_mac_addr_bytes, my_mac_bytes, 6) ; // Copy AP MAC // Capture time is in the pcap header: couple.start_time = timeval_to_timestamp(header->ts) ; // Transmission time on the mobile is unknown (unless the packet is @@ -927,7 +927,7 @@ void autocalibrate_hello() GET_AUTOCALIBRATION_PORT(), &serv, NULL) ; - memcpy(&message.ap_mac_addr_bytes, my_mac, 6) ; + memcpy(&message.ap_mac_addr_bytes, my_mac_bytes, 6) ; while (run) {