17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*45916cd2Sjpk * Common Development and Distribution License (the "License"). 6*45916cd2Sjpk * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 21*45916cd2Sjpk /* 22*45916cd2Sjpk * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 23*45916cd2Sjpk * Use is subject to license terms. 24*45916cd2Sjpk */ 257c478bd9Sstevel@tonic-gate /* Copyright (c) 1988 AT&T */ 267c478bd9Sstevel@tonic-gate /* All Rights Reserved */ 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gate #ifndef _TAR_H 297c478bd9Sstevel@tonic-gate #define _TAR_H 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */ 327c478bd9Sstevel@tonic-gate 337c478bd9Sstevel@tonic-gate #ifdef __cplusplus 347c478bd9Sstevel@tonic-gate extern "C" { 357c478bd9Sstevel@tonic-gate #endif 367c478bd9Sstevel@tonic-gate 377c478bd9Sstevel@tonic-gate #define TMAGIC "ustar" 387c478bd9Sstevel@tonic-gate #define TMAGLEN 6 397c478bd9Sstevel@tonic-gate #define TVERSION "00" 407c478bd9Sstevel@tonic-gate #define TVERSLEN 2 417c478bd9Sstevel@tonic-gate 427c478bd9Sstevel@tonic-gate /* 437c478bd9Sstevel@tonic-gate * Typeflag field definitions. 447c478bd9Sstevel@tonic-gate */ 457c478bd9Sstevel@tonic-gate 467c478bd9Sstevel@tonic-gate #define REGTYPE '0' 477c478bd9Sstevel@tonic-gate #define AREGTYPE '\0' 487c478bd9Sstevel@tonic-gate #define LNKTYPE '1' 497c478bd9Sstevel@tonic-gate #define SYMTYPE '2' 507c478bd9Sstevel@tonic-gate #define CHRTYPE '3' 517c478bd9Sstevel@tonic-gate #define BLKTYPE '4' 527c478bd9Sstevel@tonic-gate #define DIRTYPE '5' 537c478bd9Sstevel@tonic-gate #define FIFOTYPE '6' 547c478bd9Sstevel@tonic-gate #define CONTTYPE '7' 557c478bd9Sstevel@tonic-gate 567c478bd9Sstevel@tonic-gate /* 577c478bd9Sstevel@tonic-gate * Mode fild bit definitions. 587c478bd9Sstevel@tonic-gate */ 597c478bd9Sstevel@tonic-gate 607c478bd9Sstevel@tonic-gate #define TSUID 04000 617c478bd9Sstevel@tonic-gate #define TSGID 02000 627c478bd9Sstevel@tonic-gate #define TSVTX 01000 637c478bd9Sstevel@tonic-gate #define TUREAD 00400 647c478bd9Sstevel@tonic-gate #define TUWRITE 00200 657c478bd9Sstevel@tonic-gate #define TUEXEC 00100 667c478bd9Sstevel@tonic-gate #define TGREAD 00040 677c478bd9Sstevel@tonic-gate #define TGWRITE 00020 687c478bd9Sstevel@tonic-gate #define TGEXEC 00010 697c478bd9Sstevel@tonic-gate #define TOREAD 00004 707c478bd9Sstevel@tonic-gate #define TOWRITE 00002 717c478bd9Sstevel@tonic-gate #define TOEXEC 00001 727c478bd9Sstevel@tonic-gate 73*45916cd2Sjpk /* 74*45916cd2Sjpk * Types used in ancillary files 75*45916cd2Sjpk */ 76*45916cd2Sjpk #define ACL_HDR 'A' /* Access Control List */ 77*45916cd2Sjpk #define LBL_TYPE 'L' /* Trusted Extensions file label */ 78*45916cd2Sjpk #define DIR_TYPE 'D' /* Trusted Extensions directory label */ 79*45916cd2Sjpk /* 80*45916cd2Sjpk * Attribute types used in Trusted Solaris ancillary files 81*45916cd2Sjpk * that are interpreted for backward compatibility 82*45916cd2Sjpk */ 83*45916cd2Sjpk #define SLD_TYPE 'S' /* single-level directory component */ 84*45916cd2Sjpk #define PATH_TYPE 'P' /* Path component */ 85*45916cd2Sjpk #define MLD_TYPE 'M' /* multi-level directory component */ 86*45916cd2Sjpk #define FILE_TYPE 'F' /* Have to handle files differently */ 87*45916cd2Sjpk #define APRIV_TYPE 'P' /* allowed privileges data type in file */ 88*45916cd2Sjpk #define FPRIV_TYPE 'p' /* forced privileges data type in file */ 89*45916cd2Sjpk #define COMP_TYPE 'C' /* path components, use for MLD */ 90*45916cd2Sjpk #define ATTR_FLAG_TYPE 'F' /* file attribute flag bytes data type */ 91*45916cd2Sjpk #define LK_COMP_TYPE 'K' /* link data path component */ 927c478bd9Sstevel@tonic-gate #ifdef __cplusplus 937c478bd9Sstevel@tonic-gate } 947c478bd9Sstevel@tonic-gate #endif 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gate #endif /* _TAR_H */ 97