1*12967Sgavin.maltby@oracle.com /* 2*12967Sgavin.maltby@oracle.com * CDDL HEADER START 3*12967Sgavin.maltby@oracle.com * 4*12967Sgavin.maltby@oracle.com * The contents of this file are subject to the terms of the 5*12967Sgavin.maltby@oracle.com * Common Development and Distribution License (the "License"). 6*12967Sgavin.maltby@oracle.com * You may not use this file except in compliance with the License. 7*12967Sgavin.maltby@oracle.com * 8*12967Sgavin.maltby@oracle.com * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*12967Sgavin.maltby@oracle.com * or http://www.opensolaris.org/os/licensing. 10*12967Sgavin.maltby@oracle.com * See the License for the specific language governing permissions 11*12967Sgavin.maltby@oracle.com * and limitations under the License. 12*12967Sgavin.maltby@oracle.com * 13*12967Sgavin.maltby@oracle.com * When distributing Covered Code, include this CDDL HEADER in each 14*12967Sgavin.maltby@oracle.com * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*12967Sgavin.maltby@oracle.com * If applicable, add the following below this CDDL HEADER, with the 16*12967Sgavin.maltby@oracle.com * fields enclosed by brackets "[]" replaced with your own identifying 17*12967Sgavin.maltby@oracle.com * information: Portions Copyright [yyyy] [name of copyright owner] 18*12967Sgavin.maltby@oracle.com * 19*12967Sgavin.maltby@oracle.com * CDDL HEADER END 20*12967Sgavin.maltby@oracle.com */ 21*12967Sgavin.maltby@oracle.com 22*12967Sgavin.maltby@oracle.com /* 23*12967Sgavin.maltby@oracle.com * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 24*12967Sgavin.maltby@oracle.com */ 25*12967Sgavin.maltby@oracle.com 26*12967Sgavin.maltby@oracle.com #ifndef _LIBFMEVENT_RULESET_H 27*12967Sgavin.maltby@oracle.com #define _LIBFMEVENT_RULESET_H 28*12967Sgavin.maltby@oracle.com 29*12967Sgavin.maltby@oracle.com /* 30*12967Sgavin.maltby@oracle.com * Event Rulesets. A ruleset is selected by a (namespace, subsystem) 31*12967Sgavin.maltby@oracle.com * combination, which together we call a "ruleset" selection for that 32*12967Sgavin.maltby@oracle.com * namespace. The strings can be any ascii string not including 33*12967Sgavin.maltby@oracle.com * control characters or DEL. 34*12967Sgavin.maltby@oracle.com * 35*12967Sgavin.maltby@oracle.com * Selection of a ruleset determines how a "raw" event that we publish 36*12967Sgavin.maltby@oracle.com * using the libfmevent publication interfaces is post-processed into 37*12967Sgavin.maltby@oracle.com * a full protocol event. 38*12967Sgavin.maltby@oracle.com * 39*12967Sgavin.maltby@oracle.com * New rulesets must follow the FMA Event Registry and Portfolio Review 40*12967Sgavin.maltby@oracle.com * process. At this time only FMEV_RULESET_SMF and FMEV_RULESET_ON_SUNOS 41*12967Sgavin.maltby@oracle.com * rulesets are adopted by that process - the others listed here are 42*12967Sgavin.maltby@oracle.com * experimental. 43*12967Sgavin.maltby@oracle.com */ 44*12967Sgavin.maltby@oracle.com 45*12967Sgavin.maltby@oracle.com #define FMEV_MAX_RULESET_LEN 31 46*12967Sgavin.maltby@oracle.com 47*12967Sgavin.maltby@oracle.com #define FMEV_RS_SEPARATOR "\012" 48*12967Sgavin.maltby@oracle.com #define FMEV_MKRS(v, s) FMEV_V_##v FMEV_RS_SEPARATOR s 49*12967Sgavin.maltby@oracle.com 50*12967Sgavin.maltby@oracle.com /* 51*12967Sgavin.maltby@oracle.com * Namespaces 52*12967Sgavin.maltby@oracle.com */ 53*12967Sgavin.maltby@oracle.com #define FMEV_V_ALL "*" 54*12967Sgavin.maltby@oracle.com #define FMEV_V_SOLARIS_ON "solaris-osnet" /* Solaris ON Consolidation */ 55*12967Sgavin.maltby@oracle.com 56*12967Sgavin.maltby@oracle.com /* 57*12967Sgavin.maltby@oracle.com * Generic and namespace-agnostic rulesets 58*12967Sgavin.maltby@oracle.com */ 59*12967Sgavin.maltby@oracle.com #define FMEV_RULESET_UNREGISTERED FMEV_MKRS(ALL, "unregistered") 60*12967Sgavin.maltby@oracle.com #define FMEV_RULESET_DEFAULT FMEV_RULESET_UNREGISTERED 61*12967Sgavin.maltby@oracle.com #define FMEV_RULESET_SMF FMEV_MKRS(ALL, "smf") 62*12967Sgavin.maltby@oracle.com 63*12967Sgavin.maltby@oracle.com /* 64*12967Sgavin.maltby@oracle.com * Solaris ON rulesets 65*12967Sgavin.maltby@oracle.com */ 66*12967Sgavin.maltby@oracle.com #define FMEV_RULESET_ON_EREPORT FMEV_MKRS(SOLARIS_ON, "ereport") 67*12967Sgavin.maltby@oracle.com #define FMEV_RULESET_ON_SUNOS FMEV_MKRS(SOLARIS_ON, "sunos") 68*12967Sgavin.maltby@oracle.com #define FMEV_RULESET_ON_PRIVATE FMEV_MKRS(SOLARIS_ON, "private") 69*12967Sgavin.maltby@oracle.com 70*12967Sgavin.maltby@oracle.com #ifdef __cplusplus 71*12967Sgavin.maltby@oracle.com extern "C" { 72*12967Sgavin.maltby@oracle.com #endif 73*12967Sgavin.maltby@oracle.com 74*12967Sgavin.maltby@oracle.com #ifdef __cplusplus 75*12967Sgavin.maltby@oracle.com } 76*12967Sgavin.maltby@oracle.com #endif 77*12967Sgavin.maltby@oracle.com 78*12967Sgavin.maltby@oracle.com #endif /* _LIBFMEVENT_RULESET_H */ 79