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) 2009, 2011, Oracle and/or its affiliates. All rights reserved. 2N/A * Event code translation struct for use in processing config file 2N/A * Set the syslog timestamp. 2N/A * This is a private helper for logr_syslog_parse_entry(), which 2N/A * must ensure that the appropriate argv entries are non-null. 2N/A * Set the syslog priority. 2N/A * This is a private helper for logr_syslog_parse_entry(), which 2N/A * must ensure that the appropriate argv entries are non-null. 2N/A for (i = 0; i <
sz; i++) {
2N/A * Parse a syslog entry into a log_entry_t structure. A typical syslog 2N/A * entry has one of the following formats: 2N/A * <month> <day> <time> <host> <msg> 2N/A * <month> <day> <time> <host> <source>: [ID <ID> <facility.priority>] <msg> 2N/A * Oct 29 09:49:20 galaxy smbd[104039]: [ID 702911 daemon.info] init done 2N/A * If the [ID key is not present, everything 2N/A * that follows is the message text. 2N/A * bp should be pointing at the remaining message text. 2N/A /* Read the last 1024 entries in the queue */ 2N/A * Loads the given log file into log_info_t structure format. 2N/A * Returns pointer to the allocated log structure on success. 2N/A * Note that the caller is responsible for freeing the allocated 2N/A * memory for returned log_info_t structure. 2N/A * logr_syslog_snapshot 2N/A * Return a snapshot of the given log in the buffer 2N/A * provided by the caller. Returns the number of entries in 2N/A * Determines if a given log is supported or not. 2N/A * Returns B_TRUE on success, B_FALSE on failure. 2N/A * Allocate memory and make a copy, as a snapshot, from system log. 2N/A * Returns 0 on success, -1 on failure. 2N/A * Initializes the Eventlog service. 2N/A * Checks to see if a event log utility library 2N/A * is interposed. If yes then it'll initializes logr_interposer_ops 2N/A * structure with function pointers from this library. 2N/A * Finalizes the Eventlog service. 2N/A * Closes handle to interposed library.