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