require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_ALTQ_ALTQ_RED_H_)) {
    eval 'sub _ALTQ_ALTQ_RED_H_ () {1;}' unless defined(&_ALTQ_ALTQ_RED_H_);
    require 'altq/altq_classq.ph';
    if(defined(&ALTQ3_COMPAT)) {
    }
    eval 'sub REDF_ECN4 () {0x1;}' unless defined(&REDF_ECN4);
    eval 'sub REDF_ECN6 () {0x2;}' unless defined(&REDF_ECN6);
    eval 'sub REDF_ECN () {( &REDF_ECN4 |  &REDF_ECN6);}' unless defined(&REDF_ECN);
    eval 'sub REDF_FLOWVALVE () {0x4;}' unless defined(&REDF_FLOWVALVE);
    if(defined(&ALTQ3_COMPAT)) {
	eval 'sub RED_IF_ATTACH () { &_IOW(ord(\'Q\'), 1, \'struct red_interface\');}' unless defined(&RED_IF_ATTACH);
	eval 'sub RED_IF_DETACH () { &_IOW(ord(\'Q\'), 2, \'struct red_interface\');}' unless defined(&RED_IF_DETACH);
	eval 'sub RED_ENABLE () { &_IOW(ord(\'Q\'), 3, \'struct red_interface\');}' unless defined(&RED_ENABLE);
	eval 'sub RED_DISABLE () { &_IOW(ord(\'Q\'), 4, \'struct red_interface\');}' unless defined(&RED_DISABLE);
	eval 'sub RED_CONFIG () { &_IOWR(ord(\'Q\'), 6, \'struct red_conf\');}' unless defined(&RED_CONFIG);
	eval 'sub RED_GETSTATS () { &_IOWR(ord(\'Q\'), 12, \'struct red_stats\');}' unless defined(&RED_GETSTATS);
	eval 'sub RED_SETDEFAULTS () { &_IOW(ord(\'Q\'), 30, \'struct redparams\');}' unless defined(&RED_SETDEFAULTS);
    }
    if(defined(&_KERNEL)) {
	if(defined(&ALTQ3_COMPAT)) {
	}
	if(defined(&ALTQ3_COMPAT)) {
	}
	if(defined(&ALTQ3_COMPAT)) {
	}
	eval 'sub DTYPE_NODROP () {0;}' unless defined(&DTYPE_NODROP);
	eval 'sub DTYPE_FORCED () {1;}' unless defined(&DTYPE_FORCED);
	eval 'sub DTYPE_EARLY () {2;}' unless defined(&DTYPE_EARLY);
    }
}
1;
