| 
 
 
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  * Copyright 2013 Joyent, Inc.  All rights reserved.
  26  */
  27 
  28 /*
  29  * This file captures the MAC client API definitions. It can be
  30  * included from any MAC clients.
  31  */
  32 
  33 #ifndef _SYS_MAC_CLIENT_H
  34 #define _SYS_MAC_CLIENT_H
  35 
  36 #include <sys/mac.h>
  37 #include <sys/mac_flow.h>
  38 
  39 #ifdef  __cplusplus
  40 extern "C" {
  41 #endif
  42 
  43 #ifdef  _KERNEL
  44 
  45 /*
 
  71 
  72 /*
  73  * These are used when MAC clients what to specify tx and rx rings
  74  * properties. MAC_RXRINGS_NONE/MAC_TXRINGS_NONE mean that we should
  75  * not reserve any rings while MAC_RXRINGS_DONTCARE/MAC_TXRINGS_DONTCARE
  76  * mean that the system can decide if it wants to reserve rings or
  77  * not.
  78  */
  79 #define MAC_RXRINGS_NONE        0
  80 #define MAC_TXRINGS_NONE        MAC_RXRINGS_NONE
  81 #define MAC_RXRINGS_DONTCARE    -1
  82 #define MAC_TXRINGS_DONTCARE    MAC_RXRINGS_DONTCARE
  83 
  84 typedef enum {
  85         MAC_CLIENT_PROMISC_ALL,
  86         MAC_CLIENT_PROMISC_FILTERED,
  87         MAC_CLIENT_PROMISC_MULTI
  88 } mac_client_promisc_type_t;
  89 
  90 /* flags passed to mac_unicast_add() */
  91 #define MAC_UNICAST_NODUPCHECK                  0x0001
  92 #define MAC_UNICAST_PRIMARY                     0x0002
  93 #define MAC_UNICAST_HW                          0x0004
  94 #define MAC_UNICAST_VNIC_PRIMARY                0x0008
  95 #define MAC_UNICAST_TAG_DISABLE                 0x0010
  96 #define MAC_UNICAST_STRIP_DISABLE               0x0020
  97 #define MAC_UNICAST_DISABLE_TX_VID_CHECK        0x0040
  98 
  99 /* flags passed to mac_client_open */
 100 #define MAC_OPEN_FLAGS_IS_VNIC                  0x0001
 101 #define MAC_OPEN_FLAGS_EXCLUSIVE                0x0002
 102 #define MAC_OPEN_FLAGS_IS_AGGR_PORT             0x0004
 103 #define MAC_OPEN_FLAGS_SHARES_DESIRED           0x0008
 104 #define MAC_OPEN_FLAGS_USE_DATALINK_NAME        0x0010
 105 #define MAC_OPEN_FLAGS_MULTI_PRIMARY            0x0020
 106 #define MAC_OPEN_FLAGS_NO_UNICAST_ADDR          0x0040
 107 
 108 /* flags passed to mac_client_close */
 109 #define MAC_CLOSE_FLAGS_IS_VNIC         0x0001
 110 #define MAC_CLOSE_FLAGS_EXCLUSIVE       0x0002
 | 
 
 
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  * Copyright 2018 Joyent, Inc.  All rights reserved.
  26  */
  27 
  28 /*
  29  * This file captures the MAC client API definitions. It can be
  30  * included from any MAC clients.
  31  */
  32 
  33 #ifndef _SYS_MAC_CLIENT_H
  34 #define _SYS_MAC_CLIENT_H
  35 
  36 #include <sys/mac.h>
  37 #include <sys/mac_flow.h>
  38 
  39 #ifdef  __cplusplus
  40 extern "C" {
  41 #endif
  42 
  43 #ifdef  _KERNEL
  44 
  45 /*
 
  71 
  72 /*
  73  * These are used when MAC clients what to specify tx and rx rings
  74  * properties. MAC_RXRINGS_NONE/MAC_TXRINGS_NONE mean that we should
  75  * not reserve any rings while MAC_RXRINGS_DONTCARE/MAC_TXRINGS_DONTCARE
  76  * mean that the system can decide if it wants to reserve rings or
  77  * not.
  78  */
  79 #define MAC_RXRINGS_NONE        0
  80 #define MAC_TXRINGS_NONE        MAC_RXRINGS_NONE
  81 #define MAC_RXRINGS_DONTCARE    -1
  82 #define MAC_TXRINGS_DONTCARE    MAC_RXRINGS_DONTCARE
  83 
  84 typedef enum {
  85         MAC_CLIENT_PROMISC_ALL,
  86         MAC_CLIENT_PROMISC_FILTERED,
  87         MAC_CLIENT_PROMISC_MULTI
  88 } mac_client_promisc_type_t;
  89 
  90 /* flags passed to mac_unicast_add() */
  91 
  92 #define MAC_UNICAST_NODUPCHECK                  0x0001
  93 #define MAC_UNICAST_PRIMARY                     0x0002
  94 #define MAC_UNICAST_HW                          0x0004
  95 #define MAC_UNICAST_VNIC_PRIMARY                0x0008
  96 #define MAC_UNICAST_TAG_DISABLE                 0x0010
  97 #define MAC_UNICAST_STRIP_DISABLE               0x0020
  98 #define MAC_UNICAST_DISABLE_TX_VID_CHECK        0x0040
  99 
 100 /* flags passed to mac_client_open */
 101 #define MAC_OPEN_FLAGS_IS_VNIC                  0x0001
 102 #define MAC_OPEN_FLAGS_EXCLUSIVE                0x0002
 103 #define MAC_OPEN_FLAGS_IS_AGGR_PORT             0x0004
 104 #define MAC_OPEN_FLAGS_SHARES_DESIRED           0x0008
 105 #define MAC_OPEN_FLAGS_USE_DATALINK_NAME        0x0010
 106 #define MAC_OPEN_FLAGS_MULTI_PRIMARY            0x0020
 107 #define MAC_OPEN_FLAGS_NO_UNICAST_ADDR          0x0040
 108 
 109 /* flags passed to mac_client_close */
 110 #define MAC_CLOSE_FLAGS_IS_VNIC         0x0001
 111 #define MAC_CLOSE_FLAGS_EXCLUSIVE       0x0002
 |