rock.h File Reference

Things related to the Rock Ridge Interchange Protocol (RRIP). More...

#include <cdio/types.h>

Go to the source code of this file.

Data Structures

struct  iso_su_sp_s
struct  iso_su_er_s
struct  iso_su_ce_s
struct  iso_rock_px_s
struct  iso_rock_pn_s
struct  iso_rock_sl_part_s
struct  iso_rock_sl_s
struct  iso_rock_nm_s
struct  iso_rock_cl_s
struct  iso_rock_pl_s
struct  iso_rock_tf_s
struct  iso_rock_sf_s
struct  iso_extension_record_s
struct  iso_rock_time_s
struct  iso_rock_statbuf_s

Defines

#define S_ISSOCK(st_mode)   ((((st_mode)) & 0170000) == (0140000))
#define S_ISLNK(st_mode)   ((((st_mode)) & 0170000) == (0010000))
#define ISO_ROCK_IRUSR   000400
#define ISO_ROCK_IWUSR   000200
#define ISO_ROCK_IXUSR   000100
#define ISO_ROCK_IRGRP   000040
#define ISO_ROCK_IWGRP   000020
#define ISO_ROCK_IXGRP   000010
#define ISO_ROCK_IROTH   000004
#define ISO_ROCK_IWOTH   000002
#define ISO_ROCK_IXOTH   000001
#define ISO_ROCK_ISUID   004000
#define ISO_ROCK_ISGID   002000
#define ISO_ROCK_ISVTX   001000
#define ISO_ROCK_ISSOCK   0140000
#define ISO_ROCK_ISLNK   0120000
#define ISO_ROCK_ISREG   0100000
#define ISO_ROCK_ISBLK   060000
#define ISO_ROCK_ISCHR   020000
#define ISO_ROCK_ISDIR   040000
#define ISO_ROCK_ISFIFO   010000
#define ISO_ROCK_ENFMT   ISO_ROCK_ISGID
#define ISO_ROCK_SL_CONTINUE   1
#define ISO_ROCK_SL_CURRENT   2
#define ISO_ROCK_SL_PARENT   4
#define ISO_ROCK_SL_ROOT   8
#define ISO_ROCK_NM_CONTINUE   1
#define ISO_ROCK_NM_CURRENT   2
#define ISO_ROCK_NM_PARENT   4
#define ISO_ROCK_TF_CREATE   1
#define ISO_ROCK_TF_MODIFY   2
#define ISO_ROCK_TF_ACCESS   4
#define ISO_ROCK_TF_ATTRIBUTES   8
#define ISO_ROCK_TF_BACKUP   16
#define ISO_ROCK_TF_EXPIRATION   32
#define ISO_ROCK_TF_EFFECTIVE   64
#define ISO_ROCK_TF_LONG_FORM   128

Typedefs

typedef PRAGMA_BEGIN_PACKED
struct iso_su_sp_s 
iso_su_sp_t
typedef iso_su_er_s iso_su_er_t
typedef iso_su_ce_s iso_su_ce_t
typedef iso_rock_px_s iso_rock_px_t
typedef iso_rock_pn_s iso_rock_pn_t
typedef iso_rock_sl_part_s iso_rock_sl_part_t
typedef iso_rock_sl_s iso_rock_sl_t
typedef iso_rock_nm_s iso_rock_nm_t
typedef iso_rock_cl_s iso_rock_cl_t
typedef iso_rock_pl_s iso_rock_pl_t
typedef iso_rock_tf_s iso_rock_tf_t
typedef iso_rock_sf_s iso_rock_sf_t
typedef iso_extension_record_s iso_extension_record_t
typedef iso_rock_time_s iso_rock_time_t
typedef iso_rock_statbuf_s iso_rock_statbuf_t

Enumerations

enum  iso_rock_enums {
  ISO_ROCK_IRUSR = 000400, ISO_ROCK_IWUSR = 000200, ISO_ROCK_IXUSR = 000100, ISO_ROCK_IRGRP = 000040,
  ISO_ROCK_IWGRP = 000020, ISO_ROCK_IXGRP = 000010, ISO_ROCK_IROTH = 000004, ISO_ROCK_IWOTH = 000002,
  ISO_ROCK_IXOTH = 000001, ISO_ROCK_ISUID = 004000, ISO_ROCK_ISGID = 002000, ISO_ROCK_ISVTX = 001000,
  ISO_ROCK_ISSOCK = 0140000, ISO_ROCK_ISLNK = 0120000, ISO_ROCK_ISREG = 0100000, ISO_ROCK_ISBLK = 060000,
  ISO_ROCK_ISCHR = 020000, ISO_ROCK_ISDIR = 040000, ISO_ROCK_ISFIFO = 010000
}
enum  iso_rock_sl_flag_t { ISO_ROCK_SL_CONTINUE = 1, ISO_ROCK_SL_CURRENT = 2, ISO_ROCK_SL_PARENT = 4, ISO_ROCK_SL_ROOT = 8 }
enum  iso_rock_nm_flag_t { ISO_ROCK_NM_CONTINUE = 1, ISO_ROCK_NM_CURRENT = 2, ISO_ROCK_NM_PARENT = 4 }
enum  iso_rock_tf_flag_t {
  ISO_ROCK_TF_CREATE = 1, ISO_ROCK_TF_MODIFY = 2, ISO_ROCK_TF_ACCESS = 4, ISO_ROCK_TF_ATTRIBUTES = 8,
  ISO_ROCK_TF_BACKUP = 16, ISO_ROCK_TF_EXPIRATION = 32, ISO_ROCK_TF_EFFECTIVE = 64, ISO_ROCK_TF_LONG_FORM = 128
}

Functions

PRAGMA_END_PACKED int get_rock_ridge_filename (iso9660_dir_t *de, char *retname, iso9660_stat_t *p_stat)
int parse_rock_ridge_stat (iso9660_dir_t *de, iso9660_stat_t *p_stat)
mode_t iso9660_get_posix_filemode_from_rock (const iso_rock_statbuf_t *rr)
const char * iso9660_get_rock_attr_str (posix_mode_t st_mode)

Variables

iso_rock_nm_flag_t iso_rock_nm_flag
iso_rock_sl_flag_t iso_rock_sl_flag
iso_rock_tf_flag_t iso_rock_tf_flag


Detailed Description

Things related to the Rock Ridge Interchange Protocol (RRIP).

Applications will probably not include this directly but via the iso9660.h header.


Define Documentation

#define ISO_ROCK_ENFMT   ISO_ROCK_ISGID
 

Enforced file locking (shared w/set group ID)

#define ISO_ROCK_IRGRP   000040
 

#define ISO_ROCK_IROTH   000004
 

#define ISO_ROCK_IRUSR   000400
 

#define ISO_ROCK_ISBLK   060000
 

#define ISO_ROCK_ISCHR   020000
 

#define ISO_ROCK_ISDIR   040000
 

#define ISO_ROCK_ISFIFO   010000
 

#define ISO_ROCK_ISGID   002000
 

#define ISO_ROCK_ISLNK   0120000
 

#define ISO_ROCK_ISREG   0100000
 

#define ISO_ROCK_ISSOCK   0140000
 

#define ISO_ROCK_ISUID   004000
 

#define ISO_ROCK_ISVTX   001000
 

#define ISO_ROCK_IWGRP   000020
 

#define ISO_ROCK_IWOTH   000002
 

#define ISO_ROCK_IWUSR   000200
 

#define ISO_ROCK_IXGRP   000010
 

#define ISO_ROCK_IXOTH   000001
 

#define ISO_ROCK_IXUSR   000100
 

#define ISO_ROCK_NM_CONTINUE   1
 

#define ISO_ROCK_NM_CURRENT   2
 

#define ISO_ROCK_NM_PARENT   4
 

#define ISO_ROCK_SL_CONTINUE   1
 

#define ISO_ROCK_SL_CURRENT   2
 

#define ISO_ROCK_SL_PARENT   4
 

#define ISO_ROCK_SL_ROOT   8
 

#define ISO_ROCK_TF_ACCESS   4
 

#define ISO_ROCK_TF_ATTRIBUTES   8
 

#define ISO_ROCK_TF_BACKUP   16
 

#define ISO_ROCK_TF_CREATE   1
 

#define ISO_ROCK_TF_EFFECTIVE   64
 

#define ISO_ROCK_TF_EXPIRATION   32
 

#define ISO_ROCK_TF_LONG_FORM   128
 

#define ISO_ROCK_TF_MODIFY   2
 

#define S_ISLNK st_mode   )     ((((st_mode)) & 0170000) == (0010000))
 

#define S_ISSOCK st_mode   )     ((((st_mode)) & 0170000) == (0140000))
 


Typedef Documentation

typedef struct iso_extension_record_s iso_extension_record_t
 

typedef struct iso_rock_cl_s iso_rock_cl_t
 

Child link. See Section 4.1.5.1

typedef struct iso_rock_nm_s iso_rock_nm_t
 

typedef struct iso_rock_pl_s iso_rock_pl_t
 

Parent link. See Section 4.1.5.2

typedef struct iso_rock_pn_s iso_rock_pn_t
 

POSIX device number, PN. A PN is mandatory if the file type recorded in the "PX" File Mode field for a Directory Record indicates a character or block device (ISO_ROCK_ISCHR | ISO_ROCK_ISBLK). This entry is ignored for other (non-Direcotry) file types. No more than one "PN" is recorded in the System Use Area of a Directory Record.

See Rock Ridge Section 4.1.2

typedef struct iso_rock_px_s iso_rock_px_t
 

POSIX file attributes, PX. See Rock Ridge Section 4.1.2

typedef struct iso_rock_sf_s iso_rock_sf_t
 

File data in sparse format. See Rock Ridge Section 4.1.7

typedef struct iso_rock_sl_part_s iso_rock_sl_part_t
 

typedef struct iso_rock_sl_s iso_rock_sl_t
 

Symbolic link. See Rock Ridge Section 4.1.3

typedef struct iso_rock_statbuf_s iso_rock_statbuf_t
 

typedef struct iso_rock_tf_s iso_rock_tf_t
 

Time stamp(s) for a file. See Rock Ridge Section 4.1.6

typedef struct iso_rock_time_s iso_rock_time_t
 

typedef struct iso_su_ce_s iso_su_ce_t
 

typedef struct iso_su_er_s iso_su_er_t
 

system-use extension record

typedef PRAGMA_BEGIN_PACKED struct iso_su_sp_s iso_su_sp_t
 

system-use-sharing protocol


Enumeration Type Documentation

enum iso_rock_enums
 

An enumeration for some of the ISO_ROCK_* #defines below. This isn't really an enumeration one would really use in a program it is to be helpful in debuggers where wants just to refer to the ISO_ROCK_* names and get something.

Enumerator:
ISO_ROCK_IRUSR  read permission (owner)
ISO_ROCK_IWUSR  write permission (owner)
ISO_ROCK_IXUSR  execute permission (owner)
ISO_ROCK_IRGRP  read permission (group)
ISO_ROCK_IWGRP  write permission (group)
ISO_ROCK_IXGRP  execute permission (group)
ISO_ROCK_IROTH  read permission (other)
ISO_ROCK_IWOTH  write permission (other)
ISO_ROCK_IXOTH  execute permission (other)
ISO_ROCK_ISUID  set user ID on execution
ISO_ROCK_ISGID  set group ID on execution
ISO_ROCK_ISVTX  save swapped text even after use
ISO_ROCK_ISSOCK  socket
ISO_ROCK_ISLNK  symbolic link
ISO_ROCK_ISREG  regular
ISO_ROCK_ISBLK  block special
ISO_ROCK_ISCHR  character special
ISO_ROCK_ISDIR  directory
ISO_ROCK_ISFIFO  pipe or FIFO

enum iso_rock_nm_flag_t
 

These are the bits and their meanings for flags in the NM structure.

Enumerator:
ISO_ROCK_NM_CONTINUE 
ISO_ROCK_NM_CURRENT 
ISO_ROCK_NM_PARENT 

enum iso_rock_sl_flag_t
 

These are the bits and their meanings for flags in the SL structure.

Enumerator:
ISO_ROCK_SL_CONTINUE 
ISO_ROCK_SL_CURRENT 
ISO_ROCK_SL_PARENT 
ISO_ROCK_SL_ROOT 

enum iso_rock_tf_flag_t
 

These are the bits and their meanings for flags in the TF structure.

Enumerator:
ISO_ROCK_TF_CREATE 
ISO_ROCK_TF_MODIFY 
ISO_ROCK_TF_ACCESS 
ISO_ROCK_TF_ATTRIBUTES 
ISO_ROCK_TF_BACKUP 
ISO_ROCK_TF_EXPIRATION 
ISO_ROCK_TF_EFFECTIVE 
ISO_ROCK_TF_LONG_FORM 


Function Documentation

PRAGMA_END_PACKED int get_rock_ridge_filename iso9660_dir_t de,
char *  retname,
iso9660_stat_t p_stat
 

return length of name field; 0: not found, -1: to be ignored

mode_t iso9660_get_posix_filemode_from_rock const iso_rock_statbuf_t rr  ) 
 

Returns POSIX mode bitstring for a given file.

const char* iso9660_get_rock_attr_str posix_mode_t  st_mode  ) 
 

Returns a string which interpreting the POSIX mode st_mode. For example:

  drwxrws---
  -rw---Sr--
  lrwxrwxrwx
  

A description of the characters in the string follows The 1st character is either "d" if the entry is a directory, "l" is a symbolic link or "-" if neither.

The 2nd to 4th characters refer to permissions for a user while the the 5th to 7th characters refer to permissions for a group while, and the 8th to 10h characters refer to permissions for everyone.

In each of these triplets the first character (2, 5, 8) is "r" if the entry is allowed to be read.

The second character of a triplet (3, 6, 9) is "w" if the entry is allowed to be written.

The third character of a triplet (4, 7, 10) is "x" if the entry is executable but not user (for character 4) or group (for characters 6) settable and "s" if the item has the corresponding user/group set.

For a directory having an executable property on ("x" or "s") means the directory is allowed to be listed or "searched". If the execute property is not allowed for a group or user but the corresponding group/user is set "S" indicates this. If none of these properties holds the "-" indicates this.

int parse_rock_ridge_stat iso9660_dir_t de,
iso9660_stat_t p_stat
 


Variable Documentation

iso_rock_nm_flag_t iso_rock_nm_flag
 

These variables are not used, but are defined to facilatate debugging by letting us use enumerations values (which also correspond to #define's inside a debugged program.

iso_rock_sl_flag_t iso_rock_sl_flag
 

iso_rock_tf_flag_t iso_rock_tf_flag
 


Generated on Fri Oct 27 06:38:09 2006 for libcdio by  doxygen 1.4.6