-sub checkcounter
-{
- my ($base1,$val1,$base2,$val2) = @_;
-
- if($base1 eq 'cust_net_src' || $base1 eq 'cust_net_tgt'){
- &dec_counter($confignet,\%customnetwork,$val1);
- }elsif($base1 eq 'cust_host_src' || $base1 eq 'cust_host_tgt'){
- &dec_counter($confighost,\%customhost,$val1);
- }elsif($base1 eq 'cust_grp_src' || $base1 eq 'cust_grp_tgt'){
- &dec_counter($configgrp,\%customgrp,$val1);
- }elsif($base1 eq 'cust_srv'){
- &dec_counter($configsrv,\%customservice,$val1);
- }elsif($base1 eq 'cust_srvgrp'){
- &dec_counter($configsrvgrp,\%customservicegrp,$val1);
- }
-
- if($base2 eq 'cust_net_src' || $base2 eq 'cust_net_tgt'){
- &inc_counter($confignet,\%customnetwork,$val2);
- }elsif($base2 eq 'cust_host_src' || $base2 eq 'cust_host_tgt'){
- &inc_counter($confighost,\%customhost,$val2);
- }elsif($base2 eq 'cust_grp_src' || $base2 eq 'cust_grp_tgt'){
- &inc_counter($configgrp,\%customgrp,$val2);
- }elsif($base2 eq 'cust_srv'){
- &inc_counter($configsrv,\%customservice,$val2);
- }elsif($base2 eq 'cust_srvgrp'){
- &inc_counter($configsrvgrp,\%customservicegrp,$val2);
- }
-}