Hi all, I built out a couple of packages recently that I figured may be interesting for some on this list.
I decided that I wanted to figure out how to interact with WiFi devices from Go (without cgo), and that lead me to writing packages to work with netlink, generic netlink, and nl80211 on Linux. https://github.com/mdlayher/netlink https://github.com/mdlayher/wifi I was unsatisfied with many of the existing netlink packages for the reasons mentioned in the README, so I took a crack at building my own. The intent of this package is to provide the basic building blocks for working with netlink, so higher level packages (rtnetlink, genetlink, etc.) could be built on top. Generic netlink (genetlink) is also included in a package in the netlink repository, but I may end up moving it out in the future. At the moment, package wifi supports retrieving a variety of statistics from various WiFi interfaces. I have a development branch locally that supports scanning, but it's a bit tricky to get right (requires root and playing with multicast groups) and I haven't had time to fully work it out. Package wifi is used in Prometheus' node_exporter now, to expose WiFi device metrics on Linux: https://github.com/prometheus/node_exporter/blob/master/collector/wifi_linux.go. If you're familiar with the WiFi device interfaces on other operating systems, I'd love to work with you on adding support for other OSes into this package (if we can agree on some common interface across platforms). Please do file an issue if you have ideas. Hope this is useful for someone! Happy to answer any questions you may have. I plan on doing a full write-up in the near future with everything I've learned while working with netlink, genetlink, and nl80211 from Go. Thanks for your time, everyone. - Matt Layher -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.