### Sets the networks that ntop should consider as local.
###  NOTE: Uses dotted decimal and CIDR notation. Example: 192.168.0.0/24
###        The addresses of the interfaces are always local and don't need to be specified.
#--local-subnets xx.xx.xx.xx/yy

{
        use esmith::NetworksDB;
        my $ndb = esmith::NetworksDB->open_ro() ||
            die('Can not open Networks DB');

        my $networks = '';
        my @nets = $ndb->networks();
        foreach my $net (@nets){
                my $key = $net->key;
                my $mask = $net->prop('Mask');
                $networks .= "$key/$mask".',';
        }
        $OUT .= "--local-subnets $networks\n" if ($networks ne '');

}

