21 |
open Md4 |
open Md4 |
22 |
open CommonDownloads |
open CommonDownloads |
23 |
open CommonTypes |
open CommonTypes |
24 |
|
open CommonStats |
25 |
(* |
(* |
26 |
|
|
27 |
module MyList = struct |
module MyList = struct |
201 |
| Brand_emuleplus |
| Brand_emuleplus |
202 |
| Brand_hydranode |
| Brand_hydranode |
203 |
|
|
204 |
let brand_count = 15 |
let brand_list = [ |
205 |
|
( Brand_unknown , "unknown" , "unk" ) ; |
206 |
|
( Brand_edonkey , "eDonkey" , "eDK" ) ; |
207 |
|
( Brand_cdonkey , "cDonkey" , "cDK" ) ; |
208 |
|
( Brand_mldonkey1 , "old mldonkey" , "oML" ) ; |
209 |
|
( Brand_mldonkey2 , "new mldonkey" , "nML" ) ; |
210 |
|
( Brand_mldonkey3 , "trusted mld" , "tML" ) ; |
211 |
|
( Brand_overnet , "Overnet" , "OVR" ) ; |
212 |
|
( Brand_newemule , "eMule" , "eMU" ) ; |
213 |
|
( Brand_lmule , "xMule" , "xMU" ) ; |
214 |
|
( Brand_shareaza , "shareaza" , "sZA" ) ; |
215 |
|
( Brand_server , "server" , "SER" ) ; |
216 |
|
( Brand_amule , "aMule" , "aMU" ) ; |
217 |
|
( Brand_lphant , "lPhant" , "lPH" ) ; |
218 |
|
( Brand_emuleplus , "ePlus" , "eM+" ) ; |
219 |
|
( Brand_hydranode , "Hydra" , "Hyd" ) ; |
220 |
|
] |
221 |
|
|
222 |
|
let brand_count = List.length brand_list |
223 |
|
|
224 |
type brand_mod = |
type brand_mod = |
225 |
Brand_mod_unknown |
Brand_mod_unknown |
336 |
| Brand_mod_enos |
| Brand_mod_enos |
337 |
| Brand_mod_webys |
| Brand_mod_webys |
338 |
|
|
339 |
let brand_mod_count = 113 |
let brand_mod_list = [ |
340 |
|
( Brand_mod_unknown , "unknown" , "" ) ; |
341 |
|
( Brand_mod_extasy , "Extasy" , "ext" ) ; |
342 |
|
( Brand_mod_hunter , "Hunter" , "hun" ) ; |
343 |
|
( Brand_mod_sivka , "Sivka" , "siv" ) ; |
344 |
|
( Brand_mod_ice , "IcE" , "ice" ) ; |
345 |
|
( Brand_mod_plus , "Plus" , "plu" ) ; |
346 |
|
( Brand_mod_lsd , "LSD" , "lsd" ) ; |
347 |
|
( Brand_mod_maella , "Maella" , "mae" ) ; |
348 |
|
( Brand_mod_pille , "Pille" , "pil" ) ; |
349 |
|
( Brand_mod_morphkad , "MorphKad" , "mo1" ) ; |
350 |
|
( Brand_mod_efmod , "eF-MOD" , "efm" ) ; |
351 |
|
( Brand_mod_xtreme , "Xtreme" , "xtr" ) ; |
352 |
|
( Brand_mod_bionic , "Bionic" , "bio" ) ; |
353 |
|
( Brand_mod_pawcio , "Pawcio" , "paw" ) ; |
354 |
|
( Brand_mod_zzul , "ZZUL" , "zzu" ) ; |
355 |
|
( Brand_mod_blackhand , "Black Hand" , "bla" ) ; |
356 |
|
( Brand_mod_lovelace , "lovelace" , "lov" ) ; |
357 |
|
( Brand_mod_morphnext , "MorphNext" , "mo2" ) ; |
358 |
|
( Brand_mod_fincan , "fincan" , "fin" ) ; |
359 |
|
( Brand_mod_ewombat , "eWombat" , "ewo" ) ; |
360 |
|
( Brand_mod_morph , "Morph" , "mo3" ) ; |
361 |
|
( Brand_mod_mortillo , "MorTillo" , "mot" ) ; |
362 |
|
( Brand_mod_lh , "LionHeart" , "lh" ) ; |
363 |
|
( Brand_mod_emulespana , "emulEspa\241a" , "esp" ) ; |
364 |
|
( Brand_mod_blackrat , "BlackRat" , "blr" ) ; |
365 |
|
( Brand_mod_enkeydev , "enkeyDev" , "ekd" ) ; |
366 |
|
( Brand_mod_gnaddelwarz , "Gnaddelwarz" , "gna" ) ; |
367 |
|
( Brand_mod_phoenixkad , "pHoeniX-KAD" , "pkd" ) ; |
368 |
|
( Brand_mod_koizo , "koizo" , "koi" ) ; |
369 |
|
( Brand_mod_ed2kfiles , "ed2kFiles" , "edf" ) ; |
370 |
|
( Brand_mod_athlazan , "Athlazan" , "ath" ) ; |
371 |
|
( Brand_mod_cryptum , "Cryptum" , "cry" ) ; |
372 |
|
( Brand_mod_lamerzchoice , "LamerzChoice" , "lam" ) ; |
373 |
|
( Brand_mod_notdead , "NotDead" , "nod" ) ; |
374 |
|
( Brand_mod_peace , "peace" , "pea" ) ; |
375 |
|
( Brand_mod_goldicryptum , "GoldiCryptum" , "gcr" ) ; |
376 |
|
( Brand_mod_eastshare , "EastShare" , "eas" ) ; |
377 |
|
( Brand_mod_mfck , "[MFCK]" , "mfc" ) ; |
378 |
|
( Brand_mod_echanblard , "eChanblard" , "ech" ) ; |
379 |
|
( Brand_mod_sp4rk , "Sp4rK" , "sp4" ) ; |
380 |
|
( Brand_mod_powermule , "PowerMule" , "pow" ) ; |
381 |
|
( Brand_mod_bloodymad , "bloodymad" , "blo" ) ; |
382 |
|
( Brand_mod_roman2k , "Roman2K" , "rom" ) ; |
383 |
|
( Brand_mod_gammaoh , "GaMMaOH" , "gam" ) ; |
384 |
|
( Brand_mod_elfenwombat , "ElfenWombat" , "elf" ) ; |
385 |
|
( Brand_mod_o2 , "O2" , "o2" ) ; |
386 |
|
( Brand_mod_dm , "DM" , "DM" ) ; |
387 |
|
( Brand_mod_sfiom , "SF-IOM" , "SFI" ) ; |
388 |
|
( Brand_mod_magic_elseve , "Magic-Elseve" , "MEl" ) ; |
389 |
|
( Brand_mod_schlumpmule , "SchlumpMule" , "sch" ) ; |
390 |
|
( Brand_mod_lc , "LC" , "LC" ) ; |
391 |
|
( Brand_mod_noamson , "NoamSon" , "NoS" ) ; |
392 |
|
( Brand_mod_stormit , "Stormit" , "Sto" ) ; |
393 |
|
( Brand_mod_omax , "OMaX" , "OMX" ) ; |
394 |
|
( Brand_mod_mison , "Mison" , "Mis" ) ; |
395 |
|
( Brand_mod_phoenix , "Phoenix" , "pPho" ) ; |
396 |
|
( Brand_mod_spiders , "Spiders" , "spi" ) ; |
397 |
|
( Brand_mod_iberica , "Ib\233rica" , "Ib" ) ; |
398 |
|
( Brand_mod_mortimer , "Mortimer" , "mor" ) ; |
399 |
|
( Brand_mod_stonehenge , "Stonehenge" , "sto" ) ; |
400 |
|
( Brand_mod_xlillo , "Xlillo" , "Xli" ) ; |
401 |
|
( Brand_mod_imperator , "ImperatoR" , "Imp" ) ; |
402 |
|
( Brand_mod_raziboom , "Raziboom" , "Raz" ) ; |
403 |
|
( Brand_mod_khaos , "Khaos" , "Kha" ) ; |
404 |
|
( Brand_mod_hardmule , "Hardmule" , "Har" ) ; |
405 |
|
( Brand_mod_sc , "SC" , "SC" ) ; |
406 |
|
( Brand_mod_cy4n1d , "Cy4n1d" , "Cy4" ) ; |
407 |
|
( Brand_mod_dmx , "DMX" , "DMX" ) ; |
408 |
|
( Brand_mod_ketamine , "Ketamine" , "Ket" ) ; |
409 |
|
( Brand_mod_blackmule , "Blackmule" , "blm" ) ; |
410 |
|
( Brand_mod_morphxt , "MorphXT" , "Mxt" ) ; |
411 |
|
( Brand_mod_ngdonkey , "ngdonkey" , "ngd" ) ; |
412 |
|
( Brand_mod_cyrex , "Cyrex" , "haw" ) ; |
413 |
|
( Brand_mod_hawkstar , "Hawkstar" , "neo" ) ; |
414 |
|
( Brand_mod_neomule , "Neo Mule" , "cyr" ) ; |
415 |
|
( Brand_mod_aldo , "aldo" , "ald" ) ; |
416 |
|
( Brand_mod_emulede , "emule.de" , "ede" ) ; |
417 |
|
( Brand_mod_zx , "zx" , "zx" ) ; |
418 |
|
( Brand_mod_ibericaxt , "ib\233ricaxt" , "iBx" ) ; |
419 |
|
( Brand_mod_candymule , "candy-mule" , "can" ) ; |
420 |
|
( Brand_mod_ackronic , "ackronic" , "ack" ) ; |
421 |
|
( Brand_mod_rappis , "rappis" , "rap" ) ; |
422 |
|
( Brand_mod_overdose , "overdose" , "ove" ) ; |
423 |
|
( Brand_mod_hebmule , "hebmule" , "heb" ) ; |
424 |
|
( Brand_mod_senfei , "senfei" , "sen" ) ; |
425 |
|
( Brand_mod_spoofmod , "spoofmod" , "spo" ) ; |
426 |
|
( Brand_mod_fusspilz , "fusspilz" , "fus" ) ; |
427 |
|
( Brand_mod_rocket , "rocket" , "roc" ) ; |
428 |
|
( Brand_mod_warezfaw , "warezfaw" , "war" ) ; |
429 |
|
( Brand_mod_emusicmule , "emusicmule" , "emm" ) ; |
430 |
|
( Brand_mod_aideadsl , "aideadsl" , "aid" ) ; |
431 |
|
( Brand_mod_epo , "epo" , "epo" ) ; |
432 |
|
( Brand_mod_kalitsch , "kalitsch" , "kal" ) ; |
433 |
|
( Brand_mod_raynz , "raynz" , "ray" ) ; |
434 |
|
( Brand_mod_serverclient , "serverclient" , "sc" ) ; |
435 |
|
( Brand_mod_bl4ckbird , "bl4ckbird" , "b4b" ) ; |
436 |
|
( Brand_mod_bl4ckf0x , "bl4ckf0x" , "b4f" ) ; |
437 |
|
( Brand_mod_rt , "rt" , "rt" ) ; |
438 |
|
( Brand_mod_airionix , "air-ionix" , "aio" ) ; |
439 |
|
( Brand_mod_ionix , "ionix" , "ion" ) ; |
440 |
|
( Brand_mod_tornado , "tornado" , "tor" ) ; |
441 |
|
( Brand_mod_antifaker , "anti-faker" , "anf" ) ; |
442 |
|
( Brand_mod_netf , "netf" , "nef" ) ; |
443 |
|
( Brand_mod_nextemf , "nextemf" , "nxf" ) ; |
444 |
|
( Brand_mod_proemule , "proemule" , "pem" ) ; |
445 |
|
( Brand_mod_szemule , "szemule" , "sze" ) ; |
446 |
|
( Brand_mod_darkmule , "darkmule" , "dar" ) ; |
447 |
|
( Brand_mod_miragemod , "miragemod" , "mir" ) ; |
448 |
|
( Brand_mod_nextevolution , "nextevolution" , "nxe" ) ; |
449 |
|
( Brand_mod_pootzgrila , "pootzgrila" , "poo" ) ; |
450 |
|
( Brand_mod_freeangel , "freeangel" , "fre" ) ; |
451 |
|
( Brand_mod_enos , "enos" , "eno" ) ; |
452 |
|
( Brand_mod_webys , "webys" , "wys" ) ; |
453 |
|
] |
454 |
|
|
455 |
|
let brand_mod_count = List.length brand_mod_list |
456 |
|
|
457 |
|
let brand_to_string brand = |
458 |
|
find_brand_to_string brand brand_list false |
459 |
|
|
460 |
|
let brand_to_string_short brand = |
461 |
|
find_brand_to_string brand brand_list true |
462 |
|
|
463 |
|
let brand_mod_to_string brand = |
464 |
|
find_brand_to_string brand brand_mod_list false |
465 |
|
|
466 |
|
let brand_mod_to_string_short brand = |
467 |
|
find_brand_to_string brand brand_mod_list true |
468 |
|
|
469 |
|
let brand_to_int brand = |
470 |
|
find_int_of_brand brand brand_list |
471 |
|
|
472 |
|
let brand_mod_to_int brand = |
473 |
|
find_int_of_brand brand brand_mod_list |
474 |
|
|
475 |
type source_uid = |
type source_uid = |
476 |
Direct_address of Ip.t * int |
Direct_address of Ip.t * int |
674 |
mutable client_downloaded : Int64.t; |
mutable client_downloaded : Int64.t; |
675 |
mutable client_uploaded : Int64.t; |
mutable client_uploaded : Int64.t; |
676 |
mutable client_brand : brand; |
mutable client_brand : brand; |
677 |
mutable client_mod_brand : brand_mod; |
mutable client_brand_mod : brand_mod; |
678 |
mutable client_banned : bool; |
mutable client_banned : bool; |
679 |
mutable client_score : int; |
mutable client_score : int; |
680 |
mutable client_next_queue : int; |
mutable client_next_queue : int; |
973 |
*) |
*) |
974 |
*) |
*) |
975 |
|
|
|
type brand_stat = { |
|
|
mutable brand_seen : int; |
|
|
mutable brand_banned : int; |
|
|
mutable brand_filerequest : int; |
|
|
mutable brand_download : Int64.t; |
|
|
mutable brand_upload : Int64.t; |
|
|
} |
|
|
|
|
|
type brand_mod_stat = { |
|
|
mutable brand_mod_seen : int; |
|
|
mutable brand_mod_banned : int; |
|
|
mutable brand_mod_filerequest : int; |
|
|
mutable brand_mod_download : Int64.t; |
|
|
mutable brand_mod_upload : Int64.t; |
|
|
} |
|
|
|
|
|
let dummy_stats = |
|
|
{ |
|
|
brand_seen = 0; |
|
|
brand_banned = 0; |
|
|
brand_filerequest = 0; |
|
|
brand_download = Int64.zero; |
|
|
brand_upload = Int64.zero |
|
|
} |
|
|
|
|
|
let dummy_mod_stats = |
|
|
{ |
|
|
brand_mod_seen = 0; |
|
|
brand_mod_banned = 0; |
|
|
brand_mod_filerequest = 0; |
|
|
brand_mod_download = Int64.zero; |
|
|
brand_mod_upload = Int64.zero |
|
|
} |
|
|
|
|
976 |
(* |
(* |
977 |
let string_of_file_tag_name name = |
let string_of_file_tag_name name = |
978 |
match name with |
match name with |