This file is indexed.

/usr/include/afs/dir.h is in libopenafs-dev 1.8.0~pre5-1.

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
/*
 * 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
 */

#if	!defined(__AFS_DIR_H)

#define __AFS_DIR_H

#define AFS_PAGESIZE 2048	/* bytes per page */
#define NHASHENT 128		/* entries in the hash tbl */
#define MAXPAGES 128		/* max pages in a dir */
#define	BIGMAXPAGES 1023	/* new big max pages */
#define EPP 64			/* dir entries per page */
#define LEPP 6			/* log above */
/* When this next field changs, it is crucial to modify MakeDir, since the
 * latter is responsible for marking these entries as allocated.  Also
 * change the salvager. */
#define DHE 12			/* entries in a dir header above a pages header alone. */

#define FFIRST 1
#define FNEXT 2

struct MKFid {			/* A file identifier. */
    afs_int32 vnode;		/* file's vnode slot */
    afs_int32 vunique;		/* the slot incarnation number */
};

struct PageHeader {
    /* A page header entry. */
    unsigned short pgcount;	/* number of pages, or 0 if old-style */
    unsigned short tag;		/* 1234 in network byte order */
    char freecount;		/* unused, info in dirHeader structure */
    char freebitmap[EPP / 8];
    char padding[32 - (5 + EPP / 8)];
};

struct DirBuffer {
    void *buffer;
    void *data;
};

struct DirHeader {
    /* A directory header object. */
    struct PageHeader header;
    char alloMap[MAXPAGES];	/* one byte per 2K page */
    unsigned short hashTable[NHASHENT];
};

struct DirEntry {
    /* A directory entry */
    char flag;
    char length;		/* currently unused */
    unsigned short next;
    struct MKFid fid;
    char name[16];
};

struct DirXEntry {
    /* A directory extension entry. */
    char name[32];
};

struct DirPage0 {
    /* A page in a directory. */
    struct DirHeader header;
    struct DirEntry entry[1];
};

struct DirPage1 {
    /* A page in a directory. */
    struct PageHeader header;
    struct DirEntry entry[1];
};

/* Prototypes */
#ifdef KERNEL
struct dcache;
typedef struct dcache * dir_file_t;
#else
struct DirHandle;
typedef struct DirHandle * dir_file_t;
extern void Die(const char *msg) AFS_NORETURN;
#endif

extern int afs_dir_NameBlobs(char *name);
extern int afs_dir_Create(dir_file_t dir, char *entry, void *vfid);
extern int afs_dir_Length(dir_file_t dir);
extern int afs_dir_Delete(dir_file_t dir, char *entry);
extern int afs_dir_MakeDir(dir_file_t dir, afs_int32 * me,
			   afs_int32 * parent);
extern int afs_dir_Lookup(dir_file_t dir, char *entry, void *fid);
extern int afs_dir_LookupOffset(dir_file_t dir, char *entry, void *fid,
				long *offsetp);
extern int afs_dir_EnumerateDir(dir_file_t dir,
				int (*hookproc) (void *, char *name,
						 afs_int32 vnode, 
						 afs_int32 unique),
				void *hook);
extern int afs_dir_IsEmpty(dir_file_t dir);
extern int afs_dir_GetBlob(dir_file_t dir, afs_int32 blobno,
			   struct DirBuffer *);
extern int afs_dir_GetVerifiedBlob(dir_file_t dir, afs_int32 blobno,
				   struct DirBuffer *);
extern int afs_dir_DirHash(char *string);

extern int afs_dir_InverseLookup (void *dir, afs_uint32 vnode,
				  afs_uint32 unique, char *name,
				  afs_uint32 length);

extern int afs_dir_ChangeFid(dir_file_t dir, char *entry,
		             afs_uint32 *old_fid, afs_uint32 *new_fid);

/* buffer operations */

extern void DInit(int abuffers);
extern int DRead(dir_file_t fid, int page, struct DirBuffer *);
extern int DFlush(void);
extern int DFlushVolume(afs_int32);
extern int DNew(dir_file_t fid, int page, struct DirBuffer *);
extern void DZap(dir_file_t fid);
extern void DRelease(struct DirBuffer *loc, int flag);
extern int DStat(int *abuffers, int *acalls, int *aios);
extern int DFlushVolume(afs_int32 vid);
extern int DFlushEntry(dir_file_t fid);
extern int DVOffset(struct DirBuffer *);

/* salvage.c */

#ifndef KERNEL
extern int DirOK(void *);
extern int DirSalvage(void *, void *, afs_int32, afs_int32,
                      afs_int32, afs_int32);

#endif

#endif /*       !defined(__AFS_DIR_H) */