title: Wireless API for Linux in C\C++
body: <p>I'm trying to find a proper way how to reuse existing implementations of wifi tools(iw) in own code(c\c++). I need to get information about available AccessPoints in range(signal strength, mac addr., etc). I found couple example codes(WEXT and others) that uses ioctl approach, but it makes passive scans(and i get new information only once in two minutes in my network)[<strong>UPDATE1</strong>: <em>Thanks to @fluter, i know that WEXT can do active scanning, too</em>.]. I found that iw makes an active scan and that is what i need. So my question:</p>
  <blockquote>
  <p>Is there a way to use iw code in my own app without parsing its source code in chunks, or, maybe, there is an Wireless API for such purpose?</p>
  <p>(<strong>UPDATE1</strong>: with basic code examples to start with.)</p>
  </blockquote>
  <p><a href="https://stackoverflow.com/questions/5102186/wireless-api-for-linux-in-c-or-java/36771973#36771973">Similar question</a></p>
  <p><strong>UPDATE2</strong>: I have reviewed my task and found that AP information is not enough for me, i need to capture clients data, too. That leads me to wifi packet sniffing and the best tool i have found to do that is Horst. So, i'm trying to reuse its code in my app, now.</p>