require '_h2ph_pre.ph';

unless(defined(&_NETISO_TP_TRACE_H_)) {
    eval 'sub _NETISO_TP_TRACE_H_ () {1;}' unless defined(&_NETISO_TP_TRACE_H_);
    eval 'sub TPPTsendack () {1;}' unless defined(&TPPTsendack);
    eval 'sub TPPTgotack () {2;}' unless defined(&TPPTgotack);
    eval 'sub TPPTXack () {3;}' unless defined(&TPPTXack);
    eval 'sub TPPTgotXack () {4;}' unless defined(&TPPTgotXack);
    eval 'sub TPPTack () {5;}' unless defined(&TPPTack);
    eval 'sub TPPTindicate () {6;}' unless defined(&TPPTindicate);
    eval 'sub TPPTusrreq () {7;}' unless defined(&TPPTusrreq);
    eval 'sub TPPTmisc () {8;}' unless defined(&TPPTmisc);
    eval 'sub TPPTpcb () {9;}' unless defined(&TPPTpcb);
    eval 'sub TPPTref () {10;}' unless defined(&TPPTref);
    eval 'sub TPPTtpduin () {11;}' unless defined(&TPPTtpduin);
    eval 'sub TPPTparam () {12;}' unless defined(&TPPTparam);
    eval 'sub TPPTertpdu () {13;}' unless defined(&TPPTertpdu);
    eval 'sub TPPTdriver () {14;}' unless defined(&TPPTdriver);
    eval 'sub TPPTtpduout () {15;}' unless defined(&TPPTtpduout);
    require 'netiso/tp_pcb.ph';
    if(defined( &TP_TRACEFILE)||!defined( &_KERNEL)) {
	require 'netiso/tp_tpdu.ph';
	eval 'sub TPTRACE_STRLEN () {50;}' unless defined(&TPTRACE_STRLEN);
	eval 'sub tpt_inpcb () { ($tpt_stuff->{tpt_Inpcb});}' unless defined(&tpt_inpcb);
	eval 'sub tpt_pcb () { ($tpt_stuff->{tpt_Pcb});}' unless defined(&tpt_pcb);
	eval 'sub tpt_ref () { ($tpt_stuff->{tpt_Ref});}' unless defined(&tpt_ref);
	eval 'sub tpt_tpdu () { ($tpt_stuff->{tpt_Tpdu});}' unless defined(&tpt_tpdu);
	eval 'sub tpt_param () { ($tpt_stuff->{tpt_Param});}' unless defined(&tpt_param);
	eval 'sub tpt_ertpdu () { ($tpt_stuff->{tpt_Ertpdu});}' unless defined(&tpt_ertpdu);
	eval 'sub tpt_str () { ($tpt_stuff->{tptmisc}->{tpt_Str});}' unless defined(&tpt_str);
	eval 'sub tpt_m1 () { ($tpt_stuff->{tptmisc}->{tptm_1});}' unless defined(&tpt_m1);
	eval 'sub tpt_m2 () { ($tpt_stuff->{tptmisc}->{tptm_2});}' unless defined(&tpt_m2);
	eval 'sub tpt_m3 () { ($tpt_stuff->{tptmisc}->{tptm_3});}' unless defined(&tpt_m3);
	eval 'sub tpt_m4 () { ($tpt_stuff->{tptmisc}->{tptm_4});}' unless defined(&tpt_m4);
	eval 'sub tpt_m5 () { ($tpt_stuff->{tptmisc}->{tptm_5});}' unless defined(&tpt_m5);
	eval 'sub tpt_seq () { ($tpt_stuff->{tpt_Time}->{tptv_seq});}' unless defined(&tpt_seq);
	eval 'sub tpt_kind () { ($tpt_stuff->{tpt_Time}->{tptv_kind});}' unless defined(&tpt_kind);
	eval 'sub tpt_window () { ($tpt_stuff->{tpt_Time}->{tptv_window});}' unless defined(&tpt_window);
	eval 'sub tpt_size () { ($tpt_stuff->{tpt_Time}->{tptv_size});}' unless defined(&tpt_size);
    }
    if(defined(&TPPT)) {
	eval 'sub TPTRACEN () {300;}' unless defined(&TPTRACEN);
	eval 'sub tptrace {
	    local($A,$B,$C,$D,$E,$F) = @_;
    	    eval q( &tpTrace(0, ,,,,,($F)));
	}' unless defined(&tptrace);
	eval 'sub tptraceTPCB {
	    local($A,$B,$C,$D,$E,$F) = @_;
    	    eval q( &tpTrace( &tpcb, ,,,,,($F)));
	}' unless defined(&tptraceTPCB);
    } else {
	eval 'sub TPTRACEN () {1;}' unless defined(&TPTRACEN);
	eval 'sub tptrace {
	    local($A,$B,$C,$D,$E,$F) = @_;
    	    eval q(0);
	}' unless defined(&tptrace);
	eval 'sub tptraceTPCB {
	    local($A,$B,$C,$D,$E,$F) = @_;
    	    eval q(0);
	}' unless defined(&tptraceTPCB);
    }
}
1;
