tar.h revision 203964
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. 16203964Simp * 3. Neither the name of the University nor the names of its contributors 171539Srgrimes * may be used to endorse or promote products derived from this software 181539Srgrimes * without specific prior written permission. 191539Srgrimes * 201539Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 211539Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 221539Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 231539Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 241539Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 251539Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 261539Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 271539Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 281539Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 291539Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 301539Srgrimes * SUCH DAMAGE. 311539Srgrimes * 321539Srgrimes * @(#)tar.h 8.2 (Berkeley) 1/4/94 33203964Simp * 34203964Simp * $FreeBSD: head/include/tar.h 203964 2010-02-16 19:39:50Z imp $ 351539Srgrimes */ 361539Srgrimes 371539Srgrimes#ifndef _TAR_H 381539Srgrimes#define _TAR_H 391539Srgrimes 401539Srgrimes#define TMAGIC "ustar" /* ustar and a null */ 411539Srgrimes#define TMAGLEN 6 421539Srgrimes#define TVERSION "00" /* 00 and no null */ 431539Srgrimes#define TVERSLEN 2 441539Srgrimes 451539Srgrimes/* Values used in typeflag field */ 461539Srgrimes#define REGTYPE '0' /* Regular file */ 471539Srgrimes#define AREGTYPE '\0' /* Regular file */ 481539Srgrimes#define LNKTYPE '1' /* Link */ 491539Srgrimes#define SYMTYPE '2' /* Reserved */ 501539Srgrimes#define CHRTYPE '3' /* Character special */ 511539Srgrimes#define BLKTYPE '4' /* Block special */ 521539Srgrimes#define DIRTYPE '5' /* Directory */ 531539Srgrimes#define FIFOTYPE '6' /* FIFO special */ 541539Srgrimes#define CONTTYPE '7' /* Reserved */ 551539Srgrimes 561539Srgrimes/* Bits used in the mode field - values in octal */ 571539Srgrimes#define TSUID 04000 /* Set UID on execution */ 581539Srgrimes#define TSGID 02000 /* Set GID on execution */ 591539Srgrimes#define TSVTX 01000 /* Reserved */ 601539Srgrimes /* File permissions */ 611539Srgrimes#define TUREAD 00400 /* Read by owner */ 621539Srgrimes#define TUWRITE 00200 /* Write by owner */ 631539Srgrimes#define TUEXEC 00100 /* Execute/Search by owner */ 641539Srgrimes#define TGREAD 00040 /* Read by group */ 651539Srgrimes#define TGWRITE 00020 /* Write by group */ 661539Srgrimes#define TGEXEC 00010 /* Execute/Search by group */ 671539Srgrimes#define TOREAD 00004 /* Read by other */ 681539Srgrimes#define TOWRITE 00002 /* Write by other */ 691539Srgrimes#define TOEXEC 00001 /* Execute/Search by other */ 701539Srgrimes 711539Srgrimes#endif 72