This file is indexed.

/usr/include/afs/bubasics.h is in libopenafs-dev 1.6.15-1ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
/*
 * Copyright 2000, International Business Machines Corporation and others.
 * All Rights Reserved.
 *
 * This software has been released under the terms of the IBM Public
 * License.  For details, see the LICENSE file in the top-level source
 * directory or online at http://www.openafs.org/dl/license10.html
 */

#ifndef __BUBASIC__
#define __BUBASIC__

/* version numbers. This version information is accessed from more than
 * one module. Version information is kept for:
 *	bucoord <-> butc interface
 *	butc <-> butm interface
 *	bu* <-> budb interface
 *
 * and as an interim measure, for
 *	dumpschedule files
 *	dump database files i.e. D*.db
 */

/* Version of butc <-> butm interface
 * These are not version flags as the name suggests.
 */

#define BUTM_VERSIONFLAG_0 0	/* every size measure is in bytes */
#define BUTM_VERSIONFLAG_1 1	/* every size measure is in kbytes */
#define BUTM_VERSIONFLAG_2 2	/* afs 3.1 features */

/* current version of the interface */
#define BUTM_MAJORVERSION BUTM_VERSIONFLAG_2

/* versions for the bucoord <-> butc interface */
#define BUTC_VERSION_1		1	/* initial version, afs 3.1 */
#define BUTC_VERSION_2          2	/* 3.4 version - added voltype to tc_dumpDesc */
#define BUTC_VERSION_3          3	/* 3.4 version - labeltape change */
#define	CUR_BUTC_VERSION	BUTC_VERSION_3

/* TAPE_VERSION Version of the current tape format used by butc
 * Notes:
 *
 * version 0:   ?? - sizes in bytes
 * version 1:   Sizes in kbytes.
 * version 2:
 *      1) Tape expiration information in label
 *      2) backup systems's EOT markers at the end of a dump
 * version 3:
 *	1) dump id and tape use count in label
 * version 4:
 *	1) Got rid of large EOT markers
 *      2) Supports appended dumps
 */

#define TAPE_VERSION_0          0
#define TAPE_VERSION_1          1
#define TAPE_VERSION_2          2
#define	TAPE_VERSION_3		3
#define	TAPE_VERSION_4		4
#define CUR_TAPE_VERSION        TAPE_VERSION_4

#define BC_SCHEDULE_MAGIC       0x74327285	/* magic # for schedules */
#define BC_SCHEDULE_V3_1        1	/* afs 3.1 */
#define BC_SCHEDULE_VERSION     BC_SCHEDULE_V3_1	/* current version */

#define BC_DUMPDB_MAGIC         0x10381645	/* magic # for dump db */
#define BC_DUMPDB_V3_1          1	/* afs 3.1 */
#define BC_DUMPDB_VERSION       BC_DUMPDB_V3_1	/* current version */

/* define ports that move to system configuration later */
#define	BC_MESSAGEPORT	    7020	/* for communicating with backup coordinator */
#define	BC_TAPEPORT	    7025	/* for communicating with tape controller */

#ifndef AFSCONF_BUDBPORT
#define AFSCONF_BUDBPORT    7021	/* for communicating with backup database */
#endif
#define BUDB_SERVICE 22314	/* service id */

#define RX_SCINDEX_NULL	0	/* No security */
#define RX_SCINDEX_VAB 	1	/* vice tokens, with bcrypt */
#define RX_SCINDEX_KAD	2	/* Kerberos/DES */

/* maximums for various text strings
 * DON'T alter these values until all disk/tape structures can be handled
 * correctly. In particular, volume names are 64.
 */

/* dump states */
#define	DUMP_FAILED	1	/* outright failed */
#define	DUMP_PARTIAL	2	/* partial on tape */
#define	DUMP_SUCCESS	3	/* all ok */
#define DUMP_RETRY      4	/* failed, but retry */
#define DUMP_NORETRYEOT 5	/* failed, and don't retry */
#define DUMP_NOTHING    6	/* Nothing was dumped */
#define DUMP_NODUMP     7	/* don't dump, and don't retry */


#define BU_MAXNAMELEN 32	/* max for misc. names: eg volumes */
#define BU_MAXTAPELEN 32	/* for tape names */
#define BU_MAXHOSTLEN 32	/* for server (machine) names */
#define BU_MAXTOKENLEN 16	/* identifiers */
#define BU_MAXUNAMELEN 256	/* length of a user name */
#define BU_MAXCELLLEN 256	/* length of a cell name */

