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