summaryrefslogtreecommitdiff
path: root/src/kernel/iso9660.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/iso9660.h')
-rw-r--r--src/kernel/iso9660.h66
1 files changed, 64 insertions, 2 deletions
diff --git a/src/kernel/iso9660.h b/src/kernel/iso9660.h
index 8267d0d..271e5e0 100644
--- a/src/kernel/iso9660.h
+++ b/src/kernel/iso9660.h
@@ -23,12 +23,74 @@ OF THIS SOFTWARE.
#ifndef ISO9660_H
#define ISO9660_H
-struct iso_9660_volume_descriptor_start {
+enum iso_9660_vd_type {
+ BOOT_RECORD = 0,
+ PRIM_VOLUME = 1,
+ SUPP_VOLUME = 2,
+ PARTITION = 3
+};
+
+struct iso_9660_timecode {
+ uint8_t year[4];
+ uint8_t month[2];
+ uint8_t day[2];
+ uint8_t hour[2];
+ uint8_t minute[2];
+ uint8_t second[2];
+ uint8_t centisecond[2];
+ uint8_t tzone;//0 = -12, 100 = +13
+} __attribute__ ((__packed__));
+
+struct iso_9660_directory {
+ uint8_t filler[34];//TODO
+} __attribute__ ((__packed__));
+
+struct iso_9660_primary_vd {
uint8_t type;
uint8_t id[5];
uint8_t version;
+ uint8_t spacing;
+ uint8_t system_id[32];
+ uint8_t volume_id[32];
+ uint64_t spacing2;
+ uint32_t size;//in blocks
+ uint32_t size_be;
+ uint64_t spacing3[4];
+ uint16_t set_size;
+ uint16_t set_size_be;
+ uint16_t set_index;
+ uint16_t set_index_be;
+ uint16_t block_size;
+ uint16_t block_size_be;
+ uint32_t path_table_size;
+ uint32_t path_table_size_be;
+ uint32_t path_table_block;
+ uint32_t optional_path_table_block;
+ uint32_t path_table_block_be;
+ uint32_t optional_path_table_block_be;
+ struct iso_9660_directory root_directory;
+ uint8_t set_name[128];
+ uint8_t publisher[128];
+ uint8_t data_preparer[128];
+ uint8_t application[128];
+ uint8_t copyright_file[38];
+ uint8_t abstract_file[36];
+ uint8_t bibliography_file[37];
+ struct iso_9660_timecode created;
+ struct iso_9660_timecode modified;
+ struct iso_9660_timecode expires;
+ struct iso_9660_timecode effective;
+ uint8_t directory_format_version;
} __attribute__ ((__packed__));
-bool iso_9660_parse_ph(uint8_t dn, uint32_t sector, uint8_t *buffer);
+struct iso_9660_cache {
+ uint16_t block_size;
+ struct iso_9660_directory root_directory;
+ uint32_t path_table_size;
+ uint32_t path_table_sector;
+ uint32_t optional_path_table_sector;
+};
+
+bool iso_9660_parse_ph(uint8_t dn, uint8_t pn, uint32_t sector, uint8_t *buffer);
#endif \ No newline at end of file