/* proposed maximum name lengths  PA */
#define	BU_MAX_NAME	64	/* misc. names */
#define BU_MAX_DUMP_PATH 256	/* length of schedule path name */

#define BC_MAXPORTOFFSET    58510	/* max number of port offsets in database */

#ifndef NEVERDATE
#define NEVERDATE 037777777777	/* a date that will never come */
#endif
#ifndef NEVERSTRING
#define NEVERSTRING  "NEVER                   \n"
#endif
#define cTIME(t)  ( (*(t) == NEVERDATE) ? (char *)NEVERSTRING : (char *)ctime(t) )

#ifndef Date
#define Date afs_uint32
#endif

#define	DUMP_TAPE_NAME	"Ubik_db_dump"	/* base database tape name */

/* for expiration date processing */
#define	BC_NO_EXPDATE		0	/* no expiration date */
#define	BC_ABS_EXPDATE		1	/* absolute expiration date */
#define	BC_REL_EXPDATE		2	/* relative expiration date */

/*macro which generates tape names from tapeSetName */
#define tc_MakeTapeName(name,set,seq) \
    sprintf (name, (set)->format, (seq) + (set)->b)

/* common structure definitions */
struct dlqlink {
    struct dlqlink *dlq_next;
    struct dlqlink *dlq_prev;
    afs_int32 dlq_type;
    void *dlq_structPtr;	/* enclosing structure */
};

typedef struct dlqlink dlqlinkT;
typedef dlqlinkT *dlqlinkP;


/* invariants */
#define	DLQ_HEAD	1001

#define DLQ_VOLENTRY	10
#define DLQ_FINISHTAPE	11
#define DLQ_USETAPE	12
#define DLQ_FINISHDUMP  13
#define DLQ_USEDUMP     14

/* simple assertion - for testing, don't halt processing */

#define	DLQASSERT(condition)					\
	if ( (condition) == 0 )					\
	{							\
	    printf("DLQASSERT: %s failed\n", #condition);	\
	}

/* function typing */
extern dlqlinkP dlqFront(dlqlinkP);
extern dlqlinkP dlqUnlinkb(dlqlinkP);
extern dlqlinkP dlqUnlinkf(dlqlinkP);

/* -----------------------------
 * Status management
 * -----------------------------
 */

/* status management flags
 *
 * Key to comments:
 *	C - client side only
 *	S - server side only
 *	B - client or server
 */

#define STARTING	0x1	/* C; still setting up, no server task yet */
#define	ABORT_REQUEST	0x2	/* B; user requested abort */
#define	ABORT_SENT	0x4	/* C; abort sent to server (REQ cleared) */
#define	ABORT_DONE	0x8	/* S; abort complete on server */
#define	ABORT_LOCAL	0x10	/* C; abort local task if contact lost */
#define	TASK_DONE 	0x20	/* B; task complete */
#define	SILENT		0x400	/* C; don't be verbose about termination */
#define	NOREMOVE	0x1000	/* C; don't remove from queue */

/* comm status */
#define	CONTACT_LOST	0x40	/* B; contact lost */

/* errror handling */
#define	TASK_ERROR	0x80	/* S; had fatal error, will terminate */

/* general status - copied back to client for jobs status */
#define	DRIVE_WAIT	0x100	/* S; waiting for drive to become free */
#define	OPR_WAIT	0x200	/* S; waiting for operator action */
#define CALL_WAIT       0x800	/* S; waiting for callout routine completion */

struct statusS {
    dlqlinkT link;

    afs_uint32 taskId;		/* task identifier */
    afs_uint32 dbDumpId;	/* dump id */
    afs_uint32 flags;		/* as above */
    afs_uint32 nKBytes;		/* bytes xferred */
    char volumeName[BU_MAXNAMELEN];	/* current volume (if any) */
    afs_int32 volsFailed;	/* # operation failures */
    afs_int32 lastPolled;	/* last successful poll */

    /* bucoord local */
    char taskName[64];		/* type of task */
    afs_int32 port;
    afs_int32 jobNumber;
    afs_int32 volsTotal;	/* total # vols */
    afs_int32 scheduledDump;	/* Time this dump was scheduled */
    char *cmdLine;		/* Command to exectute for this dump */
};

typedef struct statusS statusT;
typedef statusT *statusP;

#endif