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. Neither the name of the University nor the names of its contributors 19 * may be used to endorse or promote products derived from this software 20 * without specific prior written permission. 21 * 22 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)cd9660_rrip.h 8.2 (Berkeley) 12/5/94 35 * $FreeBSD$ 36 */ 37 38 typedef struct { 39 char type [ISODCL ( 0, 1)]; 40 u_char length [ISODCL ( 2, 2)]; /* 711 */ 41 u_char version [ISODCL ( 3, 3)]; 42 } ISO_SUSP_HEADER; 43 44 typedef struct { 45 ISO_SUSP_HEADER h; 46 char mode [ISODCL ( 4, 11)]; /* 733 */ 47 char links [ISODCL ( 12, 19)]; /* 733 */ 48 char uid [ISODCL ( 20, 27)]; /* 733 */ 49 char gid [ISODCL ( 28, 35)]; /* 733 */ 50 } ISO_RRIP_ATTR; 51 52 typedef struct { 53 ISO_SUSP_HEADER h; 54 char dev_t_high [ISODCL ( 4, 11)]; /* 733 */ 55 char dev_t_low [ISODCL ( 12, 19)]; /* 733 */ 56 } ISO_RRIP_DEVICE; 57 58 #define ISO_SUSP_CFLAG_CONTINUE 0x01 59 #define ISO_SUSP_CFLAG_CURRENT 0x02 60 #define ISO_SUSP_CFLAG_PARENT 0x04 61 #define ISO_SUSP_CFLAG_ROOT 0x08 62 #define ISO_SUSP_CFLAG_VOLROOT 0x10 63 #define ISO_SUSP_CFLAG_HOST 0x20 64 65 typedef struct { 66 u_char cflag [ISODCL ( 1, 1)]; 67 u_char clen [ISODCL ( 2, 2)]; 68 u_char name [1]; /* XXX */ 69 } ISO_RRIP_SLINK_COMPONENT; 70 #define ISO_RRIP_SLSIZ 2 71 72 typedef struct { 73 ISO_SUSP_HEADER h; 74 u_char flags [ISODCL ( 4, 4)]; 75 u_char component [ISODCL ( 5, 5)]; 76 } ISO_RRIP_SLINK; 77 78 typedef struct { 79 ISO_SUSP_HEADER h; 80 char flags [ISODCL ( 4, 4)]; 81 } ISO_RRIP_ALTNAME; 82 83 typedef struct { 84 ISO_SUSP_HEADER h; 85 char dir_loc [ISODCL ( 4, 11)]; /* 733 */ 86 } ISO_RRIP_CLINK; 87 88 typedef struct { 89 ISO_SUSP_HEADER h; 90 char dir_loc [ISODCL ( 4, 11)]; /* 733 */ 91 } ISO_RRIP_PLINK; 92 93 typedef struct { 94 ISO_SUSP_HEADER h; 95 } ISO_RRIP_RELDIR; 96 97 #define ISO_SUSP_TSTAMP_FORM17 0x80 98 #define ISO_SUSP_TSTAMP_FORM7 0x00 99 #define ISO_SUSP_TSTAMP_CREAT 0x01 100 #define ISO_SUSP_TSTAMP_MODIFY 0x02 101 #define ISO_SUSP_TSTAMP_ACCESS 0x04 102 #define ISO_SUSP_TSTAMP_ATTR 0x08 103 #define ISO_SUSP_TSTAMP_BACKUP 0x10 104 #define ISO_SUSP_TSTAMP_EXPIRE 0x20 105 #define ISO_SUSP_TSTAMP_EFFECT 0x40 106 107 typedef struct { 108 ISO_SUSP_HEADER h; 109 u_char flags [ISODCL ( 4, 4)]; 110 u_char time [ISODCL ( 5, 5)]; 111 } ISO_RRIP_TSTAMP; 112 113 typedef struct { 114 ISO_SUSP_HEADER h; 115 u_char flags [ISODCL ( 4, 4)]; 116 } ISO_RRIP_IDFLAG; 117 118 typedef struct { 119 ISO_SUSP_HEADER h; 120 char len_id [ISODCL ( 4, 4)]; 121 char len_des [ISODCL ( 5, 5)]; 122 char len_src [ISODCL ( 6, 6)]; 123 char version [ISODCL ( 7, 7)]; 124 } ISO_RRIP_EXTREF; 125 126 typedef struct { 127 ISO_SUSP_HEADER h; 128 char check [ISODCL ( 4, 5)]; 129 char skip [ISODCL ( 6, 6)]; 130 } ISO_RRIP_OFFSET; 131 132 typedef struct { 133 ISO_SUSP_HEADER h; 134 char location [ISODCL ( 4, 11)]; 135 char offset [ISODCL ( 12, 19)]; 136 char length [ISODCL ( 20, 27)]; 137 } ISO_RRIP_CONT; 138