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_impl.h
          +++ new/usr/src/lib/libdladm/common/libdladm_impl.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) 2006, 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_IMPL_H
  26   30  #define _LIBDLADM_IMPL_H
  27   31  
  28   32  #include <sys/types.h>
  29   33  #include <sys/mac.h>
  30   34  #include <sys/mac_flow.h>
  31   35  #include <libdladm.h>
  32   36  #include <stdio.h>
  33   37  
  34   38  #ifdef  __cplusplus
↓ open down ↓ 6 lines elided ↑ open up ↑
  41   45  
  42   46  /*
  43   47   * The handle contains file descriptors to DLD_CONTROL_DEV and
  44   48   * DLMGMT_DOOR.  Rather than opening the file descriptor each time
  45   49   * it is required, the handle is opened by consumers of libdladm
  46   50   * (e.g., dladm) and then passed to libdladm.
  47   51   */
  48   52  struct dladm_handle {
  49   53          int dld_fd;     /* file descriptor to DLD_CONTROL_DEV */
  50   54          int door_fd;    /* file descriptor to DLMGMT_DOOR */
       55 +        kstat_ctl_t *dld_kcp;   /* for kstat consumers */
  51   56  };
  52   57  
  53   58  /* DLMGMT_DOOR can only be accessed by libdladm and dlmgmtd */
  54   59  extern dladm_status_t   dladm_door_fd(dladm_handle_t, int *);
  55   60  
  56   61  extern dladm_status_t   dladm_errno2status(int);
  57   62  extern dladm_status_t   i_dladm_rw_db(dladm_handle_t, const char *, mode_t,
  58   63                              dladm_status_t (*)(dladm_handle_t, void *, FILE *,
  59   64                              FILE *), void *, boolean_t);
  60   65  extern dladm_status_t   dladm_get_state(dladm_handle_t, datalink_id_t,
↓ open down ↓ 115 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX