1 /* 2 * Copyright 2005, Ingo Weinhold, bonefish@cs.tu-berlin.de. All rights reserved. 3 * Copyright 2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 4 * 5 * Distributed under the terms of the MIT License. 6 */ 7 #ifndef TAR_FS_H 8 #define TAR_FS_H 9 10 11 enum { 12 BLOCK_SIZE = 512, 13 }; 14 15 struct tar_header { 16 char name[100]; 17 char mode[8]; 18 char uid[8]; 19 char gid[8]; 20 char size[12]; 21 char modification_time[12]; 22 char check_sum[8]; 23 char type; 24 char linkname[100]; 25 char magic[6]; 26 char version[2]; 27 char user_name[32]; 28 char group_name[32]; 29 char device_major[8]; 30 char device_minor[8]; 31 char prefix[155]; 32 }; 33 34 static const char *kTarHeaderMagic = "ustar"; 35 static const char *kOldTarHeaderMagic = "ustar "; 36 37 // the relevant entry types 38 enum { 39 TAR_FILE = '0', 40 TAR_FILE2 = '\0', 41 TAR_DIRECTORY = '5', 42 TAR_LONG_NAME = 'L', 43 }; 44 45 #endif // TAR_FS_H 46