I run this command on the wireless router:
#: iwlist wlan00 scanning
wlan0 Scan completed :
Cell 01 - Address: 16:76:02:7D:A5:25
.....
So the "Address" mentioned there is the MAC address of the access point detected?
I looked in iwlib.h and ap_addr is of type sockaddr
When I first tried to print it as %d, it gave me an output similar to 71654, so I figured it's probably not in the right format.
I also tried to print the info using this answer as a guide: https://stackoverflow.com/a/11684101/1306468
but I got this error:
error: 'sockaddr' has no member named 'sa_len'
For your information I also tried
printf("%d\n", result->ap_addr.sa_family);
which gave me 1 as output in all detected access points.
Anyone has any idea how I can print out this value so it is in the same form as the iwlist wlan0 scanning address is?
Thanks a lot.