32 |
|
|
33 |
|
|
34 |
(* any = 0 *) |
(* any = 0 *) |
35 |
let name_of_tag = |
let name_of_tag = |
36 |
[ |
[ |
37 |
Field_UNKNOWN "any", 0; |
Field_UNKNOWN "any", 0; |
38 |
Field_UNKNOWN "year", 1; |
Field_UNKNOWN "year", 1; |
59 |
Field_UNKNOWN "49", 49; |
Field_UNKNOWN "49", 49; |
60 |
Field_UNKNOWN "53", 53; |
Field_UNKNOWN "53", 53; |
61 |
] |
] |
62 |
|
|
63 |
type cipher |
type cipher |
64 |
|
|
65 |
type ciphers = { |
type ciphers = { |
66 |
in_cipher : cipher; |
in_cipher : cipher; |
67 |
out_cipher : cipher; |
out_cipher : cipher; |
68 |
|
|
69 |
mutable in_xinu : int64; |
mutable in_xinu : int64; |
70 |
mutable out_xinu : int64; |
mutable out_xinu : int64; |
71 |
} |
} |
72 |
|
|
73 |
type query_key = unit |
type query_key = unit |
74 |
|
|
75 |
type query_operator = |
type query_operator = |
76 |
| Equals |
| Equals |
77 |
| Approx |
| Approx |
78 |
| AtMost |
| AtMost |
79 |
| AtLeast |
| AtLeast |
80 |
| Substring |
| Substring |
81 |
|
|
82 |
type query_term = query_operator * tag |
type query_term = query_operator * tag |
83 |
|
|
84 |
type search_extension = string * query_term list |
type search_extension = string * query_term list |
85 |
type search_uid = int |
type search_uid = int |
86 |
type file_uid = Md5Ext.t |
type file_uid = Md5Ext.t |
87 |
type file_uri = string |
type file_uri = string |
88 |
|
|
89 |
external create_cipher : unit -> cipher = "ml_create_cipher" |
external create_cipher : unit -> cipher = "ml_create_cipher" |
90 |
external apply_cipher : cipher -> string -> int -> int -> unit |
external apply_cipher : cipher -> string -> int -> int -> unit |
91 |
= "ml_apply_cipher" |
= "ml_apply_cipher" |
95 |
= "ml_cipher_packet_get" |
= "ml_cipher_packet_get" |
96 |
external xor_ciphers : cipher -> cipher -> unit = "ml_xor_ciphers" |
external xor_ciphers : cipher -> cipher -> unit = "ml_xor_ciphers" |
97 |
external xor_ciphers2 : cipher -> cipher -> unit = "ml_xor_ciphers2" |
external xor_ciphers2 : cipher -> cipher -> unit = "ml_xor_ciphers2" |
98 |
|
|
99 |
external cipher_packet_set : cipher -> string -> int -> unit |
external cipher_packet_set : cipher -> string -> int -> unit |
100 |
= "ml_cipher_packet_set" |
= "ml_cipher_packet_set" |
101 |
external cipher_packet_set_xored : cipher -> string -> int -> cipher -> unit |
external cipher_packet_set_xored : cipher -> string -> int -> cipher -> unit |
109 |
let config_file = "fasttrack.ini" |
let config_file = "fasttrack.ini" |
110 |
let options_prefix = "FT-" |
let options_prefix = "FT-" |
111 |
let max_known_peers_default = 20 |
let max_known_peers_default = 20 |
112 |
|
|
113 |
(* Useless *) |
(* Useless *) |
114 |
let redirectors = [] |
let redirectors = [] |
115 |
let has_accept = false |
let has_accept = false |
116 |
let accept_header = "" |
let accept_header = "" |
117 |
|
|
118 |
let accept_ed2kuid = false |
let accept_ed2kuid = false |
119 |
let accept_bitprint = false |
let accept_bitprint = false |
120 |
let accept_md5ext = true |
let accept_md5ext = true |
|
|
|
121 |
|
|
122 |
let max_queued_ranges = 1 |
let max_queued_ranges = 1 |
123 |
|
|
124 |
(* This is the typical reply of a busy FT client. |
(* This is the typical reply of a busy FT client. |
125 |
ascii:[ |
ascii:[ |
126 |
HTTP/1.0 503 Service Unavailable |
HTTP/1.0 503 Service Unavailable |
133 |
|
|
134 |
let value_to_index _ = () |
let value_to_index _ = () |
135 |
let index_to_value _ = [] |
let index_to_value _ = [] |
|
|
|