MAC_LINK_UPDATE(9F) Kernel Functions for Drivers MAC_LINK_UPDATE(9F)

inform the MAC layer about a link state change

#include <sys/mac_provider.h>

mac_link_update(mac_handle_t mh, link_state_t link);

illumos DDI specific

The MAC handle obtained from a call to mac_register(9F).
The current state of the link. For valid link states see the discussion of MAC_PROP_STATUS in the PROPERTIES section of mac(9E).

The mac_link_update() function is used by device drivers to inform the MAC layer that the state of a link has changed. As discussed in the Link Updates section of mac(9E), the driver should call this whenever it detects that the state of the link has changed. If the state has not changed, then the driver should not call this function. In addition, if the device driver is powering off the link or is transitioning to a state where it can no longer determine the link status, then it should make sure to call this function with the value of link set to LINK_STATE_UNKNOWN.

Device drivers should ensure that they're not holding any of their specific locks when calling this function.

The mac_link_update() function may be called from user, kernel, or interrupt context.

mac(9E), mac_register(9F)
May 31, 2016 OmniOS