libcdio 2.1.0
rock.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2005, 2006 2008, 2012 Rocky Bernstein <rocky@gnu.org>
3
4 See also rock.c by Eric Youngdale (1993) from GNU/Linux
5 This is Copyright 1993 Yggdrasil Computing, Incorporated
6
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
19*/
28
29#ifndef CDIO_ROCK_H_
30#define CDIO_ROCK_H_
31
32#include <cdio/types.h>
33
34#ifdef __cplusplus
35extern "C" {
36#endif /* __cplusplus */
37
43extern enum iso_rock_enums {
44 ISO_ROCK_IRUSR = 000400,
45 ISO_ROCK_IWUSR = 000200,
46 ISO_ROCK_IXUSR = 000100,
47 ISO_ROCK_IRGRP = 000040,
48 ISO_ROCK_IWGRP = 000020,
49 ISO_ROCK_IXGRP = 000010,
50 ISO_ROCK_IROTH = 000004,
51 ISO_ROCK_IWOTH = 000002,
52 ISO_ROCK_IXOTH = 000001,
54 ISO_ROCK_ISUID = 004000,
55 ISO_ROCK_ISGID = 002000,
56 ISO_ROCK_ISVTX = 001000,
58 ISO_ROCK_ISSOCK = 0140000,
59 ISO_ROCK_ISLNK = 0120000,
60 ISO_ROCK_ISREG = 0100000,
61 ISO_ROCK_ISBLK = 060000,
62 ISO_ROCK_ISCHR = 020000,
63 ISO_ROCK_ISDIR = 040000,
64 ISO_ROCK_ISFIFO = 010000
66
67#define ISO_ROCK_IRUSR 000400
68#define ISO_ROCK_IWUSR 000200
69#define ISO_ROCK_IXUSR 000100
70#define ISO_ROCK_IRGRP 000040
71#define ISO_ROCK_IWGRP 000020
72#define ISO_ROCK_IXGRP 000010
73#define ISO_ROCK_IROTH 000004
74#define ISO_ROCK_IWOTH 000002
75#define ISO_ROCK_IXOTH 000001
77#define ISO_ROCK_ISUID 004000
78#define ISO_ROCK_ISGID 002000
79#define ISO_ROCK_ISVTX 001000
81#define ISO_ROCK_ISSOCK 0140000
82#define ISO_ROCK_ISLNK 0120000
83#define ISO_ROCK_ISREG 0100000
84#define ISO_ROCK_ISBLK 060000
85#define ISO_ROCK_ISCHR 020000
86#define ISO_ROCK_ISDIR 040000
87#define ISO_ROCK_ISFIFO 010000
90#define ISO_ROCK_ENFMT ISO_ROCK_ISGID
91
93
100typedef struct iso_su_sp_s{
101 unsigned char magic[2];
102 uint8_t skip;
104
106typedef struct iso_su_er_s {
108 unsigned char len_des;
109 unsigned char len_src;
113
114typedef struct iso_su_ce_s {
115 char extent[8];
116 char offset[8];
117 char size[8];
119
121typedef struct iso_rock_px_s {
131
140typedef struct iso_rock_pn_s {
146
148typedef enum {
154
155#define ISO_ROCK_SL_CONTINUE 1
156#define ISO_ROCK_SL_CURRENT 2
157#define ISO_ROCK_SL_PARENT 4
158#define ISO_ROCK_SL_ROOT 8
159
160typedef struct iso_rock_sl_part_s {
161 uint8_t flags;
162 uint8_t len;
165
167typedef struct iso_rock_sl_s {
168 unsigned char flags;
171
175typedef enum {
180
181#define ISO_ROCK_NM_CONTINUE 1
182#define ISO_ROCK_NM_CURRENT 2
183#define ISO_ROCK_NM_PARENT 4
184
185
186typedef struct iso_rock_nm_s {
187 unsigned char flags;
190
192typedef struct iso_rock_cl_s {
193 char location[1];
195
197typedef struct iso_rock_pl_s {
198 char location[1];
200
202typedef enum {
212
213/* These are the bits and their meanings for flags in the TF structure. */
214#define ISO_ROCK_TF_CREATE 1
215#define ISO_ROCK_TF_MODIFY 2
216#define ISO_ROCK_TF_ACCESS 4
217#define ISO_ROCK_TF_ATTRIBUTES 8
218#define ISO_ROCK_TF_BACKUP 16
219#define ISO_ROCK_TF_EXPIRATION 32
220#define ISO_ROCK_TF_EFFECTIVE 64
221#define ISO_ROCK_TF_LONG_FORM 128
222
224typedef struct iso_rock_tf_s {
225 uint8_t flags;
238
240typedef struct iso_rock_sf_s {
243 uint8_t table_depth;
245
247 char signature[2];
254 union {
267 } u;
269
270typedef struct iso_rock_time_s {
271 bool b_used;
275 union
276 {
279 } t;
281
282typedef struct iso_rock_statbuf_s {
309 uint32_t i_rdev;
314
316
318int get_rock_ridge_filename(iso9660_dir_t * de, /*out*/ char * retname,
319 /*out*/ iso9660_stat_t *p_stat);
320
322
326 mode_t
328
363
371
372#ifdef __cplusplus
373}
374#endif /* __cplusplus */
375
376#endif /* CDIO_ROCK_H_ */
377
378/*
379 * Local variables:
380 * c-file-style: "gnu"
381 * tab-width: 8
382 * indent-tabs-mode: nil
383 * End:
384 */
uint64_t iso733_t
Definition: iso9660.h:56
uint8_t iso711_t
ISO 9660 Integer and Character types.
Definition: iso9660.h:49
#define EMPTY_ARRAY_SIZE
Definition: iso9660.h:62
uint32_t posix_gid_t
Definition: posix.h:29
uint32_t posix_mode_t
Definition: posix.h:26
uint32_t posix_nlink_t
Definition: posix.h:27
uint32_t posix_uid_t
Definition: posix.h:28
struct iso_rock_cl_s iso_rock_cl_t
struct iso_rock_sl_part_s iso_rock_sl_part_t
struct iso_rock_px_s iso_rock_px_t
iso_rock_nm_flag_t iso_rock_nm_flag
#define ISO_ROCK_IWUSR
Definition: rock.h:68
iso_rock_sl_flag_t iso_rock_sl_flag
mode_t iso9660_get_posix_filemode_from_rock(const iso_rock_statbuf_t *rr)
#define ISO_ROCK_ISCHR
Definition: rock.h:85
PRAGMA_BEGIN_PACKED struct iso_su_sp_s iso_su_sp_t
#define ISO_ROCK_SL_CURRENT
Definition: rock.h:156
#define ISO_ROCK_NM_CONTINUE
Definition: rock.h:181
#define ISO_ROCK_SL_PARENT
Definition: rock.h:157
#define ISO_ROCK_IRGRP
Definition: rock.h:70
#define ISO_ROCK_ISREG
Definition: rock.h:83
#define ISO_ROCK_ISSOCK
Definition: rock.h:81
struct iso_rock_tf_s iso_rock_tf_t
#define ISO_ROCK_IWGRP
Definition: rock.h:71
iso_rock_tf_flag_t
Definition: rock.h:202
#define ISO_ROCK_IROTH
Definition: rock.h:73
#define ISO_ROCK_TF_EFFECTIVE
Definition: rock.h:220
iso_rock_enums
Definition: rock.h:43
struct iso_rock_time_s iso_rock_time_t
#define ISO_ROCK_ISUID
Definition: rock.h:77
#define ISO_ROCK_TF_ACCESS
Definition: rock.h:216
#define ISO_ROCK_TF_LONG_FORM
Definition: rock.h:221
iso_rock_nm_flag_t
Definition: rock.h:175
#define ISO_ROCK_TF_BACKUP
Definition: rock.h:218
struct iso_rock_pl_s iso_rock_pl_t
struct iso_su_ce_s iso_su_ce_t
struct iso_extension_record_s iso_extension_record_t
#define ISO_ROCK_IXGRP
Definition: rock.h:72
iso_rock_tf_flag_t iso_rock_tf_flag
#define ISO_ROCK_IXUSR
Definition: rock.h:69
struct iso_rock_sf_s iso_rock_sf_t
#define ISO_ROCK_ISGID
Definition: rock.h:78
#define ISO_ROCK_IWOTH
Definition: rock.h:74
#define ISO_ROCK_ISVTX
Definition: rock.h:79
struct iso_rock_nm_s iso_rock_nm_t
#define ISO_ROCK_ISDIR
Definition: rock.h:86
struct iso_rock_pn_s iso_rock_pn_t
#define ISO_ROCK_ISLNK
Definition: rock.h:82
iso_rock_sl_flag_t
Definition: rock.h:148
const char * iso9660_get_rock_attr_str(posix_mode_t st_mode)
#define ISO_ROCK_IRUSR
Definition: rock.h:67
#define ISO_ROCK_ISFIFO
Definition: rock.h:87
#define ISO_ROCK_NM_PARENT
Definition: rock.h:183
#define ISO_ROCK_SL_CONTINUE
Definition: rock.h:155
#define ISO_ROCK_IXOTH
Definition: rock.h:75
#define ISO_ROCK_TF_CREATE
Definition: rock.h:214
#define ISO_ROCK_NM_CURRENT
Definition: rock.h:182
struct iso_su_er_s iso_su_er_t
struct iso_rock_sl_s iso_rock_sl_t
#define ISO_ROCK_TF_MODIFY
Definition: rock.h:215
#define ISO_ROCK_ISBLK
Definition: rock.h:84
#define ISO_ROCK_TF_EXPIRATION
Definition: rock.h:219
int parse_rock_ridge_stat(iso9660_dir_t *de, iso9660_stat_t *p_stat)
struct iso_rock_statbuf_s iso_rock_statbuf_t
#define ISO_ROCK_SL_ROOT
Definition: rock.h:158
#define ISO_ROCK_TF_ATTRIBUTES
Definition: rock.h:217
PRAGMA_END_PACKED int get_rock_ridge_filename(iso9660_dir_t *de, char *retname, iso9660_stat_t *p_stat)
Format of an ISO-9660 directory record.
Definition: iso9660.h:248
ISO-9660 shorter-format time structure. See ECMA 9.1.5.
Definition: iso9660.h:184
ISO-9660 longer-format time structure.
Definition: iso9660.h:207
Unix stat-like version of iso9660_dir.
Definition: iso9660.h:530
Definition: rock.h:246
char signature[2]
Definition: rock.h:247
iso_rock_nm_t NM
Definition: rock.h:263
iso_su_er_t ER
Definition: rock.h:257
iso_su_sp_t SP
Definition: rock.h:255
iso_su_ce_t CE
Definition: rock.h:259
union iso_extension_record_s::@13 u
iso_rock_pn_t PN
Definition: rock.h:261
iso_rock_cl_t CL
Definition: rock.h:264
iso_rock_sl_t SL
Definition: rock.h:262
iso_rock_pl_t PL
Definition: rock.h:265
iso_rock_tf_t TF
Definition: rock.h:266
iso_rock_px_t PX
Definition: rock.h:260
iso711_t len
Definition: rock.h:250
iso711_t version
Definition: rock.h:253
Definition: rock.h:192
char location[1]
Definition: rock.h:193
Definition: rock.h:186
unsigned char flags
Definition: rock.h:187
char name[EMPTY_ARRAY_SIZE]
Definition: rock.h:188
Definition: rock.h:197
char location[1]
Definition: rock.h:198
Definition: rock.h:140
iso733_t dev_low
Definition: rock.h:143
iso733_t dev_high
Definition: rock.h:141
Definition: rock.h:121
iso733_t st_gid
Definition: rock.h:128
iso733_t st_uid
Definition: rock.h:126
iso733_t st_nlinks
Definition: rock.h:124
iso733_t st_mode
Definition: rock.h:122
Definition: rock.h:240
uint8_t table_depth
Definition: rock.h:243
iso733_t virtual_size_low
Definition: rock.h:242
iso733_t virtual_size_high
Definition: rock.h:241
Definition: rock.h:160
uint8_t flags
Definition: rock.h:161
char text[EMPTY_ARRAY_SIZE]
Definition: rock.h:163
uint8_t len
Definition: rock.h:162
Definition: rock.h:167
unsigned char flags
Definition: rock.h:168
iso_rock_sl_part_t link
Definition: rock.h:169
Definition: rock.h:282
iso_rock_time_t effective
Definition: rock.h:307
iso_rock_time_t access
Definition: rock.h:300
uint8_t s_rock_offset
Definition: rock.h:291
int i_symlink_max
Definition: rock.h:293
posix_nlink_t st_nlinks
Definition: rock.h:288
iso_rock_time_t create
Definition: rock.h:296
int i_symlink
Definition: rock.h:292
posix_mode_t st_mode
Definition: rock.h:287
iso_rock_time_t backup
Definition: rock.h:304
posix_uid_t st_uid
Definition: rock.h:289
posix_gid_t st_gid
Definition: rock.h:290
iso_rock_time_t attributes
Definition: rock.h:302
uint32_t i_rdev
Definition: rock.h:309
bool_3way_t b3_rock
Definition: rock.h:283
char * psz_symlink
Definition: rock.h:294
iso_rock_time_t expiration
Definition: rock.h:305
iso_rock_time_t modify
Definition: rock.h:297
Definition: rock.h:224
uint8_t flags
Definition: rock.h:225
uint8_t time_bytes[EMPTY_ARRAY_SIZE]
Definition: rock.h:226
Definition: rock.h:270
iso9660_ltime_t ltime
Definition: rock.h:277
iso9660_dtime_t dtime
Definition: rock.h:278
union iso_rock_time_s::@14 t
bool b_used
Definition: rock.h:271
bool b_longdate
Definition: rock.h:273
Definition: rock.h:114
char offset[8]
Definition: rock.h:116
char extent[8]
Definition: rock.h:115
char size[8]
Definition: rock.h:117
Definition: rock.h:106
char data[EMPTY_ARRAY_SIZE]
Definition: rock.h:111
unsigned char len_src
Definition: rock.h:109
iso711_t len_id
Definition: rock.h:107
unsigned char len_des
Definition: rock.h:108
iso711_t ext_ver
Definition: rock.h:110
Definition: rock.h:100
uint8_t skip
Definition: rock.h:102
unsigned char magic[2]
Definition: rock.h:101
Common type definitions used pervasively in libcdio.
bool_3way_t
Definition: types.h:236
#define PRAGMA_BEGIN_PACKED
Definition: types.h:168
#define PRAGMA_END_PACKED
Definition: types.h:169
#define GNUC_PACKED
Definition: types.h:151

Generated for libcdio by doxygen 1.9.6