Print this page
10052 "dladm show-ether" should pick one kstat snapshot and stick with it
Reviewed by: Rob Johnston <rob.johnston@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Gergo Doma <domag02@gmail.com>
Reviewed by: Andy Fiddaman <andy@omniosce.org>

@@ -20,17 +20,22 @@
  */
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 
+/*
+ * Copyright 2019 OmniOS Community Edition (OmniOSce) Association
+ */
+
 #ifndef _LIBDLADM_H
 #define _LIBDLADM_H
 
 #include <sys/dls_mgmt.h>
 #include <sys/dld.h>
 #include <sys/dlpi.h>
 #include <libnvpair.h>
+#include <kstat.h>
 
 /*
  * This file includes structures, macros and common routines shared by all
  * data-link administration, and routines which do not directly administrate
  * links. For example, dladm_status2str().

@@ -206,10 +211,16 @@
 /*
  * retrieve the dld file descriptor from handle, only libdladm and
  * dlmgmtd are given access to the door file descriptor.
  */
 extern int      dladm_dld_fd(dladm_handle_t);
+/*
+ * Retrieve kstat_ctl_t* from handle.The libkstat handle is opened
+ * when the first caller needs it.This allows the library to share
+ * the kstat handle.
+ */
+extern kstat_ctl_t      *dladm_dld_kcp(dladm_handle_t);
 
 typedef struct dladm_arg_info {
         const char      *ai_name;
         char            *ai_val[DLADM_MAX_ARG_VALS];
         uint_t          ai_count;