1 /***********************************************************************
3 * This software is part of the ast package *
4 * Copyright (c) 1985-2010 AT&T Intellectual Property *
5 * and is licensed under the *
6 * Common Public License, Version 1.0 *
7 * by AT&T Intellectual Property *
9 * A copy of the License is available at *
10 * http://www.opensource.org/licenses/cpl1.0.txt *
11 * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
13 * Information and Software Systems Research *
17 * Glenn Fowler <gsf@research.att.com> *
18 * David Korn <dgk@research.att.com> *
19 * Phong Vo <kpv@research.att.com> *
21 ***********************************************************************/
24 * Standard Archive Format
25 * USTAR - Uniform Standard Tape ARchive
42 #define TMAGIC "ustar" /* ustar and a null */
44 #define TVERSION "00" /* 00 and no null */
51 * values used in typeflag field
54 #define REGTYPE '0' /* regular file */
55 #define AREGTYPE 0 /* alternate REGTYPE */
56 #define LNKTYPE '1' /* hard link */
57 #define SYMTYPE '2' /* soft link */
58 #define CHRTYPE '3' /* character special */
59 #define BLKTYPE '4' /* block special */
60 #define DIRTYPE '5' /* directory */
61 #define FIFOTYPE '6' /* FIFO special */
62 #define CONTTYPE '7' /* reserved */
63 #define SOKTYPE '8' /* socket */
64 #define EXTTYPE 'x' /* extended header */
65 #define GLBTYPE 'g' /* global extended header */
66 #define LLNKTYPE 'K' /* long link path */
67 #define LREGTYPE 'L' /* long file path */
68 #define VERTYPE 'V' /* version */
71 * bits used in mode field
74 #define TSUID 04000 /* set uid on exec */
75 #define TSGID 02000 /* set gid on exec */
76 #define TSVTX 01000 /* sticky bit -- reserved */
82 #define TUREAD 00400 /* read by owner */
83 #define TUWRITE 00200 /* write by owner */
84 #define TUEXEC 00100 /* execute by owner */
85 #define TGREAD 00040 /* read by group */
86 #define TGWRITE 00020 /* execute by group */
87 #define TGEXEC 00010 /* write by group */
88 #define TOREAD 00004 /* read by other */
89 #define TOWRITE 00002 /* write by other */
90 #define TOEXEC 00001 /* execute by other */
100 char chksum
[TCKSLEN
];
102 char linkname
[NAMSIZ
];
104 char version
[TVERSLEN
];
107 char devmajor
[TDEVLEN
];
108 char devminor
[TDEVLEN
];