cd9660_rrip.h revision 1.1 1 /* $NetBSD: cd9660_rrip.h,v 1.1 2002/12/23 17:52:09 jdolecek Exp $ */
2
3 /*-
4 * Copyright (c) 1993, 1994
5 * The Regents of the University of California. All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley
8 * by Pace Willisson (pace (at) blitz.com). The Rock Ridge Extension
9 * Support code is derived from software contributed to Berkeley
10 * by Atsushi Murai (amurai (at) spec.co.jp).
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright
18 * notice, this list of conditions and the following disclaimer in the
19 * documentation and/or other materials provided with the distribution.
20 * 3. All advertising materials mentioning features or use of this software
21 * must display the following acknowledgement:
22 * This product includes software developed by the University of
23 * California, Berkeley and its contributors.
24 * 4. Neither the name of the University nor the names of its contributors
25 * may be used to endorse or promote products derived from this software
26 * without specific prior written permission.
27 *
28 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
29 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
32 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38 * SUCH DAMAGE.
39 *
40 * @(#)cd9660_rrip.h 8.2 (Berkeley) 12/5/94
41 */
42
43 typedef struct {
44 char type [ISODCL ( 0, 1)];
45 u_char length [ISODCL ( 2, 2)]; /* 711 */
46 u_char version [ISODCL ( 3, 3)];
47 } ISO_SUSP_HEADER;
48
49 typedef struct {
50 ISO_SUSP_HEADER h;
51 char mode [ISODCL ( 4, 11)]; /* 733 */
52 char links [ISODCL ( 12, 19)]; /* 733 */
53 char uid [ISODCL ( 20, 27)]; /* 733 */
54 char gid [ISODCL ( 28, 35)]; /* 733 */
55 } ISO_RRIP_ATTR;
56
57 typedef struct {
58 ISO_SUSP_HEADER h;
59 char dev_t_high [ISODCL ( 4, 11)]; /* 733 */
60 char dev_t_low [ISODCL ( 12, 19)]; /* 733 */
61 } ISO_RRIP_DEVICE;
62
63 #define ISO_SUSP_CFLAG_CONTINUE 0x01
64 #define ISO_SUSP_CFLAG_CURRENT 0x02
65 #define ISO_SUSP_CFLAG_PARENT 0x04
66 #define ISO_SUSP_CFLAG_ROOT 0x08
67 #define ISO_SUSP_CFLAG_VOLROOT 0x10
68 #define ISO_SUSP_CFLAG_HOST 0x20
69
70 typedef struct {
71 u_char cflag [ISODCL ( 1, 1)];
72 u_char clen [ISODCL ( 2, 2)];
73 u_char name [1]; /* XXX */
74 } ISO_RRIP_SLINK_COMPONENT;
75 #define ISO_RRIP_SLSIZ 2
76
77 typedef struct {
78 ISO_SUSP_HEADER h;
79 u_char flags [ISODCL ( 4, 4)];
80 u_char component [ISODCL ( 5, 5)];
81 } ISO_RRIP_SLINK;
82
83 typedef struct {
84 ISO_SUSP_HEADER h;
85 char flags [ISODCL ( 4, 4)];
86 } ISO_RRIP_ALTNAME;
87
88 typedef struct {
89 ISO_SUSP_HEADER h;
90 char dir_loc [ISODCL ( 4, 11)]; /* 733 */
91 } ISO_RRIP_CLINK;
92
93 typedef struct {
94 ISO_SUSP_HEADER h;
95 char dir_loc [ISODCL ( 4, 11)]; /* 733 */
96 } ISO_RRIP_PLINK;
97
98 typedef struct {
99 ISO_SUSP_HEADER h;
100 } ISO_RRIP_RELDIR;
101
102 #define ISO_SUSP_TSTAMP_FORM17 0x80
103 #define ISO_SUSP_TSTAMP_FORM7 0x00
104 #define ISO_SUSP_TSTAMP_CREAT 0x01
105 #define ISO_SUSP_TSTAMP_MODIFY 0x02
106 #define ISO_SUSP_TSTAMP_ACCESS 0x04
107 #define ISO_SUSP_TSTAMP_ATTR 0x08
108 #define ISO_SUSP_TSTAMP_BACKUP 0x10
109 #define ISO_SUSP_TSTAMP_EXPIRE 0x20
110 #define ISO_SUSP_TSTAMP_EFFECT 0x40
111
112 typedef struct {
113 ISO_SUSP_HEADER h;
114 u_char flags [ISODCL ( 4, 4)];
115 u_char time [ISODCL ( 5, 5)];
116 } ISO_RRIP_TSTAMP;
117
118 typedef struct {
119 ISO_SUSP_HEADER h;
120 u_char flags [ISODCL ( 4, 4)];
121 } ISO_RRIP_IDFLAG;
122
123 typedef struct {
124 ISO_SUSP_HEADER h;
125 char len_id [ISODCL ( 4, 4)];
126 char len_des [ISODCL ( 5, 5)];
127 char len_src [ISODCL ( 6, 6)];
128 char version [ISODCL ( 7, 7)];
129 } ISO_RRIP_EXTREF;
130
131 typedef struct {
132 ISO_SUSP_HEADER h;
133 char check [ISODCL ( 4, 5)];
134 char skip [ISODCL ( 6, 6)];
135 } ISO_RRIP_OFFSET;
136
137 typedef struct {
138 ISO_SUSP_HEADER h;
139 char location [ISODCL ( 4, 11)];
140 char offset [ISODCL ( 12, 19)];
141 char length [ISODCL ( 20, 27)];
142 } ISO_RRIP_CONT;
143