xref: /illumos-gate/usr/src/man/man3dlpi/dlpi_promiscon.3dlpi (revision 115f9ea8610878d992d097ec5df5c7c244c0bc49)
1'\" te
2.\" The contents of this file are subject to the terms of the Common
3.\" Development and Distribution License (the "License").  You may not use this
4.\" file except in compliance with the License.
5.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or
6.\" http://www.opensolaris.org/os/licensing.  See the License for the specific
7.\" language governing permissions and limitations under the License.
8.\" When distributing Covered Code, include this CDDL HEADER in each file and
9.\" include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add
10.\" the following below this CDDL HEADER, with the fields enclosed by brackets
11.\" "[]" replaced with your own identifying information: Portions Copyright
12.\" [yyyy] [name of copyright owner]
13.\"
14.\" Copyright (c) 2007, Sun Microsystems, Inc.  All Rights Reserved
15.\" Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
16.\"
17.Dd April 29, 2021
18.Dt DLPI_PROMISCON 3DLPI
19.Os
20.Sh NAME
21.Nm dlpi_promiscon ,
22.Nm dlpi_promiscoff
23.Nd enable or disable DLPI promiscuous mode
24.Sh LIBRARY
25.Lb libdlpi
26.Sh SYNOPSIS
27.In libdlpi.h
28.Ft int
29.Fo dlpi_promiscon
30.Fa dlpi_handle_t dh
31.Fa uint_t level
32.Fc
33.Ft int
34.Fo dlpi_promiscoff
35.Fa dlpi_handle_t dh
36.Fa uint_t level
37.Fc
38.Sh DESCRIPTION
39.Fn dlpi_promiscon
40enables promiscuous mode on a
41.Xr dlpi 7P
42link instance associated with a DLPI handle
43.Fa dh ,
44at the specified
45.Fa level .
46Multiple levels can be combined; the new level is enabled in addition to any
47previously enabled levels.
48After enabling promiscuous mode, the caller will be able to receive all
49messages destined for the DLPI link instance at the specified
50.Fa level .
51This operation can be performed in any DLPI state of a handle.
52.Pp
53.Fn dlpi_promiscoff
54disables promiscuous mode on a
55.Xr dlpi 7P
56link instance associated with DLPI handle
57.Fa dh ,
58at the specified level.
59This operation can be performed in any DLPI state of a handle in
60which promiscuous mode is enabled at the specified
61.Fa level .
62.Pp
63The
64.Fa level
65modes are:
66.Bl -tag -width Ds
67.It Dv DL_PROMISC_PHYS
68Promiscuous mode at the physical level
69.It Dv DL_PROMISC_SAP
70Promiscuous mode at the SAP level
71.It Dv DL_PROMISC_MULTI
72Promiscuous mode for all multicast addresses
73.It Dv DL_PROMISC_RX_ONLY
74When one or more of the above promiscuous modes is also enabled, this option
75modifies it so that only inbound traffic is received.
76When using this level, it is recommended to set it before the others.
77.El
78.Sh RETURN VALUES
79On successful completion,
80.Fn dlpi_promiscon
81and
82.Fn dlpi_promiscoff
83return
84.Dv DLPI_SUCCESS .
85If
86.Dv DL_SYSERR
87is returned,
88.Va errno
89contains the specific UNIX system error value.
90Otherwise, a DLPI error value defined in
91.In sys/dlpi.h ,
92or an error value listed in the following section is returned.
93.Sh ERRORS
94.Bl -tag -width Er
95.It Er DLPI_EBADMSG
96Bad DLPI message
97.It Er DLPI_EINHANDLE
98Invalid DLPI handle
99.It Er DLPI_EINVAL
100Invalid argument
101.It Er DLPI_ETIMEDOUT
102Operation timed out
103.El
104.Sh INTERFACE STABILITY
105.Sy Committed
106.Sh MT-LEVEL
107.Sy Safe
108.Sh SEE ALSO
109.Xr libdlpi 3LIB ,
110.Xr attributes 5 ,
111.Xr dlpi 7P
112