MC_SETPROMISC(9E) Driver Entry Points MC_SETPROMISC(9E)

mc_setpromiscmodify device promiscuous mode entry point

#include <sys/mac_provider.h>

int
prefix_m_setpromisc(void *driver, boolean_t enable);

illumos DDI Specific

driver
A pointer to the driver's private data that was passed in via the member of the mac_register(9S) structure to the mac_register(9F) function.
enable
A boolean that indicates the desired state of the device's promiscuous mode. If set to , promiscuous mode should be enabled on the device. If set to , then promiscuous mode should be disabled on the device.

The () entry point is called when the GLDv3 wants to change the device's promiscuous mode. When this entry point is called, the device should manipulate both its unicast and multicast promiscuous mode.

When enable is true, then it should make sure that both unicast and multicast promiscuous mode are enabled. When it's set to false, then they should be disabled. In general, devices should always start with promiscuous mode disabled until the framework indicates that it should be enabled.

The device driver's private state is available by casting the driver argument to the function. Note, this entry point may be called in parallel with others and therefore the device driver should employ any necessary locking on that structure.

Upon successful completion, the device driver's mc_setpromisc() entry point should return after having set the device's state. Otherwise, it should return a non-zero positive error number to indicate the error that occurred.

The device driver may return one of the following errors. While this list is not intended to be exhaustive, it is recommended to use one of these if possible.

The driver encountered a device or transport error while trying to update the device's state.

mac(9E), mac_register(9F), mac_register(9S)

May 31, 2016 OmniOS