require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_ALTQ_IF_ALTQ_H_)) {
    eval 'sub _ALTQ_IF_ALTQ_H_ () {1;}' unless defined(&_ALTQ_IF_ALTQ_H_);
    if(defined(&KERNEL)) {
	unless(defined(&_KERNEL)) {
	    eval 'sub _KERNEL () {1;}' unless defined(&_KERNEL);
	}
    }
    if(defined(&_KERNEL)) {
	eval 'sub ALTQF_READY () {0x1;}' unless defined(&ALTQF_READY);
	eval 'sub ALTQF_ENABLED () {0x2;}' unless defined(&ALTQF_ENABLED);
	eval 'sub ALTQF_CLASSIFY () {0x4;}' unless defined(&ALTQF_CLASSIFY);
	eval 'sub ALTQF_CNDTNING () {0x8;}' unless defined(&ALTQF_CNDTNING);
	eval 'sub ALTQF_DRIVER1 () {0x40;}' unless defined(&ALTQF_DRIVER1);
	eval 'sub ALTQF_CANTCHANGE () {( &ALTQF_READY);}' unless defined(&ALTQF_CANTCHANGE);
	eval 'sub ALTDQ_REMOVE () {1;}' unless defined(&ALTDQ_REMOVE);
	eval 'sub ALTDQ_POLL () {2;}' unless defined(&ALTDQ_POLL);
	eval 'sub ALTRQ_PURGE () {1;}' unless defined(&ALTRQ_PURGE);
	eval 'sub ALTQ_IS_READY {
	    my($ifq) = @_;
    	    eval q((($ifq)-> &altq_flags &  &ALTQF_READY));
	}' unless defined(&ALTQ_IS_READY);
	eval 'sub ALTQ_IS_ENABLED {
	    my($ifq) = @_;
    	    eval q((($ifq)-> &altq_flags &  &ALTQF_ENABLED));
	}' unless defined(&ALTQ_IS_ENABLED);
	eval 'sub ALTQ_NEEDS_CLASSIFY {
	    my($ifq) = @_;
    	    eval q((($ifq)-> &altq_flags &  &ALTQF_CLASSIFY));
	}' unless defined(&ALTQ_NEEDS_CLASSIFY);
	eval 'sub ALTQ_IS_CNDTNING {
	    my($ifq) = @_;
    	    eval q((($ifq)-> &altq_flags &  &ALTQF_CNDTNING));
	}' unless defined(&ALTQ_IS_CNDTNING);
	eval 'sub ALTQ_SET_CNDTNING {
	    my($ifq) = @_;
    	    eval q((($ifq)-> &altq_flags |=  &ALTQF_CNDTNING));
	}' unless defined(&ALTQ_SET_CNDTNING);
	eval 'sub ALTQ_CLEAR_CNDTNING {
	    my($ifq) = @_;
    	    eval q((($ifq)-> &altq_flags &= ~ &ALTQF_CNDTNING));
	}' unless defined(&ALTQ_CLEAR_CNDTNING);
	eval 'sub ALTQ_IS_ATTACHED {
	    my($ifq) = @_;
    	    eval q((($ifq)-> &altq_disc !=  &NULL));
	}' unless defined(&ALTQ_IS_ATTACHED);
	eval 'sub ALTQ_ENQUEUE {
	    my($ifq, $m, $pa, $err) = @_;
    	    eval q(($err) = (*($ifq)-> &altq_enqueue)(($ifq),($m),($pa)));
	}' unless defined(&ALTQ_ENQUEUE);
	eval 'sub ALTQ_DEQUEUE {
	    my($ifq, $m) = @_;
    	    eval q(($m) = (*($ifq)-> &altq_dequeue)(($ifq),  &ALTDQ_REMOVE));
	}' unless defined(&ALTQ_DEQUEUE);
	eval 'sub ALTQ_POLL {
	    my($ifq, $m) = @_;
    	    eval q(($m) = (*($ifq)-> &altq_dequeue)(($ifq),  &ALTDQ_POLL));
	}' unless defined(&ALTQ_POLL);
	eval 'sub ALTQ_PURGE {
	    my($ifq) = @_;
    	    eval q(( &void)(*($ifq)-> &altq_request)(($ifq),  &ALTRQ_PURGE, ( &void *)0));
	}' unless defined(&ALTQ_PURGE);
	eval 'sub ALTQ_IS_EMPTY {
	    my($ifq) = @_;
    	    eval q((($ifq)-> &ifq_len == 0));
	}' unless defined(&ALTQ_IS_EMPTY);
	eval 'sub TBR_IS_ENABLED {
	    my($ifq) = @_;
    	    eval q((($ifq)-> &altq_tbr !=  &NULL));
	}' unless defined(&TBR_IS_ENABLED);
    }
}
1;
