require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&LACP_TIMER_CURRENT_WHILE)) {
    sub LACP_TIMER_CURRENT_WHILE () {	0;}
}
unless(defined(&LACP_TIMER_PERIODIC)) {
    sub LACP_TIMER_PERIODIC () {	1;}
}
unless(defined(&LACP_TIMER_WAIT_WHILE)) {
    sub LACP_TIMER_WAIT_WHILE () {	2;}
}
unless(defined(&LACP_NTIMER)) {
    sub LACP_NTIMER () {	3;}
}
unless(defined(&LACP_TIMER_ARM)) {
    sub LACP_TIMER_ARM {
	my($port, $timer, $val) = @_;
	eval q(($port)-> $lp_timer[($timer)] = ($val));
    }
}
unless(defined(&LACP_TIMER_DISARM)) {
    sub LACP_TIMER_DISARM {
	my($port, $timer) = @_;
	eval q(($port)-> $lp_timer[($timer)] = 0);
    }
}
unless(defined(&LACP_TIMER_ISARMED)) {
    sub LACP_TIMER_ISARMED {
	my($port, $timer) = @_;
	eval q((($port)-> $lp_timer[($timer)] > 0));
    }
}
unless(defined(&LACP_STATE_ACTIVITY)) {
    sub LACP_STATE_ACTIVITY () {	(1<<0);}
}
unless(defined(&LACP_STATE_TIMEOUT)) {
    sub LACP_STATE_TIMEOUT () {	(1<<1);}
}
unless(defined(&LACP_STATE_AGGREGATION)) {
    sub LACP_STATE_AGGREGATION () {	(1<<2);}
}
unless(defined(&LACP_STATE_SYNC)) {
    sub LACP_STATE_SYNC () {	(1<<3);}
}
unless(defined(&LACP_STATE_COLLECTING)) {
    sub LACP_STATE_COLLECTING () {	(1<<4);}
}
unless(defined(&LACP_STATE_DISTRIBUTING)) {
    sub LACP_STATE_DISTRIBUTING () {	(1<<5);}
}
unless(defined(&LACP_STATE_DEFAULTED)) {
    sub LACP_STATE_DEFAULTED () {	(1<<6);}
}
unless(defined(&LACP_STATE_EXPIRED)) {
    sub LACP_STATE_EXPIRED () {	(1<<7);}
}
unless(defined(&LACP_PORT_NTT)) {
    sub LACP_PORT_NTT () {	0x1;}
}
unless(defined(&LACP_PORT_MARK)) {
    sub LACP_PORT_MARK () {	0x2;}
}
unless(defined(&LACP_STATE_BITS)) {
    sub LACP_STATE_BITS () {	"\020" "\001ACTIVITY" "\002TIMEOUT" "\003AGGREGATION" "\004SYNC" "\005COLLECTING" "\006DISTRIBUTING" "\007DEFAULTED" "\010EXPIRED";}
}
unless(defined(&SLOWPROTOCOLS_SUBTYPE_LACP)) {
    sub SLOWPROTOCOLS_SUBTYPE_LACP () {	1;}
}
unless(defined(&SLOWPROTOCOLS_SUBTYPE_MARKER)) {
    sub SLOWPROTOCOLS_SUBTYPE_MARKER () {	2;}
}
unless(defined(&TLV_SET)) {
    sub TLV_SET {
	my($tlv, $type, $length) = @_;
	eval q( &do { ($tlv)-> &tlv_type = ($type); ($tlv)-> &tlv_length = $sizeof{$tlv} + ($length); }  &while ( 0));
    }
}
unless(defined(&MARKER_TYPE_INFO)) {
    sub MARKER_TYPE_INFO () {	0x1;}
}
unless(defined(&MARKER_TYPE_RESPONSE)) {
    sub MARKER_TYPE_RESPONSE () {	0x2;}
}
eval("sub LACP_UNSELECTED () { 0; }") unless defined(&LACP_UNSELECTED);
eval("sub LACP_STANDBY () { 1; }") unless defined(&LACP_STANDBY);
eval("sub LACP_SELECTED () { 2; }") unless defined(&LACP_SELECTED);
eval("sub LACP_MUX_DETACHED () { 0; }") unless defined(&LACP_MUX_DETACHED);
eval("sub LACP_MUX_WAITING () { 1; }") unless defined(&LACP_MUX_WAITING);
eval("sub LACP_MUX_ATTACHED () { 2; }") unless defined(&LACP_MUX_ATTACHED);
eval("sub LACP_MUX_COLLECTING () { 3; }") unless defined(&LACP_MUX_COLLECTING);
eval("sub LACP_MUX_DISTRIBUTING () { 4; }") unless defined(&LACP_MUX_DISTRIBUTING);
unless(defined(&LACP_MAX_PORTS)) {
    sub LACP_MAX_PORTS () {	32;}
}
unless(defined(&lp_state)) {
    sub lp_state () {	 ($lp_actor->{lip_state});}
}
unless(defined(&lp_key)) {
    sub lp_key () {	 ($lp_actor->{lip_key});}
}
unless(defined(&lp_systemid)) {
    sub lp_systemid () {	 ($lp_actor->{lip_systemid});}
}
unless(defined(&LACP_TYPE_ACTORINFO)) {
    sub LACP_TYPE_ACTORINFO () {	1;}
}
unless(defined(&LACP_TYPE_PARTNERINFO)) {
    sub LACP_TYPE_PARTNERINFO () {	2;}
}
unless(defined(&LACP_TYPE_COLLECTORINFO)) {
    sub LACP_TYPE_COLLECTORINFO () {	3;}
}
unless(defined(&LACP_FAST_PERIODIC_TIME)) {
    sub LACP_FAST_PERIODIC_TIME () {	(1);}
}
unless(defined(&LACP_SLOW_PERIODIC_TIME)) {
    sub LACP_SLOW_PERIODIC_TIME () {	(30);}
}
unless(defined(&LACP_SHORT_TIMEOUT_TIME)) {
    sub LACP_SHORT_TIMEOUT_TIME () {	(3*  &LACP_FAST_PERIODIC_TIME);}
}
unless(defined(&LACP_LONG_TIMEOUT_TIME)) {
    sub LACP_LONG_TIMEOUT_TIME () {	(3*  &LACP_SLOW_PERIODIC_TIME);}
}
unless(defined(&LACP_CHURN_DETECTION_TIME)) {
    sub LACP_CHURN_DETECTION_TIME () {	(60);}
}
unless(defined(&LACP_AGGREGATE_WAIT_TIME)) {
    sub LACP_AGGREGATE_WAIT_TIME () {	(2);}
}
unless(defined(&LACP_TRANSIT_DELAY)) {
    sub LACP_TRANSIT_DELAY () {	3000;}
}
unless(defined(&LACP_STATE_EQ)) {
    sub LACP_STATE_EQ {
	my($s1, $s2, $mask) = @_;
	eval q((((($s1) ^ ($s2)) & ($mask)) == 0));
    }
}
unless(defined(&LACP_SYS_PRI)) {
    sub LACP_SYS_PRI {
	my($peer) = @_;
	eval q(($peer). ($lip_systemid->{lsi_prio}));
    }
}
unless(defined(&LACP_PORT)) {
    sub LACP_PORT {
	my($_lp) = @_;
	eval q((($_lp)-> &tp_psc));
    }
}
unless(defined(&LACP_SOFTC)) {
    sub LACP_SOFTC {
	my($_sc) = @_;
	eval q((($_sc)-> &tr_psc));
    }
}
unless(defined(&LACP_LOCK_INIT)) {
    sub LACP_LOCK_INIT {
	my($_lsc) = @_;
	eval q( &mtx_init(($_lsc)-> &lsc_mtx, \"lacp mtx\",  &NULL,  &MTX_DEF));
    }
}
unless(defined(&LACP_LOCK_DESTROY)) {
    sub LACP_LOCK_DESTROY {
	my($_lsc) = @_;
	eval q( &mtx_destroy(($_lsc)-> &lsc_mtx));
    }
}
unless(defined(&LACP_LOCK)) {
    sub LACP_LOCK {
	my($_lsc) = @_;
	eval q( &mtx_lock(($_lsc)-> &lsc_mtx));
    }
}
unless(defined(&LACP_UNLOCK)) {
    sub LACP_UNLOCK {
	my($_lsc) = @_;
	eval q( &mtx_unlock(($_lsc)-> &lsc_mtx));
    }
}
unless(defined(&LACP_LOCK_ASSERT)) {
    sub LACP_LOCK_ASSERT {
	my($_lsc) = @_;
	eval q( &mtx_assert(($_lsc)-> &lsc_mtx,  &MA_OWNED));
    }
}
unless(defined(&LACP_MACSTR_MAX)) {
    sub LACP_MACSTR_MAX () {	(2*6+ 5);}
}
unless(defined(&LACP_SYSTEMPRIOSTR_MAX)) {
    sub LACP_SYSTEMPRIOSTR_MAX () {	(4);}
}
unless(defined(&LACP_SYSTEMIDSTR_MAX)) {
    sub LACP_SYSTEMIDSTR_MAX () {	( &LACP_SYSTEMPRIOSTR_MAX + 1+  &LACP_MACSTR_MAX);}
}
unless(defined(&LACP_PORTPRIOSTR_MAX)) {
    sub LACP_PORTPRIOSTR_MAX () {	(4);}
}
unless(defined(&LACP_PORTNOSTR_MAX)) {
    sub LACP_PORTNOSTR_MAX () {	(4);}
}
unless(defined(&LACP_PORTIDSTR_MAX)) {
    sub LACP_PORTIDSTR_MAX () {	( &LACP_PORTPRIOSTR_MAX + 1+  &LACP_PORTNOSTR_MAX);}
}
unless(defined(&LACP_KEYSTR_MAX)) {
    sub LACP_KEYSTR_MAX () {	(4);}
}
unless(defined(&LACP_PARTNERSTR_MAX)) {
    sub LACP_PARTNERSTR_MAX () {	(1+  &LACP_SYSTEMIDSTR_MAX + 1+  &LACP_KEYSTR_MAX + 1+  &LACP_PORTIDSTR_MAX + 1);}
}
unless(defined(&LACP_LAGIDSTR_MAX)) {
    sub LACP_LAGIDSTR_MAX () {	(1+  &LACP_PARTNERSTR_MAX + 1+  &LACP_PARTNERSTR_MAX + 1);}
}
unless(defined(&LACP_STATESTR_MAX)) {
    sub LACP_STATESTR_MAX () {	(255);}
}
1;
