require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_ALTQ_ALTQ_RMCLASS_H_)) {
    eval 'sub _ALTQ_ALTQ_RMCLASS_H_ () {1;}' unless defined(&_ALTQ_ALTQ_RMCLASS_H_);
    require 'altq/altq_classq.ph';
    if(defined(&__cplusplus)) {
    }
    eval 'sub RM_MAXPRIO () {8;}' unless defined(&RM_MAXPRIO);
    if(defined(&_KERNEL)) {
	eval 'sub RM_GETTIME {
	    my($now) = @_;
    	    eval q( &microtime($now));
	}' unless defined(&RM_GETTIME);
	eval 'sub TV_LT {
	    my($a, $b) = @_;
    	    eval q(((($a)-> &tv_sec < ($b)-> &tv_sec) || ((($a)-> &tv_usec < ($b)-> &tv_usec)  && (($a)-> &tv_sec <= ($b)-> &tv_sec))));
	}' unless defined(&TV_LT);
	eval 'sub TV_DELTA {
	    my($a, $b, $delta) = @_;
    	    eval q({  &register \'int\'  &xxs; $delta = ($a)-> &tv_usec - ($b)-> &tv_usec;  &if (( &xxs = ($a)-> &tv_sec - ($b)-> &tv_sec)) {  &switch ( &xxs) {  &default: $delta = 0;  &case 2: $delta += 1000000;  &case 1: $delta += 1000000;  &break; } } });
	}' unless defined(&TV_DELTA);
	eval 'sub TV_ADD_DELTA {
	    my($a, $delta, $res) = @_;
    	    eval q({  &register \'int\'  &xxus = ($a)-> &tv_usec + ($delta); ($res)-> &tv_sec = ($a)-> &tv_sec;  &while ( &xxus >= 1000000) { ++(($res)-> &tv_sec);  &xxus -= 1000000; } ($res)-> &tv_usec =  &xxus; });
	}' unless defined(&TV_ADD_DELTA);
	eval 'sub RM_TIMEOUT () {2;}' unless defined(&RM_TIMEOUT);
	if(1) {
	    eval 'sub RM_MAXQUEUED () {1;}' unless defined(&RM_MAXQUEUED);
	} else {
	    eval 'sub RM_MAXQUEUED () {16;}' unless defined(&RM_MAXQUEUED);
	}
	eval 'sub RM_MAXQUEUE () {64;}' unless defined(&RM_MAXQUEUE);
	eval 'sub RM_FILTER_GAIN () {5;}' unless defined(&RM_FILTER_GAIN);
	eval 'sub RM_POWER () {(1<<  &RM_FILTER_GAIN);}' unless defined(&RM_POWER);
	eval 'sub RM_MAXDEPTH () {32;}' unless defined(&RM_MAXDEPTH);
	eval 'sub RM_NS_PER_SEC () {(1000000000);}' unless defined(&RM_NS_PER_SEC);
	if(1) {
	}
	eval 'sub RMCF_RED () {0x1;}' unless defined(&RMCF_RED);
	eval 'sub RMCF_ECN () {0x2;}' unless defined(&RMCF_ECN);
	eval 'sub RMCF_RIO () {0x4;}' unless defined(&RMCF_RIO);
	eval 'sub RMCF_FLOWVALVE () {0x8;}' unless defined(&RMCF_FLOWVALVE);
	eval 'sub RMCF_CLEARDSCP () {0x10;}' unless defined(&RMCF_CLEARDSCP);
	eval 'sub RMCF_WRR () {0x100;}' unless defined(&RMCF_WRR);
	eval 'sub RMCF_EFFICIENT () {0x200;}' unless defined(&RMCF_EFFICIENT);
	eval 'sub is_a_parent_class {
	    my($cl) = @_;
    	    eval q((($cl)-> &children_ !=  &NULL));
	}' unless defined(&is_a_parent_class);
    }
    if(defined(&__cplusplus)) {
    }
}
1;
