[Listener] Get MAC and IP, then launch threads
Operation order is better that way, because autocalibrate_hello() needs to know MAC and IP addresses of the AP.
This commit is contained in:
parent
c17af1cf95
commit
5fb93d9dd3
|
@ -88,6 +88,13 @@ int main(int argc, char *argv[])
|
||||||
action.sa_handler = sigterm_handler ;
|
action.sa_handler = sigterm_handler ;
|
||||||
sigaction(SIGTERM, &action, NULL) ;
|
sigaction(SIGTERM, &action, NULL) ;
|
||||||
|
|
||||||
|
get_mac_addr(GET_WIFI_IFACE(), my_mac) ;
|
||||||
|
mac_string = mac_bytes_to_string(my_mac) ;
|
||||||
|
printf("My MAC address is: %s\n", mac_string) ;
|
||||||
|
free(mac_string) ;
|
||||||
|
get_ip_addr(GET_WIFI_IFACE(), my_ip) ;
|
||||||
|
printf("My IP address is: %s\n", my_ip) ;
|
||||||
|
|
||||||
#ifdef USE_PTHREAD
|
#ifdef USE_PTHREAD
|
||||||
/* Set up threads */
|
/* Set up threads */
|
||||||
if (GET_KEEP_MONITOR())
|
if (GET_KEEP_MONITOR())
|
||||||
|
@ -102,13 +109,6 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
#endif // USE_PTHREAD
|
#endif // USE_PTHREAD
|
||||||
|
|
||||||
get_mac_addr(GET_WIFI_IFACE(), my_mac) ;
|
|
||||||
mac_string = mac_bytes_to_string(my_mac) ;
|
|
||||||
printf("My MAC address is: %s\n", mac_string) ;
|
|
||||||
free(mac_string) ;
|
|
||||||
get_ip_addr(GET_WIFI_IFACE(), my_ip) ;
|
|
||||||
printf("My IP address is: %s\n", my_ip) ;
|
|
||||||
|
|
||||||
ret = capture() ; // Capture loop
|
ret = capture() ; // Capture loop
|
||||||
|
|
||||||
#ifdef USE_CONFIG_FILE
|
#ifdef USE_CONFIG_FILE
|
||||||
|
|
Loading…
Reference in New Issue