require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&__IP_NAT_H__)) {
    eval 'sub __IP_NAT_H__ () {1;}' unless defined(&__IP_NAT_H__);
    unless(defined(&SOLARIS)) {
	if((defined(&sun)  && (defined(&__svr4__) || defined(&__SVR4)))) {
	    eval 'sub SOLARIS () {1;}' unless defined(&SOLARIS);
	} else {
	    eval 'sub SOLARIS () {0;}' unless defined(&SOLARIS);
	}
    }
    if(defined(&__STDC__) || defined(&__GNUC__) || defined(&_AIX51)) {
	eval 'sub SIOCADNAT () { &_IOW(ord(\'r\'), 60, \'struct ipfobj\');}' unless defined(&SIOCADNAT);
	eval 'sub SIOCRMNAT () { &_IOW(ord(\'r\'), 61, \'struct ipfobj\');}' unless defined(&SIOCRMNAT);
	eval 'sub SIOCGNATS () { &_IOWR(ord(\'r\'), 62, \'struct ipfobj\');}' unless defined(&SIOCGNATS);
	eval 'sub SIOCGNATL () { &_IOWR(ord(\'r\'), 63, \'struct ipfobj\');}' unless defined(&SIOCGNATL);
	eval 'sub SIOCPURGENAT () { &_IOWR(ord(\'r\'), 100, \'struct ipfobj\');}' unless defined(&SIOCPURGENAT);
    } else {
	eval 'sub SIOCADNAT () { &_IOW("r", 60, \'struct ipfobj\');}' unless defined(&SIOCADNAT);
	eval 'sub SIOCRMNAT () { &_IOW("r", 61, \'struct ipfobj\');}' unless defined(&SIOCRMNAT);
	eval 'sub SIOCGNATS () { &_IOWR("r", 62, \'struct ipfobj\');}' unless defined(&SIOCGNATS);
	eval 'sub SIOCGNATL () { &_IOWR("r", 63, \'struct ipfobj\');}' unless defined(&SIOCGNATL);
	eval 'sub SIOCPURGENAT () { &_IOWR("r", 100, \'struct ipfobj\');}' unless defined(&SIOCPURGENAT);
    }
    undef(&LARGE_NAT) if defined(&LARGE_NAT);
    unless(defined(&NAT_SIZE)) {
	if(defined(&LARGE_NAT)) {
	    eval 'sub NAT_SIZE () {2047;}' unless defined(&NAT_SIZE);
	} else {
	    eval 'sub NAT_SIZE () {127;}' unless defined(&NAT_SIZE);
	}
    }
    unless(defined(&RDR_SIZE)) {
	if(defined(&LARGE_NAT)) {
	    eval 'sub RDR_SIZE () {2047;}' unless defined(&RDR_SIZE);
	} else {
	    eval 'sub RDR_SIZE () {127;}' unless defined(&RDR_SIZE);
	}
    }
    unless(defined(&HOSTMAP_SIZE)) {
	if(defined(&LARGE_NAT)) {
	    eval 'sub HOSTMAP_SIZE () {8191;}' unless defined(&HOSTMAP_SIZE);
	} else {
	    eval 'sub HOSTMAP_SIZE () {2047;}' unless defined(&HOSTMAP_SIZE);
	}
    }
    unless(defined(&NAT_TABLE_MAX)) {
	if(defined(&LARGE_NAT)) {
	    eval 'sub NAT_TABLE_MAX () {180000;}' unless defined(&NAT_TABLE_MAX);
	} else {
	    eval 'sub NAT_TABLE_MAX () {30000;}' unless defined(&NAT_TABLE_MAX);
	}
    }
    unless(defined(&NAT_TABLE_SZ)) {
	if(defined(&LARGE_NAT)) {
	    eval 'sub NAT_TABLE_SZ () {16383;}' unless defined(&NAT_TABLE_SZ);
	} else {
	    eval 'sub NAT_TABLE_SZ () {2047;}' unless defined(&NAT_TABLE_SZ);
	}
    }
    unless(defined(&APR_LABELLEN)) {
	eval 'sub APR_LABELLEN () {16;}' unless defined(&APR_LABELLEN);
    }
    eval 'sub NAT_HW_CKSUM () {0x80000000;}' unless defined(&NAT_HW_CKSUM);
    eval 'sub NAT_HW_CKSUM_PART () {0x40000000;}' unless defined(&NAT_HW_CKSUM_PART);
    eval 'sub DEF_NAT_AGE () {1200;}' unless defined(&DEF_NAT_AGE);
    eval 'sub nat_osrcip () { ($nat_osrc6->{in4});}' unless defined(&nat_osrcip);
    eval 'sub nat_odstip () { ($nat_odst6->{in4});}' unless defined(&nat_odstip);
    eval 'sub nat_nsrcip () { ($nat_nsrc6->{in4});}' unless defined(&nat_nsrcip);
    eval 'sub nat_ndstip () { ($nat_ndst6->{in4});}' unless defined(&nat_ndstip);
    eval 'sub nat_osrcaddr () { ($nat_osrc6->{in4}->{s_addr});}' unless defined(&nat_osrcaddr);
    eval 'sub nat_odstaddr () { ($nat_odst6->{in4}->{s_addr});}' unless defined(&nat_odstaddr);
    eval 'sub nat_nsrcaddr () { ($nat_nsrc6->{in4}->{s_addr});}' unless defined(&nat_nsrcaddr);
    eval 'sub nat_ndstaddr () { ($nat_ndst6->{in4}->{s_addr});}' unless defined(&nat_ndstaddr);
    eval 'sub nat_age () { ($nat_tqe->{tqe_die});}' unless defined(&nat_age);
    eval 'sub nat_osport () { ($nat_unold->{nat_unt}->{ts_sport});}' unless defined(&nat_osport);
    eval 'sub nat_odport () { ($nat_unold->{nat_unt}->{ts_dport});}' unless defined(&nat_odport);
    eval 'sub nat_nsport () { ($nat_unnew->{nat_unt}->{ts_sport});}' unless defined(&nat_nsport);
    eval 'sub nat_ndport () { ($nat_unnew->{nat_unt}->{ts_dport});}' unless defined(&nat_ndport);
    eval 'sub nat_oicmpid () { ($nat_unold->{nat_uni}->{ici_id});}' unless defined(&nat_oicmpid);
    eval 'sub nat_nicmpid () { ($nat_unnew->{nat_uni}->{ici_id});}' unless defined(&nat_nicmpid);
    eval 'sub nat_type () { ($nat_unold->{nat_uni}->{ici_type});}' unless defined(&nat_type);
    eval 'sub nat_oseq () { ($nat_unold->{nat_uni}->{ici_seq});}' unless defined(&nat_oseq);
    eval 'sub nat_nseq () { ($nat_unnew->{nat_uni}->{ici_seq});}' unless defined(&nat_nseq);
    eval 'sub nat_tcpstate () { ($nat_tqe->{tqe_state});}' unless defined(&nat_tcpstate);
    eval 'sub nat_die () { ($nat_tqe->{tqe_die});}' unless defined(&nat_die);
    eval 'sub nat_touched () { ($nat_tqe->{tqe_touched});}' unless defined(&nat_touched);
    eval 'sub NAT_INBOUND () {0;}' unless defined(&NAT_INBOUND);
    eval 'sub NAT_OUTBOUND () {1;}' unless defined(&NAT_OUTBOUND);
    eval 'sub NAT_ENCAPIN () {2;}' unless defined(&NAT_ENCAPIN);
    eval 'sub NAT_ENCAPOUT () {3;}' unless defined(&NAT_ENCAPOUT);
    eval 'sub NAT_DIVERTIN () {4;}' unless defined(&NAT_DIVERTIN);
    eval 'sub NAT_DIVERTOUT () {5;}' unless defined(&NAT_DIVERTOUT);
    eval 'sub NAT_TCP () {0x1;}' unless defined(&NAT_TCP);
    eval 'sub NAT_UDP () {0x2;}' unless defined(&NAT_UDP);
    eval 'sub NAT_ICMPERR () {0x4;}' unless defined(&NAT_ICMPERR);
    eval 'sub NAT_ICMPQUERY () {0x8;}' unless defined(&NAT_ICMPQUERY);
    eval 'sub NAT_SEARCH () {0x10;}' unless defined(&NAT_SEARCH);
    eval 'sub NAT_SLAVE () {0x20;}' unless defined(&NAT_SLAVE);
    eval 'sub NAT_NOTRULEPORT () {0x40;}' unless defined(&NAT_NOTRULEPORT);
    eval 'sub NAT_TCPUDP () {( &NAT_TCP| &NAT_UDP);}' unless defined(&NAT_TCPUDP);
    eval 'sub NAT_TCPUDPICMP () {( &NAT_TCP| &NAT_UDP| &NAT_ICMPERR);}' unless defined(&NAT_TCPUDPICMP);
    eval 'sub NAT_TCPUDPICMPQ () {( &NAT_TCP| &NAT_UDP| &NAT_ICMPQUERY);}' unless defined(&NAT_TCPUDPICMPQ);
    eval 'sub NAT_FROMRULE () {( &NAT_TCP| &NAT_UDP);}' unless defined(&NAT_FROMRULE);
    eval 'sub NAT_DEBUG () {0x800000;}' unless defined(&NAT_DEBUG);
    eval 'sub na_nextip () { ($na_nextaddr->{in4}->{s_addr});}' unless defined(&na_nextip);
    eval 'sub na_nextip6 () { ($na_nextaddr->{in6});}' unless defined(&na_nextip6);
    eval 'sub na_num () { ($na_addr[0]->{iplookupnum});}' unless defined(&na_num);
    eval 'sub na_type () { ($na_addr[0]->{iplookuptype});}' unless defined(&na_type);
    eval 'sub na_subtype () { ($na_addr[0]->{iplookupsubtype});}' unless defined(&na_subtype);
    eval 'sub na_ptr () { ($na_addr[1]->{iplookupptr});}' unless defined(&na_ptr);
    eval 'sub na_func () { ($na_addr[1]->{iplookupfunc});}' unless defined(&na_func);
    eval 'sub in_dpmin () { $in_ndports[0];}' unless defined(&in_dpmin);
    eval 'sub in_dpmax () { $in_ndports[1];}' unless defined(&in_dpmax);
    eval 'sub in_spmin () { $in_nsports[0];}' unless defined(&in_spmin);
    eval 'sub in_spmax () { $in_nsports[1];}' unless defined(&in_spmax);
    eval 'sub in_ndport () { $in_ndports[0];}' unless defined(&in_ndport);
    eval 'sub in_nsport () { $in_nsports[0];}' unless defined(&in_nsport);
    eval 'sub in_dipnext () { ($in_ndst->{na_nextaddr}->{in4});}' unless defined(&in_dipnext);
    eval 'sub in_dipnext6 () { ($in_ndst->{na_nextaddr});}' unless defined(&in_dipnext6);
    eval 'sub in_dnip () { ($in_ndst->{na_nextaddr}->{in4}->{s_addr});}' unless defined(&in_dnip);
    eval 'sub in_dnip6 () { ($in_ndst->{na_nextaddr});}' unless defined(&in_dnip6);
    eval 'sub in_sipnext () { ($in_nsrc->{na_nextaddr}->{in4});}' unless defined(&in_sipnext);
    eval 'sub in_snip () { ($in_nsrc->{na_nextaddr}->{in4}->{s_addr});}' unless defined(&in_snip);
    eval 'sub in_snip6 () { ($in_nsrc->{na_nextaddr});}' unless defined(&in_snip6);
    eval 'sub in_odstip () { ($in_odst->{na_addr[0]}->{in4});}' unless defined(&in_odstip);
    eval 'sub in_odstip6 () { ($in_odst->{na_addr[0]});}' unless defined(&in_odstip6);
    eval 'sub in_odstaddr () { ($in_odst->{na_addr[0]}->{in4}->{s_addr});}' unless defined(&in_odstaddr);
    eval 'sub in_odstmsk () { ($in_odst->{na_addr[1]}->{in4}->{s_addr});}' unless defined(&in_odstmsk);
    eval 'sub in_odstmsk6 () { ($in_odst->{na_addr[1]});}' unless defined(&in_odstmsk6);
    eval 'sub in_odstatype () { ($in_odst->{na_atype});}' unless defined(&in_odstatype);
    eval 'sub in_osrcip () { ($in_osrc->{na_addr[0]}->{in4});}' unless defined(&in_osrcip);
    eval 'sub in_osrcip6 () { ($in_osrc->{na_addr[0]});}' unless defined(&in_osrcip6);
    eval 'sub in_osrcaddr () { ($in_osrc->{na_addr[0]}->{in4}->{s_addr});}' unless defined(&in_osrcaddr);
    eval 'sub in_osrcmsk () { ($in_osrc->{na_addr[1]}->{in4}->{s_addr});}' unless defined(&in_osrcmsk);
    eval 'sub in_osrcmsk6 () { ($in_osrc->{na_addr[1]});}' unless defined(&in_osrcmsk6);
    eval 'sub in_osrcatype () { ($in_osrc->{na_atype});}' unless defined(&in_osrcatype);
    eval 'sub in_ndstip () { ($in_ndst->{na_addr[0]}->{in4});}' unless defined(&in_ndstip);
    eval 'sub in_ndstip6 () { ($in_ndst->{na_addr[0]});}' unless defined(&in_ndstip6);
    eval 'sub in_ndstaddr () { ($in_ndst->{na_addr[0]}->{in4}->{s_addr});}' unless defined(&in_ndstaddr);
    eval 'sub in_ndstmsk () { ($in_ndst->{na_addr[1]}->{in4}->{s_addr});}' unless defined(&in_ndstmsk);
    eval 'sub in_ndstmsk6 () { ($in_ndst->{na_addr[1]});}' unless defined(&in_ndstmsk6);
    eval 'sub in_ndstatype () { ($in_ndst->{na_atype});}' unless defined(&in_ndstatype);
    eval 'sub in_ndstafunc () { ($in_ndst->{na_function});}' unless defined(&in_ndstafunc);
    eval 'sub in_nsrcip () { ($in_nsrc->{na_addr[0]}->{in4});}' unless defined(&in_nsrcip);
    eval 'sub in_nsrcip6 () { ($in_nsrc->{na_addr[0]});}' unless defined(&in_nsrcip6);
    eval 'sub in_nsrcaddr () { ($in_nsrc->{na_addr[0]}->{in4}->{s_addr});}' unless defined(&in_nsrcaddr);
    eval 'sub in_nsrcmsk () { ($in_nsrc->{na_addr[1]}->{in4}->{s_addr});}' unless defined(&in_nsrcmsk);
    eval 'sub in_nsrcmsk6 () { ($in_nsrc->{na_addr[1]});}' unless defined(&in_nsrcmsk6);
    eval 'sub in_nsrcatype () { ($in_nsrc->{na_atype});}' unless defined(&in_nsrcatype);
    eval 'sub in_nsrcafunc () { ($in_nsrc->{na_function});}' unless defined(&in_nsrcafunc);
    eval 'sub in_scmp () { ($in_tuc->{ftu_scmp});}' unless defined(&in_scmp);
    eval 'sub in_dcmp () { ($in_tuc->{ftu_dcmp});}' unless defined(&in_dcmp);
    eval 'sub in_stop () { ($in_tuc->{ftu_stop});}' unless defined(&in_stop);
    eval 'sub in_dtop () { ($in_tuc->{ftu_dtop});}' unless defined(&in_dtop);
    eval 'sub in_osport () { ($in_tuc->{ftu_sport});}' unless defined(&in_osport);
    eval 'sub in_odport () { ($in_tuc->{ftu_dport});}' unless defined(&in_odport);
    eval 'sub in_ndstnum () { ($in_ndst->{na_addr[0]}->{iplookupnum});}' unless defined(&in_ndstnum);
    eval 'sub in_ndsttype () { ($in_ndst->{na_addr[0]}->{iplookuptype});}' unless defined(&in_ndsttype);
    eval 'sub in_ndstptr () { ($in_ndst->{na_addr[1]}->{iplookupptr});}' unless defined(&in_ndstptr);
    eval 'sub in_ndstfunc () { ($in_ndst->{na_addr[1]}->{iplookupfunc});}' unless defined(&in_ndstfunc);
    eval 'sub in_nsrcnum () { ($in_nsrc->{na_addr[0]}->{iplookupnum});}' unless defined(&in_nsrcnum);
    eval 'sub in_nsrctype () { ($in_nsrc->{na_addr[0]}->{iplookuptype});}' unless defined(&in_nsrctype);
    eval 'sub in_nsrcptr () { ($in_nsrc->{na_addr[1]}->{iplookupptr});}' unless defined(&in_nsrcptr);
    eval 'sub in_nsrcfunc () { ($in_nsrc->{na_addr[1]}->{iplookupfunc});}' unless defined(&in_nsrcfunc);
    eval 'sub in_odstnum () { ($in_odst->{na_addr[0]}->{iplookupnum});}' unless defined(&in_odstnum);
    eval 'sub in_odsttype () { ($in_odst->{na_addr[0]}->{iplookuptype});}' unless defined(&in_odsttype);
    eval 'sub in_odstptr () { ($in_odst->{na_addr[1]}->{iplookupptr});}' unless defined(&in_odstptr);
    eval 'sub in_odstfunc () { ($in_odst->{na_addr[1]}->{iplookupfunc});}' unless defined(&in_odstfunc);
    eval 'sub in_osrcnum () { ($in_osrc->{na_addr[0]}->{iplookupnum});}' unless defined(&in_osrcnum);
    eval 'sub in_osrctype () { ($in_osrc->{na_addr[0]}->{iplookuptype});}' unless defined(&in_osrctype);
    eval 'sub in_osrcptr () { ($in_osrc->{na_addr[1]}->{iplookupptr});}' unless defined(&in_osrcptr);
    eval 'sub in_osrcfunc () { ($in_osrc->{na_addr[1]}->{iplookupfunc});}' unless defined(&in_osrcfunc);
    eval 'sub in_icmpidmin () { $in_nsports[0];}' unless defined(&in_icmpidmin);
    eval 'sub in_icmpidmax () { $in_nsports[1];}' unless defined(&in_icmpidmax);
    eval 'sub IPN_ANY () {0x;}' unless defined(&IPN_ANY);
    eval 'sub IPN_TCP () {0x1;}' unless defined(&IPN_TCP);
    eval 'sub IPN_UDP () {0x2;}' unless defined(&IPN_UDP);
    eval 'sub IPN_TCPUDP () {( &IPN_TCP| &IPN_UDP);}' unless defined(&IPN_TCPUDP);
    eval 'sub IPN_ICMPERR () {0x4;}' unless defined(&IPN_ICMPERR);
    eval 'sub IPN_TCPUDPICMP () {( &IPN_TCP| &IPN_UDP| &IPN_ICMPERR);}' unless defined(&IPN_TCPUDPICMP);
    eval 'sub IPN_ICMPQUERY () {0x8;}' unless defined(&IPN_ICMPQUERY);
    eval 'sub IPN_TCPUDPICMPQ () {( &IPN_TCP| &IPN_UDP| &IPN_ICMPQUERY);}' unless defined(&IPN_TCPUDPICMPQ);
    eval 'sub IPN_RF () {( &IPN_TCPUDP| &IPN_DELETE| &IPN_ICMPERR);}' unless defined(&IPN_RF);
    eval 'sub IPN_AUTOPORTMAP () {0x10;}' unless defined(&IPN_AUTOPORTMAP);
    eval 'sub IPN_FILTER () {0x20;}' unless defined(&IPN_FILTER);
    eval 'sub IPN_SPLIT () {0x40;}' unless defined(&IPN_SPLIT);
    eval 'sub IPN_ROUNDR () {0x80;}' unless defined(&IPN_ROUNDR);
    eval 'sub IPN_SIPRANGE () {0x100;}' unless defined(&IPN_SIPRANGE);
    eval 'sub IPN_DIPRANGE () {0x200;}' unless defined(&IPN_DIPRANGE);
    eval 'sub IPN_NOTSRC () {0x400;}' unless defined(&IPN_NOTSRC);
    eval 'sub IPN_NOTDST () {0x800;}' unless defined(&IPN_NOTDST);
    eval 'sub IPN_NO () {0x1000;}' unless defined(&IPN_NO);
    eval 'sub IPN_DYNSRCIP () {0x2000;}' unless defined(&IPN_DYNSRCIP);
    eval 'sub IPN_DYNDSTIP () {0x4000;}' unless defined(&IPN_DYNDSTIP);
    eval 'sub IPN_DELETE () {0x8000;}' unless defined(&IPN_DELETE);
    eval 'sub IPN_STICKY () {0x10000;}' unless defined(&IPN_STICKY);
    eval 'sub IPN_FRAG () {0x20000;}' unless defined(&IPN_FRAG);
    eval 'sub IPN_FIXEDSPORT () {0x40000;}' unless defined(&IPN_FIXEDSPORT);
    eval 'sub IPN_FIXEDDPORT () {0x80000;}' unless defined(&IPN_FIXEDDPORT);
    eval 'sub IPN_FINDFORWARD () {0x100000;}' unless defined(&IPN_FINDFORWARD);
    eval 'sub IPN_IN () {0x200000;}' unless defined(&IPN_IN);
    eval 'sub IPN_SEQUENTIAL () {0x400000;}' unless defined(&IPN_SEQUENTIAL);
    eval 'sub IPN_PURGE () {0x800000;}' unless defined(&IPN_PURGE);
    eval 'sub IPN_PROXYRULE () {0x1000000;}' unless defined(&IPN_PROXYRULE);
    eval 'sub IPN_USERFLAGS () {( &IPN_TCPUDP| &IPN_AUTOPORTMAP| &IPN_SIPRANGE| &IPN_SPLIT|  &IPN_ROUNDR| &IPN_FILTER| &IPN_NOTSRC| &IPN_NOTDST| &IPN_NO|  &IPN_FRAG| &IPN_STICKY| &IPN_FIXEDDPORT| &IPN_ICMPQUERY|  &IPN_DIPRANGE| &IPN_SEQUENTIAL| &IPN_PURGE);}' unless defined(&IPN_USERFLAGS);
    eval 'sub NAT_MAP () {0x1;}' unless defined(&NAT_MAP);
    eval 'sub NAT_REDIRECT () {0x2;}' unless defined(&NAT_REDIRECT);
    eval 'sub NAT_BIMAP () {( &NAT_MAP| &NAT_REDIRECT);}' unless defined(&NAT_BIMAP);
    eval 'sub NAT_MAPBLK () {0x4;}' unless defined(&NAT_MAPBLK);
    eval 'sub NAT_REWRITE () {0x8;}' unless defined(&NAT_REWRITE);
    eval 'sub NAT_ENCAP () {0x10;}' unless defined(&NAT_ENCAP);
    eval 'sub NAT_DIVERTUDP () {0x20;}' unless defined(&NAT_DIVERTUDP);
    eval 'sub MAPBLK_MINPORT () {1024;}' unless defined(&MAPBLK_MINPORT);
    eval 'sub USABLE_PORTS () {(65536-  &MAPBLK_MINPORT);}' unless defined(&USABLE_PORTS);
    eval 'sub IPN_CMPSIZ () {($sizeof{ &ipnat_t} -  &offsetof( &ipnat_t,  &in_v));}' unless defined(&IPN_CMPSIZ);
    eval 'sub nl_inip () { ($nl_inipaddr->{in4});}' unless defined(&nl_inip);
    eval 'sub nl_outip () { ($nl_outipaddr->{in4});}' unless defined(&nl_outip);
    eval 'sub nl_realip () { ($nl_realipaddr->{in4});}' unless defined(&nl_realip);
    eval 'sub nl_inip6 () { ($nl_inipaddr->{in6});}' unless defined(&nl_inip6);
    eval 'sub nl_outip6 () { ($nl_outipaddr->{in6});}' unless defined(&nl_outip6);
    eval 'sub nl_realip6 () { ($nl_realipaddr->{in6});}' unless defined(&nl_realip6);
    eval 'sub ipn_rule () { ($ipn_nat->{nat_fr});}' unless defined(&ipn_rule);
    eval 'sub hm_osrcip () { ($hm_osrcip6->{in4});}' unless defined(&hm_osrcip);
    eval 'sub hm_odstip () { ($hm_odstip6->{in4});}' unless defined(&hm_odstip);
    eval 'sub hm_nsrcip () { ($hm_nsrcip6->{in4});}' unless defined(&hm_nsrcip);
    eval 'sub hm_ndstip () { ($hm_ndstip6->{in4});}' unless defined(&hm_ndstip);
    eval 'sub hm_osrc6 () { ($hm_osrcip6->{in6});}' unless defined(&hm_osrc6);
    eval 'sub hm_odst6 () { ($hm_odstip6->{in6});}' unless defined(&hm_odst6);
    eval 'sub hm_nsrc6 () { ($hm_nsrcip6->{in6});}' unless defined(&hm_nsrc6);
    eval 'sub hm_ndst6 () { ($hm_ndstip6->{in6});}' unless defined(&hm_ndst6);
    eval 'sub NL_NEW () {0;}' unless defined(&NL_NEW);
    eval 'sub NL_CLONE () {1;}' unless defined(&NL_CLONE);
    eval 'sub NL_PURGE () {0xfffc;}' unless defined(&NL_PURGE);
    eval 'sub NL_DESTROY () {0xfffd;}' unless defined(&NL_DESTROY);
    eval 'sub NL_FLUSH () {0xfffe;}' unless defined(&NL_FLUSH);
    eval 'sub NL_EXPIRE () {0xffff;}' unless defined(&NL_EXPIRE);
    eval 'sub NAT_HASH_FN {
        my($_k,$_l,$_m) = @_;
	    eval q(((($_k) + (($_k) >> 12) + $_l) % ($_m)));
    }' unless defined(&NAT_HASH_FN);
    eval 'sub NAT_HASH_FN6 {
        my($_k,$_l,$_m) = @_;
	    eval q((((( &u_32_t *)($_k))[3] + ((( &u_32_t *)($_k))[3] >> 12) + ((( &u_32_t *)($_k))[2]) + ((( &u_32_t *)($_k))[2] >> 12) + ((( &u_32_t *)($_k))[1]) + ((( &u_32_t *)($_k))[1] >> 12) + ((( &u_32_t *)($_k))[0]) + ((( &u_32_t *)($_k))[0] >> 12) + $_l) % ($_m)));
    }' unless defined(&NAT_HASH_FN6);
    eval 'sub LONG_SUM {
        my($_i) = @_;
	    eval q(((($_i) & 0xffff) + (($_i) >> 16)));
    }' unless defined(&LONG_SUM);
    eval 'sub LONG_SUM6 {
        my($_i) = @_;
	    eval q(( &LONG_SUM( &ntohl((( &u_32_t *)($_i))[0])) +  &LONG_SUM( &ntohl((( &u_32_t *)($_i))[1])) +  &LONG_SUM( &ntohl((( &u_32_t *)($_i))[2])) +  &LONG_SUM( &ntohl((( &u_32_t *)($_i))[3]))));
    }' unless defined(&LONG_SUM6);
    eval 'sub CALC_SUMD {
        my($s1, $s2, $sd) = @_;
	    eval q({ ($s1) = (($s1) & 0xffff) + (($s1) >> 16); ($s2) = (($s2) & 0xffff) + (($s2) >> 16); ($s1) = (($s1) & 0xffff) + (($s1) >> 16); ($s2) = (($s2) & 0xffff) + (($s2) >> 16);  &if (($s1) > ($s2)) ($s2)--; ($sd) = ($s2) - ($s1); ($sd) = (($sd) & 0xffff) + (($sd) >> 16); });
    }' unless defined(&CALC_SUMD);
    eval 'sub NAT_SYSSPACE () {0x80000000;}' unless defined(&NAT_SYSSPACE);
    eval 'sub NAT_LOCKHELD () {0x40000000;}' unless defined(&NAT_LOCKHELD);
    eval 'sub ipf_nat_map_max () { ($ipf_nat_map_mask->{imt4_max});}' unless defined(&ipf_nat_map_max);
    eval 'sub ipf_nat_rdr_max () { ($ipf_nat_rdr_mask->{imt4_max});}' unless defined(&ipf_nat_rdr_max);
    eval 'sub ipf_nat6_map_max () { ($ipf_nat6_map_mask->{imt6_max});}' unless defined(&ipf_nat6_map_max);
    eval 'sub ipf_nat6_rdr_max () { ($ipf_nat6_rdr_mask->{imt6_max});}' unless defined(&ipf_nat6_rdr_max);
    eval 'sub ipf_nat_map_active_masks () { ($ipf_nat_map_mask->{imt4_active});}' unless defined(&ipf_nat_map_active_masks);
    eval 'sub ipf_nat_rdr_active_masks () { ($ipf_nat_rdr_mask->{imt4_active});}' unless defined(&ipf_nat_rdr_active_masks);
    eval 'sub ipf_nat6_map_active_masks () { ($ipf_nat6_map_mask->{imt6_active});}' unless defined(&ipf_nat6_map_active_masks);
    eval 'sub ipf_nat6_rdr_active_masks () { ($ipf_nat6_rdr_mask->{imt6_active});}' unless defined(&ipf_nat6_rdr_active_masks);
    if(defined(&__OpenBSD__)) {
    }
    if(defined(&USE_INET6)) {
    }
}
1;
