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 * %sccs.include.redist.c% 11 * 12 * @(#)cd9660_rrip.h 8.1 (Berkeley) 01/21/94 13 */ 14 15 typedef struct { 16 char type [ISODCL ( 0, 1)]; 17 unsigned char length [ISODCL ( 2, 2)]; /* 711 */ 18 unsigned char version [ISODCL ( 3, 3)]; 19 } ISO_SUSP_HEADER; 20 21 typedef struct { 22 ISO_SUSP_HEADER h; 23 char mode_l [ISODCL ( 4, 7)]; /* 731 */ 24 char mode_m [ISODCL ( 8, 11)]; /* 732 */ 25 char links_l [ISODCL ( 12, 15)]; /* 731 */ 26 char links_m [ISODCL ( 16, 19)]; /* 732 */ 27 char uid_l [ISODCL ( 20, 23)]; /* 731 */ 28 char uid_m [ISODCL ( 24, 27)]; /* 732 */ 29 char gid_l [ISODCL ( 28, 31)]; /* 731 */ 30 char gid_m [ISODCL ( 32, 35)]; /* 732 */ 31 } ISO_RRIP_ATTR; 32 33 typedef struct { 34 ISO_SUSP_HEADER h; 35 char dev_t_high_l [ISODCL ( 4, 7)]; /* 731 */ 36 char dev_t_high_m [ISODCL ( 8, 11)]; /* 732 */ 37 char dev_t_low_l [ISODCL ( 12, 15)]; /* 731 */ 38 char dev_t_low_m [ISODCL ( 16, 19)]; /* 732 */ 39 } ISO_RRIP_DEVICE; 40 41 #define ISO_SUSP_CFLAG_CONTINUE 0x01 42 #define ISO_SUSP_CFLAG_CURRENT 0x02 43 #define ISO_SUSP_CFLAG_PARENT 0x04 44 #define ISO_SUSP_CFLAG_ROOT 0x08 45 #define ISO_SUSP_CFLAG_VOLROOT 0x10 46 #define ISO_SUSP_CFLAG_HOST 0x20 47 48 typedef struct { 49 u_char cflag [ISODCL ( 1, 1)]; 50 u_char clen [ISODCL ( 2, 2)]; 51 u_char name [0]; 52 } ISO_RRIP_SLINK_COMPONENT; 53 #define ISO_RRIP_SLSIZ 2 54 55 typedef struct { 56 ISO_SUSP_HEADER h; 57 u_char flags [ISODCL ( 4, 4)]; 58 u_char component [ISODCL ( 5, 5)]; 59 } ISO_RRIP_SLINK; 60 61 typedef struct { 62 ISO_SUSP_HEADER h; 63 char flags [ISODCL ( 4, 4)]; 64 } ISO_RRIP_ALTNAME; 65 66 typedef struct { 67 ISO_SUSP_HEADER h; 68 char dir_loc [ISODCL ( 4, 11)]; /* 733 */ 69 } ISO_RRIP_CLINK; 70 71 typedef struct { 72 ISO_SUSP_HEADER h; 73 char dir_loc [ISODCL ( 4, 11)]; /* 733 */ 74 } ISO_RRIP_PLINK; 75 76 typedef struct { 77 ISO_SUSP_HEADER h; 78 } ISO_RRIP_RELDIR; 79 80 #define ISO_SUSP_TSTAMP_FORM17 0x80 81 #define ISO_SUSP_TSTAMP_FORM7 0x00 82 #define ISO_SUSP_TSTAMP_CREAT 0x01 83 #define ISO_SUSP_TSTAMP_MODIFY 0x02 84 #define ISO_SUSP_TSTAMP_ACCESS 0x04 85 #define ISO_SUSP_TSTAMP_ATTR 0x08 86 #define ISO_SUSP_TSTAMP_BACKUP 0x10 87 #define ISO_SUSP_TSTAMP_EXPIRE 0x20 88 #define ISO_SUSP_TSTAMP_EFFECT 0x40 89 90 typedef struct { 91 ISO_SUSP_HEADER h; 92 unsigned char flags [ISODCL ( 4, 4)]; 93 unsigned char time [ISODCL ( 5, 5)]; 94 } ISO_RRIP_TSTAMP; 95 96 typedef struct { 97 ISO_SUSP_HEADER h; 98 unsigned char flags [ISODCL ( 4, 4)]; 99 } ISO_RRIP_IDFLAG; 100 101 typedef struct { 102 ISO_SUSP_HEADER h; 103 char len_id [ISODCL ( 4, 4)]; 104 char len_des [ISODCL ( 5, 5)]; 105 char len_src [ISODCL ( 6, 6)]; 106 char version [ISODCL ( 7, 7)]; 107 } ISO_RRIP_EXTREF; 108 109 typedef struct { 110 ISO_SUSP_HEADER h; 111 char check [ISODCL ( 4, 5)]; 112 char skip [ISODCL ( 6, 6)]; 113 } ISO_RRIP_OFFSET; 114 115 typedef struct { 116 ISO_SUSP_HEADER h; 117 char location [ISODCL ( 4, 11)]; 118 char offset [ISODCL ( 12, 19)]; 119 char length [ISODCL ( 20, 27)]; 120 } ISO_RRIP_CONT; 121