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

NAME


mac_link_update - inform the MAC layer about a link state change

SYNOPSIS


#include <sys/mac_provider.h>

void
mac_link_update(mac_handle_t mh, link_state_t link);

INTERFACE LEVEL


illumos DDI specific

PARAMETERS


mh The MAC handle obtained from a call to mac_register(9F).

link The current state of the link. For valid link states see
the discussion of MAC_PROP_STATUS in the PROPERTIES
section of mac(9E).

DESCRIPTION


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.

CONTEXT


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

SEE ALSO


mac(9E), mac_register(9F)

illumos May 31, 2016 illumos

tribblix@gmail.com :: GitHub :: Privacy