da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER START
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The contents of this file are subject to the terms of the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Common Development and Distribution License (the "License").
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You may not use this file except in compliance with the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * or http://www.opensolaris.org/os/licensing.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * See the License for the specific language governing permissions
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and limitations under the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * When distributing Covered Code, include this CDDL HEADER in each
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * If applicable, add the following below this CDDL HEADER, with the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * fields enclosed by brackets "[]" replaced with your own identifying
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * information: Portions Copyright [yyyy] [name of copyright owner]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER END
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Use is subject to license terms.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#ifndef _MLSVC_LOGR_NDL_
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define _MLSVC_LOGR_NDL_
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Event log RPC (EVENTLOG) interface definition.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#include "ndrtypes.ndl"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define LOGR_OPNUM_EventLogClose 0x02
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define LOGR_OPNUM_EventLogQueryCount 0x04
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define LOGR_OPNUM_EventLogGetOldestRec 0x05
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define LOGR_OPNUM_EventLogOpen 0x07
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define LOGR_OPNUM_EventLogRead 0x0A
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego#define LOGR_MAXENTRYLEN 800
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
8d7e41661dc4633488e93b13363137523ce59977jose borregoCONTEXT_HANDLE(logr_handle) logr_handle_t;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct logr_string {
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego WORD length;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego WORD allosize;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego LPTSTR str;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwtypedef struct logr_string logr_string_t;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct logr_record {
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego DWORD Length1;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego DWORD Reserved;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego DWORD RecordNumber;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego DWORD TimeGenerated;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego DWORD TimeWritten;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD EventID;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw WORD EventType;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw WORD NumStrings;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw WORD EventCategory;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego WORD ReservedFlags;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego DWORD ClosingRecordNumber;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego DWORD StringOffset;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD UserSidLength;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD UserSidOffset;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD DataLength;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD DataOffset;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego BYTE info[LOGR_MAXENTRYLEN];
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD Length2;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwtypedef struct logr_record logr_record_t;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * LOGR_OPNUM_EventLogClose
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(LOGR_OPNUM_EventLogClose)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct logr_EventLogClose {
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego IN logr_handle_t handle;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego OUT logr_handle_t result_handle;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * LOGR_OPNUM_EventLogQueryCount
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(LOGR_OPNUM_EventLogQueryCount)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct logr_EventLogQueryCount {
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego IN logr_handle_t handle;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego OUT DWORD rec_num;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * LOGR_OPNUM_EventLogGetOldestRec
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(LOGR_OPNUM_EventLogGetOldestRec)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct logr_EventLogGetOldestRec {
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego IN logr_handle_t handle;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego OUT DWORD oldest_rec;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * LOGR_OPNUM_EventLogOpen
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(LOGR_OPNUM_EventLogOpen)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct logr_EventLogOpen {
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego IN DWORD *server_name;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego IN logr_string_t log_name;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego IN DWORD reg_module_name;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego IN DWORD major_version;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego IN DWORD minor_version;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego OUT logr_handle_t handle;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(LOGR_OPNUM_EventLogRead)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct logr_EventLogRead {
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego IN logr_handle_t handle;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego IN DWORD read_flags;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego IN DWORD rec_offset;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego IN DWORD nbytes_to_read;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego SIZE_IS(nbytes_to_read)
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego OUT REFERENCE LPBYTE buf;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego OUT DWORD sent_size;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego OUT DWORD min_bytes_needed;
89dc44ce9705974a8bc4a39f1e878a0491a5be61jose borrego OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The EVENTLOG interface definition.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwINTERFACE(0)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwunion logr_interface {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(LOGR_OPNUM_EventLogClose)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct logr_EventLogClose EventLogClose;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(LOGR_OPNUM_EventLogQueryCount)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct logr_EventLogQueryCount EventLogQueryCount;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(LOGR_OPNUM_EventLogGetOldestRec)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct logr_EventLogGetOldestRec EventLogGetOldestRec;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(LOGR_OPNUM_EventLogOpen)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct logr_EventLogOpen EventLogOpen;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(LOGR_OPNUM_EventLogRead)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct logr_EventLogRead EventLogRead;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwtypedef union logr_interface logr_interface_t;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwEXTERNTYPEINFO(logr_interface)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#endif /* _MLSVC_LOGR_NDL_ */