cd9660_rrip.h revision 50477
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 * 3. All advertising materials mentioning features or use of this software 191541Srgrimes * must display the following acknowledgement: 201541Srgrimes * This product includes software developed by the University of 211541Srgrimes * California, Berkeley and its contributors. 221541Srgrimes * 4. Neither the name of the University nor the names of its contributors 231541Srgrimes * may be used to endorse or promote products derived from this software 241541Srgrimes * without specific prior written permission. 251541Srgrimes * 261541Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 271541Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 281541Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 291541Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 301541Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 311541Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 321541Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 331541Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 341541Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 351541Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 361541Srgrimes * SUCH DAMAGE. 371541Srgrimes * 3822521Sdyson * @(#)cd9660_rrip.h 8.2 (Berkeley) 12/5/94 3950477Speter * $FreeBSD: head/sys/fs/cd9660/cd9660_rrip.h 50477 1999-08-28 01:08:13Z peter $ 401541Srgrimes */ 4122521Sdyson 421541Srgrimestypedef struct { 4322521Sdyson char type [ISODCL ( 0, 1)]; 4422521Sdyson u_char length [ISODCL ( 2, 2)]; /* 711 */ 4522521Sdyson u_char version [ISODCL ( 3, 3)]; 461541Srgrimes} ISO_SUSP_HEADER; 4722521Sdyson 481541Srgrimestypedef struct { 491541Srgrimes ISO_SUSP_HEADER h; 5022521Sdyson char mode [ISODCL ( 4, 11)]; /* 733 */ 5122521Sdyson char links [ISODCL ( 12, 19)]; /* 733 */ 5222521Sdyson char uid [ISODCL ( 20, 27)]; /* 733 */ 5322521Sdyson char gid [ISODCL ( 28, 35)]; /* 733 */ 541541Srgrimes} ISO_RRIP_ATTR; 5522521Sdyson 561541Srgrimestypedef struct { 571541Srgrimes ISO_SUSP_HEADER h; 5822521Sdyson char dev_t_high [ISODCL ( 4, 11)]; /* 733 */ 5922521Sdyson char dev_t_low [ISODCL ( 12, 19)]; /* 733 */ 601541Srgrimes} ISO_RRIP_DEVICE; 6122521Sdyson 621541Srgrimes#define ISO_SUSP_CFLAG_CONTINUE 0x01 631541Srgrimes#define ISO_SUSP_CFLAG_CURRENT 0x02 641541Srgrimes#define ISO_SUSP_CFLAG_PARENT 0x04 651541Srgrimes#define ISO_SUSP_CFLAG_ROOT 0x08 661541Srgrimes#define ISO_SUSP_CFLAG_VOLROOT 0x10 671541Srgrimes#define ISO_SUSP_CFLAG_HOST 0x20 681541Srgrimes 691541Srgrimestypedef struct { 7022521Sdyson u_char cflag [ISODCL ( 1, 1)]; 7122521Sdyson u_char clen [ISODCL ( 2, 2)]; 7222521Sdyson u_char name [1]; /* XXX */ 731541Srgrimes} ISO_RRIP_SLINK_COMPONENT; 741541Srgrimes#define ISO_RRIP_SLSIZ 2 751541Srgrimes 761541Srgrimestypedef struct { 771541Srgrimes ISO_SUSP_HEADER h; 785651Sjoerg u_char flags [ISODCL ( 4, 4)]; 795651Sjoerg u_char component [ISODCL ( 5, 5)]; 801541Srgrimes} ISO_RRIP_SLINK; 811541Srgrimes 821541Srgrimestypedef struct { 831541Srgrimes ISO_SUSP_HEADER h; 845651Sjoerg char flags [ISODCL ( 4, 4)]; 851541Srgrimes} ISO_RRIP_ALTNAME; 861541Srgrimes 871541Srgrimestypedef struct { 881541Srgrimes ISO_SUSP_HEADER h; 895651Sjoerg char dir_loc [ISODCL ( 4, 11)]; /* 733 */ 901541Srgrimes} ISO_RRIP_CLINK; 911541Srgrimes 921541Srgrimestypedef struct { 931541Srgrimes ISO_SUSP_HEADER h; 945651Sjoerg char dir_loc [ISODCL ( 4, 11)]; /* 733 */ 951541Srgrimes} ISO_RRIP_PLINK; 961541Srgrimes 971541Srgrimestypedef struct { 981541Srgrimes ISO_SUSP_HEADER h; 991541Srgrimes} ISO_RRIP_RELDIR; 1001541Srgrimes 1011541Srgrimes#define ISO_SUSP_TSTAMP_FORM17 0x80 1021541Srgrimes#define ISO_SUSP_TSTAMP_FORM7 0x00 1031541Srgrimes#define ISO_SUSP_TSTAMP_CREAT 0x01 1041541Srgrimes#define ISO_SUSP_TSTAMP_MODIFY 0x02 1051541Srgrimes#define ISO_SUSP_TSTAMP_ACCESS 0x04 1061541Srgrimes#define ISO_SUSP_TSTAMP_ATTR 0x08 1071541Srgrimes#define ISO_SUSP_TSTAMP_BACKUP 0x10 1081541Srgrimes#define ISO_SUSP_TSTAMP_EXPIRE 0x20 1091541Srgrimes#define ISO_SUSP_TSTAMP_EFFECT 0x40 1101541Srgrimes 1111541Srgrimestypedef struct { 1121541Srgrimes ISO_SUSP_HEADER h; 11322521Sdyson u_char flags [ISODCL ( 4, 4)]; 11422521Sdyson u_char time [ISODCL ( 5, 5)]; 1151541Srgrimes} ISO_RRIP_TSTAMP; 1161541Srgrimes 1171541Srgrimestypedef struct { 1181541Srgrimes ISO_SUSP_HEADER h; 11922521Sdyson u_char flags [ISODCL ( 4, 4)]; 1201541Srgrimes} ISO_RRIP_IDFLAG; 1211541Srgrimes 1221541Srgrimestypedef struct { 1231541Srgrimes ISO_SUSP_HEADER h; 1245651Sjoerg char len_id [ISODCL ( 4, 4)]; 1251541Srgrimes char len_des [ISODCL ( 5, 5)]; 1261541Srgrimes char len_src [ISODCL ( 6, 6)]; 1271541Srgrimes char version [ISODCL ( 7, 7)]; 1281541Srgrimes} ISO_RRIP_EXTREF; 1291541Srgrimes 1301541Srgrimestypedef struct { 1311541Srgrimes ISO_SUSP_HEADER h; 1321541Srgrimes char check [ISODCL ( 4, 5)]; 1331541Srgrimes char skip [ISODCL ( 6, 6)]; 1341541Srgrimes} ISO_RRIP_OFFSET; 1351541Srgrimes 1361541Srgrimestypedef struct { 1371541Srgrimes ISO_SUSP_HEADER h; 1381541Srgrimes char location [ISODCL ( 4, 11)]; 1391541Srgrimes char offset [ISODCL ( 12, 19)]; 1401541Srgrimes char length [ISODCL ( 20, 27)]; 1411541Srgrimes} ISO_RRIP_CONT; 142