/*1* Copyright (c) Ian F. Darwin 1986-1995.2* Software written by Ian F. Darwin and others;3* maintained 1995-present by Christos Zoulas and others.4*5* Redistribution and use in source and binary forms, with or without6* modification, are permitted provided that the following conditions7* are met:8* 1. Redistributions of source code must retain the above copyright9* notice immediately at the beginning of the file, without modification,10* this list of conditions, and the following disclaimer.11* 2. Redistributions in binary form must reproduce the above copyright12* notice, this list of conditions and the following disclaimer in the13* documentation and/or other materials provided with the distribution.14*15* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND16* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE17* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE18* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR19* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL20* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS21* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)22* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT23* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY24* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF25* SUCH DAMAGE.26*/27/*28* Header file for file_public domain tar (tape archive) program.29*30* @(#)tar.h 1.20 86/10/29 Public Domain.31*32* Created 25 August 1985 by John Gilmore, ihnp4!hoptoad!gnu.33*34* $File: tar.h,v 1.16 2022/12/26 17:31:14 christos Exp $ # checkin only35*/3637/*38* Header block on tape.39*40* I'm going to use traditional DP naming conventions here.41* A "block" is a big chunk of stuff that we do I/O on.42* A "record" is a piece of info that we care about.43* Typically many "record"s fit into a "block".44*/45#define RECORDSIZE 51246#define NAMSIZ 10047#define TUNMLEN 3248#define TGNMLEN 324950union record {51unsigned char charptr[RECORDSIZE];52struct header {53char name[NAMSIZ];54char mode[8];55char uid[8];56char gid[8];57char size[12];58char mtime[12];59char chksum[8];60char linkflag;61char linkname[NAMSIZ];62char magic[8];63char uname[TUNMLEN];64char gname[TGNMLEN];65char devmajor[8];66char devminor[8];67} header;68};6970/* The magic field is filled with this if uname and gname are valid. */71#define TMAGIC "ustar" /* 5 chars and a null */72#define GNUTMAGIC "ustar " /* 7 chars and a null */737475