In the current clearview gate's usr/src/lib/libdladm/common/linkprop.c, 
what is the difference between pd_getmod and pd_get in prop_desc_t.  The 
comments state:

        /*
         * callback to get modifiable link property
         */
        pd_getf_t       *pd_getmod;

        /*
         * callback to get current link property
         */
        pd_getf_t       *pd_get;

What is "modifiable", and how do I know if my property is "modifiable"? 
It doesn't mean "writable", since "autopush" and "zone" are both 
"writable" and don't define pd_getmod.

Also, pd_check is confusing:

        /*
         * callback to validate link property value; only be set if pd_optval
         * is not NULL. In that case, validate the value by comparing it with
         * the pd_optsval. Return a val_desc_t array pointer if the value is
         * valid.
         */
        pd_checkf_t     *pd_check;

The comment seems to be out of touch with the implementation, since 
pd_optval _is_ NULL for both the "autopush" and "zone" properties, yet 
they both define a pd_check callback.  As a matter of fact, it looks like 
the only properties that don't define pd_check are those that do define 
pd_optval.  Did the comment mean to say "only be set if pd_optval is NULL"?

-Seb

Reply via email to