151 |
of_list_aux l BL_Empty |
of_list_aux l BL_Empty |
152 |
|
|
153 |
let print_list buf bl = |
let print_list buf bl = |
|
|
|
154 |
let rec print_list_aux bl = |
let rec print_list_aux bl = |
155 |
match bl with |
match bl with |
156 |
BL_Empty -> 0 |
BL_Empty -> 0 |
157 |
| BL_Range (red, left, br, right) -> |
| BL_Range (red, left, br, right) -> |
158 |
let nleft = print_list_aux left in |
let nleft = print_list_aux left in |
159 |
if br.blocking_hits > 0 then |
if br.blocking_hits > 0 then |
160 |
Printf.bprintf buf "%s (%d hits): %s - %s\n" |
Printf.bprintf buf "%s (%d hits): %s - %s\n" |
161 |
br.blocking_description |
br.blocking_description |
162 |
br.blocking_hits |
br.blocking_hits |
163 |
(Ip.to_string br.blocking_begin) |
(Ip.to_string br.blocking_begin) |
164 |
(Ip.to_string br.blocking_end); |
(Ip.to_string br.blocking_end); |
165 |
let nright = print_list_aux right in |
let nright = print_list_aux right in |
166 |
nleft + 1 + nright in |
nleft + 1 + nright in |
167 |
|
|
168 |
let count = print_list_aux bl in |
let count = print_list_aux bl in |
169 |
Printf.bprintf buf "%d ranges\n" count |
Printf.bprintf buf "%d ranges\n" count |