ud_lib.h revision 0e42dee69ed771bf604dd1789fca9d77b5bbe302
/*
* 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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _UD_LIB_H
#define _UD_LIB_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#define UD_VOL_REC_BSZ 2048
#define UD_ECMA_VER2 0x00000002
#define UD_ECMA_VER3 0x00000003
#define UD_ECMA_UNKN 0xFFFFFFFF
#define MAX_PARTS 10
#define MAX_MAPS 10
#define MAX_SPM 4
struct vds {
};
/*
* All addresses are the lbsize block numbers
* offseted into the partition
*/
struct udf {
#define INVALID_UDFS 0x0000
#define VALID_UDFS 0x0001
#define VALID_MVDS 0x0002
#define VALID_RVDS 0x0004
/*
* location of the latest lvid
*/
/*
* Location of the most usable fsd
* on WORM we have to follow till the
* end of the chain
* FSD location is absolute disk location
* after translating using maps and partitions
*/
};
struct ud_part {
#define UDP_BITMAPS 0x00
#define UDP_SPACETBLS 0x01
/* From part desc */
/* From lvid */
};
struct ud_map {
#define UDM_MAP_NORM 0x00
#define UDM_MAP_VPM 0x01
#define UDM_MAP_SPM 0x02
};
#define REG_DOM_ID 0x1
#define REG_UDF_ID 0x2
#define REG_UDF_II 0x4
#define EI_FLG_DIRTY 0x01
#define EI_FLG_PROT 0x02
struct dom_id_suffix {
};
#define PROTECT_SOFT_WRITE 0x01
#define PROTECT_HARD_WRITE 0x02
struct udf_id_suffix {
};
struct impl_id_suffix {
};
#define OS_CLASS_UNDEFINED 0x00
#define OS_CLASS_DOS_WIN3x 0x01
#define OS_CLASS_OS_2 0x02
#define OS_CLASS_MAC_OS_7 0x02
#define OS_CLASS_UNIX 0x04
#define OS_CLASS_WIN_95 0x05
#define OS_CLASS_WIN_NT 0x06
#define OS_IDENTIFIER_GENERIC 0x00
#define OS_IDENTIFIER_IBM_AIX 0x01
#define OS_IDENTIFIER_SOLARIS 0x02
#define OS_IDENTIFIER_HP_UX 0x03
#define OS_IDENTIFIER_SG_IRIX 0x04
#define OS_IDENTIFIER_LINUX 0x05
#define OS_IDENTIFIER_MK_LINUX 0x06
#define OS_IDENTIFIER_FREE_BSD 0x07
struct ud_handle {
int fd;
};
typedef struct ud_handle *ud_handle_t;
int ud_init(int, ud_handle_t *);
void ud_fini(ud_handle_t);
void ud_close_dev(ud_handle_t);
#ifdef __cplusplus
}
#endif
#endif /* _UD_LIB_H */