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