|
- /* TEST ONLY: declaration sketch, NOT an illumos ABI/header implementation. */
- #include <stdint.h>
- typedef struct kstat_ctl kstat_ctl_t;
- typedef struct kstat { int ks_type; struct kstat *ks_next; char ks_module[31]; char ks_name[31]; } kstat_t;
- struct kstat_ctl { kstat_t *kc_chain; };
- typedef struct { int data_type; union { uint64_t ui64; int64_t i64; uint32_t ui32; int32_t i32; } value; } kstat_named_t;
- #define KSTAT_DATA_INT32 1
- #define KSTAT_DATA_UINT32 2
- #define KSTAT_DATA_INT64 3
- #define KSTAT_DATA_UINT64 4
- #define KSTAT_TYPE_NAMED 1
- kstat_ctl_t *kstat_open(void);
- int kstat_close(kstat_ctl_t *);
- int kstat_chain_update(kstat_ctl_t *);
- kstat_t *kstat_lookup(kstat_ctl_t *, char *, int, char *);
- int kstat_read(kstat_ctl_t *, kstat_t *, void *);
- void *kstat_data_lookup(kstat_t *, char *);
|