xref: /onnv-gate/usr/src/head/tar.h (revision 1904:ee9cf333dd16)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
51676Sjpk  * Common Development and Distribution License (the "License").
61676Sjpk  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
211676Sjpk /*
221676Sjpk  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
231676Sjpk  * Use is subject to license terms.
241676Sjpk  */
250Sstevel@tonic-gate /*	Copyright (c) 1988 AT&T	*/
260Sstevel@tonic-gate /*	  All Rights Reserved  	*/
270Sstevel@tonic-gate 
280Sstevel@tonic-gate #ifndef _TAR_H
290Sstevel@tonic-gate #define	_TAR_H
300Sstevel@tonic-gate 
310Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.2	*/
320Sstevel@tonic-gate 
330Sstevel@tonic-gate #ifdef	__cplusplus
340Sstevel@tonic-gate extern "C" {
350Sstevel@tonic-gate #endif
360Sstevel@tonic-gate 
37*1904Saj #include <sys/feature_tests.h>
38*1904Saj 
390Sstevel@tonic-gate #define	TMAGIC		"ustar"
400Sstevel@tonic-gate #define	TMAGLEN		6
410Sstevel@tonic-gate #define	TVERSION	"00"
420Sstevel@tonic-gate #define	TVERSLEN	2
430Sstevel@tonic-gate 
440Sstevel@tonic-gate /*
450Sstevel@tonic-gate  * Typeflag field definitions.
460Sstevel@tonic-gate  */
470Sstevel@tonic-gate 
480Sstevel@tonic-gate #define	REGTYPE		'0'
490Sstevel@tonic-gate #define	AREGTYPE	'\0'
500Sstevel@tonic-gate #define	LNKTYPE		'1'
510Sstevel@tonic-gate #define	SYMTYPE		'2'
520Sstevel@tonic-gate #define	CHRTYPE		'3'
530Sstevel@tonic-gate #define	BLKTYPE		'4'
540Sstevel@tonic-gate #define	DIRTYPE		'5'
550Sstevel@tonic-gate #define	FIFOTYPE	'6'
560Sstevel@tonic-gate #define	CONTTYPE	'7'
570Sstevel@tonic-gate 
580Sstevel@tonic-gate /*
590Sstevel@tonic-gate  * Mode fild bit definitions.
600Sstevel@tonic-gate  */
610Sstevel@tonic-gate 
620Sstevel@tonic-gate #define	TSUID		04000
630Sstevel@tonic-gate #define	TSGID		02000
640Sstevel@tonic-gate #define	TSVTX		01000
650Sstevel@tonic-gate #define	TUREAD		00400
660Sstevel@tonic-gate #define	TUWRITE		00200
670Sstevel@tonic-gate #define	TUEXEC		00100
680Sstevel@tonic-gate #define	TGREAD		00040
690Sstevel@tonic-gate #define	TGWRITE		00020
700Sstevel@tonic-gate #define	TGEXEC		00010
710Sstevel@tonic-gate #define	TOREAD		00004
720Sstevel@tonic-gate #define	TOWRITE		00002
730Sstevel@tonic-gate #define	TOEXEC		00001
740Sstevel@tonic-gate 
75*1904Saj #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
761676Sjpk /*
771676Sjpk  *      Types used in ancillary files
781676Sjpk  */
791676Sjpk #define	ACL_HDR		'A'	/* Access Control List */
801676Sjpk #define	LBL_TYPE	'L'	/* Trusted Extensions file label */
811676Sjpk #define	DIR_TYPE	'D'	/* Trusted Extensions directory label */
821676Sjpk /*
831676Sjpk  * Attribute types used in Trusted Solaris ancillary files
841676Sjpk  * that are interpreted for backward compatibility
851676Sjpk  */
861676Sjpk #define	SLD_TYPE	'S'	/* single-level directory component */
871676Sjpk #define	PATH_TYPE	'P'	/* Path component */
881676Sjpk #define	MLD_TYPE	'M'	/* multi-level directory component */
891676Sjpk #define	FILE_TYPE	'F'	/* Have to handle files differently */
901676Sjpk #define	APRIV_TYPE	'P'	/* allowed privileges data type in file */
911676Sjpk #define	FPRIV_TYPE	'p'	/* forced privileges data type in file */
921676Sjpk #define	COMP_TYPE	'C'	/* path components, use for MLD */
931676Sjpk #define	ATTR_FLAG_TYPE	'F'	/* file attribute flag bytes data type */
941676Sjpk #define	LK_COMP_TYPE	'K'	/* link data path component */
95*1904Saj #endif
96*1904Saj 
970Sstevel@tonic-gate #ifdef	__cplusplus
980Sstevel@tonic-gate }
990Sstevel@tonic-gate #endif
1000Sstevel@tonic-gate 
1010Sstevel@tonic-gate #endif	/* _TAR_H */
102