|
|
1.1 ! root 1: /* ! 2: Copyright (c) 2008 TrueCrypt Foundation. All rights reserved. ! 3: ! 4: Governed by the TrueCrypt License 2.4 the full text of which is contained ! 5: in the file License.txt included in TrueCrypt binary and source code ! 6: distribution packages. ! 7: */ ! 8: ! 9: #ifndef TC_HEADER_Boot_BootCommon ! 10: #define TC_HEADER_Boot_BootCommon ! 11: ! 12: #include "Password.h" ! 13: #include "BootDefs.h" ! 14: ! 15: ! 16: #define TC_BOOT_LOADER_AREA_SIZE (TC_BOOT_LOADER_AREA_SECTOR_COUNT * SECTOR_SIZE) ! 17: ! 18: #define TC_BOOT_VOLUME_HEADER_SECTOR (TC_BOOT_LOADER_AREA_SECTOR_COUNT - 1) ! 19: #define TC_BOOT_VOLUME_HEADER_SECTOR_OFFSET (TC_BOOT_VOLUME_HEADER_SECTOR * SECTOR_SIZE) ! 20: ! 21: #define TC_CD_BOOTSECTOR_OFFSET 0xd000 ! 22: #define TC_CD_BOOT_LOADER_SECTOR 26 ! 23: ! 24: #define TC_ORIG_BOOT_LOADER_BACKUP_SECTOR TC_BOOT_LOADER_AREA_SECTOR_COUNT ! 25: #define TC_ORIG_BOOT_LOADER_BACKUP_SECTOR_OFFSET (TC_ORIG_BOOT_LOADER_BACKUP_SECTOR * SECTOR_SIZE) ! 26: ! 27: #define TC_MBR_SECTOR 0 ! 28: #define TC_MAX_MBR_BOOT_CODE_SIZE 440 ! 29: ! 30: #define TC_BOOT_CFG_FLAG_RESCUE_DISK 0x10 ! 31: #define TC_BOOT_CFG_FLAG_RESCUE_DISK_ORIG_SYS_LOADER 0x20 ! 32: ! 33: #pragma pack (1) ! 34: ! 35: typedef struct ! 36: { ! 37: byte Flags; ! 38: } BootSectorConfiguration; ! 39: ! 40: ! 41: // Modifying this value can introduce incompatibility with previous versions ! 42: #define TC_BOOT_LOADER_ARGS_OFFSET 0x10 ! 43: ! 44: typedef struct ! 45: { ! 46: // Modifying this structure can introduce incompatibility with previous versions ! 47: char Signature[8]; ! 48: uint16 BootLoaderVersion; ! 49: uint16 CryptoInfoOffset; ! 50: uint16 CryptoInfoLength; ! 51: uint32 HeaderSaltCrc32; ! 52: Password BootPassword; ! 53: } BootArguments; ! 54: ! 55: #pragma pack () ! 56: ! 57: // Boot arguments signature should not be defined as a static string ! 58: // Modifying these values can introduce incompatibility with previous versions ! 59: #define TC_SET_BOOT_ARGUMENTS_SIGNATURE(SG) do { SG[0] = 'T'; SG[1] = 'R'; SG[2] = 'U'; SG[3] = 'E'; SG[4] = 0x11; SG[5] = 0x23; SG[6] = 0x45; SG[7] = 0x66; } while (FALSE) ! 60: #define TC_IS_BOOT_ARGUMENTS_SIGNATURE(SG) (SG[0] == 'T' && SG[1] == 'R' && SG[2] == 'U' && SG[3] == 'E' && SG[4] == 0x11 && SG[5] == 0x23 && SG[6] == 0x45 && SG[7] == 0x66) ! 61: ! 62: ! 63: #endif // TC_HEADER_Boot_BootCommon
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.