TODO netlogon_user_flags_ntlmv2_enabled
[wireshark-sm.git] / epan / dissectors / dcerpc / budb / budb.idl
blob40e467781ce13f7bd1707f6f7ec2ac47b66026bd
1 /* this idl is from the LGPL irelease of dce/dfs from the open group.
2 it has been significantly modified to pass through idl2wrs
3 original copyright follows:
4 */
5 /*
6 * @OSF_COPYRIGHT@
7 * COPYRIGHT NOTICE
8 * Copyright (c) 1990, 1996 Open Software Foundation, Inc.
9 * ALL RIGHTS RESERVED (DCE). See the file named COPYRIGHT.DCE for
10 * the full copyright text.
13 * HISTORY
14 * $Log: budb.idl,v $
15 * Revision 1.1.13.1 1996/10/02 16:59:37 damon
16 * Newest DFS from Transarc
17 * [1996/10/01 18:04:09 damon]
19 * $EndLog$
21 /* Copyright (C) 1996, 1990 Transarc Corporation - All rights reserved */
23 /* $Header: /u0/rcs_trees/dce/rcs/file/bakserver/budb.idl,v 1.1.13.1 1996/10/02 16:59:37 damon Exp $ */
26 uuid("eb814e2a-0099-11ca-8678-02608c2ea96e"),
27 version(4.0),
28 /*provider_version(2)*/
29 pointer_default(ptr)
30 ] interface budb /* The backup database interface */
33 /*import "dcedfs/common_data.idl";*/
36 /*
37 * Constants for bakserver data structures
39 const long BU_MAXNAMELEN = 128; /* names of objects: volumes */
40 const long BU_MAXTAPELEN = 256; /* names of objects: tapes */
41 const long BU_MAXHOSTLEN = 128; /* names of server machines */
42 const long BU_MAXTOKENLEN = 16; /* identifiers */
43 const long BU_MAXUNAMELEN = 256; /* length of user name */
44 const long BU_MAXCELLLEN = 256; /* length of a cell name */
45 const long BU_MAXINAMELEN = 128; /* length of user name */
46 const long BU_MAXPATHLEN = 256; /* length of schedule path name */
47 const long BU_MAXGENNAMELEN = 512; /* length of generic name */
48 const long BU_MAXVOLCOUNT = 64; /* max volumes in volume array */
50 /* first some constants */
51 const long BUDB_MAJORVERSION = 1; /* version number of this interface */
52 const long BUDB_PROVIDER_VERSION = 2; /* provider version of this interface */
54 /* types of text blocks */
55 const long TB_DUMPSCHEDULE = 0;
56 const long TB_VOLUMESET = 1;
57 const long TB_TAPEHOSTS = 2;
59 /* TB_NUM must be <= TB_MAX */
60 const long TB_NUM = 3; /* no. of block types */
61 const long TB_MAX = 6; /* unused items are spares */
63 /* dump flag bit definitions */
64 const long BUDB_DUMP_INCOMPLETE = 1<<0; /* some vols omitted due to errors */
65 const long BUDB_DUMP_TAPEERROR = 1<<1; /* tape error during dump */
66 const long BUDB_DUMP_INPROGRESS = 1<<2;
67 const long BUDB_DUMP_ABORTED = 1<<3; /* aborted: prob. dump unavailable */
69 /* tape flag bit definitions */
70 const long BUDB_TAPE_TAPEERROR = 1<<0;
71 const long BUDB_TAPE_DELETED = 1<<1;
72 const long BUDB_TAPE_BEINGWRITTEN = 1<<2;/* writing in progress */
73 const long BUDB_TAPE_ABORTED = 1<<3;/* aborted: tape probably garbaged */
74 const long BUDB_TAPE_STAGED = 1<<4;/* not yet on permanent media */
75 const long BUDB_TAPE_WRITTEN = 1<<5;/* tape writing finished: all OK */
77 /* volume flag bit definitions */
78 const long BUDB_VOL_TAPEERROR = 1<<0;/* tape problem during dump */
79 const long BUDB_VOL_FILEERROR = 1<<1;/* voldump aborted during dump */
80 const long BUDB_VOL_BEINGWRITTEN = 1<<2;
81 const long BUDB_VOL_FIRSTFRAG = 1<<3;/* same as low bits of tape position */
82 const long BUDB_VOL_LASTFRAG = 1<<4;
83 const long BUDB_VOL_ABORTED = 1<<5;/* aborted: vol probably undumped */
85 const long BUDB_OP_NAMES = 0x7;
86 const long BUDB_OP_STARTS = 0x7<<3;
87 const long BUDB_OP_ENDS = 0x7<<6;
88 const long BUDB_OP_TIMES = 0x3<<9;
89 const long BUDB_OP_MISC = 0xff<<16;
91 /* The flag bits specify which entries are being requested. They are search
92 operations that use name, start, and end to select a subset of entries to be
93 returned. Not all combinations are meaning full or supported. */
94 /* defining the meaning of "name" */
95 const long BUDB_OP_DUMPNAME = 1<<0;
96 const long BUDB_OP_VOLUMENAME = 2<<0;
97 const long BUDB_OP_TAPENAME = 3<<0;
99 /* "start" is a time value */
100 const long BUDB_OP_STARTTIME = 1<<3;
101 /* "end" delimits a range of times */
102 const long BUDB_OP_RANGE = 1<<6;
103 /* "end" specifies number of earlier entries */
104 const long BUDB_OP_NPREVIOUS = 2<<6;
105 /* "end" specifies number of later entries */
106 const long BUDB_OP_NFOLLOWING = 3<<6;
107 /* start is dump id (name may be null), return all entries */
108 const long BUDB_OP_DUMPID = 2<<3;
109 /* defining the which type of time values */
110 const long BUDB_OP_CLONETIME = 1<<9; /* use clone time */
111 const long BUDB_OP_DUMPTIME = 2<<9; /* use dump time (create?) */
112 const long BUDB_OP_INCTIME = 3<<9; /* use inc time */
114 /* Miscellaneous bits: */
115 /* for volumes: return only first fragment */
116 const long BUDB_OP_FIRSTFRAG = 1<<16;
117 /* maximum number of elements returnable by these functions */
118 const long BUDB_MAX_RETURN_LIST = 1000;
119 const long BUDB_MAX_CHAR_LIST = 1024;
121 /* maximum number of volumes accepted by these functions */
122 const long BUDB_MAX_VOL_COUNT = 64;
124 const long BUDB_TEXT_COMPLETE = 1;
125 /* structure type values for database dump and restore operations */
126 /* XXX -- these names need a better prefix */
127 const long SD_DBHEADER = 1;
128 const long SD_DUMP = 2;
129 const long SD_TAPE = 3;
130 const long SD_VOLUME = 4;
131 const long SD_TEXT_DUMPSCHEDULE = 5;
132 const long SD_TEXT_VOLUMESET = 6;
133 const long SD_TEXT_TAPEHOSTS = 7;
134 const long SD_END = 8;
137 * Now, the bakserver data structure type definitions
141 * A generic string type for backup
144 typedef struct { /* identifies a principal identity */
145 budbNameString_t name;
146 budbNameString_t instance;
147 budbNameString_t cell;
148 budbNameString_t spare;
149 uint32 spare1; /* nominal spares */
150 uint32 spare2; /* nominal spares */
151 uint32 spare3; /* nominal spares */
152 uint32 spare4; /* nominal spares */
153 } budb_principal;
155 typedef struct { /* describes a tape sequence */
156 int32 id; /* id of tapeSet, assigned by budb */
157 budbNameString_t tapeServer;
158 budbNameString_t format;
159 /* Sequence numbers are assumed to be relatively small and relatively
160 * densely packed in 0<=seq<maxTapes. */
161 int32 maxTapes; /* maximum number of tapes in seq. */
162 int32 a; int32 b; /* linear transforms for tape */
163 uint32 spare1; /* nominal spares */
164 uint32 spare2; /* nominal spares */
165 uint32 spare3; /* nominal spares */
166 uint32 spare4; /* nominal spares */
167 } budb_tapeSet;
169 typedef struct { /* describes a dump */
170 uint32 id; /* identifier of this dump */
171 uint32 parent; /* parent dump */
172 int32 level; /* level in multi-level incremental */
173 int32 flags; /* various bits described below */
174 budbNameString_t volumeSetName;
175 budbNameString_t dumpPath;
176 budbNameString_t name;
177 time_t created; /* creation date of dump */
178 time_t incTime; /* time for incrementals, 0 => full */
179 int32 nVolumes; /* number of vol fragments in dump */
180 budb_tapeSet tapes; /* tapes containing dump */
181 budb_principal dumper; /* name of person running doing dump */
182 uint32 spare1; /* nominal spares */
183 uint32 spare2; /* nominal spares */
184 uint32 spare3; /* nominal spares */
185 uint32 spare4; /* nominal spares */
186 } budb_dumpEntry;
188 typedef struct { /* describes a tape */
189 budbNameString_t name;
190 uint32 flags; /* various bits described below */
191 time_t written; /* date tape was last written */
192 time_t expires; /* expiration date */
193 uint32 nMBytes; /* number of Mbytes on tape */
194 uint32 nBytes; /* Megabyte remainder */
195 int32 nFiles; /* number of files on tape */
196 int32 nVolumes; /* number of vol fragments on tape */
197 int32 seq; /* sequence in tape set */
198 int32 tapeid; /* unique tape id */
199 int32 useCount; /* # of times used */
200 int32 mediaType; /* what kind of tape */
201 uint32 dump; /* dump on tape (set) */
202 uint32 spare1; /* nominal spares */
203 uint32 spare2; /* nominal spares */
204 uint32 spare3; /* nominal spares */
205 uint32 spare4; /* nominal spares */
206 } budb_tapeEntry;
208 typedef struct { /* describes a fragment of a volume */
210 /* volume information */
211 budbNameString_t name;
212 uint32 flags; /* various bits described below */
213 udlong id; /* volume uid */
214 budbNameString_t server;
215 int32 partition; /* partition on server */
216 int32 nFrags; /* number fragments in whole volume */
217 /* per fragment */
218 int32 position; /* position on tape */
219 time_t clone; /* time volume was cloned for dump */
220 time_t incTime; /* NOT USED */
221 int32 startByte; /* first byte of volume in this frag */
222 int32 nBytes; /* number of bytes in this frag */
223 int32 seq; /* sequence of frag in volume */
224 /* additional location info */
225 uint32 dump; /* dump volume is part of */
226 budbNameString_t tape;
227 uint32 spare1; /* nominal spares */
228 uint32 spare2; /* nominal spares */
229 uint32 spare3; /* nominal spares */
230 uint32 spare4; /* nominal spares */
231 } budb_volumeEntry;
233 /* To facilitate returning large large amounts of data some of these procedures
234 expect to receive a pointer to an array of structures. The majorVersion
235 number implicitly specifies the size of each array element. The progress
236 parameter is set to the number of elements actually returned. Since the
237 caller may have limited buffer space, provisions are made to get the data in
238 a series of calls. The index parameter specifies starting point of a
239 continued operation: for the first call it will be zero, a negative number
240 will produce an error. If more elements are available on a subsequent call
241 nextIndex is set to the index of the next element. Otherwise nextIndex is
242 set to a negative number. */
244 typedef struct {
245 uint32 budb_volumeList_len;
246 [size_is(budb_volumeList_len),ptr] budb_volumeEntry budb_volumeList_val[*];
247 } budb_volumeList;
249 typedef struct {
250 uint32 budb_dumpList_len;
251 [size_is(budb_dumpList_len),ptr] budb_dumpEntry budb_dumpList_val[*];
252 } budb_dumpList;
254 typedef struct {
255 uint32 budb_tapeList_len;
256 [size_is(budb_tapeList_len),ptr] budb_tapeEntry budb_tapeList_val[*];
257 } budb_tapeList;
259 typedef struct {
260 uint32 charListT_len;
261 [length_is(charListT_len)] uint8 charListT_val[1024];
262 } charListT;
264 /* database header - minimal version that is dumped. Allows values of important
265 * state variables to be saved/restored.
267 /* XXX -- this name needs a budb_ prefix */
268 typedef struct {
269 int32 dbversion; /* database version */
270 int32 created; /* creation time */
271 budbNameString_t cell;
272 uint32 lastDumpId; /* last dump id generated */
273 uint32 lastInstanceId; /* last lock instance */
274 uint32 lastTapeId; /* last tape id */
275 uint32 spare1;
276 uint32 spare2;
277 uint32 spare3;
278 uint32 spare4;
279 } DbHeader;
281 /* The structure is a version of budb_volumeEntry with the layout of the volume
282 * id hyper explicitly specified. */
284 typedef struct { /* describes a volume in a database dump */
285 /* volume information */
286 budbNameString_t name;
287 uint32 flags; /* various bits described below */
288 udlong id;
289 budbNameString_t server;
290 int32 partition; /* partition on server */
291 int32 nFrags; /* number fragments in whole volume */
292 /* per fragment */
293 int32 position; /* position on tape */
294 time_t clone; /* time volume was cloned for dump */
295 time_t incTime; /* NOT USED */
296 int32 startByte; /* first byte of volume in this frag */
297 int32 nBytes; /* number of bytes in this frag */
298 int32 seq; /* sequence of frag in volume */
299 /* additional location info */
300 uint32 dump; /* dump volume is part of */
301 budbNameString_t tape;
302 uint32 spare1; /* nominal spares */
303 uint32 spare2; /* nominal spares */
304 uint32 spare3; /* nominal spares */
305 uint32 spare4; /* nominal spares */
306 } budb_dbVolume;
308 /* Header prefix for each structure in the byte stream returned by BUDB_DumpDB.
309 * The type field identifies the structure that follows --
310 * SD_DBHEADER -- DbHeader
311 * SD_DUMP -- budb_dumpEntry
312 * SD_TAPE -- budb_tapeEntry
313 * SD_VOLUME -- budb_dbVolume_t
314 * SD_TEXT_DUMPSCHEDULE -- ???
315 * SD_TEXT_VOLUMESET -- ???
316 * SD_TEXT_TAPEHOSTS -- ???
317 * SD_END -- end of database */
319 /* XXX -- this name needs a budb_ prefix */
320 typedef struct {
321 int32 type; /* structure type */
322 int32 structversion; /* version of following structure */
323 int32 size; /* bytes in following structure */
324 uint32 spare1;
325 uint32 spare2;
326 uint32 spare3;
327 uint32 spare4;
328 } structDumpHeader;
331 * Bakserver interface procedure declarations
333 /* This adds a volume to particular dump and tape. It is called after the
334 volume has been written to tape and allows the database to attach the volume
335 information to the structures for its containing dump and tape. The
336 description of the volume must be specified on input, including the vldb
337 information, incTime, and a description of the volume's fragmention. */
339 * provider_version(1)
341 WERROR AddVolume
343 [ref, in] budb_volumeEntry *vol
346 /* This creates a new dump. On input the dumpEntry specifies the containing
347 tape set, the dump name, the incTime, and the identity of the dumper. On
348 output the dump's id is set. */
351 * provider_version(1)
353 WERROR CreateDump
355 [ref, in, out] budb_dumpEntry *dump
359 * provider_version(1)
361 WERROR DeleteDump
363 [in] uint32 id
366 /* This is called, probably infrequently, to remove a tape from the database.
367 The assumption is that sometimes tapes are retired or lost and this routine
368 facilitates cleaning up the database. */
371 * provider_version(1)
373 WERROR DeleteTape
375 [ref, in] budb_tapeEntry *tape
376 ); /* tape info */
379 * provider_version(1)
381 WERROR DeleteVDP
383 [in] budbNameString_t *dsname, /* dump name */
384 [in] budbNameString_t *dumpPath, /* dump node path name */
385 [in] int32 curDumpId /* current dump Id for exclusion */
389 * provider_version(1)
391 WERROR FindClone
393 [in] int32 dumpID, /* id of dump to start with */
394 [in] budbNameString_t *volName, /* clone time required for volName */
395 [ref, out] uint32 *clonetime, /* returned clone time */
396 [ref, out] uint32 *cloneSpare
400 * provider_version(1)
402 WERROR FindDump
404 [in] budbNameString_t *volName, /* name of volume to look for */
405 [in] uint32 beforeDate, /* must be before this date */
406 [in] uint32 dateSpare,
407 [ref, out] budb_dumpEntry *deptr /* returned dump information */
411 * provider_version(1)
413 WERROR FindLatestDump
415 [in] budbNameString_t *vsname, /* name of volumeset to look for */
416 [in] budbNameString_t *dname, /* name of dump to look for */
417 [ref, out] budb_dumpEntry *dumpentry
420 /* This notifies the database that the dump is finished. Some status bits can
421 be specified on input. */
424 * provider_version(1)
426 WERROR FinishDump
428 [ref, in, out] budb_dumpEntry *dump
431 /* This is called when writing to the tape has been completed. The tapeEntry
432 includes some status bits on input, such as whether any tape errors were
433 encountered. Volumes and dumps on the tape are marked as safe if the status
434 was good. */
437 * provider_version(1)
439 WERROR FinishTape
441 [ref, in] budb_tapeEntry *tape
445 * provider_version(1)
447 WERROR GetDumps
449 [in] int32 majorVersion, /* version of interface structures */
450 [in] int32 flags, /* search & select controls */
451 [in] budbNameString_t *name, /* s&s parameters */
452 [in] int32 start,
453 [in] int32 end,
454 [in] int32 index, /* start index of returned entries */
455 [ref, out] int32 *nextIndex, /* output index for next call */
456 [ref, out] int32 *dbUpdate, /* time of last db change */
457 [out] budb_dumpList **dumps /* structure list */
461 * provider_version(1)
463 WERROR GetTapes
465 [in] int32 majorVersion, /* version of interface structures */
466 [in] int32 flags, /* search & select controls */
467 [in] budbNameString_t *name, /* s&s parameters */
468 [in] int32 start,
469 [in] int32 end, /* reserved: MBZ */
470 [in] int32 index, /* start index of returned entries */
471 [ref, out] int32 *nextIndex, /* output index for next call */
472 [ref, out] int32 *dbUpdate, /* time of last db change */
473 [out] budb_tapeList **tapes /* structure list */
477 * provider_version(1)
479 WERROR GetVolumes
481 [in] int32 majorVersion, /* version of interface structures */
482 [in] int32 flags, /* search & select controls */
483 [in] budbNameString_t *name, /* - parameters for search */
484 [in] int32 start, /* - usage depends which BUDP_OP_* */
485 [in] int32 end, /* - bits are set */
486 [in] int32 index, /* start index of returned entries */
487 [ref, out] int32 *nextIndex, /* output index for next call */
488 [ref, out] int32 *dbUpdate, /* time of last db change */
489 [out] budb_volumeList **volumes /* structure list */
492 /* Called when a tape is about to be used. It deletes from the database the
493 previous contents of the tape, if any, and marks it as "being written". The
494 tapeEntry identifies the tape name and dump on input. The updated entry is
495 returned on output. */
498 * provider_version(1)
500 WERROR UseTape
502 [ref, in] budb_tapeEntry *tape, /* tape info */
503 [ref, out] int32 *new /* set if tape is new */
506 /* text file management calls - alphabetic */
509 * provider_version(1)
511 WERROR GetText
513 [in] int32 lockHandle,
514 [in] int32 textType, /* which type of text */
515 [in] int32 maxLength,
516 [in] int32 offset,
517 [ref, out] int32 *nextOffset,
518 [ref, out] charListT *charListPtr
522 * provider_version(1)
524 WERROR GetTextVersion
526 [in] int32 textType,
527 [ref, out] int32 *tversion
531 * provider_version(1)
533 WERROR SaveText
535 [in] int32 lockHandle, /* which type of text */
536 [in] int32 textType, /* which type of text */
537 [in] int32 offset, /* offset into text block */
538 [in] int32 flags,
539 [ref, in] charListT *charListPtr
542 /* Lock management interface routines */
545 * provider_version(1)
547 WERROR FreeAllLocks
549 [in] uint32 instanceId /* identifies user */
553 * provider_version(1)
555 WERROR FreeLock
557 [in] uint32 lockHandle /* identifies lock */
561 * provider_version(1)
563 WERROR GetInstanceId
565 [ref, out] uint32 *instanceId /* instance of a user */
569 * provider_version(1)
571 WERROR GetLock
573 [in] uint32 instanceId, /* instance of user */
574 [in] int32 lockName, /* which lock */
575 [in] int32 expiration, /* # secs after which lock
576 released */
577 [ref, out] uint32 *lockHandle /* returned lock handle */
580 /* database dump and reconstruction */
583 * provider_version(1)
585 WERROR DbVerify
587 [ref, out] int32 *status, /* 0=ok, 1=inconsistent */
588 [ref, out] int32 *orphans, /* orphan block count */
589 [ref, out] int32 *host /* host where checks done */
593 * provider_version(1)
595 WERROR DumpDB
597 [in] int32 maxLength, /* max transfer size */
598 [ref, out] int32 *flags, /* status flags */
599 [ref, out] charListT *charListPtr /* byte stream out */
603 * provider_version(1)
605 WERROR RestoreDbHeader
607 [ref, in] DbHeader *header /* restore database header */
610 /* Debug and test interface routines
612 * These routines provide a low level interface that can be used to test out
613 * the backup database.
617 * provider_version(1)
619 WERROR T_GetVersion
621 [ref, out] int32 *majorVersion
625 * provider_version(1)
627 WERROR T_DumpHashTable
629 [in] int32 type,
630 [in] budbNameString_t *filename
634 * provider_version(1)
636 WERROR T_DumpDatabase
638 [in] budbNameString_t *filename
642 * provider_version(1)
646 typedef struct {
648 uuid_t interface_uuid; /* i/f UUID of the supported i/f */
649 uint16 vers_major; /* i/f major version number */
650 uint16 vers_minor; /* i/f minor version number */
651 uint32 vers_provider; /* provider_version number */
653 uint32 spare0; /* some long spares */
654 uint32 spare1;
655 uint32 spare2;
656 uint32 spare3;
657 uint32 spare4;
658 uint32 spare5;
659 uint32 spare6;
660 uint32 spare7;
661 uint32 spare8;
662 uint32 spare9;
664 uint8 spareText[50]; /* spare text */
666 } dfs_interfaceDescription;
668 typedef struct {
670 uint32 dfs_interfaceList_len;
671 [length_is(dfs_interfaceList_len)] dfs_interfaceDescription dfs_interfaceList_val;
673 } dfs_interfaceList;
676 WERROR GetServerInterfaces
678 [ref, in, out] dfs_interfaceList *serverInterfacesP
682 * Same as AddVolume, except takes array of volumes instead of
683 * single volume
687 * provider_version(2)
690 WERROR AddVolumes
692 [in] uint32 cnt,
693 [in, size_is(cnt)] budb_volumeEntry vol[]