xref: /netbsd-src/include/tar.h (revision 76dfffe33547c37f8bdd446e3e4ab0f3c16cea4b)
1 /*	$NetBSD: tar.h,v 1.1 1996/02/05 22:34:13 jtc Exp $	*/
2 
3 /*-
4  * Copyright (c) 1996 The NetBSD Foundation, Inc.
5  * All rights reserved.
6  *
7  * This code is derived from software contributed to The NetBSD Foundation
8  * by J.T. Conklin.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  * 1. Redistributions of source code must retain the above copyright
14  *    notice, this list of conditions and the following disclaimer.
15  * 2. Redistributions in binary form must reproduce the above copyright
16  *    notice, this list of conditions and the following disclaimer in the
17  *    documentation and/or other materials provided with the distribution.
18  * 3. All advertising materials mentioning features or use of this software
19  *    must display the following acknowledgement:
20  *        This product includes software developed by the NetBSD
21  *	  Foundation, Inc. and its contributors.
22  * 4. Neither the name of The NetBSD Foundation nor the names of its
23  *    contributors may be used to endorse or promote products derived
24  *    from this software without specific prior written permission.
25  *
26  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
30  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36  * POSSIBILITY OF SUCH DAMAGE.
37  */
38 
39 #ifndef _TAR_H_
40 #define _TAR_H_
41 
42 #define TMAGIC		"ustar"
43 #define TMAGLEN		6
44 #define TVERSION	"00"
45 #define TVERSLEN	2
46 
47 /* Typeflag field definitions */
48 #define REGTYPE		'0'
49 #define AREGTYPE	'\0'
50 #define LNKTYPE		'1'
51 #define SYMTYPE		'2'
52 #define CHRTYPE		'3'
53 #define BLKTYPE		'4'
54 #define DIRTYPE		'5'
55 #define FIFOTYPE	'6'
56 #define CONTTYPE	'7'
57 
58 /* Mode field bit definitions */
59 #define TSUID		04000
60 #define TSGID		02000
61 #define TSVTX		01000
62 #define TUREAD		00400
63 #define TUWRITE		00200
64 #define TUEXEC		00100
65 #define TGREAD		00040
66 #define TGWRITE		00020
67 #define TGEXEC		00010
68 #define TOREAD		00004
69 #define TOWRITE		00002
70 #define TOEXEC		00001
71 
72 #endif /* _TAR_H_ */
73