* sysdeps/generic/ifreq.h (__if_nextreq): New function.
[glibc.git] / posix / cpio.h
bloba2fefab516b229caca5a719b758d2a477468ed75
1 /* Extended cpio format from POSIX.1.
2 This file is part of the GNU C Library.
3 Copyright (C) 1992, 1998 Free Software Foundation, Inc.
4 NOTE: The canonical source of this file is maintained with the GNU cpio.
5 Bugs can be reported to bug-glibc@gnu.org.
7 The GNU C Library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
12 The GNU C Library 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 GNU
15 Lesser General Public License for more details.
17 You should have received a copy of the GNU Lesser General Public
18 License along with the GNU C Library; if not, write to the Free
19 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 02111-1307 USA. */
22 #ifndef _CPIO_H
23 #define _CPIO_H 1
25 /* A cpio archive consists of a sequence of files.
26 Each file has a 76 byte header,
27 a variable length, NUL terminated filename,
28 and variable length file data.
29 A header for a filename "TRAILER!!!" indicates the end of the archive. */
31 /* All the fields in the header are ISO 646 (approximately ASCII) strings
32 of octal numbers, left padded, not NUL terminated.
34 Field Name Length in Bytes Notes
35 c_magic 6 must be "070707"
36 c_dev 6
37 c_ino 6
38 c_mode 6 see below for value
39 c_uid 6
40 c_gid 6
41 c_nlink 6
42 c_rdev 6 only valid for chr and blk special files
43 c_mtime 11
44 c_namesize 6 count includes terminating NUL in pathname
45 c_filesize 11 must be 0 for FIFOs and directories */
47 /* Value for the field `c_magic'. */
48 #define MAGIC "070707"
50 /* Values for c_mode, OR'd together: */
52 #define C_IRUSR 000400
53 #define C_IWUSR 000200
54 #define C_IXUSR 000100
55 #define C_IRGRP 000040
56 #define C_IWGRP 000020
57 #define C_IXGRP 000010
58 #define C_IROTH 000004
59 #define C_IWOTH 000002
60 #define C_IXOTH 000001
62 #define C_ISUID 004000
63 #define C_ISGID 002000
64 #define C_ISVTX 001000
66 #define C_ISBLK 060000
67 #define C_ISCHR 020000
68 #define C_ISDIR 040000
69 #define C_ISFIFO 010000
70 #define C_ISSOCK 0140000
71 #define C_ISLNK 0120000
72 #define C_ISCTG 0110000
73 #define C_ISREG 0100000
75 #endif /* cpio.h */