MC_SETPROMISC(9E) Driver Entry Points MC_SETPROMISC(9E)
NAME
mc_setpromisc - modify device promiscuous mode entry point
SYNOPSIS
#include <sys/mac_provider.h> int prefix_m_setpromisc(
void *driver,
boolean_t enable);
INTERFACE LEVEL
illumos DDI Specific
PARAMETERS
driver A pointer to the driver's private data that was passed in via
the
m_pdata 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
B_TRUE, promiscuous mode should be
enabled on the device. If set to
B_FALSE, then promiscuous
mode should be disabled on the device.
DESCRIPTION
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.
RETURN VALUES
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.
ERRORS
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 The driver encountered a device or transport error
while trying to update the device's state.
SEE ALSO
mac(9E),
mac_register(9F),
mac_register(9S)illumos May 31, 2016 illumos