/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#include <strings.h>
#include <libscf.h>
#include <fm/libfmevent.h>
#include "fmevt.h"
/*
* Post-processing according to the FMEV_RULESET_SMF ruleset.
*
* Raw event we expect:
*
* ==========================================================================
* Class: "state-transition"
* Subclasses: The new state, one of SCF_STATE_STRING_* from libscf.h
* Attr:
* Name DATA_TYPE_* Description
* ------------ --------------- ---------------------------------------------
* fmri STRING svc:/... (svc scheme shorthand version)
* transition INT32 (old_state << 16) | new_state
* reason-version UINT32 reason-short namespace version
* reason-long STRING Long-winded reason for the transition
* ==========================================================================
*
* Protocol event components we return:
*
* ==========================================================================
* Class: ireport.os.smf.state-transition.<new-state>
* Attr:
* Name DATA_TYPE_* Description
* ------------ --------------- ----------------------------------------
* svc NVLIST "svc" scheme FMRI of affected service instance
* from-state STRING Previous state; SCF_STATE_STRING_*
* to-state STRING New state; SCF_STATE_STRING_*
* reason-version UINT32 reason-short namespace version
* reason-long STRING Long-winded reason for the transition
* ==========================================================================
*/
/*
* the standard representation. The caller must free the allocated string.
*/
static char *
{
char *fmristr;
return (NULL);
return (fmristr);
}
/*
* Convert a shorthand svc FMRI into a full svc FMRI nvlist
*/
static nvlist_t *
{
char *fmristr;
int err;
return (NULL);
fmristr);
return (NULL);
}
return (NULL);
}
return (ret);
}
/*ARGSUSED*/
const struct fmevt_ppargs *eap)
{
return (0);
return (0);
return (0);
return (0);
return (0);
return (0);
return (0);
return (0);
}
return (1);
}