1c10c16deSRichard Lowe'\" te 2115f9ea8SRobert Mustacchi.\" The contents of this file are subject to the terms of the Common 3115f9ea8SRobert Mustacchi.\" Development and Distribution License (the "License"). You may not use this 4115f9ea8SRobert Mustacchi.\" file except in compliance with the License. 5115f9ea8SRobert Mustacchi.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or 6115f9ea8SRobert Mustacchi.\" http://www.opensolaris.org/os/licensing. See the License for the specific 7115f9ea8SRobert Mustacchi.\" language governing permissions and limitations under the License. 8115f9ea8SRobert Mustacchi.\" When distributing Covered Code, include this CDDL HEADER in each file and 9115f9ea8SRobert Mustacchi.\" include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add 10115f9ea8SRobert Mustacchi.\" the following below this CDDL HEADER, with the fields enclosed by brackets 11115f9ea8SRobert Mustacchi.\" "[]" replaced with your own identifying information: Portions Copyright 12115f9ea8SRobert Mustacchi.\" [yyyy] [name of copyright owner] 13115f9ea8SRobert Mustacchi.\" 14c10c16deSRichard Lowe.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved 15115f9ea8SRobert Mustacchi.\" Copyright 2021 OmniOS Community Edition (OmniOSce) Association. 16115f9ea8SRobert Mustacchi.\" 17115f9ea8SRobert Mustacchi.Dd April 29, 2021 18115f9ea8SRobert Mustacchi.Dt DLPI_PROMISCON 3DLPI 19115f9ea8SRobert Mustacchi.Os 20115f9ea8SRobert Mustacchi.Sh NAME 21115f9ea8SRobert Mustacchi.Nm dlpi_promiscon , 22115f9ea8SRobert Mustacchi.Nm dlpi_promiscoff 23115f9ea8SRobert Mustacchi.Nd enable or disable DLPI promiscuous mode 24115f9ea8SRobert Mustacchi.Sh LIBRARY 25115f9ea8SRobert Mustacchi.Lb libdlpi 26115f9ea8SRobert Mustacchi.Sh SYNOPSIS 27115f9ea8SRobert Mustacchi.In libdlpi.h 28115f9ea8SRobert Mustacchi.Ft int 29115f9ea8SRobert Mustacchi.Fo dlpi_promiscon 30115f9ea8SRobert Mustacchi.Fa dlpi_handle_t dh 31115f9ea8SRobert Mustacchi.Fa uint_t level 32115f9ea8SRobert Mustacchi.Fc 33115f9ea8SRobert Mustacchi.Ft int 34115f9ea8SRobert Mustacchi.Fo dlpi_promiscoff 35115f9ea8SRobert Mustacchi.Fa dlpi_handle_t dh 36115f9ea8SRobert Mustacchi.Fa uint_t level 37115f9ea8SRobert Mustacchi.Fc 38115f9ea8SRobert Mustacchi.Sh DESCRIPTION 39115f9ea8SRobert Mustacchi.Fn dlpi_promiscon 40115f9ea8SRobert Mustacchienables promiscuous mode on a 41*bbf21555SRichard Lowe.Xr dlpi 4P 42115f9ea8SRobert Mustacchilink instance associated with a DLPI handle 43115f9ea8SRobert Mustacchi.Fa dh , 44115f9ea8SRobert Mustacchiat the specified 45115f9ea8SRobert Mustacchi.Fa level . 46115f9ea8SRobert MustacchiMultiple levels can be combined; the new level is enabled in addition to any 47115f9ea8SRobert Mustacchipreviously enabled levels. 48115f9ea8SRobert MustacchiAfter enabling promiscuous mode, the caller will be able to receive all 49115f9ea8SRobert Mustacchimessages destined for the DLPI link instance at the specified 50115f9ea8SRobert Mustacchi.Fa level . 51115f9ea8SRobert MustacchiThis operation can be performed in any DLPI state of a handle. 52115f9ea8SRobert Mustacchi.Pp 53115f9ea8SRobert Mustacchi.Fn dlpi_promiscoff 54115f9ea8SRobert Mustacchidisables promiscuous mode on a 55*bbf21555SRichard Lowe.Xr dlpi 4P 56115f9ea8SRobert Mustacchilink instance associated with DLPI handle 57115f9ea8SRobert Mustacchi.Fa dh , 58115f9ea8SRobert Mustacchiat the specified level. 59115f9ea8SRobert MustacchiThis operation can be performed in any DLPI state of a handle in 60115f9ea8SRobert Mustacchiwhich promiscuous mode is enabled at the specified 61115f9ea8SRobert Mustacchi.Fa level . 62115f9ea8SRobert Mustacchi.Pp 63115f9ea8SRobert MustacchiThe 64115f9ea8SRobert Mustacchi.Fa level 65115f9ea8SRobert Mustacchimodes are: 66115f9ea8SRobert Mustacchi.Bl -tag -width Ds 67115f9ea8SRobert Mustacchi.It Dv DL_PROMISC_PHYS 68c10c16deSRichard LowePromiscuous mode at the physical level 69115f9ea8SRobert Mustacchi.It Dv DL_PROMISC_SAP 70115f9ea8SRobert MustacchiPromiscuous mode at the SAP level 71115f9ea8SRobert Mustacchi.It Dv DL_PROMISC_MULTI 72c10c16deSRichard LowePromiscuous mode for all multicast addresses 73115f9ea8SRobert Mustacchi.It Dv DL_PROMISC_RX_ONLY 74115f9ea8SRobert MustacchiWhen one or more of the above promiscuous modes is also enabled, this option 75115f9ea8SRobert Mustacchimodifies it so that only inbound traffic is received. 76115f9ea8SRobert MustacchiWhen using this level, it is recommended to set it before the others. 77115f9ea8SRobert Mustacchi.El 78115f9ea8SRobert Mustacchi.Sh RETURN VALUES 79115f9ea8SRobert MustacchiOn successful completion, 80115f9ea8SRobert Mustacchi.Fn dlpi_promiscon 81115f9ea8SRobert Mustacchiand 82115f9ea8SRobert Mustacchi.Fn dlpi_promiscoff 83115f9ea8SRobert Mustacchireturn 84115f9ea8SRobert Mustacchi.Dv DLPI_SUCCESS . 85115f9ea8SRobert MustacchiIf 86115f9ea8SRobert Mustacchi.Dv DL_SYSERR 87115f9ea8SRobert Mustacchiis returned, 88115f9ea8SRobert Mustacchi.Va errno 89115f9ea8SRobert Mustacchicontains the specific UNIX system error value. 90115f9ea8SRobert MustacchiOtherwise, a DLPI error value defined in 91115f9ea8SRobert Mustacchi.In sys/dlpi.h , 92115f9ea8SRobert Mustacchior an error value listed in the following section is returned. 93115f9ea8SRobert Mustacchi.Sh ERRORS 94115f9ea8SRobert Mustacchi.Bl -tag -width Er 95115f9ea8SRobert Mustacchi.It Er DLPI_EBADMSG 96c10c16deSRichard LoweBad DLPI message 97115f9ea8SRobert Mustacchi.It Er DLPI_EINHANDLE 98115f9ea8SRobert MustacchiInvalid DLPI handle 99115f9ea8SRobert Mustacchi.It Er DLPI_EINVAL 100c10c16deSRichard LoweInvalid argument 101115f9ea8SRobert Mustacchi.It Er DLPI_ETIMEDOUT 102115f9ea8SRobert MustacchiOperation timed out 103115f9ea8SRobert Mustacchi.El 104115f9ea8SRobert Mustacchi.Sh INTERFACE STABILITY 105115f9ea8SRobert Mustacchi.Sy Committed 106115f9ea8SRobert Mustacchi.Sh MT-LEVEL 107115f9ea8SRobert Mustacchi.Sy Safe 108115f9ea8SRobert Mustacchi.Sh SEE ALSO 109115f9ea8SRobert Mustacchi.Xr libdlpi 3LIB , 110*bbf21555SRichard Lowe.Xr dlpi 4P , 111*bbf21555SRichard Lowe.Xr attributes 7 112