require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&__IP_HTABLE_H__)) {
    eval 'sub __IP_HTABLE_H__ () {1;}' unless defined(&__IP_HTABLE_H__);
    require 'netinet/ip_lookup.ph';
    eval 'sub ipe_value () { ($ipe_un->{ipeu_int});}' unless defined(&ipe_value);
    eval 'sub ipe_group () { ($ipe_un->{ipeu_char});}' unless defined(&ipe_group);
    eval 'sub IPE_V4_HASH_FN {
        my($a, $m, $s) = @_;
	    eval q((((($m) ^ ($a)) - 1- (($a) >> 8)) % ($s)));
    }' unless defined(&IPE_V4_HASH_FN);
    eval 'sub IPE_V6_HASH_FN {
        my($a, $m, $s) = @_;
	    eval q(((((($m)[0] ^ ($a)[0]) - (($a)[0] >> 8)) + ((($m)[1] & ($a)[1]) - (($a)[1] >> 8)) + ((($m)[2] & ($a)[2]) - (($a)[2] >> 8)) + ((($m)[3] & ($a)[3]) - (($a)[3] >> 8))) % ($s)));
    }' unless defined(&IPE_V6_HASH_FN);
    if(defined(&USE_INET6)) {
    }
    eval 'sub IPHASH_LOOKUP () {0;}' unless defined(&IPHASH_LOOKUP);
    eval 'sub IPHASH_GROUPMAP () {1;}' unless defined(&IPHASH_GROUPMAP);
    eval 'sub IPHASH_DELETE () {2;}' unless defined(&IPHASH_DELETE);
    eval 'sub IPHASH_ANON () {0x80000000;}' unless defined(&IPHASH_ANON);
    unless(defined(&_KERNEL)) {
    }
}
1;
