Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
budb.idl
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.
11  */
12 /*
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]
18  *
19  * $EndLog$
20  */
21 /* Copyright (C) 1996, 1990 Transarc Corporation - All rights reserved */
22 
23 /* $Header: /u0/rcs_trees/dce/rcs/file/bakserver/budb.idl,v 1.1.13.1 1996/10/02 16:59:37 damon Exp $ */
24 
25 [
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 */
31 {
32 
33 /*import "dcedfs/common_data.idl";*/
34 
35 
36 /*
37  * Constants for bakserver data structures
38  */
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 */
49 
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 */
53 
54 /* types of text blocks */
55 const long TB_DUMPSCHEDULE = 0;
56 const long TB_VOLUMESET = 1;
57 const long TB_TAPEHOSTS = 2;
58 
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 */
62 
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 */
68 
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 */
76 
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 */
84 
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;
90 
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;
98 
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 */
113 
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;
120 
121 /* maximum number of volumes accepted by these functions */
122 const long BUDB_MAX_VOL_COUNT = 64;
123 
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;
135 
136 /*
137  * Now, the bakserver data structure type definitions
138  */
139 
140 /*
141  * A generic string type for backup
142  */
143 
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 */
154 
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;
168 
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 */
187 
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 */
207 
208 typedef struct { /* describes a fragment of a volume */
209 
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 */
232 
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. */
243 
244 typedef struct {
245  uint32 budb_volumeList_len;
246  [size_is(budb_volumeList_len),ptr] budb_volumeEntry budb_volumeList_val[*];
248 
249 typedef struct {
250  uint32 budb_dumpList_len;
251  [size_is(budb_dumpList_len),ptr] budb_dumpEntry budb_dumpList_val[*];
252 } budb_dumpList;
253 
254 typedef struct {
255  uint32 budb_tapeList_len;
256  [size_is(budb_tapeList_len),ptr] budb_tapeEntry budb_tapeList_val[*];
257 } budb_tapeList;
258 
259 typedef struct {
260  uint32 charListT_len;
261  [length_is(charListT_len)] uint8 charListT_val[1024];
262 } charListT;
263 
264 /* database header - minimal version that is dumped. Allows values of important
265  * state variables to be saved/restored.
266  */
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;
280 
281 /* The structure is a version of budb_volumeEntry with the layout of the volume
282  * id hyper explicitly specified. */
283 
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;
307 
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 */
318 
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;
329 
330 /*
331  * Bakserver interface procedure declarations
332  */
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. */
338 /*
339  * provider_version(1)
340  */
341 WERROR AddVolume
342 (
343  [ref, in] budb_volumeEntry *vol
344 );
345 
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. */
349 
350 /*
351  * provider_version(1)
352  */
353 WERROR CreateDump
354 (
355  [ref, in, out] budb_dumpEntry *dump
356 );
357 
358 /*
359  * provider_version(1)
360  */
361 WERROR DeleteDump
362 (
363  [in] uint32 id
364 );
365 
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. */
369 
370 /*
371  * provider_version(1)
372  */
373 WERROR DeleteTape
374 (
375  [ref, in] budb_tapeEntry *tape
376 ); /* tape info */
377 
378 /*
379  * provider_version(1)
380  */
381 WERROR DeleteVDP
382 (
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 */
386 );
387 
388 /*
389  * provider_version(1)
390  */
391 WERROR FindClone
392 (
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
397 );
398 
399 /*
400  * provider_version(1)
401  */
402 WERROR FindDump
403 (
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 */
408 );
409 
410 /*
411  * provider_version(1)
412  */
413 WERROR FindLatestDump
414 (
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
418 );
419 
420 /* This notifies the database that the dump is finished. Some status bits can
421  be specified on input. */
422 
423 /*
424  * provider_version(1)
425  */
426 WERROR FinishDump
427 (
428  [ref, in, out] budb_dumpEntry *dump
429 );
430 
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. */
435 
436 /*
437  * provider_version(1)
438  */
439 WERROR FinishTape
440 (
441  [ref, in] budb_tapeEntry *tape
442 );
443 
444 /*
445  * provider_version(1)
446  */
447 WERROR GetDumps
448 (
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 */
458 );
459 
460 /*
461  * provider_version(1)
462  */
463 WERROR GetTapes
464 (
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 */
474 );
475 
476 /*
477  * provider_version(1)
478  */
479 WERROR GetVolumes
480 (
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 */
490 );
491 
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. */
496 
497 /*
498  * provider_version(1)
499  */
500 WERROR UseTape
501 (
502  [ref, in] budb_tapeEntry *tape, /* tape info */
503  [ref, out] int32 *new /* set if tape is new */
504 );
505 
506 /* text file management calls - alphabetic */
507 
508 /*
509  * provider_version(1)
510  */
511 WERROR GetText
512 (
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
519 );
520 
521 /*
522  * provider_version(1)
523  */
524 WERROR GetTextVersion
525 (
526  [in] int32 textType,
527  [ref, out] int32 *tversion
528 );
529 
530 /*
531  * provider_version(1)
532  */
533 WERROR SaveText
534 (
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
540 );
541 
542 /* Lock management interface routines */
543 
544 /*
545  * provider_version(1)
546  */
547 WERROR FreeAllLocks
548 (
549  [in] uint32 instanceId /* identifies user */
550 );
551 
552 /*
553  * provider_version(1)
554  */
555 WERROR FreeLock
556 (
557  [in] uint32 lockHandle /* identifies lock */
558 );
559 
560 /*
561  * provider_version(1)
562  */
563 WERROR GetInstanceId
564 (
565  [ref, out] uint32 *instanceId /* instance of a user */
566 );
567 
568 /*
569  * provider_version(1)
570  */
571 WERROR GetLock
572 (
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 */
578 );
579 
580 /* database dump and reconstruction */
581 
582 /*
583  * provider_version(1)
584  */
585 WERROR DbVerify
586 (
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 */
590 );
591 
592 /*
593  * provider_version(1)
594  */
595 WERROR DumpDB
596 (
597  [in] int32 maxLength, /* max transfer size */
598  [ref, out] int32 *flags, /* status flags */
599  [ref, out] charListT *charListPtr /* byte stream out */
600 );
601 
602 /*
603  * provider_version(1)
604  */
605 WERROR RestoreDbHeader
606 (
607  [ref, in] DbHeader *header /* restore database header */
608 );
609 
610 /* Debug and test interface routines
611  *
612  * These routines provide a low level interface that can be used to test out
613  * the backup database.
614  */
615 
616 /*
617  * provider_version(1)
618  */
619 WERROR T_GetVersion
620 (
621  [ref, out] int32 *majorVersion
622 );
623 
624 /*
625  * provider_version(1)
626  */
627 WERROR T_DumpHashTable
628 (
629  [in] int32 type,
630  [in] budbNameString_t *filename
631 );
632 
633 /*
634  * provider_version(1)
635  */
636 WERROR T_DumpDatabase
637 (
638  [in] budbNameString_t *filename
639 );
640 
641 /*
642  * provider_version(1)
643  */
644 
645 
646 typedef struct {
647 
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 */
652 
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;
663 
664  uint8 spareText[50]; /* spare text */
665 
667 
668 typedef struct {
669 
670  uint32 dfs_interfaceList_len;
671  [length_is(dfs_interfaceList_len)] dfs_interfaceDescription dfs_interfaceList_val;
672 
674 
675 
676 WERROR GetServerInterfaces
677 (
678  [ref, in, out] dfs_interfaceList *serverInterfacesP
679 );
680 
681 /*
682  * Same as AddVolume, except takes array of volumes instead of
683  * single volume
684  */
685 
686 /*
687  * provider_version(2)
688  */
689 
690 WERROR AddVolumes
691 (
692  [in] uint32 cnt,
693  [in, size_is(cnt)] budb_volumeEntry vol[]
694 );
695 }
Definition: budb.idl:144
Definition: budb.idl:320
Definition: budb.idl:254
Definition: budb.idl:188
Definition: budb.idl:284
Definition: budb.idl:268
Definition: budb.idl:646
Definition: budb.idl:30
Definition: budb.idl:668
Definition: budb.idl:259
Definition: budb.idl:244
Definition: budb.idl:208
Definition: budb.idl:249
Definition: budb.idl:169
Definition: budb.idl:155