require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_ALTQ_ALTQ_H_)) {
    eval 'sub _ALTQ_ALTQ_H_ () {1;}' unless defined(&_ALTQ_ALTQ_H_);
    eval 'sub ALTQT_NONE () {0;}' unless defined(&ALTQT_NONE);
    eval 'sub ALTQT_CBQ () {1;}' unless defined(&ALTQT_CBQ);
    eval 'sub ALTQT_WFQ () {2;}' unless defined(&ALTQT_WFQ);
    eval 'sub ALTQT_AFMAP () {3;}' unless defined(&ALTQT_AFMAP);
    eval 'sub ALTQT_FIFOQ () {4;}' unless defined(&ALTQT_FIFOQ);
    eval 'sub ALTQT_RED () {5;}' unless defined(&ALTQT_RED);
    eval 'sub ALTQT_RIO () {6;}' unless defined(&ALTQT_RIO);
    eval 'sub ALTQT_LOCALQ () {7;}' unless defined(&ALTQT_LOCALQ);
    eval 'sub ALTQT_HFSC () {8;}' unless defined(&ALTQT_HFSC);
    eval 'sub ALTQT_CDNR () {9;}' unless defined(&ALTQT_CDNR);
    eval 'sub ALTQT_BLUE () {10;}' unless defined(&ALTQT_BLUE);
    eval 'sub ALTQT_PRIQ () {11;}' unless defined(&ALTQT_PRIQ);
    eval 'sub ALTQT_MAX () {12;}' unless defined(&ALTQT_MAX);
    eval 'sub PKTCNTR_ADD {
        my($cntr, $len) = @_;
	    eval q( &do { ($cntr)-> &packets++; ($cntr)-> &bytes += $len; }  &while (0));
    }' unless defined(&PKTCNTR_ADD);
    if(defined(&_KERNEL)) {
	require 'altq/altq_var.ph';
    }
}
1;
