8202 doors man pages contain extra whitespace
[unleashed.git] / usr / src / man / man9e / mc_setpromisc.9e
blob4c3d4f91137176ed7874a1d13cdfb43f1b0b0e0f
1 .\"
2 .\" This file and its contents are supplied under the terms of the
3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 .\" You may only use this file in accordance with the terms of version
5 .\" 1.0 of the CDDL.
6 .\"
7 .\" A full copy of the text of the CDDL should have accompanied this
8 .\" source.  A copy of the CDDL is also available via the Internet at
9 .\" http://www.illumos.org/license/CDDL.
10 .\"
11 .\"
12 .\" Copyright 2016 Joyent, Inc.
13 .\"
14 .Dd May 31, 2016
15 .Dt MC_SETPROMISC 9E
16 .Os
17 .Sh NAME
18 .Nm mc_setpromisc
19 .Nd modify device promiscuous mode entry point
20 .Sh SYNOPSIS
21 .In sys/mac_provider.h
22 .Ft int
23 .Fo prefix_m_setpromisc
24 .Fa "void *driver"
25 .Fa "boolean_t enable"
26 .Fc
27 .Sh INTERFACE LEVEL
28 illumos DDI Specific
29 .Sh PARAMETERS
30 .Bl -tag -width Ds
31 .It Fa driver
32 A pointer to the driver's private data that was passed in via the
33 .Sy m_pdata
34 member of the
35 .Xr mac_register 9S
36 structure to the
37 .Xr mac_register 9F
38 function.
39 .It Fa enable
40 A boolean that indicates the desired state of the device's promiscuous
41 mode. If set to
42 .Sy B_TRUE ,
43 promiscuous mode should be enabled on the device. If set to
44 .Sy B_FALSE ,
45 then promiscuous mode should be disabled on the device.
46 .El
47 .Sh DESCRIPTION
48 The
49 .Fn mc_setpromisc
50 entry point is called when the GLDv3 wants to change the device's
51 promiscuous mode. When this entry point is called, the device should
52 manipulate both its unicast and multicast promiscuous mode.
53 .Pp
54 When
55 .Fa enable
56 is true, then it should make sure that both unicast and multicast
57 promiscuous mode are enabled. When it's set to false, then they should
58 be disabled. In general, devices should always start with promiscuous
59 mode disabled until the framework indicates that it should be enabled.
60 .Pp
61 The device driver's private state is available by casting the
62 .Fa driver
63 argument to the function. Note, this entry point may be called in
64 parallel with others and therefore the device driver should employ any
65 necessary locking on that structure.
66 .Sh RETURN VALUES
67 Upon successful completion, the device driver's
68 .Fn mc_setpromisc
69 entry point should return
70 .Sy 0
71 after having set the device's state. Otherwise, it should return a
72 non-zero positive error number to indicate the error that occurred.
73 .Sh ERRORS
74 The device driver may return one of the following errors. While this list
75 is not intended to be exhaustive, it is recommended to use one of these
76 if possible.
77 .Bl -tag -width Er
78 .It Er EIO
79 The driver encountered a device or transport error while trying to
80 update the device's state.
81 .El
82 .Sh SEE ALSO
83 .Xr mac 9E ,
84 .Xr mac_register 9F ,
85 .Xr mac_register 9S