1 (* Copyright 2001, 2002 b8_bavard, b8_fee_carabine, INRIA *)
3 This file is part of mldonkey.
5 mldonkey is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 mldonkey is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with mldonkey; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 let log_prefix = "[EDK]"
30 lprintf_nl2
log_prefix fmt
33 lprintf2
log_prefix fmt
35 exception Donkey_large_file
38 mutable emule_version
: int;
39 mutable emule_release
: string;
40 mutable emule_osinfosupport
: int;
41 mutable emule_features
: int;
43 (* emule_miscoptions1 *)
44 mutable received_miscoptions1
: bool;
45 mutable emule_aich
: int;
46 mutable emule_unicode
: int;
47 mutable emule_udpver
: int;
48 mutable emule_compression
: int;
49 mutable emule_secident
: int;
50 mutable emule_sourceexchange
: int;
51 mutable emule_extendedrequest
: int;
52 mutable emule_comments
: int;
53 mutable emule_peercache
: int;
54 mutable emule_noviewshared
: int;
55 mutable emule_multipacket
: int;
56 mutable emule_supportpreview
: int;
58 (* emule_miscoptions2 *)
59 mutable received_miscoptions2
: bool;
60 mutable emule_require_crypt
: int;
61 mutable emule_request_crypt
: int;
62 mutable emule_support_crypt
: int;
63 mutable emule_extmultipacket
: int;
64 mutable emule_largefiles
: int;
65 mutable emule_kad_version
: int;
83 type request_record
= {
84 mutable last_request
: int;
85 mutable nwarnings
: int;
90 | Reliability_reliable
91 | Reliability_suspicious
of int
113 ( Brand_unknown
, "unknown" , "unk" ) ;
114 ( Brand_edonkey
, "eDonkey" , "eDK" ) ;
115 ( Brand_mldonkey1
, "old mldonkey" , "oML" ) ;
116 ( Brand_mldonkey2
, "new mldonkey" , "nML" ) ;
117 ( Brand_overnet
, "Overnet" , "OVR" ) ;
118 ( Brand_newemule
, "eMule" , "eMU" ) ;
119 ( Brand_server
, "server" , "SER" ) ;
120 ( Brand_mldonkey3
, "trusted mld" , "tML" ) ;
121 ( Brand_cdonkey
, "cDonkey" , "cDK" ) ;
122 ( Brand_lmule
, "xMule" , "xMU" ) ;
123 ( Brand_shareaza
, "shareaza" , "sZA" ) ;
124 ( Brand_amule
, "aMule" , "aMU" ) ;
125 ( Brand_lphant
, "lPhant" , "lPH" ) ;
126 ( Brand_emuleplus
, "ePlus" , "eM+" ) ;
127 ( Brand_hydranode
, "Hydra" , "Hyd" ) ;
128 ( Brand_verycd
, "VeryCD" , "VCD" ) ;
129 ( Brand_imp
, "IMPmule" , "IMP" ) ;
132 let brand_count = List.length
brand_list
150 | Brand_mod_blackhand
152 | Brand_mod_morphnext
158 | Brand_mod_emulespana
161 | Brand_mod_gnaddelwarz
162 | Brand_mod_phoenixkad
164 | Brand_mod_ed2kfiles
167 | Brand_mod_lamerzchoice
170 | Brand_mod_goldicryptum
171 | Brand_mod_eastshare
173 | Brand_mod_echanblard
175 | Brand_mod_powermule
176 | Brand_mod_bloodymad
179 | Brand_mod_elfenwombat
183 | Brand_mod_magic_elseve
184 | Brand_mod_schlumpmule
194 | Brand_mod_stonehenge
196 | Brand_mod_imperator
204 | Brand_mod_blackmule
213 | Brand_mod_ibericaxt
214 | Brand_mod_candymule
224 | Brand_mod_emusicmule
229 | Brand_mod_serverclient
230 | Brand_mod_bl4ckbird
236 | Brand_mod_antifaker
242 | Brand_mod_miragemod
243 | Brand_mod_nextevolution
244 | Brand_mod_pootzgrila
245 | Brand_mod_freeangel
249 let brand_mod_list = [
250 ( Brand_mod_unknown
, "unknown" , "" ) ;
251 ( Brand_mod_extasy
, "Extasy" , "ext" ) ;
252 ( Brand_mod_hunter
, "Hunter" , "hun" ) ;
253 ( Brand_mod_sivka
, "Sivka" , "siv" ) ;
254 ( Brand_mod_ice
, "IcE" , "ice" ) ;
255 ( Brand_mod_plus
, "Plus" , "plu" ) ;
256 ( Brand_mod_lsd
, "LSD" , "lsd" ) ;
257 ( Brand_mod_maella
, "Maella" , "mae" ) ;
258 ( Brand_mod_pille
, "Pille" , "pil" ) ;
259 ( Brand_mod_morphkad
, "MorphKad" , "mo1" ) ;
260 ( Brand_mod_efmod
, "eF-MOD" , "efm" ) ;
261 ( Brand_mod_xtreme
, "Xtreme" , "xtr" ) ;
262 ( Brand_mod_bionic
, "Bionic" , "bio" ) ;
263 ( Brand_mod_pawcio
, "Pawcio" , "paw" ) ;
264 ( Brand_mod_zzul
, "ZZUL" , "zzu" ) ;
265 ( Brand_mod_blackhand
, "Black Hand" , "bla" ) ;
266 ( Brand_mod_lovelace
, "lovelace" , "lov" ) ;
267 ( Brand_mod_morphnext
, "MorphNext" , "mo2" ) ;
268 ( Brand_mod_fincan
, "fincan" , "fin" ) ;
269 ( Brand_mod_ewombat
, "eWombat" , "ewo" ) ;
270 ( Brand_mod_morph
, "Morph" , "mo3" ) ;
271 ( Brand_mod_mortillo
, "MorTillo" , "mot" ) ;
272 ( Brand_mod_lh
, "LionHeart" , "lh" ) ;
273 ( Brand_mod_emulespana
, "emulEspa\241a" , "esp" ) ;
274 ( Brand_mod_blackrat
, "BlackRat" , "blr" ) ;
275 ( Brand_mod_enkeydev
, "enkeyDev" , "ekd" ) ;
276 ( Brand_mod_gnaddelwarz
, "Gnaddelwarz" , "gna" ) ;
277 ( Brand_mod_phoenixkad
, "pHoeniX-KAD" , "pkd" ) ;
278 ( Brand_mod_koizo
, "koizo" , "koi" ) ;
279 ( Brand_mod_ed2kfiles
, "ed2kFiles" , "edf" ) ;
280 ( Brand_mod_athlazan
, "Athlazan" , "ath" ) ;
281 ( Brand_mod_cryptum
, "Cryptum" , "cry" ) ;
282 ( Brand_mod_lamerzchoice
, "LamerzChoice" , "lam" ) ;
283 ( Brand_mod_notdead
, "NotDead" , "nod" ) ;
284 ( Brand_mod_peace
, "peace" , "pea" ) ;
285 ( Brand_mod_goldicryptum
, "GoldiCryptum" , "gcr" ) ;
286 ( Brand_mod_eastshare
, "EastShare" , "eas" ) ;
287 ( Brand_mod_mfck
, "[MFCK]" , "mfc" ) ;
288 ( Brand_mod_echanblard
, "eChanblard" , "ech" ) ;
289 ( Brand_mod_sp4rk
, "Sp4rK" , "sp4" ) ;
290 ( Brand_mod_powermule
, "PowerMule" , "pow" ) ;
291 ( Brand_mod_bloodymad
, "bloodymad" , "blo" ) ;
292 ( Brand_mod_roman2k
, "Roman2K" , "rom" ) ;
293 ( Brand_mod_gammaoh
, "GaMMaOH" , "gam" ) ;
294 ( Brand_mod_elfenwombat
, "ElfenWombat" , "elf" ) ;
295 ( Brand_mod_o2
, "O2" , "o2" ) ;
296 ( Brand_mod_dm
, "DM" , "DM" ) ;
297 ( Brand_mod_sfiom
, "SF-IOM" , "SFI" ) ;
298 ( Brand_mod_magic_elseve
, "Magic-Elseve" , "MEl" ) ;
299 ( Brand_mod_schlumpmule
, "SchlumpMule" , "sch" ) ;
300 ( Brand_mod_lc
, "LC" , "LC" ) ;
301 ( Brand_mod_noamson
, "NoamSon" , "NoS" ) ;
302 ( Brand_mod_stormit
, "Stormit" , "Sto" ) ;
303 ( Brand_mod_omax
, "OMaX" , "OMX" ) ;
304 ( Brand_mod_mison
, "Mison" , "Mis" ) ;
305 ( Brand_mod_phoenix
, "Phoenix" , "pPho" ) ;
306 ( Brand_mod_spiders
, "Spiders" , "spi" ) ;
307 ( Brand_mod_iberica
, "Ib\233rica" , "Ib" ) ;
308 ( Brand_mod_mortimer
, "Mortimer" , "mor" ) ;
309 ( Brand_mod_stonehenge
, "Stonehenge" , "sto" ) ;
310 ( Brand_mod_xlillo
, "Xlillo" , "Xli" ) ;
311 ( Brand_mod_imperator
, "ImperatoR" , "Imp" ) ;
312 ( Brand_mod_raziboom
, "Raziboom" , "Raz" ) ;
313 ( Brand_mod_khaos
, "Khaos" , "Kha" ) ;
314 ( Brand_mod_hardmule
, "Hardmule" , "Har" ) ;
315 ( Brand_mod_sc
, "SC" , "SC" ) ;
316 ( Brand_mod_cy4n1d
, "Cy4n1d" , "Cy4" ) ;
317 ( Brand_mod_dmx
, "DMX" , "DMX" ) ;
318 ( Brand_mod_ketamine
, "Ketamine" , "Ket" ) ;
319 ( Brand_mod_blackmule
, "Blackmule" , "blm" ) ;
320 ( Brand_mod_morphxt
, "MorphXT" , "Mxt" ) ;
321 ( Brand_mod_ngdonkey
, "ngdonkey" , "ngd" ) ;
322 ( Brand_mod_cyrex
, "Cyrex" , "haw" ) ;
323 ( Brand_mod_hawkstar
, "Hawkstar" , "neo" ) ;
324 ( Brand_mod_neomule
, "Neo Mule" , "cyr" ) ;
325 ( Brand_mod_aldo
, "aldo" , "ald" ) ;
326 ( Brand_mod_emulede
, "emule.de" , "ede" ) ;
327 ( Brand_mod_zx
, "zx" , "zx" ) ;
328 ( Brand_mod_ibericaxt
, "ib\233ricaxt" , "iBx" ) ;
329 ( Brand_mod_candymule
, "candy-mule" , "can" ) ;
330 ( Brand_mod_ackronic
, "ackronic" , "ack" ) ;
331 ( Brand_mod_rappis
, "rappis" , "rap" ) ;
332 ( Brand_mod_overdose
, "overdose" , "ove" ) ;
333 ( Brand_mod_hebmule
, "hebmule" , "heb" ) ;
334 ( Brand_mod_senfei
, "senfei" , "sen" ) ;
335 ( Brand_mod_spoofmod
, "spoofmod" , "spo" ) ;
336 ( Brand_mod_fusspilz
, "fusspilz" , "fus" ) ;
337 ( Brand_mod_rocket
, "rocket" , "roc" ) ;
338 ( Brand_mod_warezfaw
, "warezfaw" , "war" ) ;
339 ( Brand_mod_emusicmule
, "emusicmule" , "emm" ) ;
340 ( Brand_mod_aideadsl
, "aideadsl" , "aid" ) ;
341 ( Brand_mod_epo
, "epo" , "epo" ) ;
342 ( Brand_mod_kalitsch
, "kalitsch" , "kal" ) ;
343 ( Brand_mod_raynz
, "raynz" , "ray" ) ;
344 ( Brand_mod_serverclient
, "serverclient" , "sc" ) ;
345 ( Brand_mod_bl4ckbird
, "bl4ckbird" , "b4b" ) ;
346 ( Brand_mod_bl4ckf0x
, "bl4ckf0x" , "b4f" ) ;
347 ( Brand_mod_rt
, "rt" , "rt" ) ;
348 ( Brand_mod_airionix
, "air-ionix" , "aio" ) ;
349 ( Brand_mod_ionix
, "ionix" , "ion" ) ;
350 ( Brand_mod_tornado
, "tornado" , "tor" ) ;
351 ( Brand_mod_antifaker
, "anti-faker" , "anf" ) ;
352 ( Brand_mod_netf
, "netf" , "nef" ) ;
353 ( Brand_mod_nextemf
, "nextemf" , "nxf" ) ;
354 ( Brand_mod_proemule
, "proemule" , "pem" ) ;
355 ( Brand_mod_szemule
, "szemule" , "sze" ) ;
356 ( Brand_mod_darkmule
, "darkmule" , "dar" ) ;
357 ( Brand_mod_miragemod
, "miragemod" , "mir" ) ;
358 ( Brand_mod_nextevolution
, "nextevolution" , "nxe" ) ;
359 ( Brand_mod_pootzgrila
, "pootzgrila" , "poo" ) ;
360 ( Brand_mod_freeangel
, "freeangel" , "fre" ) ;
361 ( Brand_mod_enos
, "enos" , "eno" ) ;
362 ( Brand_mod_webys
, "webys" , "wys" ) ;
365 let brand_mod_count = List.length
brand_mod_list
367 let brand_to_string brand
=
368 find_brand_to_string brand
brand_list false
370 let brand_to_string_short brand
=
371 find_brand_to_string brand
brand_list true
373 let brand_mod_to_string brand
=
374 find_brand_to_string brand
brand_mod_list false
376 let brand_mod_to_string_short brand
=
377 find_brand_to_string brand
brand_mod_list true
379 let brand_to_int brand
=
380 find_int_of_brand brand
brand_list
382 let brand_mod_to_int brand
=
383 find_int_of_brand brand
brand_mod_list
386 Direct_address
of Ip.t
* int
387 | Indirect_address
of Ip.t
* int * int64
* int * Ip.t
388 | Invalid_address
of string * string
390 let id_of_ip ip
= Ip.to_int64
(Ip.rev ip
)
391 let ip_of_id id
= Ip.rev
(Ip.of_int64 id
)
393 module DonkeySources
= CommonSources.Make
(struct
397 type source_brand
= bool
398 let value_to_source_brand = value_to_bool
399 let source_brand_to_value = bool_to_value
400 let dummy_source_brand = false
405 let module_name = "DonkeySources"
407 let direct_source s
=
408 match s
with Direct_address _
-> true | _
-> false
410 let indirect_source s
=
411 match s
with Indirect_address _
-> true | _
-> false
413 let dummy_source_uid = Direct_address
(Ip.null
, 0)
415 let value_to_source_uid v
=
417 List
[ip
;port
] | SmallList
[ip
;port
] ->
418 let ip = Ip.of_string
(value_to_string
ip) in
419 let port = value_to_int
port in
420 Direct_address
(ip, port)
421 | List
[ip;port; id
] | SmallList
[ip;port;id
] ->
422 let ip = Ip.of_string
(value_to_string
ip) in
423 let port = value_to_int
port in
424 let id = try id_of_ip (Ip.of_string
(value_to_string
id))
425 with _
-> value_to_int64
id in
426 Indirect_address
(ip, port, id, 0, Ip.null
)
428 failwith
"bad client address"
430 let source_uid_to_value s
=
432 Direct_address
(ip, port) ->
433 SmallList
[string_to_value
(Ip.to_string
ip); int_to_value
port]
434 | Indirect_address
(server_ip
, server_port
, id, port, _
) ->
436 string_to_value
(Ip.to_string server_ip
);
437 int_to_value server_port
;
440 | Invalid_address _
-> failwith
"Invalid address"
444 file_file
: file
CommonFile.file_impl
;
446 mutable file_swarmer
: CommonSwarming.t
option;
447 mutable file_nchunks
: int;
448 mutable file_nchunk_hashes
: int;
449 mutable file_diskname
: string;
450 mutable file_computed_md4s
: Md4.t array
;
451 mutable file_format
: format
;
452 mutable file_shared
: file
CommonShared.shared_impl
option;
453 mutable file_sources
: DonkeySources.file_sources_manager
;
454 mutable file_comments
: (Ip.t
* string * int * string) list
;
458 mutable server_server
: server
CommonServer.server_impl
;
459 mutable server_ip
: Ip.t
;
460 mutable server_cid
: Ip.t
option;
461 mutable server_port
: int;
462 mutable server_realport
: int option; (* in case we connect through auxport; this is the true one *)
463 mutable server_country_code
: int option;
464 mutable server_sock
: tcp_connection
;
465 mutable server_search_queries
: CommonTypes.search
Fifo.t
;
466 mutable server_users_queries
: bool Fifo.t
;
467 mutable server_connection_control
: connection_control
;
468 mutable server_score
: int;
469 mutable server_tags
: CommonTypes.tag list
;
470 mutable server_nusers
: int64
option;
471 mutable server_nfiles
: int64
option;
472 mutable server_name
: string;
473 mutable server_description
: string;
474 mutable server_banner
: string;
475 mutable server_users
: user list
;
476 mutable server_next_udp
: int;
477 mutable server_master
: bool;
478 mutable server_preferred
: bool;
479 mutable server_last_ping
: float; (* time last PingServerUdpReq was sent *)
480 mutable server_next_ping
: float; (* time next PingServerUdpReq will be sent *)
481 mutable server_descping_counter
: int;
482 mutable server_ping
: int;
483 mutable server_udp_ping_challenge
: int64
option;
484 mutable server_udp_desc_challenge
: int64
option;
485 (* reset after answer received, increased after UDP ping sent, server deleted after 10 attempts *)
486 mutable server_failed_count
: int;
488 mutable server_id_requests
: file
option Fifo.t
;
490 mutable server_queries_credit
: int;
491 mutable server_waiting_queries
: file list
;
492 mutable server_sent_all_queries
: bool;
493 mutable server_has_zlib
: bool;
494 mutable server_has_newtags
: bool;
495 mutable server_has_unicode
: bool;
496 mutable server_has_related_search
: bool;
497 mutable server_has_tag_integer
: bool;
498 mutable server_has_largefiles
: bool;
499 mutable server_obfuscation_tcp
: int option;
500 mutable server_obfuscation_udp
: int option;
501 mutable server_dynip
: string;
502 mutable server_auxportslist
: string;
503 mutable server_has_get_sources
: bool;
504 mutable server_has_get_files
: bool;
505 mutable server_has_get_sources2
: bool;
507 mutable server_flags
: int;
508 mutable server_version
: string;
509 mutable server_lowid_users
: int64
option;
510 mutable server_soft_limit
: int64
option;
511 mutable server_hard_limit
: int64
option;
512 mutable server_max_users
: int64
option;
513 mutable server_sent_shared
: file list
518 user_user
: user
CommonUser.user_impl
;
520 mutable user_name
: string;
523 user_tags
: CommonTypes.tag list
;
524 user_server
: server
;
528 (* Result of result *)
531 and file_change_kind
=
533 | FileAvailabilityChange
536 and client_change_kind
=
543 and server_change_kind
=
551 client_client
: client
CommonClient.client_impl
;
552 mutable client_kind
: source_uid
;
553 client_source
: DonkeySources.source
;
554 mutable client_md4
: Md4.t
;
555 mutable client_ip
: Ip.t
;
556 mutable client_country_code
: int option;
557 mutable client_download
: (file
* CommonSwarming.uploader
) option;
558 mutable client_file_queue
: (
559 file
* (* has displayed when connected *)
561 CommonSwarming.uploader
563 mutable client_all_files
: result list
option;
564 mutable client_tags
: CommonTypes.tag list
;
565 mutable client_name
: string;
566 mutable client_rating
: int ;
567 mutable client_upload
: upload_info
option;
568 mutable client_checked
: bool;
569 mutable client_connected
: bool;
571 mutable client_session_downloaded
: Int64.t
;
572 mutable client_session_uploaded
: Int64.t
;
573 mutable client_total_downloaded
: Int64.t
;
574 mutable client_total_uploaded
: Int64.t
;
575 mutable client_brand
: brand
;
576 mutable client_brand_mod
: brand_mod
;
577 mutable client_osinfo_sent
: bool;
578 mutable client_osinfo
: string option;
579 mutable client_banned
: bool;
580 mutable client_rank
: int;
581 mutable client_connect_time
: int;
582 mutable client_requests_received
: int;
583 mutable client_requests_sent
: int;
584 mutable client_slot
: slot_status
;
585 mutable client_debug
: bool;
586 mutable client_pending_messages
: string list
;
587 client_emule_proto
: emule_proto
;
588 mutable client_comp
: compressed_parts
option;
589 mutable client_connection_time
: int;
590 mutable client_sent_challenge
: Int64.t
;
591 mutable client_req_challenge
: Int64.t
;
592 mutable client_public_key
: string option;
593 mutable client_sui_verified
: bool option;
594 mutable client_last_file_req_md4
: Md4.t
option;
597 and compressed_parts
= {
601 mutable comp_len
: int;
602 mutable comp_blocs
: string list
;
611 mutable up_file
: file
;
612 mutable up_pos
: int64
;
613 mutable up_end_chunk
: int64
;
614 mutable up_chunks
: (int64
* int64
) list
;
615 (* zones sent but not yet received by other peer, oldest first *)
616 mutable up_flying_chunks
: (int64
* int64
) list
;
617 mutable up_current
: int64
;
618 mutable up_finish
: bool;
619 mutable up_waiting
: bool;
623 SourceClient
of client
624 | SourceLastConnection
of
626 int * (* last connection attempt *)
627 int (* booked client num *)
629 and file_to_share
= {
630 shared_name
: string;
632 mutable shared_list
: Md4.t list
;
633 mutable shared_pos
: int64
;
634 mutable shared_chunk
: int;
635 mutable shared_fd
: Unix32.t
;
636 shared_shared
: file_to_share
CommonShared.shared_impl
;
639 module UdpClientMap
= Map.Make
(struct
641 let compare = compare
645 udp_client_ip
: Ip.t
;
646 udp_client_port
: int;
647 udp_client_can_receive
: bool;
648 mutable udp_client_last_conn
: int;
652 mutable group
: udp_client
UdpClientMap.t
;
655 type old_result
= result
657 exception NoSpecifiedFile
658 exception Already_done
660 type shared_file_info
= {
662 sh_md4s
: Md4.t array
;
672 let set_client_state c s
=
673 let cc = as_client c
.client_client
in
674 set_client_state cc s
676 let set_client_disconnected c
=
677 let cc = as_client c
.client_client
in
678 set_client_disconnected cc
680 let set_server_state s state
=
681 let ss = as_server s
.server_server
in
682 if server_state
ss <> state
then begin
683 set_server_state ss state
;
686 let file_state file
=
687 CommonFile.file_state (as_file file
.file_file
)
689 let file_last_seen file
= file
.file_file
.impl_file_last_seen
691 let file_must_update file
=
692 file_must_update (as_file file
.file_file
)
694 let client_state client
=
695 CommonClient.client_state (as_client client
.client_client
)
697 let client_new_file client r
=
698 client_new_file (as_client client
.client_client
) ""
701 let server_state server
=
702 CommonServer.server_state (as_server server
.server_server
)
704 let dummy_emule_proto = {
707 emule_osinfosupport
= 0;
710 (* emule_miscoptions1 *)
711 received_miscoptions1
= false;
715 emule_compression
= 0; (* 1 *)
717 emule_sourceexchange
= 0; (* 3 *)
718 emule_extendedrequest
= 0; (* 2 *)
721 emule_noviewshared
= 0;
722 emule_multipacket
= 0;
723 emule_supportpreview
= 0;
725 (* emule_miscoptions2 *)
726 received_miscoptions2
= false;
727 emule_require_crypt
= 0;
728 emule_request_crypt
= 0;
729 emule_support_crypt
= 0;
730 emule_extmultipacket
= 0;
731 emule_largefiles
= 0;
732 emule_kad_version
= 0;
736 { dummy_emule_proto with emule_version
= 0 }
738 let old_max_emule_file_size = 4290048000L
739 (* #define OLD_MAX_EMULE_FILE_SIZE 4290048000ui64 // (4294967295/PARTSIZE)*PARTSIZE = ~4GB *)
741 let max_emule_file_size = 0x4000000000L
742 (* #define MAX_EMULE_FILE_SIZE 0x4000000000ui64 // = 2^38 = 256GB *)