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>

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libdladm/common/libdladm.h
          +++ new/usr/src/lib/libdladm/common/libdladm.h
↓ open down ↓ 14 lines elided ↑ open up ↑
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  23   23   */
  24   24  
       25 +/*
       26 + * Copyright 2019 OmniOS Community Edition (OmniOSce) Association
       27 + */
       28 +
  25   29  #ifndef _LIBDLADM_H
  26   30  #define _LIBDLADM_H
  27   31  
  28   32  #include <sys/dls_mgmt.h>
  29   33  #include <sys/dld.h>
  30   34  #include <sys/dlpi.h>
  31   35  #include <libnvpair.h>
       36 +#include <kstat.h>
  32   37  
  33   38  /*
  34   39   * This file includes structures, macros and common routines shared by all
  35   40   * data-link administration, and routines which do not directly administrate
  36   41   * links. For example, dladm_status2str().
  37   42   */
  38   43  
  39   44  #ifdef  __cplusplus
  40   45  extern "C" {
  41   46  #endif
↓ open down ↓ 159 lines elided ↑ open up ↑
 201  206  
 202  207  /* open/close handle */
 203  208  extern dladm_status_t   dladm_open(dladm_handle_t *);
 204  209  extern void             dladm_close(dladm_handle_t);
 205  210  
 206  211  /*
 207  212   * retrieve the dld file descriptor from handle, only libdladm and
 208  213   * dlmgmtd are given access to the door file descriptor.
 209  214   */
 210  215  extern int      dladm_dld_fd(dladm_handle_t);
      216 +/*
      217 + * Retrieve kstat_ctl_t* from handle.The libkstat handle is opened
      218 + * when the first caller needs it.This allows the library to share
      219 + * the kstat handle.
      220 + */
      221 +extern kstat_ctl_t      *dladm_dld_kcp(dladm_handle_t);
 211  222  
 212  223  typedef struct dladm_arg_info {
 213  224          const char      *ai_name;
 214  225          char            *ai_val[DLADM_MAX_ARG_VALS];
 215  226          uint_t          ai_count;
 216  227  } dladm_arg_info_t;
 217  228  
 218  229  typedef struct dladm_arg_list {
 219  230          dladm_arg_info_t        al_info[DLADM_MAX_ARG_CNT];
 220  231          uint_t                  al_count;
↓ open down ↓ 75 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX