> > This is not true. which function to call is not dependent on the type of
> the
> > link, but the property. For example, "autopush" is a property for all
> links
> > so that it might call dladm_gen_set_prop(), and "speed" is a property of
> > wifi, so that it call wifi_set_prop().
>
> I don't see a problem here. I'd expect that libdladm would first handle
> any "link-wide" generic properties itself. Any unknown properties would
> then be passed on to the library associated with the link type, as they
> are today.
>
It can work. But I think a more reasonable logic should be:
if (is_generic(prop_name)) {
dladm_gen_set_prop();
} else (is_wifi(prop_name)) {
wladm_set_prop();
} else ... {
...
}
Thanks
- Cathy