Annotation of XNU/bsd/sys/attr.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
        !             3:  *
        !             4:  * @APPLE_LICENSE_HEADER_START@
        !             5:  * 
        !             6:  * The contents of this file constitute Original Code as defined in and
        !             7:  * are subject to the Apple Public Source License Version 1.1 (the
        !             8:  * "License").  You may not use this file except in compliance with the
        !             9:  * License.  Please obtain a copy of the License at
        !            10:  * http://www.apple.com/publicsource and read it before using this file.
        !            11:  * 
        !            12:  * This Original Code and all software distributed under the License are
        !            13:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
        !            14:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
        !            15:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
        !            16:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
        !            17:  * License for the specific language governing rights and limitations
        !            18:  * under the License.
        !            19:  * 
        !            20:  * @APPLE_LICENSE_HEADER_END@
        !            21:  */
        !            22: /*
        !            23:  * attr.h - attribute data structures and interfaces
        !            24:  *
        !            25:  * Copyright (c) 1998, Apple Computer, Inc.  All Rights Reserved.
        !            26:  *
        !            27:  * History:
        !            28:  *      2/18/98        Pat Dirks, Apple Computer               New Today
        !            29:  *
        !            30:  */
        !            31: 
        !            32: #ifndef _SYS_ATTR_H_
        !            33: #define _SYS_ATTR_H_
        !            34: 
        !            35: #ifndef _SYS_TYPES_H_
        !            36: #include <sys/types.h>
        !            37: #endif
        !            38: #ifndef _SYS_UCRED_H
        !            39: #include <sys/ucred.h>
        !            40: #endif
        !            41: #ifndef _SYS_MOUNT_H_
        !            42: #include <sys/mount.h>
        !            43: #endif
        !            44: 
        !            45: #define FSOPT_NOFOLLOW 0x00000001
        !            46: 
        !            47: typedef u_int32_t text_encoding_t;
        !            48: 
        !            49: typedef u_int32_t fsobj_type_t;
        !            50: 
        !            51: typedef u_int32_t fsobj_tag_t;
        !            52: 
        !            53: typedef u_int32_t fsfile_type_t;
        !            54: 
        !            55: typedef u_int32_t fsvolid_t;
        !            56: 
        !            57: typedef struct fsobj_id {
        !            58:        u_int32_t               fid_objno;
        !            59:        u_int32_t               fid_generation;
        !            60: } fsobj_id_t;
        !            61: 
        !            62: typedef u_int32_t attrgroup_t;
        !            63: 
        !            64: struct attrlist {
        !            65:        u_short bitmapcount;                    /* number of attr. bit sets in list (should be 5) */
        !            66:        u_int16_t reserved;                             /* (to maintain 4-byte alignment) */
        !            67:        attrgroup_t commonattr;                 /* common attribute group */
        !            68:        attrgroup_t volattr;                    /* Volume attribute group */
        !            69:        attrgroup_t dirattr;                    /* directory attribute group */
        !            70:        attrgroup_t fileattr;                   /* file attribute group */
        !            71:        attrgroup_t forkattr;                   /* fork attribute group */
        !            72: };
        !            73: 
        !            74: typedef struct attrreference {
        !            75:        long attr_dataoffset;
        !            76:        size_t attr_length;
        !            77: } attrreference_t;
        !            78: 
        !            79: /* XXX PPD This is derived from HFSVolumePriv.h and should perhaps be referenced from there? */
        !            80: 
        !            81: struct diskextent {
        !            82:        u_int32_t                                       startblock;                             /* first block allocated */
        !            83:        u_int32_t                                       blockcount;                             /* number of blocks allocated */
        !            84: };
        !            85: 
        !            86: typedef struct diskextent extentrecord[8];
        !            87: 
        !            88: #define ATTR_BIT_MAP_COUNT 5
        !            89: 
        !            90: #define ATTR_CMN_NAME                          0x00000001
        !            91: #define ATTR_CMN_DEVID                         0x00000002
        !            92: #define ATTR_CMN_FSID                          0x00000004
        !            93: #define ATTR_CMN_OBJTYPE                       0x00000008
        !            94: #define ATTR_CMN_OBJTAG                                0x00000010
        !            95: #define ATTR_CMN_OBJID                         0x00000020
        !            96: #define ATTR_CMN_OBJPERMANENTID                0x00000040
        !            97: #define ATTR_CMN_PAROBJID                      0x00000080
        !            98: #define ATTR_CMN_SCRIPT                                0x00000100
        !            99: #define ATTR_CMN_CRTIME                                0x00000200
        !           100: #define ATTR_CMN_MODTIME                       0x00000400
        !           101: #define ATTR_CMN_CHGTIME                       0x00000800
        !           102: #define ATTR_CMN_ACCTIME                       0x00001000
        !           103: #define ATTR_CMN_BKUPTIME                      0x00002000
        !           104: #define ATTR_CMN_FNDRINFO                      0x00004000
        !           105: #define ATTR_CMN_OWNERID                       0x00008000
        !           106: #define ATTR_CMN_GRPID                         0x00010000
        !           107: #define ATTR_CMN_ACCESSMASK                    0x00020000
        !           108: #define ATTR_CMN_FLAGS                         0x00040000
        !           109: #define ATTR_CMN_NAMEDATTRCOUNT                0x00080000
        !           110: #define ATTR_CMN_NAMEDATTRLIST         0x00100000
        !           111: 
        !           112: #define ATTR_CMN_VALIDMASK                     0x001FFFFF
        !           113: #define ATTR_CMN_SETMASK                       0x0007FF00
        !           114: #define ATTR_CMN_VOLSETMASK                     0x00006700
        !           115: 
        !           116: #define ATTR_VOL_FSTYPE                                0x00000001
        !           117: #define ATTR_VOL_SIGNATURE                     0x00000002
        !           118: #define ATTR_VOL_SIZE                          0x00000004
        !           119: #define ATTR_VOL_SPACEFREE                     0x00000008
        !           120: #define ATTR_VOL_SPACEAVAIL                    0x00000010
        !           121: #define ATTR_VOL_MINALLOCATION         0x00000020
        !           122: #define ATTR_VOL_ALLOCATIONCLUMP       0x00000040
        !           123: #define ATTR_VOL_IOBLOCKSIZE           0x00000080
        !           124: #define ATTR_VOL_OBJCOUNT                      0x00000100
        !           125: #define ATTR_VOL_FILECOUNT                     0x00000200
        !           126: #define ATTR_VOL_DIRCOUNT                      0x00000400
        !           127: #define ATTR_VOL_MAXOBJCOUNT           0x00000800
        !           128: #define ATTR_VOL_MOUNTPOINT                    0x00001000
        !           129: #define ATTR_VOL_NAME                          0x00002000
        !           130: #define ATTR_VOL_MOUNTFLAGS                     0x00004000
        !           131: #define ATTR_VOL_MOUNTEDDEVICE       0x00008000
        !           132: #define ATTR_VOL_ENCODINGSUSED         0x00010000
        !           133: #define ATTR_VOL_INFO                          0x80000000
        !           134: 
        !           135: #define ATTR_VOL_VALIDMASK                     0x8001FFFF
        !           136: #define ATTR_VOL_SETMASK                       0x80002000
        !           137: 
        !           138: 
        !           139: /* File/directory attributes: */
        !           140: #define ATTR_DIR_LINKCOUNT                     0x00000001
        !           141: #define ATTR_DIR_ENTRYCOUNT                    0x00000002
        !           142: 
        !           143: #define ATTR_DIR_VALIDMASK                     0x00000003
        !           144: #define ATTR_DIR_SETMASK                       0x00000000
        !           145: 
        !           146: #define ATTR_FILE_LINKCOUNT                    0x00000001
        !           147: #define ATTR_FILE_TOTALSIZE                    0x00000002
        !           148: #define ATTR_FILE_ALLOCSIZE                    0x00000004
        !           149: #define ATTR_FILE_IOBLOCKSIZE          0x00000008
        !           150: #define ATTR_FILE_CLUMPSIZE                    0x00000010
        !           151: #define ATTR_FILE_DEVTYPE                      0x00000020
        !           152: #define ATTR_FILE_FILETYPE                     0x00000040
        !           153: #define ATTR_FILE_FORKCOUNT                    0x00000080
        !           154: #define ATTR_FILE_FORKLIST                     0x00000100
        !           155: #define ATTR_FILE_DATALENGTH           0x00000200
        !           156: #define ATTR_FILE_DATAALLOCSIZE                0x00000400
        !           157: #define ATTR_FILE_DATAEXTENTS          0x00000800
        !           158: #define ATTR_FILE_RSRCLENGTH           0x00001000
        !           159: #define ATTR_FILE_RSRCALLOCSIZE                0x00002000
        !           160: #define ATTR_FILE_RSRCEXTENTS          0x00004000
        !           161: 
        !           162: #define ATTR_FILE_VALIDMASK                    0x00007FFF
        !           163: #define ATTR_FILE_SETMASK                      0x00000020
        !           164: 
        !           165: #define ATTR_FORK_TOTALSIZE                    0x00000001
        !           166: #define ATTR_FORK_ALLOCSIZE                    0x00000002
        !           167: 
        !           168: #define ATTR_FORK_VALIDMASK                    0x00000003
        !           169: #define ATTR_FORK_SETMASK                      0x00000000
        !           170: 
        !           171: #define SRCHFS_START                                   0x00000001
        !           172: #define SRCHFS_MATCHPARTIALNAMES               0x00000002
        !           173: #define SRCHFS_MATCHDIRS                               0x00000004
        !           174: #define SRCHFS_MATCHFILES                              0x00000008
        !           175: #define SRCHFS_NEGATEPARAMS                    0x80000000
        !           176: #define SRCHFS_VALIDOPTIONSMASK                        0x8000000F
        !           177: 
        !           178: struct fssearchblock {
        !           179:        struct attrlist         *returnattrs;
        !           180:        void                            *returnbuffer;
        !           181:        size_t                          returnbuffersize;
        !           182:        u_long                          maxmatches;
        !           183:        struct timeval          timelimit;
        !           184:        void                            *searchparams1;
        !           185:        size_t                          sizeofsearchparams1;
        !           186:        void                            *searchparams2;
        !           187:        size_t                          sizeofsearchparams2;
        !           188:        struct attrlist         searchattrs;
        !           189: };
        !           190: 
        !           191: 
        !           192: struct searchstate {
        !           193:        u_char                          reserved[556];          //      sizeof( SearchState )
        !           194: };
        !           195: 
        !           196: 
        !           197: 
        !           198: #define FST_EOF (-1)                           /* end-of-file offset */
        !           199: 
        !           200: __BEGIN_DECLS
        !           201: /* XXX PPD This should be moved to dirent.h to be with getdirentries(2) et al. */
        !           202: //int getdirentriesattr(int fd, const struct attrlist *attrspec, void *attrbuf, size_t bufsize, long //*cookie);
        !           203: 
        !           204: __END_DECLS
        !           205: 
        !           206: #endif /* !_SYS_ATTR_H_ */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.