tar.h revision 1539
11539Srgrimes/*-
21539Srgrimes * Copyright (c) 1994
31539Srgrimes *	The Regents of the University of California.  All rights reserved.
41539Srgrimes *
51539Srgrimes * This code is derived from software contributed to Berkeley by
61539Srgrimes * Chuck Karish of Mindcraft, Inc.
71539Srgrimes *
81539Srgrimes * Redistribution and use in source and binary forms, with or without
91539Srgrimes * modification, are permitted provided that the following conditions
101539Srgrimes * are met:
111539Srgrimes * 1. Redistributions of source code must retain the above copyright
121539Srgrimes *    notice, this list of conditions and the following disclaimer.
131539Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
141539Srgrimes *    notice, this list of conditions and the following disclaimer in the
151539Srgrimes *    documentation and/or other materials provided with the distribution.
161539Srgrimes * 3. All advertising materials mentioning features or use of this software
171539Srgrimes *    must display the following acknowledgement:
181539Srgrimes *	This product includes software developed by the University of
191539Srgrimes *	California, Berkeley and its contributors.
201539Srgrimes * 4. Neither the name of the University nor the names of its contributors
211539Srgrimes *    may be used to endorse or promote products derived from this software
221539Srgrimes *    without specific prior written permission.
231539Srgrimes *
241539Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
251539Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
261539Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
271539Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
281539Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
291539Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
301539Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
311539Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
321539Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
331539Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
341539Srgrimes * SUCH DAMAGE.
351539Srgrimes *
361539Srgrimes *	@(#)tar.h	8.2 (Berkeley) 1/4/94
371539Srgrimes */
381539Srgrimes
391539Srgrimes#ifndef _TAR_H
401539Srgrimes#define _TAR_H
411539Srgrimes
421539Srgrimes#define	TMAGIC		"ustar"	/* ustar and a null */
431539Srgrimes#define	TMAGLEN		6
441539Srgrimes#define	TVERSION	"00"	/* 00 and no null */
451539Srgrimes#define	TVERSLEN	2
461539Srgrimes
471539Srgrimes/* Values used in typeflag field */
481539Srgrimes#define	REGTYPE		'0'	/* Regular file */
491539Srgrimes#define	AREGTYPE	'\0'	/* Regular file */
501539Srgrimes#define	LNKTYPE		'1'	/* Link */
511539Srgrimes#define	SYMTYPE		'2'	/* Reserved */
521539Srgrimes#define	CHRTYPE		'3'	/* Character special */
531539Srgrimes#define	BLKTYPE		'4'	/* Block special */
541539Srgrimes#define	DIRTYPE		'5'	/* Directory */
551539Srgrimes#define	FIFOTYPE	'6'	/* FIFO special */
561539Srgrimes#define	CONTTYPE	'7'	/* Reserved */
571539Srgrimes
581539Srgrimes/* Bits used in the mode field - values in octal */
591539Srgrimes#define	TSUID		04000	/* Set UID on execution */
601539Srgrimes#define	TSGID		02000	/* Set GID on execution */
611539Srgrimes#define	TSVTX		01000	/* Reserved */
621539Srgrimes				/* File permissions */
631539Srgrimes#define	TUREAD		00400	/* Read by owner */
641539Srgrimes#define	TUWRITE		00200	/* Write by owner */
651539Srgrimes#define	TUEXEC		00100	/* Execute/Search by owner */
661539Srgrimes#define	TGREAD		00040	/* Read by group */
671539Srgrimes#define	TGWRITE		00020	/* Write by group */
681539Srgrimes#define	TGEXEC		00010	/* Execute/Search by group */
691539Srgrimes#define	TOREAD		00004	/* Read by other */
701539Srgrimes#define	TOWRITE		00002	/* Write by other */
711539Srgrimes#define	TOEXEC		00001	/* Execute/Search by other */
721539Srgrimes
731539Srgrimes#endif
74