>> int mac_prop_init(const char *link, mac_prop_handle_t *mph) >> >> Returns a handle to be used later with mac_prop_get(). For the 'link' >> argument, physical NIC drivers, which do not have access to vanity >> name services, should provide the device instance name, e.g. "bge0". > > Physical link drivers do not necessarily "know" that name. They know the > instance number, and driver name. I'd rather see an alternative wrapper > version for NIC drivers that takes the dev_info_t, and an "instance" > number (ala the mac_register_t) instead of a link name. I think it would > be architecturally cleaner to use consistent link identification for > this as well as mac_register.
Yeah, I guess passing dev_info_t would be cleaner and consistent with mac_register(). And if a "smarter" consumer comes along, it would be trivial to add another wrapper that takes a linkname. -Artem
