Print this page
2553 mac address should be a dladm link property


 116 typedef struct mac_propval_range_s {
 117         uint_t mpr_count;                       /* count of ranges */
 118         mac_propval_type_t mpr_type;            /* type of value */
 119         union {
 120                 mac_propval_uint32_range_t mpr_uint32[1];
 121         } u;
 122 } mac_propval_range_t;
 123 
 124 #define mpr_range_uint32        u.mpr_uint32
 125 
 126 /*
 127  * Maximum MAC address length
 128  */
 129 #define MAXMACADDRLEN           20
 130 
 131 typedef enum {
 132         MAC_LOGTYPE_LINK = 1,
 133         MAC_LOGTYPE_FLOW
 134 } mac_logtype_t;
 135 





 136 #define MAXLINKPROPNAME         256             /* max property name len */
 137 
 138 /*
 139  * Public properties.
 140  *
 141  * Note that there are 2 sets of parameters: the *_EN_* values are
 142  * those that the Administrator configures for autonegotiation. The
 143  * _ADV_* values are those that are currently exposed over the wire.
 144  */
 145 typedef enum {
 146         MAC_PROP_DUPLEX = 0x00000001,
 147         MAC_PROP_SPEED,
 148         MAC_PROP_STATUS,
 149         MAC_PROP_AUTONEG,
 150         MAC_PROP_EN_AUTONEG,
 151         MAC_PROP_MTU,
 152         MAC_PROP_ZONE,
 153         MAC_PROP_AUTOPUSH,
 154         MAC_PROP_FLOWCTRL,
 155         MAC_PROP_ADV_1000FDX_CAP,


 188         MAC_PROP_WL_CREATE_IBSS,
 189         MAC_PROP_WL_SETOPTIE,
 190         MAC_PROP_WL_DELKEY,
 191         MAC_PROP_WL_KEY,
 192         MAC_PROP_WL_MLME,
 193         MAC_PROP_TAGMODE,
 194         MAC_PROP_ADV_10GFDX_CAP,
 195         MAC_PROP_EN_10GFDX_CAP,
 196         MAC_PROP_PVID,
 197         MAC_PROP_LLIMIT,
 198         MAC_PROP_LDECAY,
 199         MAC_PROP_RESOURCE,
 200         MAC_PROP_RESOURCE_EFF,
 201         MAC_PROP_RXRINGSRANGE,
 202         MAC_PROP_TXRINGSRANGE,
 203         MAC_PROP_MAX_TX_RINGS_AVAIL,
 204         MAC_PROP_MAX_RX_RINGS_AVAIL,
 205         MAC_PROP_MAX_RXHWCLNT_AVAIL,
 206         MAC_PROP_MAX_TXHWCLNT_AVAIL,
 207         MAC_PROP_IB_LINKMODE,

 208         MAC_PROP_PRIVATE = -1
 209 } mac_prop_id_t;
 210 
 211 /*
 212  * Flags to figure out r/w status of legacy ndd props.
 213  */
 214 #define MAC_PROP_PERM_READ              0x0001
 215 #define MAC_PROP_PERM_WRITE             0x0010
 216 #define MAC_PROP_MAP_KSTAT              0x0100
 217 #define MAC_PROP_PERM_RW                (MAC_PROP_PERM_READ|MAC_PROP_PERM_WRITE)
 218 #define MAC_PROP_FLAGS_RK               (MAC_PROP_PERM_READ|MAC_PROP_MAP_KSTAT)
 219 
 220 #ifdef  _KERNEL
 221 
 222 /*
 223  * There are three ranges of statistics values.  0 to 1 - MAC_STAT_MIN are
 224  * interface statistics maintained by the mac module.  MAC_STAT_MIN to 1 -
 225  * MACTYPE_STAT_MIN are common MAC statistics defined by the mac module and
 226  * maintained by each driver.  MACTYPE_STAT_MIN and above are statistics
 227  * defined by MAC-Type plugins and maintained by each driver.




 116 typedef struct mac_propval_range_s {
 117         uint_t mpr_count;                       /* count of ranges */
 118         mac_propval_type_t mpr_type;            /* type of value */
 119         union {
 120                 mac_propval_uint32_range_t mpr_uint32[1];
 121         } u;
 122 } mac_propval_range_t;
 123 
 124 #define mpr_range_uint32        u.mpr_uint32
 125 
 126 /*
 127  * Maximum MAC address length
 128  */
 129 #define MAXMACADDRLEN           20
 130 
 131 typedef enum {
 132         MAC_LOGTYPE_LINK = 1,
 133         MAC_LOGTYPE_FLOW
 134 } mac_logtype_t;
 135 
 136 typedef struct mac_addrprop_s {
 137         uint32_t        ma_len;
 138         uint8_t         ma_addr[MAXMACADDRLEN];
 139 } mac_addrprop_t;
 140 
 141 #define MAXLINKPROPNAME         256             /* max property name len */
 142 
 143 /*
 144  * Public properties.
 145  *
 146  * Note that there are 2 sets of parameters: the *_EN_* values are
 147  * those that the Administrator configures for autonegotiation. The
 148  * _ADV_* values are those that are currently exposed over the wire.
 149  */
 150 typedef enum {
 151         MAC_PROP_DUPLEX = 0x00000001,
 152         MAC_PROP_SPEED,
 153         MAC_PROP_STATUS,
 154         MAC_PROP_AUTONEG,
 155         MAC_PROP_EN_AUTONEG,
 156         MAC_PROP_MTU,
 157         MAC_PROP_ZONE,
 158         MAC_PROP_AUTOPUSH,
 159         MAC_PROP_FLOWCTRL,
 160         MAC_PROP_ADV_1000FDX_CAP,


 193         MAC_PROP_WL_CREATE_IBSS,
 194         MAC_PROP_WL_SETOPTIE,
 195         MAC_PROP_WL_DELKEY,
 196         MAC_PROP_WL_KEY,
 197         MAC_PROP_WL_MLME,
 198         MAC_PROP_TAGMODE,
 199         MAC_PROP_ADV_10GFDX_CAP,
 200         MAC_PROP_EN_10GFDX_CAP,
 201         MAC_PROP_PVID,
 202         MAC_PROP_LLIMIT,
 203         MAC_PROP_LDECAY,
 204         MAC_PROP_RESOURCE,
 205         MAC_PROP_RESOURCE_EFF,
 206         MAC_PROP_RXRINGSRANGE,
 207         MAC_PROP_TXRINGSRANGE,
 208         MAC_PROP_MAX_TX_RINGS_AVAIL,
 209         MAC_PROP_MAX_RX_RINGS_AVAIL,
 210         MAC_PROP_MAX_RXHWCLNT_AVAIL,
 211         MAC_PROP_MAX_TXHWCLNT_AVAIL,
 212         MAC_PROP_IB_LINKMODE,
 213         MAC_PROP_MACADDRESS,
 214         MAC_PROP_PRIVATE = -1
 215 } mac_prop_id_t;
 216 
 217 /*
 218  * Flags to figure out r/w status of legacy ndd props.
 219  */
 220 #define MAC_PROP_PERM_READ              0x0001
 221 #define MAC_PROP_PERM_WRITE             0x0010
 222 #define MAC_PROP_MAP_KSTAT              0x0100
 223 #define MAC_PROP_PERM_RW                (MAC_PROP_PERM_READ|MAC_PROP_PERM_WRITE)
 224 #define MAC_PROP_FLAGS_RK               (MAC_PROP_PERM_READ|MAC_PROP_MAP_KSTAT)
 225 
 226 #ifdef  _KERNEL
 227 
 228 /*
 229  * There are three ranges of statistics values.  0 to 1 - MAC_STAT_MIN are
 230  * interface statistics maintained by the mac module.  MAC_STAT_MIN to 1 -
 231  * MACTYPE_STAT_MIN are common MAC statistics defined by the mac module and
 232  * maintained by each driver.  MACTYPE_STAT_MIN and above are statistics
 233  * defined by MAC-Type plugins and maintained by each driver.