6  * You may not use this file except in compliance with the License.
   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 (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  24  */
  25 
  26 #ifndef _SYS_FM_PROTOCOL_H
  27 #define _SYS_FM_PROTOCOL_H
  28 
  29 #ifdef  __cplusplus
  30 extern "C" {
  31 #endif
  32 
  33 #ifdef _KERNEL
  34 #include <sys/varargs.h>
  35 #include <sys/nvpair.h>
  36 #else
  37 #include <libnvpair.h>
  38 #include <stdarg.h>
  39 #endif
  40 #include <sys/processor.h>
  41 
  42 /* FM common member names */
  43 #define FM_CLASS                        "class"
  44 #define FM_VERSION                      "version"
  45 
 
  70 #define FM_EREPORT_DETECTOR             "detector"
  71 #define FM_EREPORT_ENA                  "ena"
  72 
  73 /* list.* event payload member names */
  74 #define FM_LIST_EVENT_SIZE              "list-sz"
  75 
  76 /* ireport.* event payload member names */
  77 #define FM_IREPORT_DETECTOR             "detector"
  78 #define FM_IREPORT_UUID                 "uuid"
  79 #define FM_IREPORT_PRIORITY             "pri"
  80 #define FM_IREPORT_ATTRIBUTES           "attr"
  81 
  82 /*
  83  * list.suspect, isolated, updated, repaired and resolved
  84  * versions/payload member names.
  85  */
  86 #define FM_SUSPECT_UUID                 "uuid"
  87 #define FM_SUSPECT_DIAG_CODE            "code"
  88 #define FM_SUSPECT_DIAG_TIME            "diag-time"
  89 #define FM_SUSPECT_DE                   "de"
  90 #define FM_SUSPECT_FAULT_LIST           "fault-list"
  91 #define FM_SUSPECT_FAULT_SZ             "fault-list-sz"
  92 #define FM_SUSPECT_FAULT_STATUS         "fault-status"
  93 #define FM_SUSPECT_INJECTED             "__injected"
  94 #define FM_SUSPECT_MESSAGE              "message"
  95 #define FM_SUSPECT_RETIRE               "retire"
  96 #define FM_SUSPECT_RESPONSE             "response"
  97 #define FM_SUSPECT_SEVERITY             "severity"
  98 
  99 #define FM_SUSPECT_VERS0                0
 100 #define FM_SUSPECT_VERSION              FM_SUSPECT_VERS0
 101 
 102 #define FM_SUSPECT_FAULTY               0x1
 103 #define FM_SUSPECT_UNUSABLE             0x2
 104 #define FM_SUSPECT_NOT_PRESENT          0x4
 105 #define FM_SUSPECT_DEGRADED             0x8
 106 #define FM_SUSPECT_REPAIRED             0x10
 107 #define FM_SUSPECT_REPLACED             0x20
 108 #define FM_SUSPECT_ACQUITTED            0x40
 109 
 110 /* fault event versions and payload member names */
 111 #define FM_FAULT_VERS0                  0
 112 #define FM_FAULT_VERSION                FM_FAULT_VERS0
 113 
 114 #define FM_FAULT_ASRU                   "asru"
 115 #define FM_FAULT_FRU                    "fru"
 116 #define FM_FAULT_FRU_LABEL              "fru-label"
 117 #define FM_FAULT_CERTAINTY              "certainty"
  
 | 
 
 
   6  * You may not use this file except in compliance with the License.
   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 (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  24  */
  25 
  26 /*
  27  * Copyright 2018 Nexenta Systems, Inc.
  28  */
  29 
  30 #ifndef _SYS_FM_PROTOCOL_H
  31 #define _SYS_FM_PROTOCOL_H
  32 
  33 #ifdef  __cplusplus
  34 extern "C" {
  35 #endif
  36 
  37 #ifdef _KERNEL
  38 #include <sys/varargs.h>
  39 #include <sys/nvpair.h>
  40 #else
  41 #include <libnvpair.h>
  42 #include <stdarg.h>
  43 #endif
  44 #include <sys/processor.h>
  45 
  46 /* FM common member names */
  47 #define FM_CLASS                        "class"
  48 #define FM_VERSION                      "version"
  49 
 
  74 #define FM_EREPORT_DETECTOR             "detector"
  75 #define FM_EREPORT_ENA                  "ena"
  76 
  77 /* list.* event payload member names */
  78 #define FM_LIST_EVENT_SIZE              "list-sz"
  79 
  80 /* ireport.* event payload member names */
  81 #define FM_IREPORT_DETECTOR             "detector"
  82 #define FM_IREPORT_UUID                 "uuid"
  83 #define FM_IREPORT_PRIORITY             "pri"
  84 #define FM_IREPORT_ATTRIBUTES           "attr"
  85 
  86 /*
  87  * list.suspect, isolated, updated, repaired and resolved
  88  * versions/payload member names.
  89  */
  90 #define FM_SUSPECT_UUID                 "uuid"
  91 #define FM_SUSPECT_DIAG_CODE            "code"
  92 #define FM_SUSPECT_DIAG_TIME            "diag-time"
  93 #define FM_SUSPECT_DE                   "de"
  94 #define FM_SUSPECT_DESC                 "desc"
  95 #define FM_SUSPECT_FAULT_LIST           "fault-list"
  96 #define FM_SUSPECT_FAULT_SZ             "fault-list-sz"
  97 #define FM_SUSPECT_FAULT_STATUS         "fault-status"
  98 #define FM_SUSPECT_INJECTED             "__injected"
  99 #define FM_SUSPECT_MESSAGE              "message"
 100 #define FM_SUSPECT_RETIRE               "retire"
 101 #define FM_SUSPECT_RESPONSE             "response"
 102 #define FM_SUSPECT_SEVERITY             "severity"
 103 #define FM_SUSPECT_TYPE                 "type"
 104 
 105 #define FM_SUSPECT_VERS0                0
 106 #define FM_SUSPECT_VERSION              FM_SUSPECT_VERS0
 107 
 108 #define FM_SUSPECT_FAULTY               0x1
 109 #define FM_SUSPECT_UNUSABLE             0x2
 110 #define FM_SUSPECT_NOT_PRESENT          0x4
 111 #define FM_SUSPECT_DEGRADED             0x8
 112 #define FM_SUSPECT_REPAIRED             0x10
 113 #define FM_SUSPECT_REPLACED             0x20
 114 #define FM_SUSPECT_ACQUITTED            0x40
 115 
 116 /* fault event versions and payload member names */
 117 #define FM_FAULT_VERS0                  0
 118 #define FM_FAULT_VERSION                FM_FAULT_VERS0
 119 
 120 #define FM_FAULT_ASRU                   "asru"
 121 #define FM_FAULT_FRU                    "fru"
 122 #define FM_FAULT_FRU_LABEL              "fru-label"
 123 #define FM_FAULT_CERTAINTY              "certainty"
  
 |