require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_NET_PFKEYV2_H_)) {
    eval 'sub _NET_PFKEYV2_H_ () {1;}' unless defined(&_NET_PFKEYV2_H_);
    unless(defined(&__PFKEY_V2_H)) {
	eval 'sub __PFKEY_V2_H () {1;}' unless defined(&__PFKEY_V2_H);
	eval 'sub PF_KEY_V2 () {2;}' unless defined(&PF_KEY_V2);
	eval 'sub PFKEYV2_REVISION () {199806;}' unless defined(&PFKEYV2_REVISION);
	eval 'sub SADB_RESERVED () {0;}' unless defined(&SADB_RESERVED);
	eval 'sub SADB_GETSPI () {1;}' unless defined(&SADB_GETSPI);
	eval 'sub SADB_UPDATE () {2;}' unless defined(&SADB_UPDATE);
	eval 'sub SADB_ADD () {3;}' unless defined(&SADB_ADD);
	eval 'sub SADB_DELETE () {4;}' unless defined(&SADB_DELETE);
	eval 'sub SADB_GET () {5;}' unless defined(&SADB_GET);
	eval 'sub SADB_ACQUIRE () {6;}' unless defined(&SADB_ACQUIRE);
	eval 'sub SADB_REGISTER () {7;}' unless defined(&SADB_REGISTER);
	eval 'sub SADB_EXPIRE () {8;}' unless defined(&SADB_EXPIRE);
	eval 'sub SADB_FLUSH () {9;}' unless defined(&SADB_FLUSH);
	eval 'sub SADB_DUMP () {10;}' unless defined(&SADB_DUMP);
	eval 'sub SADB_X_PROMISC () {11;}' unless defined(&SADB_X_PROMISC);
	eval 'sub SADB_X_PCHANGE () {12;}' unless defined(&SADB_X_PCHANGE);
	eval 'sub SADB_X_SPDUPDATE () {13;}' unless defined(&SADB_X_SPDUPDATE);
	eval 'sub SADB_X_SPDADD () {14;}' unless defined(&SADB_X_SPDADD);
	eval 'sub SADB_X_SPDDELETE () {15;}' unless defined(&SADB_X_SPDDELETE);
	eval 'sub SADB_X_SPDGET () {16;}' unless defined(&SADB_X_SPDGET);
	eval 'sub SADB_X_SPDACQUIRE () {17;}' unless defined(&SADB_X_SPDACQUIRE);
	eval 'sub SADB_X_SPDDUMP () {18;}' unless defined(&SADB_X_SPDDUMP);
	eval 'sub SADB_X_SPDFLUSH () {19;}' unless defined(&SADB_X_SPDFLUSH);
	eval 'sub SADB_X_SPDSETIDX () {20;}' unless defined(&SADB_X_SPDSETIDX);
	eval 'sub SADB_X_SPDEXPIRE () {21;}' unless defined(&SADB_X_SPDEXPIRE);
	eval 'sub SADB_X_SPDDELETE2 () {22;}' unless defined(&SADB_X_SPDDELETE2);
	eval 'sub SADB_X_NAT_T_NEW_MAPPING () {23;}' unless defined(&SADB_X_NAT_T_NEW_MAPPING);
	if(0) {
	    eval 'sub SADB_X_MIGRATE () {24;}' unless defined(&SADB_X_MIGRATE);
	}
	eval 'sub SADB_MAX () {23;}' unless defined(&SADB_MAX);
	eval 'sub IPSEC_POLICY_FLAG_ORIGIN_KERNEL () {0x80;}' unless defined(&IPSEC_POLICY_FLAG_ORIGIN_KERNEL);
	eval 'sub sadb_x_policy_reserved () { &sadb_x_policy_flags;}' unless defined(&sadb_x_policy_reserved);
	eval 'sub SADB_EXT_RESERVED () {0;}' unless defined(&SADB_EXT_RESERVED);
	eval 'sub SADB_EXT_SA () {1;}' unless defined(&SADB_EXT_SA);
	eval 'sub SADB_EXT_LIFETIME_CURRENT () {2;}' unless defined(&SADB_EXT_LIFETIME_CURRENT);
	eval 'sub SADB_EXT_LIFETIME_HARD () {3;}' unless defined(&SADB_EXT_LIFETIME_HARD);
	eval 'sub SADB_EXT_LIFETIME_SOFT () {4;}' unless defined(&SADB_EXT_LIFETIME_SOFT);
	eval 'sub SADB_EXT_ADDRESS_SRC () {5;}' unless defined(&SADB_EXT_ADDRESS_SRC);
	eval 'sub SADB_EXT_ADDRESS_DST () {6;}' unless defined(&SADB_EXT_ADDRESS_DST);
	eval 'sub SADB_EXT_ADDRESS_PROXY () {7;}' unless defined(&SADB_EXT_ADDRESS_PROXY);
	eval 'sub SADB_EXT_KEY_AUTH () {8;}' unless defined(&SADB_EXT_KEY_AUTH);
	eval 'sub SADB_EXT_KEY_ENCRYPT () {9;}' unless defined(&SADB_EXT_KEY_ENCRYPT);
	eval 'sub SADB_EXT_IDENTITY_SRC () {10;}' unless defined(&SADB_EXT_IDENTITY_SRC);
	eval 'sub SADB_EXT_IDENTITY_DST () {11;}' unless defined(&SADB_EXT_IDENTITY_DST);
	eval 'sub SADB_EXT_SENSITIVITY () {12;}' unless defined(&SADB_EXT_SENSITIVITY);
	eval 'sub SADB_EXT_PROPOSAL () {13;}' unless defined(&SADB_EXT_PROPOSAL);
	eval 'sub SADB_EXT_SUPPORTED_AUTH () {14;}' unless defined(&SADB_EXT_SUPPORTED_AUTH);
	eval 'sub SADB_EXT_SUPPORTED_ENCRYPT () {15;}' unless defined(&SADB_EXT_SUPPORTED_ENCRYPT);
	eval 'sub SADB_EXT_SPIRANGE () {16;}' unless defined(&SADB_EXT_SPIRANGE);
	eval 'sub SADB_X_EXT_KMPRIVATE () {17;}' unless defined(&SADB_X_EXT_KMPRIVATE);
	eval 'sub SADB_X_EXT_POLICY () {18;}' unless defined(&SADB_X_EXT_POLICY);
	eval 'sub SADB_X_EXT_SA2 () {19;}' unless defined(&SADB_X_EXT_SA2);
	eval 'sub SADB_X_EXT_NAT_T_TYPE () {20;}' unless defined(&SADB_X_EXT_NAT_T_TYPE);
	eval 'sub SADB_X_EXT_NAT_T_SPORT () {21;}' unless defined(&SADB_X_EXT_NAT_T_SPORT);
	eval 'sub SADB_X_EXT_NAT_T_DPORT () {22;}' unless defined(&SADB_X_EXT_NAT_T_DPORT);
	eval 'sub SADB_X_EXT_NAT_T_OA () {23;}' unless defined(&SADB_X_EXT_NAT_T_OA);
	eval 'sub SADB_X_EXT_NAT_T_OAI () {23;}' unless defined(&SADB_X_EXT_NAT_T_OAI);
	eval 'sub SADB_X_EXT_NAT_T_OAR () {24;}' unless defined(&SADB_X_EXT_NAT_T_OAR);
	eval 'sub SADB_X_EXT_NAT_T_FRAG () {25;}' unless defined(&SADB_X_EXT_NAT_T_FRAG);
	if(0) {
	    eval 'sub SADB_X_EXT_TAG () {25;}' unless defined(&SADB_X_EXT_TAG);
	    eval 'sub SADB_X_EXT_SA3 () {26;}' unless defined(&SADB_X_EXT_SA3);
	    eval 'sub SADB_X_EXT_PACKET () {27;}' unless defined(&SADB_X_EXT_PACKET);
	}
	eval 'sub SADB_EXT_MAX () {25;}' unless defined(&SADB_EXT_MAX);
	eval 'sub SADB_SATYPE_UNSPEC () {0;}' unless defined(&SADB_SATYPE_UNSPEC);
	eval 'sub SADB_SATYPE_AH () {2;}' unless defined(&SADB_SATYPE_AH);
	eval 'sub SADB_SATYPE_ESP () {3;}' unless defined(&SADB_SATYPE_ESP);
	eval 'sub SADB_SATYPE_RSVP () {5;}' unless defined(&SADB_SATYPE_RSVP);
	eval 'sub SADB_SATYPE_OSPFV2 () {6;}' unless defined(&SADB_SATYPE_OSPFV2);
	eval 'sub SADB_SATYPE_RIPV2 () {7;}' unless defined(&SADB_SATYPE_RIPV2);
	eval 'sub SADB_SATYPE_MIP () {8;}' unless defined(&SADB_SATYPE_MIP);
	eval 'sub SADB_X_SATYPE_IPCOMP () {9;}' unless defined(&SADB_X_SATYPE_IPCOMP);
	eval 'sub SADB_X_SATYPE_TCPSIGNATURE () {11;}' unless defined(&SADB_X_SATYPE_TCPSIGNATURE);
	eval 'sub SADB_SATYPE_MAX () {12;}' unless defined(&SADB_SATYPE_MAX);
	eval 'sub SADB_SASTATE_LARVAL () {0;}' unless defined(&SADB_SASTATE_LARVAL);
	eval 'sub SADB_SASTATE_MATURE () {1;}' unless defined(&SADB_SASTATE_MATURE);
	eval 'sub SADB_SASTATE_DYING () {2;}' unless defined(&SADB_SASTATE_DYING);
	eval 'sub SADB_SASTATE_DEAD () {3;}' unless defined(&SADB_SASTATE_DEAD);
	eval 'sub SADB_SASTATE_MAX () {3;}' unless defined(&SADB_SASTATE_MAX);
	eval 'sub SADB_SASTATE_USABLE_P {
	    my($sav) = @_;
    	    eval q((($sav)-> &state ==  &SADB_SASTATE_MATURE || ($sav)-> &state ==  &SADB_SASTATE_DYING));
	}' unless defined(&SADB_SASTATE_USABLE_P);
	eval 'sub SADB_SAFLAGS_PFS () {1;}' unless defined(&SADB_SAFLAGS_PFS);
	eval 'sub SADB_AALG_NONE () {0;}' unless defined(&SADB_AALG_NONE);
	eval 'sub SADB_AALG_MD5HMAC () {2;}' unless defined(&SADB_AALG_MD5HMAC);
	eval 'sub SADB_AALG_SHA1HMAC () {3;}' unless defined(&SADB_AALG_SHA1HMAC);
	eval 'sub SADB_AALG_MAX () {251;}' unless defined(&SADB_AALG_MAX);
	eval 'sub SADB_X_AALG_SHA2_256 () {5;}' unless defined(&SADB_X_AALG_SHA2_256);
	eval 'sub SADB_X_AALG_SHA2_384 () {6;}' unless defined(&SADB_X_AALG_SHA2_384);
	eval 'sub SADB_X_AALG_SHA2_512 () {7;}' unless defined(&SADB_X_AALG_SHA2_512);
	eval 'sub SADB_X_AALG_RIPEMD160HMAC () {8;}' unless defined(&SADB_X_AALG_RIPEMD160HMAC);
	eval 'sub SADB_X_AALG_AES_XCBC_MAC () {9;}' unless defined(&SADB_X_AALG_AES_XCBC_MAC);
	eval 'sub SADB_X_AALG_AES128GMAC () {11;}' unless defined(&SADB_X_AALG_AES128GMAC);
	eval 'sub SADB_X_AALG_AES192GMAC () {12;}' unless defined(&SADB_X_AALG_AES192GMAC);
	eval 'sub SADB_X_AALG_AES256GMAC () {13;}' unless defined(&SADB_X_AALG_AES256GMAC);
	eval 'sub SADB_X_AALG_MD5 () {249;}' unless defined(&SADB_X_AALG_MD5);
	eval 'sub SADB_X_AALG_SHA () {250;}' unless defined(&SADB_X_AALG_SHA);
	eval 'sub SADB_X_AALG_NULL () {251;}' unless defined(&SADB_X_AALG_NULL);
	eval 'sub SADB_X_AALG_TCP_MD5 () {252;}' unless defined(&SADB_X_AALG_TCP_MD5);
	eval 'sub SADB_AALG_STATS_INIT () {[ &SADB_AALG_NONE] = 1, [ &SADB_AALG_MD5HMAC] = 2, [ &SADB_AALG_SHA1HMAC] = 3, [ &SADB_X_AALG_SHA2_256] = 4, [ &SADB_X_AALG_SHA2_384] = 5, [ &SADB_X_AALG_SHA2_512] = 6, [ &SADB_X_AALG_RIPEMD160HMAC] = 7, [ &SADB_X_AALG_AES_XCBC_MAC] = 8, [ &SADB_X_AALG_AES128GMAC] = 9, [ &SADB_X_AALG_AES192GMAC] = 10, [ &SADB_X_AALG_AES256GMAC] = 11, [ &SADB_X_AALG_MD5] = 12, [ &SADB_X_AALG_SHA] = 13, [ &SADB_X_AALG_NULL] = 14, [ &SADB_X_AALG_TCP_MD5] = 15,;}' unless defined(&SADB_AALG_STATS_INIT);
	eval 'sub SADB_AALG_STATS_NUM () {16;}' unless defined(&SADB_AALG_STATS_NUM);
	eval 'sub SADB_AALG_STATS_STR () {"*unknown*", "none", "hmac-md5", "hmac-sha1", "hmac-sha2-256", "hmac-sha2-384", "hmac-sha2-512", "hmac-ripe-md160", "aes-xbc-mac", "aes-128-mac", "aes-192-mac", "aes-256-mac", "md5", "sha", "null", "tcp-md5",;}' unless defined(&SADB_AALG_STATS_STR);
	eval 'sub SADB_EALG_NONE () {0;}' unless defined(&SADB_EALG_NONE);
	eval 'sub SADB_EALG_DESCBC () {2;}' unless defined(&SADB_EALG_DESCBC);
	eval 'sub SADB_EALG_3DESCBC () {3;}' unless defined(&SADB_EALG_3DESCBC);
	eval 'sub SADB_EALG_NULL () {11;}' unless defined(&SADB_EALG_NULL);
	eval 'sub SADB_EALG_MAX () {250;}' unless defined(&SADB_EALG_MAX);
	eval 'sub SADB_X_EALG_CAST128CBC () {6;}' unless defined(&SADB_X_EALG_CAST128CBC);
	eval 'sub SADB_X_EALG_BLOWFISHCBC () {7;}' unless defined(&SADB_X_EALG_BLOWFISHCBC);
	eval 'sub SADB_X_EALG_RIJNDAELCBC () {12;}' unless defined(&SADB_X_EALG_RIJNDAELCBC);
	eval 'sub SADB_X_EALG_AES () {12;}' unless defined(&SADB_X_EALG_AES);
	eval 'sub SADB_X_EALG_AESCTR () {13;}' unless defined(&SADB_X_EALG_AESCTR);
	eval 'sub SADB_X_EALG_AESGCM8 () {18;}' unless defined(&SADB_X_EALG_AESGCM8);
	eval 'sub SADB_X_EALG_AESGCM12 () {19;}' unless defined(&SADB_X_EALG_AESGCM12);
	eval 'sub SADB_X_EALG_AESGCM16 () {20;}' unless defined(&SADB_X_EALG_AESGCM16);
	eval 'sub SADB_X_EALG_CAMELLIACBC () {22;}' unless defined(&SADB_X_EALG_CAMELLIACBC);
	eval 'sub SADB_X_EALG_AESGMAC () {23;}' unless defined(&SADB_X_EALG_AESGMAC);
	eval 'sub SADB_X_EALG_SKIPJACK () {250;}' unless defined(&SADB_X_EALG_SKIPJACK);
	eval 'sub SADB_EALG_STATS_INIT () {[ &SADB_EALG_NONE] = 1, [ &SADB_EALG_DESCBC] = 2, [ &SADB_EALG_3DESCBC] = 3, [ &SADB_EALG_NULL] = 4, [ &SADB_X_EALG_CAST128CBC] = 5, [ &SADB_X_EALG_BLOWFISHCBC] = 6, [ &SADB_X_EALG_RIJNDAELCBC] = 7, [ &SADB_X_EALG_AESCTR] = 8, [ &SADB_X_EALG_AESGCM8] = 9, [ &SADB_X_EALG_AESGCM12] = 10, [ &SADB_X_EALG_AESGCM16] = 11, [ &SADB_X_EALG_CAMELLIACBC] = 12, [ &SADB_X_EALG_AESGMAC] = 13, [ &SADB_X_EALG_SKIPJACK] = 14,;}' unless defined(&SADB_EALG_STATS_INIT);
	eval 'sub SADB_EALG_STATS_NUM () {15;}' unless defined(&SADB_EALG_STATS_NUM);
	eval 'sub SADB_EALG_STATS_STR () {"*unknown*", "none", "des-cbc", "3des-cbc", "null", "cast128-cbc", "blowfish-cbc", "aes-cbc", "aes-ctr", "aes-gcm-8", "aes-gcm-12", "aes-gcm-16", "camelia-cbc", "aes-gmac", "skipjack",;}' unless defined(&SADB_EALG_STATS_STR);
	eval 'sub SADB_X_CALG_NONE () {0;}' unless defined(&SADB_X_CALG_NONE);
	eval 'sub SADB_X_CALG_OUI () {1;}' unless defined(&SADB_X_CALG_OUI);
	eval 'sub SADB_X_CALG_DEFLATE () {2;}' unless defined(&SADB_X_CALG_DEFLATE);
	eval 'sub SADB_X_CALG_LZS () {3;}' unless defined(&SADB_X_CALG_LZS);
	eval 'sub SADB_X_CALG_MAX () {4;}' unless defined(&SADB_X_CALG_MAX);
	eval 'sub SADB_CALG_STATS_INIT () {[ &SADB_X_CALG_NONE] = 1, [ &SADB_X_CALG_OUI] = 2, [ &SADB_X_CALG_DEFLATE] = 3, [ &SADB_X_CALG_LZS] = 4,;}' unless defined(&SADB_CALG_STATS_INIT);
	eval 'sub SADB_CALG_STATS_NUM () {5;}' unless defined(&SADB_CALG_STATS_NUM);
	eval 'sub SADB_CALG_STATS_STR () {"*unknown*", "none", "oui", "deflate", "lzs",;}' unless defined(&SADB_CALG_STATS_STR);
	eval 'sub SADB_IDENTTYPE_RESERVED () {0;}' unless defined(&SADB_IDENTTYPE_RESERVED);
	eval 'sub SADB_IDENTTYPE_PREFIX () {1;}' unless defined(&SADB_IDENTTYPE_PREFIX);
	eval 'sub SADB_IDENTTYPE_FQDN () {2;}' unless defined(&SADB_IDENTTYPE_FQDN);
	eval 'sub SADB_IDENTTYPE_USERFQDN () {3;}' unless defined(&SADB_IDENTTYPE_USERFQDN);
	eval 'sub SADB_X_IDENTTYPE_ADDR () {4;}' unless defined(&SADB_X_IDENTTYPE_ADDR);
	eval 'sub SADB_IDENTTYPE_MAX () {4;}' unless defined(&SADB_IDENTTYPE_MAX);
	eval 'sub SADB_X_EXT_NONE () {0x;}' unless defined(&SADB_X_EXT_NONE);
	eval 'sub SADB_X_EXT_OLD () {0x1;}' unless defined(&SADB_X_EXT_OLD);
	eval 'sub SADB_X_EXT_IV4B () {0x10;}' unless defined(&SADB_X_EXT_IV4B);
	eval 'sub SADB_X_EXT_DERIV () {0x20;}' unless defined(&SADB_X_EXT_DERIV);
	eval 'sub SADB_X_EXT_CYCSEQ () {0x40;}' unless defined(&SADB_X_EXT_CYCSEQ);
	eval 'sub SADB_X_EXT_PSEQ () {0x;}' unless defined(&SADB_X_EXT_PSEQ);
	eval 'sub SADB_X_EXT_PRAND () {0x100;}' unless defined(&SADB_X_EXT_PRAND);
	eval 'sub SADB_X_EXT_PZERO () {0x200;}' unless defined(&SADB_X_EXT_PZERO);
	eval 'sub SADB_X_EXT_PMASK () {0x300;}' unless defined(&SADB_X_EXT_PMASK);
	if(1) {
	    eval 'sub SADB_X_EXT_RAWCPI () {0x80;}' unless defined(&SADB_X_EXT_RAWCPI);
	}
	eval 'sub SADB_KEY_FLAGS_MAX () {0xfff;}' unless defined(&SADB_KEY_FLAGS_MAX);
	eval 'sub PFKEY_SPI_SIZE () {$sizeof{ &uint32_t};}' unless defined(&PFKEY_SPI_SIZE);
	eval 'sub SADB_X_LIFETIME_ALLOCATIONS () {0;}' unless defined(&SADB_X_LIFETIME_ALLOCATIONS);
	eval 'sub SADB_X_LIFETIME_BYTES () {1;}' unless defined(&SADB_X_LIFETIME_BYTES);
	eval 'sub SADB_X_LIFETIME_ADDTIME () {2;}' unless defined(&SADB_X_LIFETIME_ADDTIME);
	eval 'sub SADB_X_LIFETIME_USETIME () {3;}' unless defined(&SADB_X_LIFETIME_USETIME);
	eval 'sub PFKEY_SOFT_LIFETIME_RATE () {80;}' unless defined(&PFKEY_SOFT_LIFETIME_RATE);
	eval 'sub PFKEY_ALIGN8 {
	    my($a) = @_;
    	    eval q((1+ ((($a) - 1) | (8- 1))));
	}' unless defined(&PFKEY_ALIGN8);
	eval 'sub PFKEY_EXTLEN {
	    my($msg) = @_;
    	    eval q( &PFKEY_UNUNIT64((( &const \'struct sadb_ext\' *)( &const  &void *)($msg))-> &sadb_ext_len));
	}' unless defined(&PFKEY_EXTLEN);
	eval 'sub PFKEY_ADDR_PREFIX {
	    my($ext) = @_;
    	    eval q(((( &const \'struct sadb_address\' *)( &const  &void *)($ext))-> &sadb_address_prefixlen));
	}' unless defined(&PFKEY_ADDR_PREFIX);
	eval 'sub PFKEY_ADDR_PROTO {
	    my($ext) = @_;
    	    eval q(((( &const \'struct sadb_address\' *)( &const  &void *)($ext))-> &sadb_address_proto));
	}' unless defined(&PFKEY_ADDR_PROTO);
	eval 'sub PFKEY_ADDR_SADDR {
	    my($ext) = @_;
    	    eval q((( &void *)(( &void *)($ext) + $sizeof{\'struct sadb_address\'})));
	}' unless defined(&PFKEY_ADDR_SADDR);
	eval 'sub PFKEY_UNUNIT64 {
	    my($a) = @_;
    	    eval q((($a) << 3));
	}' unless defined(&PFKEY_UNUNIT64);
	eval 'sub PFKEY_UNIT64 {
	    my($a) = @_;
    	    eval q((($a) >> 3));
	}' unless defined(&PFKEY_UNIT64);
    }
}
1;
