>> 4. The signature of get/set_conf_field should be:
>>
>> dladm_status_t dladm_get_conf_field(dladm_conf_t conf, const char* field,
>>     void *value, size_t *vallenp);
>>
>> dladm_status_t dladm_set_conf_field(dladm_conf_t conf, const char *field,
>>     void char *value, size_t vallen);
>>
> 
> I can go either way on this.  I remember meem made the comment that we 
> should pass strings.  I don't have a strong feeling any more for either 
> way of doing things.
> 
I am not sure what concern Meem has. But I think that make it as void * will 
make the programming easier. For example, to set and get a VLAN ID field:

dladm_set_conf_field(conf, FVLANID, &vid, sizeof (uint16_t);
dladm_get_conf_field(conf, FVLANID, &vid, sizeof (uint16_t))

>> 8. I would think dladm_walk_conf() will only be called in devfsadmd, 
>> so it should be made private (not in this document).
>>
> 
> Right now only devfsadmd uses dladm_walk_conf, but could someone in the 
> future want to use it?  I'd prefer to leave it as is.
> 
Other applications need to walk the links will just call 
dladm_walk_linkids(), and use dladm_read_conf() to get the configuration of 
each link. To have two walk functions will only make the API confusing.

>> 9. Note the altroot argument in below functions:
>>
>> dladm_status_t dladm_write_conf(dladm_conf_t conf, const char *altroot);
>> dladm_status_t dladm_remove_conf(dladm_linkid_t linkid,
>>     const char *altroot);
>>
> 
> Meem mentioned dladm_set_rootdir, which I think I would be better than 
> having extra arguments.
> 
Ok. Then please include dladm_set_rootdir() in the document.

Thanks
- Cathy

Reply via email to