Based on earlier implementation by James Chapman. But instead of dragging in all of libnl, use existing libnetlink infrastructure.