2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 2N/A * This file contains the code that creates ASR audit messages. 2N/A/* Default initial buffer sizes. They will grow if needed. */ 2N/A * Logs a topology error to the ASR log. 2N/A * The returned string must be freed when no longer needed. 2N/A * If there is an error NULL will be returned and asr_errno will be set. 2N/A * Gets the FRU from a topo node as a string. 2N/A * Gets the ASRU from a topo node as a string. 2N/A * Gets the resouce from a topo node as a string. 2N/A * Prints the additional-information element filled with data from the given 2N/A * topo node property. 2N/A * The name of the property is returned for further processing of the 2N/A * Prints additional information for an entire topo node group. 2N/A * Any properties that are part of the standard ASR audit message 2N/A * will be returned in the std name value list. 2N/A char *
skip =
"|protocol|authority|";
2N/A * If this is a value we should skip then stop now. 2N/A * Prints out additional information for a topology node. 2N/A * Converts an FMRI string to an ASR name. 2N/A * The string will contain the FMRI data after the <authority>/ 2N/A *(
id +
1) !=
':' && *(
id +
1) !=
'/')
2N/A * Contains the definition of a hardware component, inclusive of a path to this 2N/A * hardware component 2N/A * Adds name, id, serial, part, revision, path, state, status & 2N/A * additional-information 2N/A * Walks the topology. Used as a callback function to the topology walker. 2N/A * Prints all the hardware-component ASR elements. 2N/A * Searches the FMA topology and creates a hardware-component for each 2N/A * topology node found. 2N/A * A description of a software package reminiscent of pkginfo 2N/A * Adds all values in an uncategorized element so all info can be sent. 2N/A * Newer verisons of message.xsd should include these new values. 2N/A "<uncategorized name='software-package'>" 2N/A "<software-package>\n");
2N/A "</software-package>" 2N/A * Reads a file containing pkginfo output and prints the results to the out 2N/A * buffer as ASR audit software-package elements. 2N/A "info to audit event");
2N/A * Collects software package information and print it out as ASR 2N/A * software-package elements. 2N/A * Prints out a SCF service as an ASR software-module element containing 2N/A * name & description 2N/A * description = STATE STIME 2N/A * Collects all SCF services and prints them out as ASR software-module 2N/A "Error (%d) calling audit payload command (%s)",
2N/A * Collects software package information and print it out as ASR 2N/A * software-package elements. 2N/A * Creates an ASR audit message and places it in out_msg. The message must 2N/A * be released when finished using it. 2N/A * Returns non-zero, sets out_msg to NULL and sets asr_errno 2N/A * if there is an error.