require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_NETINET_TCP_TIMER_H_)) {
    eval 'sub _NETINET_TCP_TIMER_H_ () {1;}' unless defined(&_NETINET_TCP_TIMER_H_);
    eval 'sub TCPT_NTIMERS () {4;}' unless defined(&TCPT_NTIMERS);
    eval 'sub TCPT_REXMT () {0;}' unless defined(&TCPT_REXMT);
    eval 'sub TCPT_PERSIST () {1;}' unless defined(&TCPT_PERSIST);
    eval 'sub TCPT_KEEP () {2;}' unless defined(&TCPT_KEEP);
    eval 'sub TCPT_2MSL () {3;}' unless defined(&TCPT_2MSL);
    eval 'sub TCPTV_MSL () {( 30* &PR_SLOWHZ);}' unless defined(&TCPTV_MSL);
    eval 'sub TCPTV_SRTTBASE () {0;}' unless defined(&TCPTV_SRTTBASE);
    eval 'sub TCPTV_SRTTDFLT () {( 3* &PR_SLOWHZ);}' unless defined(&TCPTV_SRTTDFLT);
    eval 'sub TCPTV_PERSMIN () {( 5* &PR_SLOWHZ);}' unless defined(&TCPTV_PERSMIN);
    eval 'sub TCPTV_PERSMAX () {( 60* &PR_SLOWHZ);}' unless defined(&TCPTV_PERSMAX);
    eval 'sub TCPTV_KEEP_INIT () {( 75* &PR_SLOWHZ);}' unless defined(&TCPTV_KEEP_INIT);
    eval 'sub TCPTV_KEEP_IDLE () {(120*60* &PR_SLOWHZ);}' unless defined(&TCPTV_KEEP_IDLE);
    eval 'sub TCPTV_KEEPINTVL () {( 75* &PR_SLOWHZ);}' unless defined(&TCPTV_KEEPINTVL);
    eval 'sub TCPTV_KEEPCNT () {8;}' unless defined(&TCPTV_KEEPCNT);
    eval 'sub TCPTV_MIN () {( 1* &PR_SLOWHZ);}' unless defined(&TCPTV_MIN);
    eval 'sub TCPTV_REXMTMAX () {( 64* &PR_SLOWHZ);}' unless defined(&TCPTV_REXMTMAX);
    eval 'sub TCP_LINGERTIME () {120;}' unless defined(&TCP_LINGERTIME);
    eval 'sub TCP_MAXRXTSHIFT () {12;}' unless defined(&TCP_MAXRXTSHIFT);
    eval 'sub TCP_DELACK_TICKS () {( &hz /  &PR_FASTHZ);}' unless defined(&TCP_DELACK_TICKS);
    if(defined(&TCPTIMERS)) {
    }
    eval 'sub TCP_TIMER_INIT {
        my($tp, $timer) = @_;
	    eval q( &timeout_set(($tp)-> $t_timer[($timer)],  $tcp_timer_funcs[($timer)], $tp));
    }' unless defined(&TCP_TIMER_INIT);
    eval 'sub TCP_TIMER_ARM {
        my($tp, $timer, $nticks) = @_;
	    eval q( &timeout_add(($tp)-> $t_timer[($timer)], ($nticks) * ( &hz /  &PR_SLOWHZ)));
    }' unless defined(&TCP_TIMER_ARM);
    eval 'sub TCP_TIMER_DISARM {
        my($tp, $timer) = @_;
	    eval q( &timeout_del(($tp)-> $t_timer[($timer)]));
    }' unless defined(&TCP_TIMER_DISARM);
    eval 'sub TCP_TIMER_ISARMED {
        my($tp, $timer) = @_;
	    eval q( &timeout_pending(($tp)-> $t_timer[($timer)]));
    }' unless defined(&TCP_TIMER_ISARMED);
    eval 'sub TCPT_RANGESET {
        my($tv, $value, $tvmin, $tvmax) = @_;
	    eval q({ ($tv) = ($value);  &if (($tv) < ($tvmin)) ($tv) = ($tvmin);  &else  &if (($tv) > ($tvmax)) ($tv) = ($tvmax); });
    }' unless defined(&TCPT_RANGESET);
    if(defined(&_KERNEL)) {
    }
}
1;
