/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1988,1997-1998,2001 by Sun Microsystems, Inc.
* All rights reserved.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#ifndef _ARCHIVES_H
#define _ARCHIVES_H
#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.7 */
#include <tar.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Magic numbers */
/* Various header and field lengths */
/* cpio binary header definition */
struct hdr_cpio {
};
/* cpio ODC header format */
struct c_hdr {
};
/* -c and CRC header format */
struct Exp_cpio_hdr {
};
/* Tar header structure and format */
/* tar header definition */
union tblock {
struct tar_hdr {
} tbuf;
};
/* volcopy tape label format and structure */
struct volcopy_label {
int v_time,
};
/*
* Define archive formats for extended attributes.
*
* Extended attributes are stored in two pieces.
* 1. An attribute header which has information about
* what file the attribute is for and what the attribute
* is named.
* 2. The attribute record itself. Stored as a normal file type
* of entry.
* associated with them.
*
* The names of the header in the archive look like:
*
* The name of the attribute looks like:
*
* This is done so that an archiver that doesn't understand these formats
* can just dispose of the attribute records unless the user chooses to
* rename them via cpio -r or pax -i
*
* The format is composed of a fixed size header followed
* by a variable sized xattr_buf. If the attribute is a hard link
* to another attribute, then another xattr_buf section is included
* for the link.
*
* The xattr_buf is used to define the necessary "pathing" steps
* to get to the extended attribute. This is necessary to support
* a fully recursive attribute model where an attribute may itself
* have an attribute.
*
* The basic layout looks like this.
*
* --------------------------------
* | |
* | xattr_hdr |
* | |
* --------------------------------
* --------------------------------
* | |
* | xattr_buf |
* | |
* --------------------------------
* --------------------------------
* | |
* | (optional link info) |
* | |
* --------------------------------
* --------------------------------
* | |
* | attribute itself |
* | stored as normal tar |
* | or cpio data with |
* | special mode or |
* | typeflag |
* | |
* --------------------------------
*
*/
/*
* extended attribute fixed header
*
* h_version format version.
* h_size size of header + variable sized data sections.
* h_component_len Length of entire pathing section.
* h_link_component_len Length of link component section. Again same definition
* as h_component_len.
*/
struct xattr_hdr {
};
/*
* The name is encoded like this:
* filepathNULattrpathNUL[attrpathNULL]...
*/
struct xattr_buf {
};
/*
* Special values for tar archives
*/
/*
* typeflag for tar archives.
*/
/*
* Attribute hdr and attribute files have the following typeflag
*/
/*
* For cpio archives the header and attribute have
* _XATTR_CPIO_MODE ORED into the mode field in both
* character and binary versions of the archive format
*/
#ifdef __cplusplus
}
#endif
#endif /* _ARCHIVES_H */