mac_stat.c revision d62bc4badc1c1f1549c961cfb8b420e650e1272b
/*
* CDDL HEADER START
*
* 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
* 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]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* MAC Services Module
*/
#include <sys/sysmacros.h>
#include <sys/mac_impl.h>
#define MAC_KSTAT_NAME "mac"
#define MAC_KSTAT_CLASS "net"
static mac_stat_info_t i_mac_si[] = {
};
#define MAC_NKSTAT \
(sizeof (i_mac_si) / sizeof (mac_stat_info_t))
static mac_stat_info_t i_mac_mod_si[] = {
};
#define MAC_MOD_NKSTAT \
(sizeof (i_mac_mod_si) / sizeof (mac_stat_info_t))
#define MAC_MOD_KSTAT_OFFSET 0
/*
* Private functions.
*/
static int
{
uint_t i;
if (rw != KSTAT_READ)
return (EACCES);
if (i == MAC_MOD_KSTAT_OFFSET) {
msi_index = 0;
msi = i_mac_mod_si;
} else if (i == MAC_KSTAT_OFFSET) {
msi_index = 0;
} else if (i == MAC_TYPE_KSTAT_OFFSET) {
msi_index = 0;
}
case KSTAT_DATA_UINT64:
break;
case KSTAT_DATA_UINT32:
break;
default:
break;
}
knp++;
}
return (0);
}
static void
{
int i;
for (i = 0; i < count; i++) {
knp++;
}
}
/*
* Exported functions.
*/
/*
* Create the "mac" kstat. The "mac" kstat is comprised of three kinds of
* statistics: statistics maintained by the mac module itself, generic mac
* statistics maintained by the driver, and MAC-type specific statistics
* also maintained by the driver.
*/
void
{
} else {
}
return;
knp += MAC_MOD_NKSTAT;
knp += MAC_NKSTAT;
}
}
/*ARGSUSED*/
void
{
mip->mi_kstat_count = 0;
}
}
{
if (IS_MAC_STAT(stat)) {
}
}