require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_NETINET_TCP_VAR_H_)) {
    eval 'sub _NETINET_TCP_VAR_H_ () {1;}' unless defined(&_NETINET_TCP_VAR_H_);
    eval 'sub TF_ACKNOW () {0x1;}' unless defined(&TF_ACKNOW);
    eval 'sub TF_DELACK () {0x2;}' unless defined(&TF_DELACK);
    eval 'sub TF_NODELAY () {0x4;}' unless defined(&TF_NODELAY);
    eval 'sub TF_NOOPT () {0x8;}' unless defined(&TF_NOOPT);
    eval 'sub TF_SENTFIN () {0x10;}' unless defined(&TF_SENTFIN);
    eval 'sub TF_REQ_SCALE () {0x20;}' unless defined(&TF_REQ_SCALE);
    eval 'sub TF_RCVD_SCALE () {0x40;}' unless defined(&TF_RCVD_SCALE);
    eval 'sub TF_REQ_TSTMP () {0x80;}' unless defined(&TF_REQ_TSTMP);
    eval 'sub TF_RCVD_TSTMP () {0x100;}' unless defined(&TF_RCVD_TSTMP);
    eval 'sub TF_SACK_PERMIT () {0x200;}' unless defined(&TF_SACK_PERMIT);
    eval 'sub TF_SIGNATURE () {0x400;}' unless defined(&TF_SIGNATURE);
    if(defined(&TCP_ECN)) {
	eval 'sub TF_ECN_PERMIT () {0x8000;}' unless defined(&TF_ECN_PERMIT);
	eval 'sub TF_RCVD_CE () {0x10000;}' unless defined(&TF_RCVD_CE);
	eval 'sub TF_SEND_CWR () {0x20000;}' unless defined(&TF_SEND_CWR);
	eval 'sub TF_DISABLE_ECN () {0x40000;}' unless defined(&TF_DISABLE_ECN);
    }
    eval 'sub TF_REASSLOCK () {0x80000;}' unless defined(&TF_REASSLOCK);
    eval 'sub TF_LASTIDLE () {0x100000;}' unless defined(&TF_LASTIDLE);
    eval 'sub TF_DEAD () {0x200000;}' unless defined(&TF_DEAD);
    eval 'sub TF_PMTUD_PEND () {0x400000;}' unless defined(&TF_PMTUD_PEND);
    if(1) {
	if(1) {
	}
    }
    if(1) {
    }
    if(1) {
    }
    eval 'sub TCPOOB_HAVEDATA () {0x1;}' unless defined(&TCPOOB_HAVEDATA);
    eval 'sub TCPOOB_HADDATA () {0x2;}' unless defined(&TCPOOB_HADDATA);
    eval 'sub intotcpcb {
        my($ip) = @_;
	    eval q((($ip)-> &inp_ppcb));
    }' unless defined(&intotcpcb);
    eval 'sub sototcpcb {
        my($so) = @_;
	    eval q(( &intotcpcb( &sotoinpcb($so))));
    }' unless defined(&sototcpcb);
    if(defined(&_KERNEL)) {
	eval 'sub TCP_INIT_DELACK {
	    my($tp) = @_;
    	    eval q( &timeout_set(($tp)-> &t_delack_to,  &tcp_delack, $tp));
	}' unless defined(&TCP_INIT_DELACK);
	eval 'sub TCP_RESTART_DELACK {
	    my($tp) = @_;
    	    eval q( &timeout_add(($tp)-> &t_delack_to,  &tcp_delack_ticks));
	}' unless defined(&TCP_RESTART_DELACK);
	eval 'sub TCP_SET_DELACK {
	    my($tp) = @_;
    	    eval q( &do {  &if ((($tp)-> &t_flags &  &TF_DELACK) == 0) { ($tp)-> &t_flags |=  &TF_DELACK;  &TCP_RESTART_DELACK($tp); } }  &while ( 0));
	}' unless defined(&TCP_SET_DELACK);
	eval 'sub TCP_CLEAR_DELACK {
	    my($tp) = @_;
    	    eval q( &do {  &if (($tp)-> &t_flags &  &TF_DELACK) { ($tp)-> &t_flags &= ~ &TF_DELACK;  &timeout_del(($tp)-> &t_delack_to); } }  &while ( 0));
	}' unless defined(&TCP_CLEAR_DELACK);
	if(1) {
	}
	if(defined(&INET6)) {
	}
	eval 'sub sc_route4 () { ($sc_route_u->{route4});}' unless defined(&sc_route4);
	if(defined(&INET6)) {
	    eval 'sub sc_route6 () { ($sc_route_u->{route6});}' unless defined(&sc_route6);
	}
	if(0) {
	}
	eval 'sub SCF_UNREACH () {0x1;}' unless defined(&SCF_UNREACH);
	eval 'sub SCF_TIMESTAMP () {0x2;}' unless defined(&SCF_TIMESTAMP);
	eval 'sub SCF_DEAD () {0x4;}' unless defined(&SCF_DEAD);
	eval 'sub SCF_SACK_PERMIT () {0x8;}' unless defined(&SCF_SACK_PERMIT);
	eval 'sub SCF_ECN_PERMIT () {0x10;}' unless defined(&SCF_ECN_PERMIT);
	eval 'sub SCF_SIGNATURE () {0x20;}' unless defined(&SCF_SIGNATURE);
	eval 'sub tcp_reass_lock {
	    my($tp) = @_;
    	    eval q( &tcp_reass_lock_try($tp));
	}' unless defined(&tcp_reass_lock);
	eval 'sub tcp_reass_lock_try {
	    my($tp) = @_;
    	    eval q({ \'int\'  &s;  &s =  &splvm();  &if ( ($tp->{t_flags}) &  &TF_REASSLOCK) {  &splx( &s); (0); }  ($tp->{t_flags}) |=  &TF_REASSLOCK;  &splx( &s); (1); });
	}' unless defined(&tcp_reass_lock_try);
	eval 'sub tcp_reass_unlock {
	    my($tp) = @_;
    	    eval q({ \'int\'  &s;  &s =  &splvm();  ($tp->{t_flags}) &= ~ &TF_REASSLOCK;  &splx( &s); });
	}' unless defined(&tcp_reass_unlock);
    }
    eval 'sub TCP_RTT_SHIFT () {3;}' unless defined(&TCP_RTT_SHIFT);
    eval 'sub TCP_RTTVAR_SHIFT () {2;}' unless defined(&TCP_RTTVAR_SHIFT);
    eval 'sub TCP_RTT_BASE_SHIFT () {2;}' unless defined(&TCP_RTT_BASE_SHIFT);
    eval 'sub TCP_RTT_MAX () {(1<<9);}' unless defined(&TCP_RTT_MAX);
    eval 'sub TCP_REXMTVAL {
        my($tp) = @_;
	    eval q((((($tp)-> &t_srtt >>  &TCP_RTT_SHIFT) + ($tp)-> &t_rttvar) >>  &TCP_RTT_BASE_SHIFT));
    }' unless defined(&TCP_REXMTVAL);
    eval 'sub TCPCTL_RFC1323 () {1;}' unless defined(&TCPCTL_RFC1323);
    eval 'sub TCPCTL_KEEPINITTIME () {2;}' unless defined(&TCPCTL_KEEPINITTIME);
    eval 'sub TCPCTL_KEEPIDLE () {3;}' unless defined(&TCPCTL_KEEPIDLE);
    eval 'sub TCPCTL_KEEPINTVL () {4;}' unless defined(&TCPCTL_KEEPINTVL);
    eval 'sub TCPCTL_SLOWHZ () {5;}' unless defined(&TCPCTL_SLOWHZ);
    eval 'sub TCPCTL_BADDYNAMIC () {6;}' unless defined(&TCPCTL_BADDYNAMIC);
    eval 'sub TCPCTL_RECVSPACE () {7;}' unless defined(&TCPCTL_RECVSPACE);
    eval 'sub TCPCTL_SENDSPACE () {8;}' unless defined(&TCPCTL_SENDSPACE);
    eval 'sub TCPCTL_IDENT () {9;}' unless defined(&TCPCTL_IDENT);
    eval 'sub TCPCTL_SACK () {10;}' unless defined(&TCPCTL_SACK);
    eval 'sub TCPCTL_MSSDFLT () {11;}' unless defined(&TCPCTL_MSSDFLT);
    eval 'sub TCPCTL_RSTPPSLIMIT () {12;}' unless defined(&TCPCTL_RSTPPSLIMIT);
    eval 'sub TCPCTL_ACK_ON_PUSH () {13;}' unless defined(&TCPCTL_ACK_ON_PUSH);
    eval 'sub TCPCTL_ECN () {14;}' unless defined(&TCPCTL_ECN);
    eval 'sub TCPCTL_SYN_CACHE_LIMIT () {15;}' unless defined(&TCPCTL_SYN_CACHE_LIMIT);
    eval 'sub TCPCTL_SYN_BUCKET_LIMIT () {16;}' unless defined(&TCPCTL_SYN_BUCKET_LIMIT);
    eval 'sub TCPCTL_RFC3390 () {17;}' unless defined(&TCPCTL_RFC3390);
    eval 'sub TCPCTL_REASS_LIMIT () {18;}' unless defined(&TCPCTL_REASS_LIMIT);
    eval 'sub TCPCTL_DROP () {19;}' unless defined(&TCPCTL_DROP);
    eval 'sub TCPCTL_SACKHOLE_LIMIT () {20;}' unless defined(&TCPCTL_SACKHOLE_LIMIT);
    eval 'sub TCPCTL_MAXID () {21;}' unless defined(&TCPCTL_MAXID);
    eval 'sub TCPCTL_NAMES () {{ { 0, 0}, { "rfc1323",  &CTLTYPE_INT }, { "keepinittime",  &CTLTYPE_INT }, { "keepidle",  &CTLTYPE_INT }, { "keepintvl",  &CTLTYPE_INT }, { "slowhz",  &CTLTYPE_INT }, { "baddynamic",  &CTLTYPE_STRUCT }, { "recvspace",  &CTLTYPE_INT }, { "sendspace",  &CTLTYPE_INT }, { "ident",  &CTLTYPE_STRUCT }, { "sack",  &CTLTYPE_INT }, { "mssdflt",  &CTLTYPE_INT }, { "rstppslimit",  &CTLTYPE_INT }, { "ackonpush",  &CTLTYPE_INT }, { "ecn",  &CTLTYPE_INT }, { "syncachelimit",  &CTLTYPE_INT }, { "synbucketlimit",  &CTLTYPE_INT }, { "rfc3390",  &CTLTYPE_INT }, { "reasslimit",  &CTLTYPE_INT }, { "drop",  &CTLTYPE_STRUCT }, { "sackholelimit",  &CTLTYPE_INT }, };}' unless defined(&TCPCTL_NAMES);
    eval 'sub TCPCTL_VARS () {{  &NULL,  &tcp_do_rfc1323,  &tcptv_keep_init,  &tcp_keepidle,  &tcp_keepintvl,  &NULL,  &NULL,  &tcp_recvspace,  &tcp_sendspace,  &NULL,  &NULL,  &tcp_mssdflt,  &tcp_rst_ppslim,  &tcp_ack_on_push,  &NULL,  &tcp_syn_cache_limit,  &tcp_syn_bucket_limit,  &tcp_do_rfc3390,  &NULL,  &NULL,  &NULL };}' unless defined(&TCPCTL_VARS);
    if(defined(&_KERNEL)) {
	if(defined(&TCP_SACK)) {
	}
	if(defined( &INET6)  && !defined( &TCP6)) {
	}
	if(defined( &INET6)  && !defined( &TCP6)) {
	}
	if(defined(&INET6)) {
	}
	if(defined( &INET6)  && !defined( &TCP6)) {
	}
	if(defined(&TCP_SACK)) {
	    if(defined(&DEBUG)) {
	    }
	}
	if(defined( &TCP_SACK)) {
	}
	if(defined(&TCP_SIGNATURE)) {
	}
    }
}
1;
