implement next_subnet & previous_subnet

Signed-off-by: Etienne Basset <etienne.basset@ensta.org>
teach printf variants about %L, %U (lower & upper)

Signed-off-by: Etienne Basset <etienne.basset@ensta.org>
add copy_subnet helper and update copy_addr

Signed-off-by: Etienne Basset <etienne.basset@ensta.org>
make it better

Signed-off-by: Etienne Basset <etienne.basset@ensta.org>
add  a subnettool 'relation' command to print the relation between 2 subnets

Signed-off-by: Etienne Basset <etienne.basset@ensta.org>
teach st_printf about %P format (prefix/mask)

Signed-off-by: Etienne Basset <etienne.basset@ensta.org>
convert subnet_aggregate to st_debug MACRO, simplify

Signed-off-by: Etienne Basset <etienne.basset@ensta.org>
add  %c format to st_printf

Signed-off-by: Etienne Basset <etienne.basset@ensta.org>
convert more debug MACRO ==> st_debug
that increased speed a lot since before the change we did :
subnet2str(subnet, buffer);
debug(XXXXXX)
the subnet2str was unconditionnal even in case there's no debug

Signed-off-by: Etienne Basset <etienne.basset@ensta.org>
use st_debug

Signed-off-by: Etienne Basset <etienne.basset@ensta.org>
update bigcsv on a bigger file to test the st_debug speedup :

etienne@ARODEF subnet_tools]$ ./subnet-tools -D timing,memory:2 subnet bigcsv.csv
alloc_subnet_file : trying to alloc 835584 bytes
netcsv_endofline_callback : need to reallocate 1671168 bytes
netcsv_endofline_callback : need to reallocate 3342336 bytes
netcsv_endofline_callback : need to reallocate 6684672 bytes
netcsv_endofline_callback : need to reallocate 13369344 bytes
netcsv_endofline_callback : need to reallocate 26738688 bytes
netcsv_endofline_callback : need to reallocate 53477376 bytes
netcsv_endofline_callback : need to reallocate 106954752 bytes
netcsv_endofline_callback : need to reallocate 213909504 bytes
netcsv_endofline_callback : need to reallocate 427819008 bytes
netcsv_endofline_callback : need to reallocate 855638016 bytes
netcsv_endofline_callback : need to reallocate 1711276032 bytes
netcsv_endofline_callback : need to reallocate 3422552064 bytes
read_csv_body : elapsed time 9 sec 803 millisec
alloc_tas : allocated 96000000 bytes for heap
subnet_file_simplify : Allocated 2448000000 bytes for new struct route
subnet_file_simplify : elapsed time 14 sec 572 millisec
aggregate_route_file : Allocated 2448000000 bytes for new struct route
aggregate_route_file : elapsed time 15 sec 117 millisec
10.0.0.1;32;;0.0.0.0;TEST_1
10.0.0.2;31;;0.0.0.0;AGGREGATE
10.0.0.4;30;;0.0.0.0;AGGREGATE
10.0.0.8;29;;0.0.0.0;AGGREGATE
10.0.0.16;28;;0.0.0.0;AGGREGATE
10.0.0.32;27;;0.0.0.0;AGGREGATE
10.0.0.64;26;;0.0.0.0;AGGREGATE
10.0.0.128;25;;0.0.0.0;AGGREGATE
10.0.1.0;24;;0.0.0.0;AGGREGATE
10.0.2.0;23;;0.0.0.0;AGGREGATE
10.0.4.0;22;;0.0.0.0;AGGREGATE
10.0.8.0;21;;0.0.0.0;AGGREGATE
10.0.16.0;20;;0.0.0.0;AGGREGATE
10.0.32.0;19;;0.0.0.0;AGGREGATE
10.0.64.0;18;;0.0.0.0;AGGREGATE
10.0.128.0;17;;0.0.0.0;AGGREGATE
10.1.0.0;16;;0.0.0.0;AGGREGATE
10.2.0.0;15;;0.0.0.0;AGGREGATE
10.4.0.0;14;;0.0.0.0;AGGREGATE
10.8.0.0;13;;0.0.0.0;AGGREGATE
10.16.0.0;12;;0.0.0.0;AGGREGATE
10.32.0.0;11;;0.0.0.0;AGGREGATE
10.64.0.0;10;;0.0.0.0;AGGREGATE
10.128.0.0;11;;0.0.0.0;AGGREGATE
10.160.0.0;12;;0.0.0.0;AGGREGATE
10.176.0.0;14;;0.0.0.0;AGGREGATE
10.180.0.0;15;;0.0.0.0;AGGREGATE
10.182.0.0;16;;0.0.0.0;AGGREGATE
10.183.0.0;20;;0.0.0.0;AGGREGATE
10.183.16.0;21;;0.0.0.0;AGGREGATE
10.183.24.0;23;;0.0.0.0;AGGREGATE
10.183.26.0;24;;0.0.0.0;AGGREGATE
10.183.27.0;32;;0.0.0.0;TEST_12000000

Signed-off-by: Etienne Basset <etienne.basset@ensta.org>
more conversion to st_debug

Signed-off-by: Etienne Basset <etienne.basset@ensta.org>