stevel@tonic-gate | 7c478bd | 2005-06-14 00:00:00 -0700 | [diff] [blame] | 1 | /* |
| 2 | * CDDL HEADER START |
| 3 | * |
| 4 | * The contents of this file are subject to the terms of the |
jpk | 45916cd | 2006-03-24 12:29:20 -0800 | [diff] [blame] | 5 | * Common Development and Distribution License (the "License"). |
| 6 | * You may not use this file except in compliance with the License. |
stevel@tonic-gate | 7c478bd | 2005-06-14 00:00:00 -0700 | [diff] [blame] | 7 | * |
| 8 | * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 9 | * or http://www.opensolaris.org/os/licensing. |
| 10 | * See the License for the specific language governing permissions |
| 11 | * and limitations under the License. |
| 12 | * |
| 13 | * When distributing Covered Code, include this CDDL HEADER in each |
| 14 | * file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 15 | * If applicable, add the following below this CDDL HEADER, with the |
| 16 | * fields enclosed by brackets "[]" replaced with your own identifying |
| 17 | * information: Portions Copyright [yyyy] [name of copyright owner] |
| 18 | * |
| 19 | * CDDL HEADER END |
| 20 | */ |
jpk | 45916cd | 2006-03-24 12:29:20 -0800 | [diff] [blame] | 21 | /* |
| 22 | * Copyright 2006 Sun Microsystems, Inc. All rights reserved. |
| 23 | * Use is subject to license terms. |
| 24 | */ |
stevel@tonic-gate | 7c478bd | 2005-06-14 00:00:00 -0700 | [diff] [blame] | 25 | /* Copyright (c) 1988 AT&T */ |
Marcel Telka | b4203d7 | 2017-06-14 08:51:35 +0200 | [diff] [blame] | 26 | /* All Rights Reserved */ |
stevel@tonic-gate | 7c478bd | 2005-06-14 00:00:00 -0700 | [diff] [blame] | 27 | |
stevel@tonic-gate | 7c478bd | 2005-06-14 00:00:00 -0700 | [diff] [blame] | 28 | #ifndef _TAR_H |
| 29 | #define _TAR_H |
| 30 | |
stevel@tonic-gate | 7c478bd | 2005-06-14 00:00:00 -0700 | [diff] [blame] | 31 | #ifdef __cplusplus |
| 32 | extern "C" { |
| 33 | #endif |
| 34 | |
aj | 4d7b462 | 2006-04-28 15:41:51 -0700 | [diff] [blame] | 35 | #include <sys/feature_tests.h> |
| 36 | |
stevel@tonic-gate | 7c478bd | 2005-06-14 00:00:00 -0700 | [diff] [blame] | 37 | #define TMAGIC "ustar" |
| 38 | #define TMAGLEN 6 |
| 39 | #define TVERSION "00" |
| 40 | #define TVERSLEN 2 |
| 41 | |
| 42 | /* |
| 43 | * Typeflag field definitions. |
| 44 | */ |
| 45 | |
| 46 | #define REGTYPE '0' |
| 47 | #define AREGTYPE '\0' |
| 48 | #define LNKTYPE '1' |
| 49 | #define SYMTYPE '2' |
| 50 | #define CHRTYPE '3' |
| 51 | #define BLKTYPE '4' |
| 52 | #define DIRTYPE '5' |
| 53 | #define FIFOTYPE '6' |
| 54 | #define CONTTYPE '7' |
| 55 | |
| 56 | /* |
| 57 | * Mode fild bit definitions. |
| 58 | */ |
| 59 | |
| 60 | #define TSUID 04000 |
| 61 | #define TSGID 02000 |
| 62 | #define TSVTX 01000 |
| 63 | #define TUREAD 00400 |
| 64 | #define TUWRITE 00200 |
| 65 | #define TUEXEC 00100 |
| 66 | #define TGREAD 00040 |
| 67 | #define TGWRITE 00020 |
| 68 | #define TGEXEC 00010 |
| 69 | #define TOREAD 00004 |
| 70 | #define TOWRITE 00002 |
| 71 | #define TOEXEC 00001 |
| 72 | |
aj | 4d7b462 | 2006-04-28 15:41:51 -0700 | [diff] [blame] | 73 | #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) |
jpk | 45916cd | 2006-03-24 12:29:20 -0800 | [diff] [blame] | 74 | /* |
| 75 | * Types used in ancillary files |
| 76 | */ |
| 77 | #define ACL_HDR 'A' /* Access Control List */ |
| 78 | #define LBL_TYPE 'L' /* Trusted Extensions file label */ |
| 79 | #define DIR_TYPE 'D' /* Trusted Extensions directory label */ |
| 80 | /* |
| 81 | * Attribute types used in Trusted Solaris ancillary files |
| 82 | * that are interpreted for backward compatibility |
| 83 | */ |
| 84 | #define SLD_TYPE 'S' /* single-level directory component */ |
| 85 | #define PATH_TYPE 'P' /* Path component */ |
| 86 | #define MLD_TYPE 'M' /* multi-level directory component */ |
| 87 | #define FILE_TYPE 'F' /* Have to handle files differently */ |
| 88 | #define APRIV_TYPE 'P' /* allowed privileges data type in file */ |
| 89 | #define FPRIV_TYPE 'p' /* forced privileges data type in file */ |
| 90 | #define COMP_TYPE 'C' /* path components, use for MLD */ |
| 91 | #define ATTR_FLAG_TYPE 'F' /* file attribute flag bytes data type */ |
| 92 | #define LK_COMP_TYPE 'K' /* link data path component */ |
aj | 4d7b462 | 2006-04-28 15:41:51 -0700 | [diff] [blame] | 93 | #endif |
| 94 | |
stevel@tonic-gate | 7c478bd | 2005-06-14 00:00:00 -0700 | [diff] [blame] | 95 | #ifdef __cplusplus |
| 96 | } |
| 97 | #endif |
| 98 | |
| 99 | #endif /* _TAR_H */ |