+ /* An enumerated type that identifies where the stream corresponding to
+ * this lookup table entry is actually located.
+ *
+ * Obviously if we open a WIM and read its lookup table, the location is
+ * set to RESOURCE_IN_WIM since all the streams will initially be
+ * located in the WIM. However, to deal with problems such as image
+ * capture and image mount, we allow the actual location of the stream
+ * to be somewhere else, such as an external file.
+ */
+ enum {
+ /* The lookup table entry does not correspond to a stream (this
+ * state should exist only temporarily) */
+ RESOURCE_NONEXISTENT = 0,
+
+ /* The stream resource is located in a WIM file. The WIMStruct
+ * for the WIM file will be pointed to by the @wim member. */
+ RESOURCE_IN_WIM,
+
+ /* The stream resource is located in an external file. The
+ * name of the file will be provided by @file_on_disk member.
+ * In addition, if @file_on_disk_fp is not NULL, it will be an
+ * open FILE * to the file. */
+ RESOURCE_IN_FILE_ON_DISK,
+
+ /* The stream resource is located in an external file in the
+ * staging directory for a read-write mount. */
+ RESOURCE_IN_STAGING_FILE,
+
+ /* The stream resource is directly attached in an in-memory
+ * buffer pointed to by @attached_buffer. */
+ RESOURCE_IN_ATTACHED_BUFFER,
+
+ /* The stream resource is located in an NTFS volume. It is
+ * identified by volume, filename, data stream name, and by
+ * whether it is a reparse point or not. @ntfs_loc points to a
+ * structure containing this information. */
+ RESOURCE_IN_NTFS_VOLUME,
+ } resource_location;
+
+ /* (On-disk field)
+ * Number of times this lookup table entry is referenced by dentries.
+ * Unfortunately, this field is not always set correctly in Microsoft's
+ * WIMs, so we have no choice but to fix it if more references to the
+ * lookup table entry are found than stated here. */