require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_ALTQ_ALTQ_H_)) {
    eval 'sub _ALTQ_ALTQ_H_ () {1;}' unless defined(&_ALTQ_ALTQ_H_);
    if(1) {
	eval 'sub ALTQ3_COMPAT () {1;}' unless defined(&ALTQ3_COMPAT);
	eval 'sub ALTQ3_CLFIER_COMPAT () {1;}' unless defined(&ALTQ3_CLFIER_COMPAT);
    }
    if(defined(&ALTQ3_COMPAT)) {
	require 'sys/param.ph';
	require 'sys/ioccom.ph';
	require 'sys/queue.ph';
	require 'netinet/in.ph';
	unless(defined(&IFNAMSIZ)) {
	    eval 'sub IFNAMSIZ () {16;}' unless defined(&IFNAMSIZ);
	}
    }
    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_JOBS () {12;}' unless defined(&ALTQT_JOBS);
    eval 'sub ALTQT_MAX () {13;}' unless defined(&ALTQT_MAX);
    if(defined(&ALTQ3_COMPAT)) {
    }
    if(defined(&ALTQ3_COMPAT)) {
	if(defined(&ALTQ3_CLFIER_COMPAT)) {
	    if(defined(&SIN6_LEN)) {
	    }
	    if(defined(&SIN6_LEN)) {
	    }
	}
    }
    eval 'sub PKTCNTR_ADD {
        my($cntr, $len) = @_;
	    eval q( &do { ($cntr)-> &packets++; ($cntr)-> &bytes += $len; }  &while ( 0));
    }' unless defined(&PKTCNTR_ADD);
    if(defined(&ALTQ3_COMPAT)) {
	eval 'sub ALTQGTYPE () { &_IOWR(ord(\'q\'), 0, \'struct altqreq\');}' unless defined(&ALTQGTYPE);
	if(0) {
	    eval 'sub ALTQATTACH () { &_IOW(ord(\'q\'), 1, \'struct altqreq\');}' unless defined(&ALTQATTACH);
	    eval 'sub ALTQDETACH () { &_IOW(ord(\'q\'), 2, \'struct altqreq\');}' unless defined(&ALTQDETACH);
	    eval 'sub ALTQENABLE () { &_IOW(ord(\'q\'), 3, \'struct altqreq\');}' unless defined(&ALTQENABLE);
	    eval 'sub ALTQDISABLE () { &_IOW(ord(\'q\'), 4, \'struct altqreq\');}' unless defined(&ALTQDISABLE);
	    eval 'sub ALTQCLEAR () { &_IOW(ord(\'q\'), 5, \'struct altqreq\');}' unless defined(&ALTQCLEAR);
	    eval 'sub ALTQCONFIG () { &_IOWR(ord(\'q\'), 6, \'struct altqreq\');}' unless defined(&ALTQCONFIG);
	    eval 'sub ALTQADDCLASS () { &_IOWR(ord(\'q\'), 7, \'struct altqreq\');}' unless defined(&ALTQADDCLASS);
	    eval 'sub ALTQMODCLASS () { &_IOWR(ord(\'q\'), 8, \'struct altqreq\');}' unless defined(&ALTQMODCLASS);
	    eval 'sub ALTQDELCLASS () { &_IOWR(ord(\'q\'), 9, \'struct altqreq\');}' unless defined(&ALTQDELCLASS);
	    eval 'sub ALTQADDFILTER () { &_IOWR(ord(\'q\'), 10, \'struct altqreq\');}' unless defined(&ALTQADDFILTER);
	    eval 'sub ALTQDELFILTER () { &_IOWR(ord(\'q\'), 11, \'struct altqreq\');}' unless defined(&ALTQDELFILTER);
	    eval 'sub ALTQGETSTATS () { &_IOWR(ord(\'q\'), 12, \'struct altqreq\');}' unless defined(&ALTQGETSTATS);
	    eval 'sub ALTQGETCNTR () { &_IOWR(ord(\'q\'), 13, \'struct altqreq\');}' unless defined(&ALTQGETCNTR);
	}
	eval 'sub ALTQTBRSET () { &_IOW(ord(\'q\'), 14, \'struct tbrreq\');}' unless defined(&ALTQTBRSET);
	eval 'sub ALTQTBRGET () { &_IOWR(ord(\'q\'), 15, \'struct tbrreq\');}' unless defined(&ALTQTBRGET);
    }
    if(defined(&_KERNEL)) {
	require 'altq/altq_var.ph';
    }
}
1;
