xref: /openbsd/include/tar.h (revision d874cce4)
1*d874cce4Sray /*	$OpenBSD: tar.h,v 1.3 2008/06/26 05:42:04 ray Exp $	*/
22d787d22Sniklas /*	$NetBSD: tar.h,v 1.1 1996/02/05 22:34:13 jtc Exp $	*/
32d787d22Sniklas 
42d787d22Sniklas /*-
52d787d22Sniklas  * Copyright (c) 1996 The NetBSD Foundation, Inc.
62d787d22Sniklas  * All rights reserved.
72d787d22Sniklas  *
82d787d22Sniklas  * This code is derived from software contributed to The NetBSD Foundation
92d787d22Sniklas  * by J.T. Conklin.
102d787d22Sniklas  *
112d787d22Sniklas  * Redistribution and use in source and binary forms, with or without
122d787d22Sniklas  * modification, are permitted provided that the following conditions
132d787d22Sniklas  * are met:
142d787d22Sniklas  * 1. Redistributions of source code must retain the above copyright
152d787d22Sniklas  *    notice, this list of conditions and the following disclaimer.
162d787d22Sniklas  * 2. Redistributions in binary form must reproduce the above copyright
172d787d22Sniklas  *    notice, this list of conditions and the following disclaimer in the
182d787d22Sniklas  *    documentation and/or other materials provided with the distribution.
192d787d22Sniklas  *
202d787d22Sniklas  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
212d787d22Sniklas  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
222d787d22Sniklas  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
232d787d22Sniklas  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
242d787d22Sniklas  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
252d787d22Sniklas  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
262d787d22Sniklas  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
272d787d22Sniklas  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
282d787d22Sniklas  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
292d787d22Sniklas  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
302d787d22Sniklas  * POSSIBILITY OF SUCH DAMAGE.
312d787d22Sniklas  */
322d787d22Sniklas 
332d787d22Sniklas #ifndef _TAR_H_
342d787d22Sniklas #define _TAR_H_
352d787d22Sniklas 
362d787d22Sniklas #define TMAGIC		"ustar"
372d787d22Sniklas #define TMAGLEN		6
382d787d22Sniklas #define TVERSION	"00"
392d787d22Sniklas #define TVERSLEN	2
402d787d22Sniklas 
412d787d22Sniklas /* Typeflag field definitions */
422d787d22Sniklas #define REGTYPE		'0'
432d787d22Sniklas #define AREGTYPE	'\0'
442d787d22Sniklas #define LNKTYPE		'1'
452d787d22Sniklas #define SYMTYPE		'2'
462d787d22Sniklas #define CHRTYPE		'3'
472d787d22Sniklas #define BLKTYPE		'4'
482d787d22Sniklas #define DIRTYPE		'5'
492d787d22Sniklas #define FIFOTYPE	'6'
502d787d22Sniklas #define CONTTYPE	'7'
512d787d22Sniklas 
522d787d22Sniklas /* Mode field bit definitions */
532d787d22Sniklas #define TSUID		04000
542d787d22Sniklas #define TSGID		02000
552d787d22Sniklas #define TSVTX		01000
562d787d22Sniklas #define TUREAD		00400
572d787d22Sniklas #define TUWRITE		00200
582d787d22Sniklas #define TUEXEC		00100
592d787d22Sniklas #define TGREAD		00040
602d787d22Sniklas #define TGWRITE		00020
612d787d22Sniklas #define TGEXEC		00010
622d787d22Sniklas #define TOREAD		00004
632d787d22Sniklas #define TOWRITE		00002
642d787d22Sniklas #define TOEXEC		00001
652d787d22Sniklas 
662d787d22Sniklas #endif /* _TAR_H_ */
67