1 /* 2 * EWF session section (EWF-E01) 3 * 4 * Copyright (c) 2006-2014, Joachim Metz <joachim.metz@gmail.com> 5 * 6 * Refer to AUTHORS for acknowledgements. 7 * 8 * This program is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU Lesser General Public License as published by 10 * the Free Software Foundation, either version 3 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public License 19 * along with this program. If not, see <https://www.gnu.org/licenses/>. 20 */ 21 22 #if !defined( _EWF_SESSION_H ) 23 #define _EWF_SESSION_H 24 25 #include <common.h> 26 #include <types.h> 27 28 #if defined( __cplusplus ) 29 extern "C" { 30 #endif 31 32 typedef struct ewf_session_header ewf_session_header_t; 33 34 struct ewf_session_header 35 { 36 /* Number of sessions 37 * consists of 4 bytes 38 */ 39 uint8_t number_of_sessions[ 4 ]; 40 41 /* Unknown 42 * consists of 28 bytes 43 * contains 0x00 44 */ 45 uint8_t unknown1[ 28 ]; 46 47 /* The section checksum of all (previous) session data 48 * consists of 4 bytes (32 bits) 49 * starts with offset 76 50 */ 51 uint8_t checksum[ 4 ]; 52 53 /* The session entry array 54 * consists of 32 bytes per sector 55 * as long as necessary 56 */ 57 58 /* The last session entry is followed by a 4 byte checksum 59 */ 60 }; 61 62 typedef struct ewf_session_entry ewf_session_entry_t; 63 64 struct ewf_session_entry 65 { 66 /* The type 67 * consists of 4 bytes 68 */ 69 uint8_t type[ 4 ]; 70 71 /* The start sector of the session 72 * consists of 4 bytes 73 */ 74 uint8_t start_sector[ 4 ]; 75 76 /* Unknown 77 * consists of 24 bytes 78 * contains 0x00 79 */ 80 uint8_t unknown2[ 24 ]; 81 }; 82 83 #if defined( __cplusplus ) 84 } 85 #endif 86 87 #endif 88 89