include/ntquotas.h

説明を見る。
00001 /* 
00002    Unix SMB/CIFS implementation.
00003    NT QUOTA code constants
00004    Copyright (C) Stefan (metze) Metzmacher      2003
00005    
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 2 of the License, or
00009    (at your option) any later version.
00010    
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015    
00016    You should have received a copy of the GNU General Public License
00017    along with this program; if not, write to the Free Software
00018    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019 */
00020 
00021 #ifndef _NTQUOTAS_H
00022 #define _NTQUOTAS_H
00023 
00024 /* 
00025  * details for Quota Flags:
00026  * 
00027  * 0x20 Log Limit: log if the user exceeds his Hard Quota
00028  * 0x10 Log Warn:  log if the user exceeds his Soft Quota
00029  * 0x02 Deny Disk: deny disk access when the user exceeds his Hard Quota
00030  * 0x01 Enable Quotas: enable quota for this fs
00031  *
00032  */
00033 
00034 #define QUOTAS_ENABLED          0x0001
00035 #define QUOTAS_DENY_DISK        0x0002
00036 #define QUOTAS_LOG_VIOLATIONS   0x0004
00037 #define CONTENT_INDEX_DISABLED  0x0008
00038 #define QUOTAS_LOG_THRESHOLD    0x0010
00039 #define QUOTAS_LOG_LIMIT        0x0020
00040 #define LOG_VOLUME_THRESHOLD    0x0040
00041 #define LOG_VOLUME_LIMIT        0x0080
00042 #define QUOTAS_INCOMPLETE       0x0100
00043 #define QUOTAS_REBUILDING       0x0200
00044 #define QUOTAS_0400             0x0400
00045 #define QUOTAS_0800             0x0800
00046 #define QUOTAS_1000             0x1000
00047 #define QUOTAS_2000             0x2000
00048 #define QUOTAS_4000             0x4000
00049 #define QUOTAS_8000             0x8000
00050 
00051 #define SMB_NTQUOTAS_NO_LIMIT   ((SMB_BIG_UINT)(-1))
00052 #define SMB_NTQUOTAS_NO_ENTRY   ((SMB_BIG_UINT)(-2))
00053 #define SMB_NTQUOTAS_NO_SPACE   ((SMB_BIG_UINT)(0))
00054 #define SMB_NTQUOTAS_1_B        (SMB_BIG_UINT)0x0000000000000001
00055 #define SMB_NTQUOTAS_1KB        (SMB_BIG_UINT)0x0000000000000400
00056 #define SMB_NTQUOTAS_1MB        (SMB_BIG_UINT)0x0000000000100000
00057 #define SMB_NTQUOTAS_1GB        (SMB_BIG_UINT)0x0000000040000000
00058 #define SMB_NTQUOTAS_1TB        (SMB_BIG_UINT)0x0000010000000000
00059 #define SMB_NTQUOTAS_1PB        (SMB_BIG_UINT)0x0004000000000000
00060 #define SMB_NTQUOTAS_1EB        (SMB_BIG_UINT)0x1000000000000000
00061 
00062 enum SMB_QUOTA_TYPE {
00063         SMB_INVALID_QUOTA_TYPE = -1,
00064         SMB_USER_FS_QUOTA_TYPE = 1,
00065         SMB_USER_QUOTA_TYPE = 2,
00066         SMB_GROUP_FS_QUOTA_TYPE = 3,/* not used yet */
00067         SMB_GROUP_QUOTA_TYPE = 4 /* not in use yet, maybe for disk_free queries */
00068 };
00069 
00070 typedef struct _SMB_NTQUOTA_STRUCT {
00071         enum SMB_QUOTA_TYPE qtype;
00072         SMB_BIG_UINT usedspace;
00073         SMB_BIG_UINT softlim;
00074         SMB_BIG_UINT hardlim;
00075         uint32 qflags;
00076         DOM_SID sid;
00077 } SMB_NTQUOTA_STRUCT;
00078 
00079 typedef struct _SMB_NTQUOTA_LIST {
00080         struct _SMB_NTQUOTA_LIST *prev,*next;
00081         TALLOC_CTX *mem_ctx;
00082         uid_t uid;
00083         SMB_NTQUOTA_STRUCT *quotas;
00084 } SMB_NTQUOTA_LIST;
00085 
00086 typedef struct _SMB_NTQUOTA_HANDLE {
00087         BOOL valid;
00088         SMB_NTQUOTA_LIST *quota_list;
00089         SMB_NTQUOTA_LIST *tmp_list;
00090 } SMB_NTQUOTA_HANDLE;
00091 
00092 #define CHECK_NTQUOTA_HANDLE_OK(fsp,conn)       (FNUM_OK(fsp,conn) &&\
00093          (fsp)->fake_file_handle &&\
00094          ((fsp)->fake_file_handle->type == FAKE_FILE_TYPE_QUOTA) &&\
00095          (fsp)->fake_file_handle->pd)
00096 
00097 #endif /*_NTQUOTAS_H */

Sambaに対してSat Aug 29 21:22:54 2009に生成されました。  doxygen 1.4.7