-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdef.php
More file actions
55 lines (45 loc) · 1.29 KB
/
def.php
File metadata and controls
55 lines (45 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
const PHP_QUOTA_DEF = '
#ifndef PHP_QUOTA_H
#define PHP_QUOTA_H
#include <stdint.h>
typedef enum quota_type {
PHP_QUOTA_TYPE_USER = 0,
PHP_QUOTA_TYPE_GROUP = 1,
} quota_type;
typedef struct query_ret
{
uint64_t bc, bs, bh, bt, fc, fs, fh, ft;
} query_ret;
typedef struct getmntent_ret
{
char *dev;
char *path;
char *type;
char *opts;
// freemask stores which strings are "owned" by this object and need to be
// freed.
//
// (freemask & (1 << 0)): dev
// (freemask & (1 << 1)): path
// (freemask & (1 << 2)): type
// (freemask & (1 << 3)): opts
char freemask;
} getmntent_ret;
// TODO: enum or bool for kind
query_ret quota_query (char *dev, int uid, quota_type kind);
int quota_setqlim (char *dev, int uid, double bs, double bh, double fs,
double fh, int timelimflag, quota_type kind);
int quota_sync (char *dev);
query_ret quota_rpcquery (char *host, char *path, int uid, quota_type kind);
void quota_rpcpeer (unsigned int port, unsigned int use_tcp,
unsigned int timeout);
int quota_rpcauth (int uid, int gid, char *hostname);
int quota_setmntent ();
getmntent_ret quota_getmntent ();
void quota_getmntent_free (getmntent_ret ret);
void quota_endmntent ();
char *quota_getqcargtype ();
const char *quota_strerr ();
#endif
';