xref: /titanic_41/usr/src/uts/common/smbsrv/ndl/eventlog.ndl (revision 89dc44ce9705974a8bc4a39f1e878a0491a5be61)
1da6c28aaSamw/*
2da6c28aaSamw * CDDL HEADER START
3da6c28aaSamw *
4da6c28aaSamw * The contents of this file are subject to the terms of the
5da6c28aaSamw * Common Development and Distribution License (the "License").
6da6c28aaSamw * You may not use this file except in compliance with the License.
7da6c28aaSamw *
8da6c28aaSamw * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9da6c28aaSamw * or http://www.opensolaris.org/os/licensing.
10da6c28aaSamw * See the License for the specific language governing permissions
11da6c28aaSamw * and limitations under the License.
12da6c28aaSamw *
13da6c28aaSamw * When distributing Covered Code, include this CDDL HEADER in each
14da6c28aaSamw * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15da6c28aaSamw * If applicable, add the following below this CDDL HEADER, with the
16da6c28aaSamw * fields enclosed by brackets "[]" replaced with your own identifying
17da6c28aaSamw * information: Portions Copyright [yyyy] [name of copyright owner]
18da6c28aaSamw *
19da6c28aaSamw * CDDL HEADER END
20da6c28aaSamw */
21da6c28aaSamw/*
22*89dc44ceSjose borrego * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23da6c28aaSamw * Use is subject to license terms.
24da6c28aaSamw */
25da6c28aaSamw
26da6c28aaSamw#ifndef _MLSVC_LOGR_NDL_
27da6c28aaSamw#define _MLSVC_LOGR_NDL_
28da6c28aaSamw
29da6c28aaSamw/*
30da6c28aaSamw ***********************************************************************
31da6c28aaSamw *
32da6c28aaSamw * Event log RPC (EVENTLOG) interface definition.
33da6c28aaSamw *
34da6c28aaSamw ***********************************************************************
35da6c28aaSamw */
36da6c28aaSamw
37da6c28aaSamw#include "ndrtypes.ndl"
38da6c28aaSamw
39da6c28aaSamw#define LOGR_OPNUM_EventLogClose		0x02
40da6c28aaSamw#define LOGR_OPNUM_EventLogQueryCount		0x04
41da6c28aaSamw#define LOGR_OPNUM_EventLogGetOldestRec		0x05
42da6c28aaSamw#define LOGR_OPNUM_EventLogOpen			0x07
43da6c28aaSamw#define LOGR_OPNUM_EventLogRead			0x0A
44da6c28aaSamw
45*89dc44ceSjose borrego#define LOGR_MAXENTRYLEN			800
46da6c28aaSamw
47da6c28aaSamw
488d7e4166Sjose borregoCONTEXT_HANDLE(logr_handle) logr_handle_t;
49da6c28aaSamw
50da6c28aaSamwstruct logr_string {
51da6c28aaSamw	WORD	length;
52da6c28aaSamw	WORD	allosize;
53da6c28aaSamw	LPTSTR	str;
54da6c28aaSamw};
55da6c28aaSamwtypedef struct logr_string logr_string_t;
56da6c28aaSamw
57da6c28aaSamwstruct logr_record {
58*89dc44ceSjose borrego	DWORD  Length1;
59*89dc44ceSjose borrego	DWORD  Reserved;
60*89dc44ceSjose borrego	DWORD  RecordNumber;
61*89dc44ceSjose borrego	DWORD  TimeGenerated;
62*89dc44ceSjose borrego	DWORD  TimeWritten;
63da6c28aaSamw	DWORD  EventID;
64da6c28aaSamw	WORD   EventType;
65da6c28aaSamw	WORD   NumStrings;
66da6c28aaSamw	WORD   EventCategory;
67*89dc44ceSjose borrego	WORD   ReservedFlags;
68*89dc44ceSjose borrego	DWORD  ClosingRecordNumber;
69*89dc44ceSjose borrego	DWORD  StringOffset;
70da6c28aaSamw	DWORD  UserSidLength;
71da6c28aaSamw	DWORD  UserSidOffset;
72da6c28aaSamw	DWORD  DataLength;
73da6c28aaSamw	DWORD  DataOffset;
74*89dc44ceSjose borrego	BYTE   info[LOGR_MAXENTRYLEN];
75da6c28aaSamw	DWORD  Length2;
76da6c28aaSamw};
77da6c28aaSamwtypedef struct logr_record logr_record_t;
78da6c28aaSamw
79da6c28aaSamw/*
80da6c28aaSamw ***********************************************************************
81da6c28aaSamw * LOGR_OPNUM_EventLogClose
82da6c28aaSamw ***********************************************************************
83da6c28aaSamw */
84da6c28aaSamwOPERATION(LOGR_OPNUM_EventLogClose)
85da6c28aaSamwstruct logr_EventLogClose {
86da6c28aaSamw	IN	logr_handle_t handle;
87da6c28aaSamw	OUT	logr_handle_t result_handle;
88da6c28aaSamw	OUT	DWORD status;
89da6c28aaSamw};
90da6c28aaSamw
91da6c28aaSamw/*
92da6c28aaSamw ***********************************************************************
93da6c28aaSamw * LOGR_OPNUM_EventLogQueryCount
94da6c28aaSamw ***********************************************************************
95da6c28aaSamw */
96da6c28aaSamwOPERATION(LOGR_OPNUM_EventLogQueryCount)
97da6c28aaSamwstruct logr_EventLogQueryCount {
98da6c28aaSamw	IN	logr_handle_t handle;
99da6c28aaSamw	OUT	DWORD rec_num;
100da6c28aaSamw	OUT	DWORD status;
101da6c28aaSamw};
102da6c28aaSamw
103da6c28aaSamw/*
104da6c28aaSamw ***********************************************************************
105da6c28aaSamw * LOGR_OPNUM_EventLogGetOldestRec
106da6c28aaSamw ***********************************************************************
107da6c28aaSamw */
108da6c28aaSamwOPERATION(LOGR_OPNUM_EventLogGetOldestRec)
109da6c28aaSamwstruct logr_EventLogGetOldestRec {
110da6c28aaSamw	IN	logr_handle_t handle;
111da6c28aaSamw	OUT	DWORD oldest_rec;
112da6c28aaSamw	OUT	DWORD status;
113da6c28aaSamw};
114da6c28aaSamw
115da6c28aaSamw/*
116da6c28aaSamw ***********************************************************************
117da6c28aaSamw * LOGR_OPNUM_EventLogOpen
118da6c28aaSamw ***********************************************************************
119da6c28aaSamw */
120da6c28aaSamwOPERATION(LOGR_OPNUM_EventLogOpen)
121da6c28aaSamwstruct logr_EventLogOpen {
122*89dc44ceSjose borrego	IN	DWORD *server_name;
123da6c28aaSamw	IN	logr_string_t log_name;
124*89dc44ceSjose borrego	IN	DWORD reg_module_name;
125*89dc44ceSjose borrego	IN	DWORD major_version;
126*89dc44ceSjose borrego	IN	DWORD minor_version;
127da6c28aaSamw	OUT	logr_handle_t handle;
128da6c28aaSamw	OUT	DWORD status;
129da6c28aaSamw};
130da6c28aaSamw
131da6c28aaSamwOPERATION(LOGR_OPNUM_EventLogRead)
132da6c28aaSamwstruct logr_EventLogRead {
133da6c28aaSamw	IN	logr_handle_t handle;
134da6c28aaSamw	IN	DWORD read_flags;
135da6c28aaSamw	IN	DWORD rec_offset;
136*89dc44ceSjose borrego	IN	DWORD nbytes_to_read;
137*89dc44ceSjose borrego    SIZE_IS(nbytes_to_read)
138*89dc44ceSjose borrego	OUT REFERENCE	LPBYTE buf;
139da6c28aaSamw	OUT	DWORD sent_size;
140*89dc44ceSjose borrego	OUT	DWORD min_bytes_needed;
141da6c28aaSamw	OUT	DWORD status;
142da6c28aaSamw};
143da6c28aaSamw
144da6c28aaSamw/*
145da6c28aaSamw ***********************************************************************
146da6c28aaSamw * The EVENTLOG interface definition.
147da6c28aaSamw ***********************************************************************
148da6c28aaSamw */
149da6c28aaSamwINTERFACE(0)
150da6c28aaSamwunion logr_interface {
151da6c28aaSamw	CASE(LOGR_OPNUM_EventLogClose)
152da6c28aaSamw		struct logr_EventLogClose		EventLogClose;
153da6c28aaSamw	CASE(LOGR_OPNUM_EventLogQueryCount)
154da6c28aaSamw		struct logr_EventLogQueryCount		EventLogQueryCount;
155da6c28aaSamw	CASE(LOGR_OPNUM_EventLogGetOldestRec)
156da6c28aaSamw		struct logr_EventLogGetOldestRec	EventLogGetOldestRec;
157da6c28aaSamw	CASE(LOGR_OPNUM_EventLogOpen)
158da6c28aaSamw		struct logr_EventLogOpen		EventLogOpen;
159da6c28aaSamw	CASE(LOGR_OPNUM_EventLogRead)
160da6c28aaSamw		struct logr_EventLogRead		EventLogRead;
161da6c28aaSamw};
162da6c28aaSamwtypedef union logr_interface	logr_interface_t;
163da6c28aaSamwEXTERNTYPEINFO(logr_interface)
164da6c28aaSamw
165da6c28aaSamw#endif /* _MLSVC_LOGR_NDL_ */
166