MC_SETPROMISC(9E) | Driver Entry Points | MC_SETPROMISC(9E) |
mc_setpromisc
—
modify device promiscuous mode entry point
#include
<sys/mac_provider.h>
int
prefix_m_setpromisc
(void
*driver, boolean_t enable);
illumos DDI Specific
The
mc_setpromisc
()
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
0 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.
EIO
May 31, 2016 | OmniOS |