tar.h revision 1539
1139749Simp/*-
253553Stanimura * Copyright (c) 1994
353553Stanimura *	The Regents of the University of California.  All rights reserved.
453553Stanimura *
553553Stanimura * This code is derived from software contributed to Berkeley by
653553Stanimura * Chuck Karish of Mindcraft, Inc.
753553Stanimura *
853553Stanimura * Redistribution and use in source and binary forms, with or without
953553Stanimura * modification, are permitted provided that the following conditions
1053553Stanimura * are met:
1153553Stanimura * 1. Redistributions of source code must retain the above copyright
1253553Stanimura *    notice, this list of conditions and the following disclaimer.
1353553Stanimura * 2. Redistributions in binary form must reproduce the above copyright
1453553Stanimura *    notice, this list of conditions and the following disclaimer in the
1553553Stanimura *    documentation and/or other materials provided with the distribution.
1653553Stanimura * 3. All advertising materials mentioning features or use of this software
1753553Stanimura *    must display the following acknowledgement:
1853553Stanimura *	This product includes software developed by the University of
1953553Stanimura *	California, Berkeley and its contributors.
2053553Stanimura * 4. Neither the name of the University nor the names of its contributors
2153553Stanimura *    may be used to endorse or promote products derived from this software
2253553Stanimura *    without specific prior written permission.
2353553Stanimura *
2453553Stanimura * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2553553Stanimura * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2653553Stanimura * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2753553Stanimura * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2853553Stanimura * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2953553Stanimura * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3053553Stanimura * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3153553Stanimura * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3253553Stanimura * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3353553Stanimura * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3453553Stanimura * SUCH DAMAGE.
3553553Stanimura *
3653553Stanimura *	@(#)tar.h	8.2 (Berkeley) 1/4/94
37193640Sariff */
38193640Sariff
39193640Sariff#ifndef _TAR_H
40193640Sariff#define _TAR_H
41193640Sariff
4253553Stanimura#define	TMAGIC		"ustar"	/* ustar and a null */
4353553Stanimura#define	TMAGLEN		6
4453553Stanimura#define	TVERSION	"00"	/* 00 and no null */
4553553Stanimura#define	TVERSLEN	2
4653553Stanimura
4753553Stanimura/* Values used in typeflag field */
4853553Stanimura#define	REGTYPE		'0'	/* Regular file */
4982180Scg#define	AREGTYPE	'\0'	/* Regular file */
5082180Scg#define	LNKTYPE		'1'	/* Link */
5153682Stanimura#define	SYMTYPE		'2'	/* Reserved */
5253682Stanimura#define	CHRTYPE		'3'	/* Character special */
5353682Stanimura#define	BLKTYPE		'4'	/* Block special */
5453682Stanimura#define	DIRTYPE		'5'	/* Directory */
5553553Stanimura#define	FIFOTYPE	'6'	/* FIFO special */
5662947Stanimura#define	CONTTYPE	'7'	/* Reserved */
5762947Stanimura
5862947Stanimura/* Bits used in the mode field - values in octal */
5962947Stanimura#define	TSUID		04000	/* Set UID on execution */
6062947Stanimura#define	TSGID		02000	/* Set GID on execution */
6162947Stanimura#define	TSVTX		01000	/* Reserved */
6262947Stanimura				/* File permissions */
6353553Stanimura#define	TUREAD		00400	/* Read by owner */
6453553Stanimura#define	TUWRITE		00200	/* Write by owner */
6553553Stanimura#define	TUEXEC		00100	/* Execute/Search by owner */
6653553Stanimura#define	TGREAD		00040	/* Read by group */
6753553Stanimura#define	TGWRITE		00020	/* Write by group */
6853553Stanimura#define	TGEXEC		00010	/* Execute/Search by group */
6953553Stanimura#define	TOREAD		00004	/* Read by other */
7053553Stanimura#define	TOWRITE		00002	/* Write by other */
7153553Stanimura#define	TOEXEC		00001	/* Execute/Search by other */
7253553Stanimura
7353553Stanimura#endif
7453553Stanimura