1/* 2 * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. 3 * 4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 * 6 * This file contains Original Code and/or Modifications of Original Code 7 * as defined in and that are subject to the Apple Public Source License 8 * Version 2.0 (the 'License'). You may not use this file except in 9 * compliance with the License. The rights granted to you under the License 10 * may not be used to create, or enable the creation or redistribution of, 11 * unlawful or unlicensed copies of an Apple operating system, or to 12 * circumvent, violate, or enable the circumvention or violation of, any 13 * terms of an Apple operating system software license agreement. 14 * 15 * Please obtain a copy of the License at 16 * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 * 18 * The Original Code and all software distributed under the License are 19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 * Please see the License for the specific language governing rights and 24 * limitations under the License. 25 * 26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 */ 28/* $NetBSD: cd9660_rrip.h,v 1.6 1994/12/13 22:33:24 mycroft Exp $ */ 29 30/*- 31 * Copyright (c) 1993, 1994 32 * The Regents of the University of California. All rights reserved. 33 * 34 * This code is derived from software contributed to Berkeley 35 * by Pace Willisson (pace@blitz.com). The Rock Ridge Extension 36 * Support code is derived from software contributed to Berkeley 37 * by Atsushi Murai (amurai@spec.co.jp). 38 * 39 * Redistribution and use in source and binary forms, with or without 40 * modification, are permitted provided that the following conditions 41 * are met: 42 * 1. Redistributions of source code must retain the above copyright 43 * notice, this list of conditions and the following disclaimer. 44 * 2. Redistributions in binary form must reproduce the above copyright 45 * notice, this list of conditions and the following disclaimer in the 46 * documentation and/or other materials provided with the distribution. 47 * 3. All advertising materials mentioning features or use of this software 48 * must display the following acknowledgement: 49 * This product includes software developed by the University of 50 * California, Berkeley and its contributors. 51 * 4. Neither the name of the University nor the names of its contributors 52 * may be used to endorse or promote products derived from this software 53 * without specific prior written permission. 54 * 55 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 56 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 57 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 58 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 59 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 60 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 61 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 62 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 63 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 64 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 65 * SUCH DAMAGE. 66 * 67 * @(#)cd9660_rrip.h 8.2 (Berkeley) 12/5/94 68 */ 69#ifndef __ISOFS_CD9660_CD9660_RRIP_H__ 70#define __ISOFS_CD9660_CD9660_RRIP_H__ 71 72#include <sys/appleapiopts.h> 73 74#ifdef __APPLE_API_PRIVATE 75typedef struct { 76 char type [ISODCL ( 0, 1)]; 77 u_char length [ISODCL ( 2, 2)]; /* 711 */ 78 u_char version [ISODCL ( 3, 3)]; 79} ISO_SUSP_HEADER; 80 81typedef struct { 82 ISO_SUSP_HEADER h; 83 char mode [ISODCL ( 4, 11)]; /* 733 */ 84 char links [ISODCL ( 12, 19)]; /* 733 */ 85 char uid [ISODCL ( 20, 27)]; /* 733 */ 86 char gid [ISODCL ( 28, 35)]; /* 733 */ 87} ISO_RRIP_ATTR; 88 89typedef struct { 90 ISO_SUSP_HEADER h; 91 char dev_t_high [ISODCL ( 4, 11)]; /* 733 */ 92 char dev_t_low [ISODCL ( 12, 19)]; /* 733 */ 93} ISO_RRIP_DEVICE; 94 95#define ISO_SUSP_CFLAG_CONTINUE 0x01 96#define ISO_SUSP_CFLAG_CURRENT 0x02 97#define ISO_SUSP_CFLAG_PARENT 0x04 98#define ISO_SUSP_CFLAG_ROOT 0x08 99#define ISO_SUSP_CFLAG_VOLROOT 0x10 100#define ISO_SUSP_CFLAG_HOST 0x20 101 102typedef struct { 103 u_char cflag [ISODCL ( 1, 1)]; 104 u_char clen [ISODCL ( 2, 2)]; 105 u_char name [1]; /* XXX */ 106} ISO_RRIP_SLINK_COMPONENT; 107#define ISO_RRIP_SLSIZ 2 108 109typedef struct { 110 ISO_SUSP_HEADER h; 111 u_char flags [ISODCL ( 4, 4)]; 112 u_char component [ISODCL ( 5, 5)]; 113} ISO_RRIP_SLINK; 114 115typedef struct { 116 ISO_SUSP_HEADER h; 117 char flags [ISODCL ( 4, 4)]; 118} ISO_RRIP_ALTNAME; 119 120typedef struct { 121 ISO_SUSP_HEADER h; 122 char dir_loc [ISODCL ( 4, 11)]; /* 733 */ 123} ISO_RRIP_CLINK; 124 125typedef struct { 126 ISO_SUSP_HEADER h; 127 char dir_loc [ISODCL ( 4, 11)]; /* 733 */ 128} ISO_RRIP_PLINK; 129 130typedef struct { 131 ISO_SUSP_HEADER h; 132} ISO_RRIP_RELDIR; 133 134#define ISO_SUSP_TSTAMP_FORM17 0x80 135#define ISO_SUSP_TSTAMP_FORM7 0x00 136#define ISO_SUSP_TSTAMP_CREAT 0x01 137#define ISO_SUSP_TSTAMP_MODIFY 0x02 138#define ISO_SUSP_TSTAMP_ACCESS 0x04 139#define ISO_SUSP_TSTAMP_ATTR 0x08 140#define ISO_SUSP_TSTAMP_BACKUP 0x10 141#define ISO_SUSP_TSTAMP_EXPIRE 0x20 142#define ISO_SUSP_TSTAMP_EFFECT 0x40 143 144typedef struct { 145 ISO_SUSP_HEADER h; 146 u_char flags [ISODCL ( 4, 4)]; 147 u_char time [ISODCL ( 5, 5)]; 148} ISO_RRIP_TSTAMP; 149 150typedef struct { 151 ISO_SUSP_HEADER h; 152 u_char flags [ISODCL ( 4, 4)]; 153} ISO_RRIP_IDFLAG; 154 155typedef struct { 156 ISO_SUSP_HEADER h; 157 char len_id [ISODCL ( 4, 4)]; 158 char len_des [ISODCL ( 5, 5)]; 159 char len_src [ISODCL ( 6, 6)]; 160 char version [ISODCL ( 7, 7)]; 161} ISO_RRIP_EXTREF; 162 163typedef struct { 164 ISO_SUSP_HEADER h; 165 char check [ISODCL ( 4, 5)]; 166 char skip [ISODCL ( 6, 6)]; 167} ISO_RRIP_OFFSET; 168 169typedef struct { 170 ISO_SUSP_HEADER h; 171 char location [ISODCL ( 4, 11)]; 172 char offset [ISODCL ( 12, 19)]; 173 char length [ISODCL ( 20, 27)]; 174} ISO_RRIP_CONT; 175 176#endif /* __APPLE_API_PRIVATE */ 177#endif /* __ISOFS_CD9660_CD9660_RRIP_H__ */ 178