1734b3a42SToomas Soome /*
2*2a6e99a0SToomas Soome  * SPDX-License-Identifier: BSD-3-Clause
3*2a6e99a0SToomas Soome  *
4199767f8SToomas Soome  * Copyright (c) 1993, 1994
5199767f8SToomas Soome  *	The Regents of the University of California.  All rights reserved.
6199767f8SToomas Soome  *
7199767f8SToomas Soome  * This code is derived from software contributed to Berkeley
8199767f8SToomas Soome  * by Pace Willisson (pace@blitz.com).  The Rock Ridge Extension
9199767f8SToomas Soome  * Support code is derived from software contributed to Berkeley
10199767f8SToomas Soome  * by Atsushi Murai (amurai@spec.co.jp).
11199767f8SToomas Soome  *
12199767f8SToomas Soome  * Redistribution and use in source and binary forms, with or without
13199767f8SToomas Soome  * modification, are permitted provided that the following conditions
14199767f8SToomas Soome  * are met:
15199767f8SToomas Soome  * 1. Redistributions of source code must retain the above copyright
16199767f8SToomas Soome  *    notice, this list of conditions and the following disclaimer.
17199767f8SToomas Soome  * 2. Redistributions in binary form must reproduce the above copyright
18199767f8SToomas Soome  *    notice, this list of conditions and the following disclaimer in the
19199767f8SToomas Soome  *    documentation and/or other materials provided with the distribution.
20*2a6e99a0SToomas Soome  * 3. Neither the name of the University nor the names of its contributors
21199767f8SToomas Soome  *    may be used to endorse or promote products derived from this software
22199767f8SToomas Soome  *    without specific prior written permission.
23199767f8SToomas Soome  *
24199767f8SToomas Soome  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25199767f8SToomas Soome  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26199767f8SToomas Soome  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27199767f8SToomas Soome  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28199767f8SToomas Soome  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29199767f8SToomas Soome  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30199767f8SToomas Soome  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31199767f8SToomas Soome  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32199767f8SToomas Soome  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33199767f8SToomas Soome  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34199767f8SToomas Soome  * SUCH DAMAGE.
35199767f8SToomas Soome  *
36199767f8SToomas Soome  *	@(#)cd9660_rrip.h	8.2 (Berkeley) 12/5/94
37199767f8SToomas Soome  */
38199767f8SToomas Soome 
39734b3a42SToomas Soome #ifndef	CD9660_RRIP_H
40734b3a42SToomas Soome #define	CD9660_RRIP_H
41734b3a42SToomas Soome 
42199767f8SToomas Soome typedef struct {
43734b3a42SToomas Soome 	char   type			[ISODCL(0,    1)];
44734b3a42SToomas Soome 	uchar_t length			[ISODCL(2,    2)]; /* 711 */
45734b3a42SToomas Soome 	uchar_t version			[ISODCL(3,    3)];
46199767f8SToomas Soome } ISO_SUSP_HEADER;
47199767f8SToomas Soome 
48199767f8SToomas Soome typedef struct {
49199767f8SToomas Soome 	ISO_SUSP_HEADER			h;
50734b3a42SToomas Soome 	char mode			[ISODCL(4,   11)]; /* 733 */
51734b3a42SToomas Soome 	char links			[ISODCL(12,   19)]; /* 733 */
52734b3a42SToomas Soome 	char uid			[ISODCL(20,   27)]; /* 733 */
53734b3a42SToomas Soome 	char gid			[ISODCL(28,   35)]; /* 733 */
54199767f8SToomas Soome } ISO_RRIP_ATTR;
55199767f8SToomas Soome 
56199767f8SToomas Soome typedef struct {
57199767f8SToomas Soome 	ISO_SUSP_HEADER			h;
58734b3a42SToomas Soome 	char dev_t_high			[ISODCL(4,   11)]; /* 733 */
59734b3a42SToomas Soome 	char dev_t_low			[ISODCL(12,   19)]; /* 733 */
60199767f8SToomas Soome } ISO_RRIP_DEVICE;
61199767f8SToomas Soome 
62199767f8SToomas Soome #define	ISO_SUSP_CFLAG_CONTINUE	0x01
63199767f8SToomas Soome #define	ISO_SUSP_CFLAG_CURRENT	0x02
64199767f8SToomas Soome #define	ISO_SUSP_CFLAG_PARENT	0x04
65199767f8SToomas Soome #define	ISO_SUSP_CFLAG_ROOT	0x08
66199767f8SToomas Soome #define	ISO_SUSP_CFLAG_VOLROOT	0x10
67199767f8SToomas Soome #define	ISO_SUSP_CFLAG_HOST	0x20
68199767f8SToomas Soome 
69199767f8SToomas Soome typedef struct {
70734b3a42SToomas Soome 	uchar_t cflag			[ISODCL(1,    1)];
71734b3a42SToomas Soome 	uchar_t clen			[ISODCL(2,    2)];
72734b3a42SToomas Soome 	uchar_t name			[1];			/* XXX */
73199767f8SToomas Soome } ISO_RRIP_SLINK_COMPONENT;
74199767f8SToomas Soome #define	ISO_RRIP_SLSIZ	2
75199767f8SToomas Soome 
76199767f8SToomas Soome typedef struct {
77199767f8SToomas Soome 	ISO_SUSP_HEADER			h;
78734b3a42SToomas Soome 	uchar_t flags			[ISODCL(4,	 4)];
79734b3a42SToomas Soome 	uchar_t component		[ISODCL(5,	 5)];
80199767f8SToomas Soome } ISO_RRIP_SLINK;
81199767f8SToomas Soome 
82199767f8SToomas Soome typedef struct {
83199767f8SToomas Soome 	ISO_SUSP_HEADER			h;
84734b3a42SToomas Soome 	char flags			[ISODCL(4,	 4)];
85199767f8SToomas Soome } ISO_RRIP_ALTNAME;
86199767f8SToomas Soome 
87199767f8SToomas Soome typedef struct {
88199767f8SToomas Soome 	ISO_SUSP_HEADER			h;
89734b3a42SToomas Soome 	char dir_loc			[ISODCL(4,	 11)]; /* 733 */
90199767f8SToomas Soome } ISO_RRIP_CLINK;
91199767f8SToomas Soome 
92199767f8SToomas Soome typedef struct {
93199767f8SToomas Soome 	ISO_SUSP_HEADER			h;
94734b3a42SToomas Soome 	char dir_loc			[ISODCL(4,	 11)]; /* 733 */
95199767f8SToomas Soome } ISO_RRIP_PLINK;
96199767f8SToomas Soome 
97199767f8SToomas Soome typedef struct {
98199767f8SToomas Soome 	ISO_SUSP_HEADER			h;
99199767f8SToomas Soome } ISO_RRIP_RELDIR;
100199767f8SToomas Soome 
101199767f8SToomas Soome #define	ISO_SUSP_TSTAMP_FORM17	0x80
102199767f8SToomas Soome #define	ISO_SUSP_TSTAMP_FORM7	0x00
103199767f8SToomas Soome #define	ISO_SUSP_TSTAMP_CREAT	0x01
104199767f8SToomas Soome #define	ISO_SUSP_TSTAMP_MODIFY	0x02
105199767f8SToomas Soome #define	ISO_SUSP_TSTAMP_ACCESS	0x04
106199767f8SToomas Soome #define	ISO_SUSP_TSTAMP_ATTR	0x08
107199767f8SToomas Soome #define	ISO_SUSP_TSTAMP_BACKUP	0x10
108199767f8SToomas Soome #define	ISO_SUSP_TSTAMP_EXPIRE	0x20
109199767f8SToomas Soome #define	ISO_SUSP_TSTAMP_EFFECT	0x40
110199767f8SToomas Soome 
111199767f8SToomas Soome typedef struct {
112199767f8SToomas Soome 	ISO_SUSP_HEADER			h;
113734b3a42SToomas Soome 	uchar_t flags			[ISODCL(4,    4)];
114734b3a42SToomas Soome 	uchar_t time			[ISODCL(5,    5)];
115199767f8SToomas Soome } ISO_RRIP_TSTAMP;
116199767f8SToomas Soome 
117199767f8SToomas Soome typedef struct {
118199767f8SToomas Soome 	ISO_SUSP_HEADER			h;
119734b3a42SToomas Soome 	uchar_t flags			[ISODCL(4,    4)];
120199767f8SToomas Soome } ISO_RRIP_IDFLAG;
121199767f8SToomas Soome 
122199767f8SToomas Soome typedef struct {
123199767f8SToomas Soome 	ISO_SUSP_HEADER			h;
124734b3a42SToomas Soome 	char len_id			[ISODCL(4,	 4)];
125734b3a42SToomas Soome 	char len_des			[ISODCL(5,	 5)];
126734b3a42SToomas Soome 	char len_src			[ISODCL(6,	 6)];
127734b3a42SToomas Soome 	char version			[ISODCL(7,	 7)];
128199767f8SToomas Soome } ISO_RRIP_EXTREF;
129199767f8SToomas Soome 
130199767f8SToomas Soome typedef struct {
131199767f8SToomas Soome 	ISO_SUSP_HEADER			h;
132734b3a42SToomas Soome 	char check			[ISODCL(4,	 5)];
133734b3a42SToomas Soome 	char skip			[ISODCL(6,	 6)];
134199767f8SToomas Soome } ISO_RRIP_OFFSET;
135199767f8SToomas Soome 
136199767f8SToomas Soome typedef struct {
137199767f8SToomas Soome 	ISO_SUSP_HEADER			h;
138734b3a42SToomas Soome 	uchar_t location			[ISODCL(4,	11)];
139734b3a42SToomas Soome 	uchar_t offset			[ISODCL(12,	19)];
140734b3a42SToomas Soome 	uchar_t length			[ISODCL(20,	27)];
141199767f8SToomas Soome } ISO_RRIP_CONT;
142734b3a42SToomas Soome 
143734b3a42SToomas Soome #endif	/* CD9660_RRIP_H */
144