require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_NETINET_IP_STATE_H_)) {
    eval 'sub _NETINET_IP_STATE_H_ () {1;}' unless defined(&_NETINET_IP_STATE_H_);
    if(defined(&__STDC__) || defined(&__GNUC__) || defined(&_AIX51)) {
	eval 'sub SIOCDELST () { &_IOW(ord(\'r\'), 61, \'struct ipfobj\');}' unless defined(&SIOCDELST);
    } else {
	eval 'sub SIOCDELST () { &_IOW("r", 61, \'struct ipfobj\');}' unless defined(&SIOCDELST);
    }
    unless(defined(&IPSTATE_SIZE)) {
	eval 'sub IPSTATE_SIZE () {5737;}' unless defined(&IPSTATE_SIZE);
    }
    unless(defined(&IPSTATE_MAX)) {
	eval 'sub IPSTATE_MAX () {4013;}' unless defined(&IPSTATE_MAX);
    }
    eval 'sub PAIRS {
        my($s1,$d1,$s2,$d2) = @_;
	    eval q((((($s1) == ($s2))  && (($d1) == ($d2))) || ((($s1) == ($d2))  && (($d1) == ($s2)))));
    }' unless defined(&PAIRS);
    eval 'sub IPPAIR {
        my($s1,$d1,$s2,$d2) = @_;
	    eval q( &PAIRS(($s1). &s_addr, ($d1). &s_addr, ($s2). &s_addr, ($d2). &s_addr));
    }' unless defined(&IPPAIR);
    eval 'sub is_die () { ($is_sti->{tqe_die});}' unless defined(&is_die);
    eval 'sub is_state () { ($is_sti->{tqe_state});}' unless defined(&is_state);
    eval 'sub is_touched () { ($is_sti->{tqe_touched});}' unless defined(&is_touched);
    eval 'sub is_saddr () { ($is_src->{in4}->{s_addr});}' unless defined(&is_saddr);
    eval 'sub is_daddr () { ($is_dst->{in4}->{s_addr});}' unless defined(&is_daddr);
    eval 'sub is_icmp () { ($is_ps->{is_ics});}' unless defined(&is_icmp);
    eval 'sub is_type () { ($is_icmp->{ici_type});}' unless defined(&is_type);
    eval 'sub is_tcp () { ($is_ps->{is_ts});}' unless defined(&is_tcp);
    eval 'sub is_udp () { ($is_ps->{is_us});}' unless defined(&is_udp);
    eval 'sub is_send () { ($is_tcp->{ts_data[0]}->{td_end});}' unless defined(&is_send);
    eval 'sub is_dend () { ($is_tcp->{ts_data[1]}->{td_end});}' unless defined(&is_dend);
    eval 'sub is_maxswin () { ($is_tcp->{ts_data[0]}->{td_maxwin});}' unless defined(&is_maxswin);
    eval 'sub is_maxdwin () { ($is_tcp->{ts_data[1]}->{td_maxwin});}' unless defined(&is_maxdwin);
    eval 'sub is_maxsend () { ($is_tcp->{ts_data[0]}->{td_maxend});}' unless defined(&is_maxsend);
    eval 'sub is_maxdend () { ($is_tcp->{ts_data[1]}->{td_maxend});}' unless defined(&is_maxdend);
    eval 'sub is_swinscale () { ($is_tcp->{ts_data[0]}->{td_winscale});}' unless defined(&is_swinscale);
    eval 'sub is_dwinscale () { ($is_tcp->{ts_data[1]}->{td_winscale});}' unless defined(&is_dwinscale);
    eval 'sub is_swinflags () { ($is_tcp->{ts_data[0]}->{td_winflags});}' unless defined(&is_swinflags);
    eval 'sub is_dwinflags () { ($is_tcp->{ts_data[1]}->{td_winflags});}' unless defined(&is_dwinflags);
    eval 'sub is_sport () { ($is_tcp->{ts_sport});}' unless defined(&is_sport);
    eval 'sub is_dport () { ($is_tcp->{ts_dport});}' unless defined(&is_dport);
    eval 'sub is_ifpin () { $is_ifp[0];}' unless defined(&is_ifpin);
    eval 'sub is_ifpout () { $is_ifp[2];}' unless defined(&is_ifpout);
    eval 'sub is_gre () { ($is_ps->{is_ug});}' unless defined(&is_gre);
    eval 'sub is_call () { ($is_gre->{gs_call});}' unless defined(&is_call);
    eval 'sub IS_WSPORT () { &SI_W_SPORT;}' unless defined(&IS_WSPORT);
    eval 'sub IS_WDPORT () { &SI_W_DPORT;}' unless defined(&IS_WDPORT);
    eval 'sub IS_WSADDR () { &SI_W_SADDR;}' unless defined(&IS_WSADDR);
    eval 'sub IS_WDADDR () { &SI_W_DADDR;}' unless defined(&IS_WDADDR);
    eval 'sub IS_NEWFR () { &SI_NEWFR;}' unless defined(&IS_NEWFR);
    eval 'sub IS_CLONE () { &SI_CLONE;}' unless defined(&IS_CLONE);
    eval 'sub IS_CLONED () { &SI_CLONED;}' unless defined(&IS_CLONED);
    eval 'sub IS_TCPFSM () {0x10000;}' unless defined(&IS_TCPFSM);
    eval 'sub IS_STRICT () {0x20000;}' unless defined(&IS_STRICT);
    eval 'sub IS_ISNSYN () {0x40000;}' unless defined(&IS_ISNSYN);
    eval 'sub IS_ISNACK () {0x80000;}' unless defined(&IS_ISNACK);
    eval 'sub IS_STATESYNC () {0x100000;}' unless defined(&IS_STATESYNC);
    eval 'sub IS_LOOSE () {0x200000;}' unless defined(&IS_LOOSE);
    eval 'sub IS_SC_CLIENT () {0x10000000;}' unless defined(&IS_SC_CLIENT);
    eval 'sub IS_SC_SERVER () {0x20000000;}' unless defined(&IS_SC_SERVER);
    eval 'sub IS_SC_MATCHC () {0x40000000;}' unless defined(&IS_SC_MATCHC);
    eval 'sub IS_SC_MATCHS () {0x80000000;}' unless defined(&IS_SC_MATCHS);
    eval 'sub IS_SC_MATCHALL () {( &IS_SC_MATCHC| &IS_SC_MATCHC);}' unless defined(&IS_SC_MATCHALL);
    eval 'sub IS_SC_ALL () {( &IS_SC_MATCHC| &IS_SC_MATCHC| &IS_SC_CLIENT| &IS_SC_SERVER);}' unless defined(&IS_SC_ALL);
    eval 'sub IS_INHERITED () {0xfffff00;}' unless defined(&IS_INHERITED);
    eval 'sub TH_OPENING () {( &TH_SYN| &TH_ACK);}' unless defined(&TH_OPENING);
    eval 'sub ips_rule () { ($ips_is->{is_rule});}' unless defined(&ips_rule);
    eval 'sub isl_sport () { ($isl_ps->{isl_ports[0]});}' unless defined(&isl_sport);
    eval 'sub isl_dport () { ($isl_ps->{isl_ports[1]});}' unless defined(&isl_dport);
    eval 'sub isl_itype () { ($isl_ps->{isl_icmp});}' unless defined(&isl_itype);
    eval 'sub ISL_NEW () {0;}' unless defined(&ISL_NEW);
    eval 'sub ISL_CLONE () {1;}' unless defined(&ISL_CLONE);
    eval 'sub ISL_STATECHANGE () {2;}' unless defined(&ISL_STATECHANGE);
    eval 'sub ISL_EXPIRE () {0xffff;}' unless defined(&ISL_EXPIRE);
    eval 'sub ISL_FLUSH () {0xfffe;}' unless defined(&ISL_FLUSH);
    eval 'sub ISL_REMOVE () {0xfffd;}' unless defined(&ISL_REMOVE);
    eval 'sub ISL_INTERMEDIATE () {0xfffc;}' unless defined(&ISL_INTERMEDIATE);
    eval 'sub ISL_KILLED () {0xfffb;}' unless defined(&ISL_KILLED);
    eval 'sub ISL_ORPHAN () {0xfffa;}' unless defined(&ISL_ORPHAN);
    eval 'sub ISL_UNLOAD () {0xfff9;}' unless defined(&ISL_UNLOAD);
    unless(defined(&_KERNEL)) {
    }
}
1;
