LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Detecting wireless network interfaces under Linux (https://www.linuxquestions.org/questions/programming-9/detecting-wireless-network-interfaces-under-linux-849222/)

cshong 12-09-2010 01:44 AM

Detecting wireless network interfaces under Linux
 
My C++ program must be able to detect EVERY Wireless Network Interfaces under Linux operating system and display the interface names on the screen.

How can my application achieve this?

Is there any sample codes?

Is there any third party libraries can do this?

Notes: The detected wireless network interfaces should also include the virtual interfaces, like the one created by Aircrack-NG's Airmon-NG script.

paulsm4 12-09-2010 10:06 PM

Hi -

You can use "iwlist" to scan for wireless networks from the command line.

You can call "iwlist" using the "popen()" API from your C/C++ program, and parse the results.

You can use "man iwlist" or "man open", or Google for examples, to get more details.


All times are GMT -5. The time now is 03:23 PM.