Print this page
NEX-17772 libfmd_snmp should learn about new FmProblem fields
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
Reviewed by: Roman Strashkin <roman.strashkin@nexenta.com>


   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 




  27 #ifndef _FMD_ADM_H
  28 #define _FMD_ADM_H
  29 
  30 #pragma ident   "%Z%%M% %I%     %E% SMI"
  31 
  32 #include <fm/fmd_api.h>
  33 
  34 #ifdef  __cplusplus
  35 extern "C" {
  36 #endif
  37 
  38 /*
  39  * Fault Management Daemon Administrative Interfaces
  40  *
  41  * Note: The contents of this file are private to the implementation of the
  42  * Solaris system and FMD subsystem and are subject to change at any time
  43  * without notice.  Applications and drivers using these interfaces will fail
  44  * to run on future releases.  These interfaces should not be used for any
  45  * purpose until they are publicly documented for use outside of Sun.
  46  */
  47 
  48 #define FMD_ADM_VERSION 1               /* library ABI interface version */
  49 #define FMD_ADM_PROGRAM 0               /* connect library to system fmd */
  50 
  51 typedef struct fmd_adm fmd_adm_t;


  77 extern int fmd_adm_module_load(fmd_adm_t *, const char *);
  78 extern int fmd_adm_module_unload(fmd_adm_t *, const char *);
  79 extern int fmd_adm_module_reset(fmd_adm_t *, const char *);
  80 extern int fmd_adm_module_stats(fmd_adm_t *, const char *, fmd_adm_stats_t *);
  81 extern int fmd_adm_module_gc(fmd_adm_t *, const char *);
  82 
  83 typedef struct fmd_adm_rsrcinfo {
  84         const char *ari_fmri;           /* fmri name of resource */
  85         const char *ari_uuid;           /* uuid name of resource */
  86         const char *ari_case;           /* uuid of case associated w/ state */
  87         uint_t ari_flags;               /* flags (see below) */
  88 } fmd_adm_rsrcinfo_t;
  89 
  90 #define FMD_ADM_RSRC_FAULTY     0x1     /* resource is faulty */
  91 #define FMD_ADM_RSRC_UNUSABLE   0x2     /* resource is unusable */
  92 #define FMD_ADM_RSRC_INVISIBLE  0x4     /* resource is not directly visible */
  93 
  94 typedef struct fmd_adm_caseinfo {
  95         const char *aci_uuid;
  96         const char *aci_code;


  97         const char *aci_url;


  98         nvlist_t *aci_event;
  99 } fmd_adm_caseinfo_t;
 100 
 101 typedef int fmd_adm_rsrc_f(const fmd_adm_rsrcinfo_t *, void *);
 102 typedef int fmd_adm_case_f(const fmd_adm_caseinfo_t *, void *);
 103 
 104 extern int fmd_adm_rsrc_count(fmd_adm_t *, int, uint32_t *);
 105 extern int fmd_adm_rsrc_iter(fmd_adm_t *, int, fmd_adm_rsrc_f *, void *);
 106 extern int fmd_adm_rsrc_flush(fmd_adm_t *, const char *);
 107 extern int fmd_adm_rsrc_repaired(fmd_adm_t *, const char *);
 108 extern int fmd_adm_rsrc_replaced(fmd_adm_t *, const char *);
 109 extern int fmd_adm_rsrc_acquit(fmd_adm_t *, const char *, const char *);
 110 extern int fmd_adm_case_repair(fmd_adm_t *, const char *);
 111 extern int fmd_adm_case_acquit(fmd_adm_t *, const char *);
 112 extern int fmd_adm_case_iter(fmd_adm_t *, const char *, fmd_adm_case_f *,
 113     void *);
 114 
 115 typedef struct fmd_adm_serdinfo {
 116         const char *asi_name;           /* name of serd engine */
 117         uint64_t asi_delta;             /* nsecs from oldest event to now */




   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 /*
  28  * Copyright 2018 Nexenta Systems, Inc.
  29  */
  30 
  31 #ifndef _FMD_ADM_H
  32 #define _FMD_ADM_H
  33 


  34 #include <fm/fmd_api.h>
  35 
  36 #ifdef  __cplusplus
  37 extern "C" {
  38 #endif
  39 
  40 /*
  41  * Fault Management Daemon Administrative Interfaces
  42  *
  43  * Note: The contents of this file are private to the implementation of the
  44  * Solaris system and FMD subsystem and are subject to change at any time
  45  * without notice.  Applications and drivers using these interfaces will fail
  46  * to run on future releases.  These interfaces should not be used for any
  47  * purpose until they are publicly documented for use outside of Sun.
  48  */
  49 
  50 #define FMD_ADM_VERSION 1               /* library ABI interface version */
  51 #define FMD_ADM_PROGRAM 0               /* connect library to system fmd */
  52 
  53 typedef struct fmd_adm fmd_adm_t;


  79 extern int fmd_adm_module_load(fmd_adm_t *, const char *);
  80 extern int fmd_adm_module_unload(fmd_adm_t *, const char *);
  81 extern int fmd_adm_module_reset(fmd_adm_t *, const char *);
  82 extern int fmd_adm_module_stats(fmd_adm_t *, const char *, fmd_adm_stats_t *);
  83 extern int fmd_adm_module_gc(fmd_adm_t *, const char *);
  84 
  85 typedef struct fmd_adm_rsrcinfo {
  86         const char *ari_fmri;           /* fmri name of resource */
  87         const char *ari_uuid;           /* uuid name of resource */
  88         const char *ari_case;           /* uuid of case associated w/ state */
  89         uint_t ari_flags;               /* flags (see below) */
  90 } fmd_adm_rsrcinfo_t;
  91 
  92 #define FMD_ADM_RSRC_FAULTY     0x1     /* resource is faulty */
  93 #define FMD_ADM_RSRC_UNUSABLE   0x2     /* resource is unusable */
  94 #define FMD_ADM_RSRC_INVISIBLE  0x4     /* resource is not directly visible */
  95 
  96 typedef struct fmd_adm_caseinfo {
  97         const char *aci_uuid;
  98         const char *aci_code;
  99         const char *aci_type;
 100         const char *aci_severity;
 101         const char *aci_url;
 102         const char *aci_desc;
 103         const char *aci_fmri;
 104         nvlist_t *aci_event;
 105 } fmd_adm_caseinfo_t;
 106 
 107 typedef int fmd_adm_rsrc_f(const fmd_adm_rsrcinfo_t *, void *);
 108 typedef int fmd_adm_case_f(const fmd_adm_caseinfo_t *, void *);
 109 
 110 extern int fmd_adm_rsrc_count(fmd_adm_t *, int, uint32_t *);
 111 extern int fmd_adm_rsrc_iter(fmd_adm_t *, int, fmd_adm_rsrc_f *, void *);
 112 extern int fmd_adm_rsrc_flush(fmd_adm_t *, const char *);
 113 extern int fmd_adm_rsrc_repaired(fmd_adm_t *, const char *);
 114 extern int fmd_adm_rsrc_replaced(fmd_adm_t *, const char *);
 115 extern int fmd_adm_rsrc_acquit(fmd_adm_t *, const char *, const char *);
 116 extern int fmd_adm_case_repair(fmd_adm_t *, const char *);
 117 extern int fmd_adm_case_acquit(fmd_adm_t *, const char *);
 118 extern int fmd_adm_case_iter(fmd_adm_t *, const char *, fmd_adm_case_f *,
 119     void *);
 120 
 121 typedef struct fmd_adm_serdinfo {
 122         const char *asi_name;           /* name of serd engine */
 123         uint64_t asi_delta;             /* nsecs from oldest event to now */