Example #1
0
func init() {
	ids, er := genl.GetFamilyIDs()
	if er != nil {
		panic(fmt.Sprintf("initialization error, no genl family nl80211: %s", er))
	}
	NL80211_ID = ids["nl80211"]
}
Example #2
0
func main() {
	s, _ := netlink.DialNetlink("route", 0)
	TestRouteLink(s)
	TestRouteAddr(s)

	// NETLINK_GENERIC tests
	s, _ = netlink.DialNetlink("generic", 0)
	fmt.Println("Testing generic family messages")
	TestGenericFamily(s)

	ids, er := genl.GetFamilyIDs()
	fmt.Printf("%#v\n%s\n", ids, er)
}