xref: /original-bsd/include/tar.h (revision 333da485)
1 /*-
2  * Copyright (c) 1994
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * This code is derived from software contributed to Berkeley by
6  * Chuck Karish of Mindcraft, Inc.
7  *
8  * %sccs.include.redist.c%
9  *
10  *	@(#)tar.h	8.2 (Berkeley) 01/04/94
11  */
12 
13 #ifndef _TAR_H
14 #define _TAR_H
15 
16 #define	TMAGIC		"ustar"	/* ustar and a null */
17 #define	TMAGLEN		6
18 #define	TVERSION	"00"	/* 00 and no null */
19 #define	TVERSLEN	2
20 
21 /* Values used in typeflag field */
22 #define	REGTYPE		'0'	/* Regular file */
23 #define	AREGTYPE	'\0'	/* Regular file */
24 #define	LNKTYPE		'1'	/* Link */
25 #define	SYMTYPE		'2'	/* Reserved */
26 #define	CHRTYPE		'3'	/* Character special */
27 #define	BLKTYPE		'4'	/* Block special */
28 #define	DIRTYPE		'5'	/* Directory */
29 #define	FIFOTYPE	'6'	/* FIFO special */
30 #define	CONTTYPE	'7'	/* Reserved */
31 
32 /* Bits used in the mode field - values in octal */
33 #define	TSUID		04000	/* Set UID on execution */
34 #define	TSGID		02000	/* Set GID on execution */
35 #define	TSVTX		01000	/* Reserved */
36 				/* File permissions */
37 #define	TUREAD		00400	/* Read by owner */
38 #define	TUWRITE		00200	/* Write by owner */
39 #define	TUEXEC		00100	/* Execute/Search by owner */
40 #define	TGREAD		00040	/* Read by group */
41 #define	TGWRITE		00020	/* Write by group */
42 #define	TGEXEC		00010	/* Execute/Search by group */
43 #define	TOREAD		00004	/* Read by other */
44 #define	TOWRITE		00002	/* Write by other */
45 #define	TOEXEC		00001	/* Execute/Search by other */
46 
47 #endif
48