eventlog_svc.c revision 2
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 Log Service RPC (LOGR) interface definition. 2N/A * READ flags for EventLogRead 2N/A * EVENTLOG_SEEK_READ 2N/A * The read operation proceeds from the record specified by the 2N/A * dwRecordOffset parameter. This flag cannot be used with 2N/A * EVENTLOG_SEQUENTIAL_READ. 2N/A * EVENTLOG_SEQUENTIAL_READ 2N/A * The read operation proceeds sequentially from the last call to the 2N/A * ReadEventLog function using this handle. This flag cannot be used 2N/A * with EVENTLOG_SEEK_READ. 2N/A * If the buffer is large enough, more than one record can be read at 2N/A * the specified seek position; you must specify one of the following 2N/A * flags to indicate the direction for successive read operations. 2N/A * EVENTLOG_FORWARDS_READ 2N/A * The log is read in chronological order. This flag cannot be used 2N/A * with EVENTLOG_BACKWARDS_READ. 2N/A * EVENTLOG_BACKWARDS_READ 2N/A * The log is read in reverse chronological order. This flag cannot be 2N/A * used with EVENTLOG_FORWARDS_READ. 2N/A * The types of events that can be logged. 2N/A * Event identifiers uniquely identify a particular event. Each event 2N/A * source can define its own numbered events and the description strings 2N/A * to which they are mapped. Event viewers can present these strings to 2N/A * the user. They should help the user understand what went wrong and 2N/A * suggest what actions to take. Direct the description at users solving 2N/A * their own problems, not at administrators or support technicians. 2N/A * Make the description clear and concise and avoid culture-specific 2N/A * The following diagram illustrates the format of an event identifier. 2N/A * 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 2N/A * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 2N/A * +---+-+-+-----------------------+-------------------------------+ 2N/A * |Sev|C|R| Facility | Code | 2N/A * +---+-+-+-----------------------+-------------------------------+ 2N/A * Indicates the severity. This is one of the following values: 2N/A * 01 - Informational 2N/A * Indicates a customer code (1) or a system code (0). 2N/A * Status code for the facility. 2N/A "Event Log Service",
/* desc */ 2N/A "\\eventlog",
/* endpoint */ 2N/A "82273fdc-e32a-18c3-3f78-827929dc23ea", 0,
/* abstract */ 2N/A 0,
/* no bind_instance_size */ 2N/A 0,
/* no bind_req() */ 2N/A 0,
/* no unbind_and_close() */ 2N/A 0,
/* use generic_call_stub() */ 2N/A * This function registers the LOGR RPC interface with the RPC runtime 2N/A * library. It must be called in order to use either the client side 2N/A * or the server side functions. 2N/A * Handle lookup wrapper to validate the local service and/or manager context. 2N/A * logr_context_data_free 2N/A * Callback to free the context data associated with local service 2N/A * Handle allocation wrapper to setup the local manager context. 2N/A * logr_s_EventLogClose 2N/A * This is a request to close the LOGR interface specified by handle. 2N/A * Free the handle and associated resources, and zero out the result 2N/A * handle for the client. 2N/A * logr_s_EventLogOpen 2N/A * Open the event log. Not supported yet. 2N/A * logr_s_EventLogQueryCount 2N/A * take a snapshot from system log, assign it to the given handle. 2N/A * return number of log entries in the snapshot as result of RPC 2N/A * logr_s_EventLogGetOldestRec 2N/A * Return oldest record number in the snapshot as result of RPC call. 2N/A * logr_set_event_typeid 2N/A * Map the local system log priority to the event type and event ID 2N/A * for Windows events. 2N/A * logr_set_logrecord 2N/A * Fill a Windows event record based on a local system log record. 2N/A /* Because, Solaris allows remote logging, need to get hostname here */ 2N/A /*LINTED E_BAD_PTR_CAST_ALIGN*/ 2N/A * logr_s_EventLogRead 2N/A * Reads a whole number of entries from system log. The function can 2N/A * read log entries in chronological or reverse chronological order. 2N/A * set last record number which is read for 2N/A * the first iteration of sequential read. 2N/A * function should return as many whole log entries as 2N/A * will fit in the buffer; it should not return partial 2N/A * entries, even if there is room in the buffer. 2N/A * Send this error to Windows client so that it 2N/A * can figure out that there is no more record 2N/A /*LINTED E_BAD_PTR_CAST_ALIGN*/