/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_FS_UDF_VOLUME_H
#define _SYS_FS_UDF_VOLUME_H
#include <sys/isa_defs.h>
#ifdef __cplusplus
extern "C" {
#endif
/* fid_idlen include compression id */
/*
* #define ID_LEN(fid) \
* (((SWAP_16((fid)->fid_iulen) + (fid)->fid_idlen - 2) + 3) & ~3)
*/
#if defined(_BIG_ENDIAN)
(((a) & 0xff00) << 8) | \
(((a) & 0xff0000) >> 8) | \
(((a) & 0xff000000) >> 24))
(((a) & 0xff00ULL) << 40) | \
(((a) & 0xff0000ULL) << 24) | \
(((a) & 0xff000000ULL) << 8) | \
(((a) & 0xff00000000ULL) >> 8) | \
(((a) & 0xff0000000000ULL) >> 24) | \
(((a) & 0xff000000000000ULL) >> 40) | \
(((a) & 0xff00000000000000ULL) >> 56))
#else
#define SWAP_16(a) (a)
#define SWAP_32(a) (a)
#define SWAP_64(a) (a)
#endif /* _BIG_ENDIAN */
/* Basic data structures */
typedef char dstring_t;
/*
* recorded at the start of the descriptor
* used to distinguish between different
* descriptors
*/
struct tag {
};
/*
* descriptor tag id values
*/
/*
* Character set's allowed in descriptor fields
* shall be specified
*/
struct charspec {
};
/*
* Entity Identification
*/
struct regid {
};
struct lb_addr {
/* uint32_t lba_number; 00 Logical Block Number */
/* uint8_t lba_prn[2]; 04 Partition Reference Number */
};
/*
* Extend Descriptor
*/
struct extent_ad {
};
/*
* Short Allocation Descriptor
*/
struct short_ad {
};
/*
* Long Allocation Descriptor
*/
struct long_ad {
/* lb_addr_t lad_ext_loc; 04 Extent Location */
};
/*
* Format to record date and time
* If zero date & time is not specified
*/
struct tstamp {
};
/*
* ts_tzone
*/
/*
* Format of the ICB tag which specifies
* most of the infomation of the file
*/
struct icb_tag {
/* lb_addr_t itag_lb_addr; 0C parent ICB Location */
};
/*
* Different strategy types for the file
* For DVD_ROM we use onlt type4
*/
/*
* File types
*/
/*
* Flags
*/
/* Volume recognition descriptors */
/*
* Primary volume descriptor identifis the
* volume and certain attributes of the volume
*/
struct pri_vol_desc {
};
/*
* Anchor Volume Descriptor Pointer specifies
* the extent of Main & Reserve volume descriptor
*/
struct anch_vol_desc_ptr {
};
/*
* Volume Descriptor Pointer
*/
struct vol_desc_ptr {
};
/*
* Implementation Use Volume Descriptor
* This is taken from udf1.02/1.50 documents
* the fields after iuvd_ii are defined only
* for the udf domain
*/
struct iuvd_desc {
};
/*
* Partition Descriptor
* specifies the size and location of the partition
*/
struct part_desc {
};
/*
* pd_acc_type
*/
/*
* Partition Header Descriptor
* Overloads pd_pc_use
*/
struct phdr_desc {
};
/*
* Logical Volume Descriptor
*/
struct log_vol_desc {
};
/*
* Unallocated Space Descriptor
* Contains information about the space
* that does not belong to any of the
* partition
*/
struct unall_spc_desc {
};
/*
* Terminating Descriptor
* this will be the last in a Volume Descriptor Sequence
*/
struct term_desc {
};
/*
* Logical Volume Header Descriptor
* This will be overlaid on lvid_lvcu
* and will contain the maximum value of
* unique id on the media
*/
struct log_vol_hdr_desc {
};
/*
* Logical Volume Integrity Sequence
* This will contain the integrity of the
* file system
*/
struct log_vol_int_desc {
/* uint8_t lvid_lvcu[32]; */
/* Size Table */
/* Implementation Use */
};
/*
* Logical Volume integrity Implementation Use
* This is defined in udf spec
*/
struct lvid_iu {
};
/*
* File Set Descriptor
* This will point to the root directory.
*/
struct file_set_desc {
};
/*
* File Identifier Descriptor
* Directory entries
*/
struct file_id {
};
/*
* Allocation Extent Descriptor
*/
struct alloc_ext_desc {
};
/*
* Indirect Entry
* used to specify the address of another ICB
*/
struct indirect_entry {
};
/*
* Terminal Entry
*/
struct term_entry {
};
/*
* File entry describes the
* file attributes and location it is recorded on the media
*/
struct file_entry {
};
/*
* Extended Attribute Header
*/
struct ext_attr_hdr {
};
/*
* Unallocated Space Entry
*/
struct unall_space_ent {
};
/*
* Space Bitmap Descriptor
*/
struct space_bmap_desc {
};
/*
* Partition Integrity entry
*/
struct part_int_desc {
};
struct attr_hdr {
};
/*
* We will support and use the
* following Extended Attributes
* we will ignore others while reading
* and will preserve then when updating
* the EAR's
* In all the EA's we allocate the last member
* as 4 bytes. This is a sort of hack
* since the structure has to be
* properly alined to 4 bytes.
*/
struct dev_spec_ear {
};
struct ftimes_ear {
};
/* ft_exit */
struct iu_ea {
};
/*
* CGMS & FREE_SPACE will be
* over laid on iu_iu field
*/
struct copy_mgt_info {
};
struct FREE_SPACE {
};
struct nsr_desc {
};
/*
* Partition Map
*/
struct pmap_hdr {
};
struct pmap_typ1 {
};
/*
* Only two types of type2 maps
* are supported they are
* *UDF Virtual Partition
* *UDF Sparable Partition
* For vpm fields till map2_pn
* are valid and the entire structure is
* valid for spm
*/
struct pmap_typ2 {
};
struct stbl_entry {
};
struct stbl {
};
struct path_comp {
};
#ifdef __cplusplus
}
#endif
#endif /* _SYS_FS_UDF_VOLUME_H */