'iw' is a tool to use nl80211. Please refer to the link for any documentation or update.
http://wireless.kernel.org/en/users/Documentation/iw
https://git.kernel.org/pub/scm/linux/kernel/git/jberg/iw.git
This project makes few modifications on iw source. C/C++ developers can call iw commands and set manual netlink callback function.
To build the project, just enter 'make'. If that fails, check if you have netlink library installed.