1N/A
1N/A/* : : generated by proto : : */
1N/A/***********************************************************************
1N/A* *
1N/A* This software is part of the ast package *
1N/A* Copyright (c) 1985-2011 AT&T Intellectual Property *
1N/A* and is licensed under the *
1N/A* Common Public License, Version 1.0 *
1N/A* by AT&T Intellectual Property *
1N/A* *
1N/A* A copy of the License is available at *
1N/A* http://www.opensource.org/licenses/cpl1.0.txt *
1N/A* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
1N/A* *
1N/A* Information and Software Systems Research *
1N/A* AT&T Research *
1N/A* Florham Park NJ *
1N/A* *
1N/A* Glenn Fowler <gsf@research.att.com> *
1N/A* David Korn <dgk@research.att.com> *
1N/A* Phong Vo <kpv@research.att.com> *
1N/A* *
1N/A***********************************************************************/
1N/A
1N/A/*
1N/A * Standard Archive Format
1N/A * USTAR - Uniform Standard Tape ARchive
1N/A */
1N/A
1N/A#ifndef _TAR_H
1N/A#if !defined(__PROTO__)
1N/A#include <prototyped.h>
1N/A#endif
1N/A#if !defined(__LINKAGE__)
1N/A#define __LINKAGE__ /* 2004-08-11 transition */
1N/A#endif
1N/A
1N/A#define _TAR_H
1N/A
1N/A#define TBLOCK 512
1N/A#define NAMSIZ 100
1N/A#define PFXSIZ 155
1N/A
1N/A#define TMODLEN 8
1N/A#define TUIDLEN 8
1N/A#define TGIDLEN 8
1N/A#define TSIZLEN 12
1N/A#define TMTMLEN 12
1N/A#define TCKSLEN 8
1N/A
1N/A#define TMAGIC "ustar" /* ustar and a null */
1N/A#define TMAGLEN 6
1N/A#define TVERSION "00" /* 00 and no null */
1N/A#define TVERSLEN 2
1N/A#define TUNMLEN 32
1N/A#define TGNMLEN 32
1N/A#define TDEVLEN 8
1N/A
1N/A/*
1N/A * values used in typeflag field
1N/A */
1N/A
1N/A#define REGTYPE '0' /* regular file */
1N/A#define AREGTYPE 0 /* alternate REGTYPE */
1N/A#define LNKTYPE '1' /* hard link */
1N/A#define SYMTYPE '2' /* soft link */
1N/A#define CHRTYPE '3' /* character special */
1N/A#define BLKTYPE '4' /* block special */
1N/A#define DIRTYPE '5' /* directory */
1N/A#define FIFOTYPE '6' /* FIFO special */
1N/A#define CONTTYPE '7' /* reserved */
1N/A#define SOKTYPE '8' /* socket */
1N/A#define EXTTYPE 'x' /* extended header */
1N/A#define GLBTYPE 'g' /* global extended header */
1N/A#define LLNKTYPE 'K' /* long link path */
1N/A#define LREGTYPE 'L' /* long file path */
1N/A#define VERTYPE 'V' /* version */
1N/A
1N/A/*
1N/A * bits used in mode field
1N/A */
1N/A
1N/A#define TSUID 04000 /* set uid on exec */
1N/A#define TSGID 02000 /* set gid on exec */
1N/A#define TSVTX 01000 /* sticky bit -- reserved */
1N/A
1N/A/*
1N/A * file permissions
1N/A */
1N/A
1N/A#define TUREAD 00400 /* read by owner */
1N/A#define TUWRITE 00200 /* write by owner */
1N/A#define TUEXEC 00100 /* execute by owner */
1N/A#define TGREAD 00040 /* read by group */
1N/A#define TGWRITE 00020 /* execute by group */
1N/A#define TGEXEC 00010 /* write by group */
1N/A#define TOREAD 00004 /* read by other */
1N/A#define TOWRITE 00002 /* write by other */
1N/A#define TOEXEC 00001 /* execute by other */
1N/A
1N/Astruct header
1N/A{
1N/A char name[NAMSIZ];
1N/A char mode[TMODLEN];
1N/A char uid[TUIDLEN];
1N/A char gid[TGIDLEN];
1N/A char size[TSIZLEN];
1N/A char mtime[TMTMLEN];
1N/A char chksum[TCKSLEN];
1N/A char typeflag;
1N/A char linkname[NAMSIZ];
1N/A char magic[TMAGLEN];
1N/A char version[TVERSLEN];
1N/A char uname[TUNMLEN];
1N/A char gname[TGNMLEN];
1N/A char devmajor[TDEVLEN];
1N/A char devminor[TDEVLEN];
1N/A char prefix[PFXSIZ];
1N/A};
1N/A
1N/Aunion hblock
1N/A{
1N/A char dummy[TBLOCK];
1N/A struct header dbuf;
1N/A};
1N/A
1N/A#endif