[Listener] Rename my_mac -> my_mac_bytes

This commit is contained in:
Matteo Cypriani 2011-03-10 19:20:40 +01:00
parent 60fe0061be
commit 7671163f62
1 changed files with 6 additions and 6 deletions

View File

@ -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)
{