+#define MAX_MBUF_CNAME 15
+
+typedef struct mb_class_stat {
+ char mbcl_cname[MAX_MBUF_CNAME + 1]; /* class name */
+ u_int32_t mbcl_size; /* buffer size */
+ u_int32_t mbcl_total; /* # of buffers created */
+ u_int32_t mbcl_active; /* # of active buffers */
+ u_int32_t mbcl_infree; /* # of available buffers */
+ u_int32_t mbcl_slab_cnt; /* # of available slabs */
+ u_int64_t mbcl_alloc_cnt; /* # of times alloc is called */
+ u_int64_t mbcl_free_cnt; /* # of times free is called */
+ u_int64_t mbcl_notified; /* # of notified wakeups */
+ u_int64_t mbcl_purge_cnt; /* # of purges so far */
+ u_int64_t mbcl_fail_cnt; /* # of allocation failures */
+ u_int32_t mbcl_ctotal; /* total only for this class */
+ /*
+ * Cache layer statistics
+ */
+ u_int32_t mbcl_mc_state; /* cache state (see below) */
+ u_int32_t mbcl_mc_cached; /* # of cached buffers */
+ u_int32_t mbcl_mc_waiter_cnt; /* # waiters on the cache */
+ u_int32_t mbcl_mc_wretry_cnt; /* # of wait retries */
+ u_int32_t mbcl_mc_nwretry_cnt; /* # of no-wait retry attempts */
+ u_int64_t mbcl_reserved[4]; /* for future use */
+} mb_class_stat_t;
+
+#define MCS_DISABLED 0 /* cache is permanently disabled */
+#define MCS_ONLINE 1 /* cache is online */
+#define MCS_PURGING 2 /* cache is being purged */
+#define MCS_OFFLINE 3 /* cache is offline (resizing) */
+
+typedef struct mb_stat {
+ u_int32_t mbs_cnt; /* number of classes */
+ mb_class_stat_t mbs_class[1]; /* class array */
+} mb_stat_t;
+
+#ifdef KERNEL_PRIVATE