require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_NET_IF_BRIDGE_H_)) {
    eval 'sub _NET_IF_BRIDGE_H_ () {1;}' unless defined(&_NET_IF_BRIDGE_H_);
    require 'net/pfvar.ph';
    eval 'sub IFBIF_LEARNING () {0x1;}' unless defined(&IFBIF_LEARNING);
    eval 'sub IFBIF_DISCOVER () {0x2;}' unless defined(&IFBIF_DISCOVER);
    eval 'sub IFBIF_BLOCKNONIP () {0x4;}' unless defined(&IFBIF_BLOCKNONIP);
    eval 'sub IFBIF_STP () {0x8;}' unless defined(&IFBIF_STP);
    eval 'sub IFBIF_BSTP_EDGE () {0x10;}' unless defined(&IFBIF_BSTP_EDGE);
    eval 'sub IFBIF_BSTP_AUTOEDGE () {0x20;}' unless defined(&IFBIF_BSTP_AUTOEDGE);
    eval 'sub IFBIF_BSTP_PTP () {0x40;}' unless defined(&IFBIF_BSTP_PTP);
    eval 'sub IFBIF_BSTP_AUTOPTP () {0x80;}' unless defined(&IFBIF_BSTP_AUTOPTP);
    eval 'sub IFBIF_SPAN () {0x100;}' unless defined(&IFBIF_SPAN);
    eval 'sub IFBIF_RO_MASK () {0xff00;}' unless defined(&IFBIF_RO_MASK);
    eval 'sub IFBF_FLUSHDYN () {0x;}' unless defined(&IFBF_FLUSHDYN);
    eval 'sub IFBF_FLUSHALL () {0x1;}' unless defined(&IFBF_FLUSHALL);
    eval 'sub BSTP_IFSTATE_DISABLED () {0;}' unless defined(&BSTP_IFSTATE_DISABLED);
    eval 'sub BSTP_IFSTATE_LISTENING () {1;}' unless defined(&BSTP_IFSTATE_LISTENING);
    eval 'sub BSTP_IFSTATE_LEARNING () {2;}' unless defined(&BSTP_IFSTATE_LEARNING);
    eval 'sub BSTP_IFSTATE_FORWARDING () {3;}' unless defined(&BSTP_IFSTATE_FORWARDING);
    eval 'sub BSTP_IFSTATE_BLOCKING () {4;}' unless defined(&BSTP_IFSTATE_BLOCKING);
    eval 'sub BSTP_IFSTATE_DISCARDING () {5;}' unless defined(&BSTP_IFSTATE_DISCARDING);
    eval 'sub BSTP_TCSTATE_ACTIVE () {1;}' unless defined(&BSTP_TCSTATE_ACTIVE);
    eval 'sub BSTP_TCSTATE_DETECTED () {2;}' unless defined(&BSTP_TCSTATE_DETECTED);
    eval 'sub BSTP_TCSTATE_INACTIVE () {3;}' unless defined(&BSTP_TCSTATE_INACTIVE);
    eval 'sub BSTP_TCSTATE_LEARNING () {4;}' unless defined(&BSTP_TCSTATE_LEARNING);
    eval 'sub BSTP_TCSTATE_PROPAG () {5;}' unless defined(&BSTP_TCSTATE_PROPAG);
    eval 'sub BSTP_TCSTATE_ACK () {6;}' unless defined(&BSTP_TCSTATE_ACK);
    eval 'sub BSTP_TCSTATE_TC () {7;}' unless defined(&BSTP_TCSTATE_TC);
    eval 'sub BSTP_TCSTATE_TCN () {8;}' unless defined(&BSTP_TCSTATE_TCN);
    eval 'sub BSTP_ROLE_DISABLED () {0;}' unless defined(&BSTP_ROLE_DISABLED);
    eval 'sub BSTP_ROLE_ROOT () {1;}' unless defined(&BSTP_ROLE_ROOT);
    eval 'sub BSTP_ROLE_DESIGNATED () {2;}' unless defined(&BSTP_ROLE_DESIGNATED);
    eval 'sub BSTP_ROLE_ALTERNATE () {3;}' unless defined(&BSTP_ROLE_ALTERNATE);
    eval 'sub BSTP_ROLE_BACKUP () {4;}' unless defined(&BSTP_ROLE_BACKUP);
    eval 'sub ifbic_buf () { ($ifbic_ifbicu->{ifbicu_buf});}' unless defined(&ifbic_buf);
    eval 'sub ifbic_req () { ($ifbic_ifbicu->{ifbicu_req});}' unless defined(&ifbic_req);
    eval 'sub IFBAF_TYPEMASK () {0x3;}' unless defined(&IFBAF_TYPEMASK);
    eval 'sub IFBAF_DYNAMIC () {0x;}' unless defined(&IFBAF_DYNAMIC);
    eval 'sub IFBAF_STATIC () {0x1;}' unless defined(&IFBAF_STATIC);
    eval 'sub ifbac_buf () { ($ifbac_ifbacu->{ifbacu_buf});}' unless defined(&ifbac_buf);
    eval 'sub ifbac_req () { ($ifbac_ifbacu->{ifbacu_req});}' unless defined(&ifbac_req);
    eval 'sub ifbrp_csize () { ($ifbrp_ifbrpu->{ifbrpu_csize});}' unless defined(&ifbrp_csize);
    eval 'sub ifbrp_ctime () { ($ifbrp_ifbrpu->{ifbrpu_ctime});}' unless defined(&ifbrp_ctime);
    eval 'sub ifbrp_prio () { ($ifbrp_ifbrpu->{ifbrpu_prio});}' unless defined(&ifbrp_prio);
    eval 'sub ifbrp_proto () { ($ifbrp_ifbrpu->{ifbrpu_proto});}' unless defined(&ifbrp_proto);
    eval 'sub ifbrp_txhc () { ($ifbrp_ifbrpu->{ifbrpu_txhc});}' unless defined(&ifbrp_txhc);
    eval 'sub ifbrp_hellotime () { ($ifbrp_ifbrpu->{ifbrpu_hellotime});}' unless defined(&ifbrp_hellotime);
    eval 'sub ifbrp_fwddelay () { ($ifbrp_ifbrpu->{ifbrpu_fwddelay});}' unless defined(&ifbrp_fwddelay);
    eval 'sub ifbrp_maxage () { ($ifbrp_ifbrpu->{ifbrpu_maxage});}' unless defined(&ifbrp_maxage);
    eval 'sub BSTP_PROTO_ID () {0x;}' unless defined(&BSTP_PROTO_ID);
    eval 'sub BSTP_PROTO_STP () {0x;}' unless defined(&BSTP_PROTO_STP);
    eval 'sub BSTP_PROTO_RSTP () {0x2;}' unless defined(&BSTP_PROTO_RSTP);
    eval 'sub BSTP_PROTO_MAX () { &BSTP_PROTO_RSTP;}' unless defined(&BSTP_PROTO_MAX);
    eval 'sub BRL_ACTION_BLOCK () {0x1;}' unless defined(&BRL_ACTION_BLOCK);
    eval 'sub BRL_ACTION_PASS () {0x2;}' unless defined(&BRL_ACTION_PASS);
    eval 'sub BRL_FLAG_IN () {0x8;}' unless defined(&BRL_FLAG_IN);
    eval 'sub BRL_FLAG_OUT () {0x4;}' unless defined(&BRL_FLAG_OUT);
    eval 'sub BRL_FLAG_SRCVALID () {0x2;}' unless defined(&BRL_FLAG_SRCVALID);
    eval 'sub BRL_FLAG_DSTVALID () {0x1;}' unless defined(&BRL_FLAG_DSTVALID);
    eval 'sub ifbrl_buf () { ($ifbrl_ifbrlu->{ifbrlu_buf});}' unless defined(&ifbrl_buf);
    eval 'sub ifbrl_req () { ($ifbrl_ifbrlu->{ifbrlu_req});}' unless defined(&ifbrl_req);
    if(defined(&_KERNEL)) {
	eval 'sub BSTP_PORT_CANMIGRATE () {0x1;}' unless defined(&BSTP_PORT_CANMIGRATE);
	eval 'sub BSTP_PORT_NEWINFO () {0x2;}' unless defined(&BSTP_PORT_NEWINFO);
	eval 'sub BSTP_PORT_DISPUTED () {0x4;}' unless defined(&BSTP_PORT_DISPUTED);
	eval 'sub BSTP_PORT_ADMCOST () {0x8;}' unless defined(&BSTP_PORT_ADMCOST);
	eval 'sub BSTP_PORT_AUTOEDGE () {0x10;}' unless defined(&BSTP_PORT_AUTOEDGE);
	eval 'sub BSTP_PORT_AUTOPTP () {0x20;}' unless defined(&BSTP_PORT_AUTOPTP);
	eval 'sub BSTP_PDU_SUPERIOR () {1;}' unless defined(&BSTP_PDU_SUPERIOR);
	eval 'sub BSTP_PDU_REPEATED () {2;}' unless defined(&BSTP_PDU_REPEATED);
	eval 'sub BSTP_PDU_INFERIOR () {3;}' unless defined(&BSTP_PDU_INFERIOR);
	eval 'sub BSTP_PDU_INFERIORALT () {4;}' unless defined(&BSTP_PDU_INFERIORALT);
	eval 'sub BSTP_PDU_OTHER () {5;}' unless defined(&BSTP_PDU_OTHER);
	eval 'sub BSTP_PDU_PRMASK () {0xc;}' unless defined(&BSTP_PDU_PRMASK);
	eval 'sub BSTP_PDU_PRSHIFT () {2;}' unless defined(&BSTP_PDU_PRSHIFT);
	eval 'sub BSTP_PDU_F_UNKN () {0x;}' unless defined(&BSTP_PDU_F_UNKN);
	eval 'sub BSTP_PDU_F_ALT () {0x1;}' unless defined(&BSTP_PDU_F_ALT);
	eval 'sub BSTP_PDU_F_ROOT () {0x2;}' unless defined(&BSTP_PDU_F_ROOT);
	eval 'sub BSTP_PDU_F_DESG () {0x3;}' unless defined(&BSTP_PDU_F_DESG);
	eval 'sub BSTP_PDU_STPMASK () {0x81;}' unless defined(&BSTP_PDU_STPMASK);
	eval 'sub BSTP_PDU_RSTPMASK () {0x7f;}' unless defined(&BSTP_PDU_RSTPMASK);
	eval 'sub BSTP_PDU_F_TC () {0x1;}' unless defined(&BSTP_PDU_F_TC);
	eval 'sub BSTP_PDU_F_P () {0x2;}' unless defined(&BSTP_PDU_F_P);
	eval 'sub BSTP_PDU_F_L () {0x10;}' unless defined(&BSTP_PDU_F_L);
	eval 'sub BSTP_PDU_F_F () {0x20;}' unless defined(&BSTP_PDU_F_F);
	eval 'sub BSTP_PDU_F_A () {0x40;}' unless defined(&BSTP_PDU_F_A);
	eval 'sub BSTP_PDU_F_TCA () {0x80;}' unless defined(&BSTP_PDU_F_TCA);
	eval 'sub bs_ifflags () { ($bs_ifp->{if_flags});}' unless defined(&bs_ifflags);
	eval 'sub bif_state () { ($bif_stp->{bp_state});}' unless defined(&bif_state);
	unless(defined(&BRIDGE_RTABLE_SIZE)) {
	    eval 'sub BRIDGE_RTABLE_SIZE () {1024;}' unless defined(&BRIDGE_RTABLE_SIZE);
	}
	eval 'sub BRIDGE_RTABLE_MASK () {( &BRIDGE_RTABLE_SIZE - 1);}' unless defined(&BRIDGE_RTABLE_MASK);
    }
}
1;
