-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDATA_STRUCTURES
339 lines (279 loc) · 12.5 KB
/
DATA_STRUCTURES
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
Updated: 4/12/2013
glutil can perform IO operations on glFTPd binary logs (any vanilla
binary file you can find in /logs folder), shared mem segment containing
online users info, or the filesystem, based on advanced filtering
methods. Extensive formatting options are available, output can be
passed along to the shell or written to stdout (see -exec[v] and -print[f]).
This document contains a full list of data fields that are available.
Fields are referenced using static variable names and accepted by
--[i]regex[i], --[i]match, --[i]lom, --sort, -exec family instructions
and -print[f] (see --help)
Mind, that whenever passing arguments to -exec[v] or -print[f],
{} enclosures to be used around variables (e.g. {dir}, {time}, ...)
* NOTE: As of 1.9-34, data log field names are guaranteed to be the
same when reading and writing. For instance, filtering by a specific
field (regex,lom,..) takes the same field name argument as textform
datalog records (used when injecting data into logs, -z).
Some field names were changed.
* NOTE: Fields are added all the time, check CHANGELOG or commit
history to see when they were added, except when using the latest
version
FLAGS:
S = string
I = integer
F = float
E = extra info (not part of actual data structure)
| FIELD | TYPE | DESCRIPTION |
+---------+------+----------------------------------------------------+
; GLOBAL (applies everywhere)
exe S Absolute path to self
procid S Self process id
ipc S glFTPd's IPC key set in system (or glutil)
glroot S glFTPd root path
siteroot S glFTPd site root path
ftpdata S glFTPd data path
logroot S Absolute path to logs folder
logfile S glutil log file path
imdbfile S iMDB log path
tvragefile S TVRAGE log path
nukestr S glFTPd nuke string extracted from glftpd.conf
memlimit S Maximum number of bytes that can be buffered
glconf S Path to glftpd.conf per glconf.h
curtime S Seconds passed since Epoch
?<..> S Extended directives (see MANUAL)
Used to store intermediate and final results from arithmetic ops:
s64glob[n] IE 64-bit signed
u64glob[n] IE 64-bit unsigned
f32glob[n] IE 32-bit floating-point
There are 256 variables [n] available for each type;
s64glob[0-255]
u64glob[0-255]
f32glob[0-255]
Do not reference them with square brackets around indexes, correct example:
.. {s64glob3} .. {f32glob19} ..
; FILESYSTEM (applies to -x, -d, -n, -a, -h and -k)
path S Full path
basepath S Base path
size S Total size, in bytes
mode I File type (glutil --info -vv)
devid I ID of device containing file
major I Class ID of device
minor I ID of the device in class
inode I inode number
links I Number of hard links
rlink S Read value of a symbolic link
uid I User ID of owner
gid I Uroup ID of owner
user S Username of the owner
group S Group of the owner
blksize I Optimal block size for filesystem I/O
blocks I Number of 512B blocks allocated
sparse F File's sparseness.
atime I Time of last access
mtime I Time of last modification
ctime I Time of last status change
isread I 1 = Read access, 0 = No read access, -1 = Operation failed
iswrite I 1 = Write access, 0 = No write access, -1 = Operation failed
isexec I 1 = Execute access, 0 = No execute access, -1 = Operation failed
uperm I User permission octet
gperm I Group permission octet
operm I Others permission octet
sperm I SUID/SGID/sticky bit octet
perm S File permissions string
pbits I Permission bits
st_mode I Permission value
crc32 I CRC32 of file (hexadecimal)
dec-crc32 S (OBSOLETE) CRC32 of file (decimal)
depth I Current directory tree depth
data E Raw data contained in 'path' (must not be a directory)
c:<key> S Retrieve line starting with <key>, followed by a space or tab (meant for glftpd config files)
; DIRLOG
dir S The name of the dir (fullpath)
mode ES File type (glutil --info -vv)
basedir ES The name of the dir (basepath)
x:<field> ES Returns FILESYSTEM info on <dir> (available fields listed above)
xg:<field> ES Returns FILESYSTEM info on /glroot/<dir> (available fields listed above)
nuser ES User name of the creator
ngroup ES Group name of the creator
status I 0 = NEWDIR, 1 = NUKE, 2 = UNNUKE, 3 = DELETED
time I Creation time since epoch (man 2 time)
user I The userid of the creator
group I The groupid of the primary group of the creator
files I The number of files inside the dir
size I The number of bytes in the dir
; NUKELOG
dir S The name of the dir (fullpath)
basedir ES The name of the dir (basepath)
x:<field> ES Returns FILESYSTEM info on <dir> (available fields listed above)
xg:<field> ES Returns FILESYSTEM info on /glroot/<dir> (available fields listed above)
mode ES File type (glutil --info -vv)
status I 0 = NUKED, 1 = UNNUKED
time I The nuke time since epoch (man 2 time)
nuker S The name of the nuker
unnuker S The name of the unnuker
nukee S The name of the nukee
mult I The nuke multiplier
size F The number of bytes nuked
reason S The nuke reason
; DUPEFILE
file S The file name
time I Creation time since epoch (man 2 time)
user S The name of the uploader
; LASTONLOG
user S Username
group S Users primary group
tag S Users tagline
logon I Users logon time
logoff I Users logoff time
upload I Bytes uploaded
download I Bytes downloaded
stats S What did the user do ?
; ONELINER
user S The user that added the oneliner
group S The primary group of the user who added the oneliner
tag S The tagline of the user who added the oneliner
time I The time the message was added (epoch)
msg S The message (oneliner)
; ONLINE (shared memory segment)
user S The username of the user
tag S The users tagline
time I The login time since the epoch (man 2 time)
status I The status of the user, idle, RETR, etc
host S The host the user is comming from (with ident)
dir S The users current dir (fullpath)
basedir ES The filename component of fullpath current dir (basepath)
ndir ES The directory component of fullpath current dir
ssl I 0 = no ssl, 1 = ssl on control, 2 = ssl on control and data
group I The group id of the users primary group
pid I The processor id of the process
lupdtime I Last update time since epoch (man 2 time)
lxfertime I The time of the last succesfull transfer
bxfer I Bytes transferred so far
btxfer I Bytes transferred in the last loop (speed limiting)
rate I Transfer rate in B/s, calculated from bxfer and lupdtime
; glutil specific:
; IMDB
dir S The directory name related to record
mode ES File type (glutil --info -vv)
basedir ES The directory name related to record (basepath)
x:<field> ES Returns FILESYSTEM info on <dir> (available fields listed above)
xg:<field> ES Returns FILESYSTEM info on /glroot/<dir> (available fields listed above)
time I Creation time since epoch (man 2 time)
imdbid S iMDB object ID
score F iMDB score
votes I iMDB votes
genre S Listed genres
rated S Rating
title S Title
director S Director
actors S Actors
released I Released time since epoch (man 2 time)
runtime I Runtime
year I Year of release | !*changed from string to integer in 1.9-72, update existing databases*!
country S Country
language S Language
plot S Plot/synopsis
screens I Number of screenings
type S Media type (movie/tv/..)
; TVRAGE
dir S The directory name related to record
basedir ES The name of the dir (basepath)
x:<field> ES Returns FILESYSTEM info on <dir> (available fields listed above)
xg:<field> ES Returns FILESYSTEM info on /glroot/<dir> (available fields listed above)
mode ES File type (glutil --info -vv)
time I Creation time since epoch (man 2 time)
showid I TVRAGE show id
name S Show name
link S TVRAGE link to show
country S Country of origin
airtime S Airing time
airday S Air day of the week
runtime I Show runtime in minutes
started I Show starting time since epoch
ended I Show ended time since epoch
startyear I Year show started
endyear I Year show ended
seasons I Total number of seasons
class S Show classification
genre S Show genres
network S Show network
status S Show status
; GAME
dir S The directory name related to record
basedir ES The name of the dir (basepath)
x:<field> ES Returns FILESYSTEM info on <dir> (available fields listed above)
xg:<field> ES Returns FILESYSTEM info on /glroot/<dir> (available fields listed above)
mode ES File type (glutil --info -vv)
time I Creation time since epoch (man 2 time)
score F Game score
; GENERIC-1 (ge1)
i32 I 32-bit integer field
ge1 S 255 byte signed character field
ge2 S -||-
ge3 S -||-
ge4 S -||-
ge5 S -||-
ge6 S -||-
ge7 S -||-
ge8 S -||-
; GENERIC-2 (ge2)
i1 I 32-bit signed integer field
i2 I -||-
i3 I -||-
i4 I -||-
u1 I 32-bit unsigned integer field
u2 I -||-
u3 I -||-
u4 I -||-
ul1 I 64-bit unsigned integer field
ul2 I -||-
ul3 I -||-
ul4 I -||-
f1 I 32 bit floating point field
f2 I -||-
f3 I -||-
f4 I -||-
ge1 S 255 byte signed character field
ge2 S -||-
ge3 S -||-
ge4 S -||-
ge5 S 128 byte signed character field
ge6 S -||-
ge7 S -||-
ge8 S -||-
; GENERIC-3 (ge3)
i1 I 32-bit signed integer field
i2 I -||-
u1 I 32-bit unsigned integer field
u2 I -||-
ul1 I 64-bit unsigned integer field
ul2 I -||-
ge1 S 255 byte signed character field
ge2 S -||-
ge3 S 128 byte signed character field
ge4 S -||-
; GENERIC-4 (ge4)
i1 I 32-bit signed integer field
i2 I -||-
u1 I 32-bit unsigned integer field
u2 I -||-
ul1 I 64-bit unsigned integer field
ul2 I -||-
ge1 S 4096 byte signed character field
ge2 S 255 byte signed character field
ge3 S 128 byte signed character field
ge4 S -||-
; ALTLOG
file S The name of the file (fullpath)
mode ES File type (glutil --info -vv)
basedir ES The name of the file (basepath)
x:<field> ES Returns FILESYSTEM info on <dir> (available fields listed above)
xg:<field> ES Returns FILESYSTEM info on /glroot/<dir> (available fields listed above)
nuser ES User name of the creator
ngroup ES Group name of the creator
status I Reserved
time I Creation time since epoch (man 2 time)
user I The user id of the creator
group I The group id of the primary group of the creator
files I Reserved
size I The size of the file