require '_h2ph_pre.ph';

unless(defined(&_NETISO_TP_STAT_H_)) {
    eval 'sub _NETISO_TP_STAT_H_ () {1;}' unless defined(&_NETISO_TP_STAT_H_);
    eval 'sub NRTT_CATEGORIES () {4;}' unless defined(&NRTT_CATEGORIES);
    eval 'sub TP_PM_MAX () {0xa;}' unless defined(&TP_PM_MAX);
    eval 'sub IncStat {
        local($x) = @_;
	    eval q( &tp_stat. $x ++);
    }' unless defined(&IncStat);
    if(defined(&TP_PERF_MEAS)) {
	eval 'sub PStat {
	    local($Tpcb, $X) = @_;
    	    eval q(($Tpcb)-> &tp_p_meas-> $X);
	}' unless defined(&PStat);
	eval 'sub IncPStat {
	    local($Tpcb, $X) = @_;
    	    eval q( &if(($Tpcb)-> &tp_perf_on) ($Tpcb)-> &tp_p_meas-> $X ++);
	}' unless defined(&IncPStat);
    } else {
	eval 'sub PStat {
	    local($tpcb, $x) = @_;
    	    eval q( &PStat_Junk);
	}' unless defined(&PStat);
	eval 'sub IncPStat {
	    local($tpcb, $x) = @_;
    	    eval q();
	}' unless defined(&IncPStat);
	eval 'sub tpmeas {
	    local($a,$b,$c,$d,$e,$f) = @_;
    	    eval q(0);
	}' unless defined(&tpmeas);
    }
    eval 'sub DOPERF {
        local($tpcb) = @_;
	    eval q(( ($tpcb->{tp_perf_on})  &&  ($tpcb->{tp_p_meas})));
    }' unless defined(&DOPERF);
}
1;
