Peter Memishian wrote:
>  > > As I recall, my thought was that we would store the data in ASCII anyway,
>  > > so having the API allow arbitrarily-typed data seemed messy.  Further, in
>  > > the above calsl, I'm not sure how the routines would know to treat vid as
>  > > a 16-bit unsigned integer unless it knows the type of FVLANID.  But then
>  > > why pass the size?
>  > > 
>  > So your comments are strictly related to the format in the configuration 
>  > file? If so, I understand. But if we have to convert each fields into 
>  > strings before we write it, and convert the string back to the fields from 
>  > the string, that would cause inconvenience to the caller.
>  > 
>  > Can we just add another argument to the API to indicate the type of the 
>  > field, similar to the "KSTAT_DATA_ULONG, KSTAT_DATA_CHAR ..." in the kstat 
>  > interfaces.
> 
> Are we sure our datatypes will always be that simple (e.g., will link
> properties be returned from these interfaces too)?  It seems more flexible
> to me to leave the interpretation of the data to the caller.
> 
In a complex case, one can always use DATA_STR type and let the caller to 
interpret the data.

- Cathy


Reply via email to