'\" te .\" The contents of this file are subject to the terms of the Common .\" Development and Distribution License (the "License"). You may not use this .\" file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or .\" http://www.opensolaris.org/os/licensing. See the License for the specific .\" language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and .\" include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add .\" the following below this CDDL HEADER, with the fields enclosed by brackets .\" "[]" replaced with your own identifying information: Portions Copyright .\" [yyyy] [name of copyright owner] .\" .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved .\" Copyright 2021 OmniOS Community Edition (OmniOSce) Association. .\" .Dd April 29, 2021 .Dt DLPI_PROMISCON 3DLPI .Os .Sh NAME .Nm dlpi_promiscon , .Nm dlpi_promiscoff .Nd enable or disable DLPI promiscuous mode .Sh LIBRARY .Lb libdlpi .Sh SYNOPSIS .In libdlpi.h .Ft int .Fo dlpi_promiscon .Fa dlpi_handle_t dh .Fa uint_t level .Fc .Ft int .Fo dlpi_promiscoff .Fa dlpi_handle_t dh .Fa uint_t level .Fc .Sh DESCRIPTION .Fn dlpi_promiscon enables promiscuous mode on a .Xr dlpi 4P link instance associated with a DLPI handle .Fa dh , at the specified .Fa level . Multiple levels can be combined; the new level is enabled in addition to any previously enabled levels. After enabling promiscuous mode, the caller will be able to receive all messages destined for the DLPI link instance at the specified .Fa level . This operation can be performed in any DLPI state of a handle. .Pp .Fn dlpi_promiscoff disables promiscuous mode on a .Xr dlpi 4P link instance associated with DLPI handle .Fa dh , at the specified level. This operation can be performed in any DLPI state of a handle in which promiscuous mode is enabled at the specified .Fa level . .Pp The .Fa level modes are: .Bl -tag -width Ds .It Dv DL_PROMISC_PHYS Promiscuous mode at the physical level .It Dv DL_PROMISC_SAP Promiscuous mode at the SAP level .It Dv DL_PROMISC_MULTI Promiscuous mode for all multicast addresses .It Dv DL_PROMISC_RX_ONLY When one or more of the above promiscuous modes is also enabled, this option modifies it so that only inbound traffic is received. When using this level, it is recommended to set it before the others. .El .Sh RETURN VALUES On successful completion, .Fn dlpi_promiscon and .Fn dlpi_promiscoff return .Dv DLPI_SUCCESS . If .Dv DL_SYSERR is returned, .Va errno contains the specific UNIX system error value. Otherwise, a DLPI error value defined in .In sys/dlpi.h , or an error value listed in the following section is returned. .Sh ERRORS .Bl -tag -width Er .It Er DLPI_EBADMSG Bad DLPI message .It Er DLPI_EINHANDLE Invalid DLPI handle .It Er DLPI_EINVAL Invalid argument .It Er DLPI_ETIMEDOUT Operation timed out .El .Sh INTERFACE STABILITY .Sy Committed .Sh MT-LEVEL .Sy Safe .Sh SEE ALSO .Xr libdlpi 3LIB , .Xr dlpi 4P , .Xr attributes 7