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