LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-09-2010, 01:44 AM   #1
cshong
LQ Newbie
 
Registered: Nov 2006
Posts: 24

Rep: Reputation: 0
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.
 
Old 12-09-2010, 10:06 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Do I need a new stanza in network-interfaces to get wireless connection up? sonichedgehog Linux - Networking 9 08-26-2009 04:30 AM
No wireless extensions for any network interfaces? Caldus Linux - Newbie 5 02-04-2008 02:19 PM
/etc/network/interfaces for wireless usb h2gofast Linux - Wireless Networking 2 10-15-2005 10:17 AM
detecting wireless network MiniMe001 Linux - Laptop and Netbook 13 11-28-2004 02:21 PM
Detecting Wireless Network Cards kharn Linux - Wireless Networking 0 07-16-2003 12:13 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration