inode(4)
NAME
inode − format of an inode
SYNOPSIS
#include <sys/types.h>
#include <sys/ino.h>
DESCRIPTION
An inode for a plain file or directory in a file system has the following structure as it appears on a disk block, defined in <sys/ino.h>.
struct dinode {
u_short di_mode; /* mode and type of file */
short di_nlink; /* number of links to file */
short di_uid_lsb; /* owner’s user id */
short di_gid_lsb; /* owner’s group id */
quad di_size; /* number of bytes in file */
time_t di_atime; /* time last accessed */
long di_atspare;
time_t di_mtime; /* time last modified */
long di_mtspare;
time_t di_ctime; /* time of last file status change */
long di_ctspare;
daddr_t di_db[NDADDR]; /* disk block addresses */
daddr_t di_ib[NIADDR]; /* indirect blocks */
long di_flags; /* status */
long di_blocks; /* blocks actually held */
long di_gen; /* file generation number */
short di_uid_msb; /* owner’s user id (top 16 bits) */
short di_gid_msb; /* owner’s group id (top 16 bits) */
long di_spare[2]; /* reserved, currently unused */
ino_t di_contin; /* continuation inode number */
};
A continuation inode contains a file’s optional access control list (ACL) entries, and has the following structure as it appears on a disk block:
struct cinode {
u_short ci_mode; /* mode and type of file */
short ci_nlink; /* number of links to file */
/* optional ACL entries */
struct acl_entry_internal_lsb ci_acl_lsb[NOPTENTRIES];
/* least sig bytes of ACL uids/gids */
struct acl_entry_internal_msb ci_acl_msb[NOPTENTRIES];
/* most sig bytes of ACL uids/gids */
char ci_spare[3]; /* reserved, currently unused */
long ci_ciflags; /* status */
};
For the meaning of the defined types u_short, quad, daddr_t, and time_t, see types(5).
Continuation inodes are distinguished from other inodes by their file type. See <sys/inode.h> for the definition of these values.
See <sys/inode.h> for the definition of inode structures for special files, pipes, or FIFOs.
WARNINGS
Kernel internal structures may change from release to release without warning. Applications directly relying on these structures are not supported.
AUTHOR
AT&T, the University of California, Berkeley, and HP.
SEE ALSO
Hewlett-Packard Company — HP-UX Release 10.20: July 1996