> The current signature for dls_destroy() in the clearview gate is:
>
> /*
>   * Delete a given physical link.
>   */
> int
> dls_destroy(mac_handle_t mh, datalink_id_t *idp)
> ...
>
> The idea being that dls_destroy()'s only input argument is mh, and it 
> returns the datalink id that was destroyed.  Is there a reason why this 
> couldn't be:
>
> /*
>   * Delete a data link.
>   */
> int
> dls_destroy(datalink_id_t id)
> ...
>   
It is symmetrical with dls_create() which also take mac_handle_t as the 
input.

As dls_create() and dls_destroy() are often called by pseudo link driver 
(such as aggr, iptun) to create/destroy data-links after/before 
mac_register()/mac_unregister(), my intention is to not require those 
drivers to keep the linkid information, but instead create/destroy links 
using mac_handle_t which is returned by mac_register().

Thanks
- Cathy
> All callers of dls_destroy() created the datalink using dls_create(), and 
> thus should know what datalink id to delete.
>
> -Seb
>
> _________________________________
> clearview-discuss mailing list
> clearview-discuss at opensolaris.org
>   


Reply via email to