11541Srgrimes/*- 21541Srgrimes * Copyright (c) 1993, 1994 31541Srgrimes * The Regents of the University of California. All rights reserved. 41541Srgrimes * 51541Srgrimes * This code is derived from software contributed to Berkeley 61541Srgrimes * by Pace Willisson (pace@blitz.com). The Rock Ridge Extension 71541Srgrimes * Support code is derived from software contributed to Berkeley 81541Srgrimes * by Atsushi Murai (amurai@spec.co.jp). 91541Srgrimes * 101541Srgrimes * Redistribution and use in source and binary forms, with or without 111541Srgrimes * modification, are permitted provided that the following conditions 121541Srgrimes * are met: 131541Srgrimes * 1. Redistributions of source code must retain the above copyright 141541Srgrimes * notice, this list of conditions and the following disclaimer. 151541Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 161541Srgrimes * notice, this list of conditions and the following disclaimer in the 171541Srgrimes * documentation and/or other materials provided with the distribution. 181541Srgrimes * 4. Neither the name of the University nor the names of its contributors 191541Srgrimes * may be used to endorse or promote products derived from this software 201541Srgrimes * without specific prior written permission. 211541Srgrimes * 221541Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 231541Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 241541Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 251541Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 261541Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 271541Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 281541Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 291541Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 301541Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 311541Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 321541Srgrimes * SUCH DAMAGE. 331541Srgrimes * 3422521Sdyson * @(#)cd9660_rrip.h 8.2 (Berkeley) 12/5/94 3550477Speter * $FreeBSD$ 361541Srgrimes */ 37131526Sphk 381541Srgrimestypedef struct { 3922521Sdyson char type [ISODCL ( 0, 1)]; 4022521Sdyson u_char length [ISODCL ( 2, 2)]; /* 711 */ 4122521Sdyson u_char version [ISODCL ( 3, 3)]; 421541Srgrimes} ISO_SUSP_HEADER; 43131526Sphk 441541Srgrimestypedef struct { 451541Srgrimes ISO_SUSP_HEADER h; 4622521Sdyson char mode [ISODCL ( 4, 11)]; /* 733 */ 4722521Sdyson char links [ISODCL ( 12, 19)]; /* 733 */ 4822521Sdyson char uid [ISODCL ( 20, 27)]; /* 733 */ 4922521Sdyson char gid [ISODCL ( 28, 35)]; /* 733 */ 501541Srgrimes} ISO_RRIP_ATTR; 51131526Sphk 521541Srgrimestypedef struct { 531541Srgrimes ISO_SUSP_HEADER h; 5422521Sdyson char dev_t_high [ISODCL ( 4, 11)]; /* 733 */ 5522521Sdyson char dev_t_low [ISODCL ( 12, 19)]; /* 733 */ 561541Srgrimes} ISO_RRIP_DEVICE; 57131526Sphk 581541Srgrimes#define ISO_SUSP_CFLAG_CONTINUE 0x01 591541Srgrimes#define ISO_SUSP_CFLAG_CURRENT 0x02 601541Srgrimes#define ISO_SUSP_CFLAG_PARENT 0x04 611541Srgrimes#define ISO_SUSP_CFLAG_ROOT 0x08 621541Srgrimes#define ISO_SUSP_CFLAG_VOLROOT 0x10 631541Srgrimes#define ISO_SUSP_CFLAG_HOST 0x20 641541Srgrimes 651541Srgrimestypedef struct { 6622521Sdyson u_char cflag [ISODCL ( 1, 1)]; 6722521Sdyson u_char clen [ISODCL ( 2, 2)]; 6822521Sdyson u_char name [1]; /* XXX */ 691541Srgrimes} ISO_RRIP_SLINK_COMPONENT; 701541Srgrimes#define ISO_RRIP_SLSIZ 2 711541Srgrimes 721541Srgrimestypedef struct { 731541Srgrimes ISO_SUSP_HEADER h; 745651Sjoerg u_char flags [ISODCL ( 4, 4)]; 755651Sjoerg u_char component [ISODCL ( 5, 5)]; 761541Srgrimes} ISO_RRIP_SLINK; 771541Srgrimes 781541Srgrimestypedef struct { 791541Srgrimes ISO_SUSP_HEADER h; 805651Sjoerg char flags [ISODCL ( 4, 4)]; 811541Srgrimes} ISO_RRIP_ALTNAME; 821541Srgrimes 831541Srgrimestypedef struct { 841541Srgrimes ISO_SUSP_HEADER h; 855651Sjoerg char dir_loc [ISODCL ( 4, 11)]; /* 733 */ 861541Srgrimes} ISO_RRIP_CLINK; 871541Srgrimes 881541Srgrimestypedef struct { 891541Srgrimes ISO_SUSP_HEADER h; 905651Sjoerg char dir_loc [ISODCL ( 4, 11)]; /* 733 */ 911541Srgrimes} ISO_RRIP_PLINK; 921541Srgrimes 931541Srgrimestypedef struct { 941541Srgrimes ISO_SUSP_HEADER h; 951541Srgrimes} ISO_RRIP_RELDIR; 961541Srgrimes 971541Srgrimes#define ISO_SUSP_TSTAMP_FORM17 0x80 981541Srgrimes#define ISO_SUSP_TSTAMP_FORM7 0x00 991541Srgrimes#define ISO_SUSP_TSTAMP_CREAT 0x01 1001541Srgrimes#define ISO_SUSP_TSTAMP_MODIFY 0x02 1011541Srgrimes#define ISO_SUSP_TSTAMP_ACCESS 0x04 1021541Srgrimes#define ISO_SUSP_TSTAMP_ATTR 0x08 1031541Srgrimes#define ISO_SUSP_TSTAMP_BACKUP 0x10 1041541Srgrimes#define ISO_SUSP_TSTAMP_EXPIRE 0x20 1051541Srgrimes#define ISO_SUSP_TSTAMP_EFFECT 0x40 1061541Srgrimes 1071541Srgrimestypedef struct { 1081541Srgrimes ISO_SUSP_HEADER h; 10922521Sdyson u_char flags [ISODCL ( 4, 4)]; 11022521Sdyson u_char time [ISODCL ( 5, 5)]; 1111541Srgrimes} ISO_RRIP_TSTAMP; 1121541Srgrimes 1131541Srgrimestypedef struct { 1141541Srgrimes ISO_SUSP_HEADER h; 11522521Sdyson u_char flags [ISODCL ( 4, 4)]; 1161541Srgrimes} ISO_RRIP_IDFLAG; 1171541Srgrimes 1181541Srgrimestypedef struct { 1191541Srgrimes ISO_SUSP_HEADER h; 1205651Sjoerg char len_id [ISODCL ( 4, 4)]; 1211541Srgrimes char len_des [ISODCL ( 5, 5)]; 1221541Srgrimes char len_src [ISODCL ( 6, 6)]; 1231541Srgrimes char version [ISODCL ( 7, 7)]; 1241541Srgrimes} ISO_RRIP_EXTREF; 1251541Srgrimes 1261541Srgrimestypedef struct { 1271541Srgrimes ISO_SUSP_HEADER h; 1281541Srgrimes char check [ISODCL ( 4, 5)]; 1291541Srgrimes char skip [ISODCL ( 6, 6)]; 1301541Srgrimes} ISO_RRIP_OFFSET; 1311541Srgrimes 1321541Srgrimestypedef struct { 1331541Srgrimes ISO_SUSP_HEADER h; 1341541Srgrimes char location [ISODCL ( 4, 11)]; 1351541Srgrimes char offset [ISODCL ( 12, 19)]; 1361541Srgrimes char length [ISODCL ( 20, 27)]; 1371541Srgrimes} ISO_RRIP_CONT; 138