require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_NET_PFKEY_V2_H_)) {
    eval 'sub _NET_PFKEY_V2_H_ () {1;}' unless defined(&_NET_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 _OPENBSD_IPSEC_API_VERSION () {2;}' unless defined(&_OPENBSD_IPSEC_API_VERSION);
    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_ADDFLOW () {12;}' unless defined(&SADB_X_ADDFLOW);
    eval 'sub SADB_X_DELFLOW () {13;}' unless defined(&SADB_X_DELFLOW);
    eval 'sub SADB_X_GRPSPIS () {14;}' unless defined(&SADB_X_GRPSPIS);
    eval 'sub SADB_X_ASKPOLICY () {15;}' unless defined(&SADB_X_ASKPOLICY);
    eval 'sub SADB_X_SPDDUMP () {16;}' unless defined(&SADB_X_SPDDUMP);
    eval 'sub SADB_MAX () {16;}' unless defined(&SADB_MAX);
    if(defined(&_KERNEL)) {
	eval 'sub SADB_X_GETSPROTO {
	    my($x) = @_;
    	    eval q(( ($x) ==  &SADB_SATYPE_AH ?  &IPPROTO_AH : ($x) ==  &SADB_SATYPE_ESP ?  &IPPROTO_ESP : ($x) ==  &SADB_X_SATYPE_TCPSIGNATURE ?  &IPPROTO_TCP : ($x) ==  &SADB_X_SATYPE_IPCOMP ?  &IPPROTO_IPCOMP:  &IPPROTO_IPIP ));
	}' unless defined(&SADB_X_GETSPROTO);
    }
    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_SRC_MASK () {17;}' unless defined(&SADB_X_EXT_SRC_MASK);
    eval 'sub SADB_X_EXT_DST_MASK () {18;}' unless defined(&SADB_X_EXT_DST_MASK);
    eval 'sub SADB_X_EXT_PROTOCOL () {19;}' unless defined(&SADB_X_EXT_PROTOCOL);
    eval 'sub SADB_X_EXT_FLOW_TYPE () {20;}' unless defined(&SADB_X_EXT_FLOW_TYPE);
    eval 'sub SADB_X_EXT_SRC_FLOW () {21;}' unless defined(&SADB_X_EXT_SRC_FLOW);
    eval 'sub SADB_X_EXT_DST_FLOW () {22;}' unless defined(&SADB_X_EXT_DST_FLOW);
    eval 'sub SADB_X_EXT_SA2 () {23;}' unless defined(&SADB_X_EXT_SA2);
    eval 'sub SADB_X_EXT_DST2 () {24;}' unless defined(&SADB_X_EXT_DST2);
    eval 'sub SADB_X_EXT_POLICY () {25;}' unless defined(&SADB_X_EXT_POLICY);
    eval 'sub SADB_X_EXT_LOCAL_CREDENTIALS () {26;}' unless defined(&SADB_X_EXT_LOCAL_CREDENTIALS);
    eval 'sub SADB_X_EXT_REMOTE_CREDENTIALS () {27;}' unless defined(&SADB_X_EXT_REMOTE_CREDENTIALS);
    eval 'sub SADB_X_EXT_LOCAL_AUTH () {28;}' unless defined(&SADB_X_EXT_LOCAL_AUTH);
    eval 'sub SADB_X_EXT_REMOTE_AUTH () {29;}' unless defined(&SADB_X_EXT_REMOTE_AUTH);
    eval 'sub SADB_X_EXT_SUPPORTED_COMP () {30;}' unless defined(&SADB_X_EXT_SUPPORTED_COMP);
    eval 'sub SADB_X_EXT_UDPENCAP () {31;}' unless defined(&SADB_X_EXT_UDPENCAP);
    eval 'sub SADB_X_EXT_LIFETIME_LASTUSE () {32;}' unless defined(&SADB_X_EXT_LIFETIME_LASTUSE);
    eval 'sub SADB_X_EXT_TAG () {33;}' unless defined(&SADB_X_EXT_TAG);
    eval 'sub SADB_EXT_MAX () {33;}' unless defined(&SADB_EXT_MAX);
    eval 'sub SADB_SATYPE_UNSPEC () {0;}' unless defined(&SADB_SATYPE_UNSPEC);
    eval 'sub SADB_SATYPE_AH () {1;}' unless defined(&SADB_SATYPE_AH);
    eval 'sub SADB_SATYPE_ESP () {2;}' unless defined(&SADB_SATYPE_ESP);
    eval 'sub SADB_SATYPE_RSVP () {3;}' unless defined(&SADB_SATYPE_RSVP);
    eval 'sub SADB_SATYPE_OSPFV2 () {4;}' unless defined(&SADB_SATYPE_OSPFV2);
    eval 'sub SADB_SATYPE_RIPV2 () {5;}' unless defined(&SADB_SATYPE_RIPV2);
    eval 'sub SADB_SATYPE_MIP () {6;}' unless defined(&SADB_SATYPE_MIP);
    eval 'sub SADB_X_SATYPE_IPIP () {7;}' unless defined(&SADB_X_SATYPE_IPIP);
    eval 'sub SADB_X_SATYPE_TCPSIGNATURE () {8;}' unless defined(&SADB_X_SATYPE_TCPSIGNATURE);
    eval 'sub SADB_X_SATYPE_IPCOMP () {9;}' unless defined(&SADB_X_SATYPE_IPCOMP);
    eval 'sub SADB_SATYPE_MAX () {9;}' 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_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_X_AALG_DES () {4;}' unless defined(&SADB_X_AALG_DES);
    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_MD5 () {249;}' unless defined(&SADB_X_AALG_MD5);
    eval 'sub SADB_X_AALG_SHA1 () {250;}' unless defined(&SADB_X_AALG_SHA1);
    eval 'sub SADB_AALG_MAX () {250;}' unless defined(&SADB_AALG_MAX);
    eval 'sub SADB_EALG_NONE () {0;}' unless defined(&SADB_EALG_NONE);
    eval 'sub SADB_X_EALG_DES_IV64 () {1;}' unless defined(&SADB_X_EALG_DES_IV64);
    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_X_EALG_RC5 () {4;}' unless defined(&SADB_X_EALG_RC5);
    eval 'sub SADB_X_EALG_IDEA () {5;}' unless defined(&SADB_X_EALG_IDEA);
    eval 'sub SADB_X_EALG_CAST () {6;}' unless defined(&SADB_X_EALG_CAST);
    eval 'sub SADB_X_EALG_BLF () {7;}' unless defined(&SADB_X_EALG_BLF);
    eval 'sub SADB_X_EALG_3IDEA () {8;}' unless defined(&SADB_X_EALG_3IDEA);
    eval 'sub SADB_X_EALG_DES_IV32 () {9;}' unless defined(&SADB_X_EALG_DES_IV32);
    eval 'sub SADB_X_EALG_RC4 () {10;}' unless defined(&SADB_X_EALG_RC4);
    eval 'sub SADB_EALG_NULL () {11;}' unless defined(&SADB_EALG_NULL);
    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_SKIPJACK () {249;}' unless defined(&SADB_X_EALG_SKIPJACK);
    eval 'sub SADB_EALG_MAX () {249;}' unless defined(&SADB_EALG_MAX);
    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 () {3;}' unless defined(&SADB_X_CALG_MAX);
    eval 'sub SADB_SAFLAGS_PFS () {0x1;}' unless defined(&SADB_SAFLAGS_PFS);
    eval 'sub SADB_X_SAFLAGS_HALFIV () {0x2;}' unless defined(&SADB_X_SAFLAGS_HALFIV);
    eval 'sub SADB_X_SAFLAGS_TUNNEL () {0x4;}' unless defined(&SADB_X_SAFLAGS_TUNNEL);
    eval 'sub SADB_X_SAFLAGS_CHAINDEL () {0x8;}' unless defined(&SADB_X_SAFLAGS_CHAINDEL);
    eval 'sub SADB_X_SAFLAGS_RANDOMPADDING () {0x80;}' unless defined(&SADB_X_SAFLAGS_RANDOMPADDING);
    eval 'sub SADB_X_SAFLAGS_NOREPLAY () {0x100;}' unless defined(&SADB_X_SAFLAGS_NOREPLAY);
    eval 'sub SADB_X_SAFLAGS_UDPENCAP () {0x200;}' unless defined(&SADB_X_SAFLAGS_UDPENCAP);
    eval 'sub SADB_X_POLICYFLAGS_POLICY () {0x1;}' unless defined(&SADB_X_POLICYFLAGS_POLICY);
    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_CONNECTION () {4;}' unless defined(&SADB_X_IDENTTYPE_CONNECTION);
    eval 'sub SADB_IDENTTYPE_MAX () {4;}' unless defined(&SADB_IDENTTYPE_MAX);
    eval 'sub SADB_KEY_FLAGS_MAX () {0;}' unless defined(&SADB_KEY_FLAGS_MAX);
    if(defined(&_KERNEL)) {
	eval 'sub PFKEYV2_LIFETIME_HARD () {0;}' unless defined(&PFKEYV2_LIFETIME_HARD);
	eval 'sub PFKEYV2_LIFETIME_SOFT () {1;}' unless defined(&PFKEYV2_LIFETIME_SOFT);
	eval 'sub PFKEYV2_LIFETIME_CURRENT () {2;}' unless defined(&PFKEYV2_LIFETIME_CURRENT);
	eval 'sub PFKEYV2_LIFETIME_LASTUSE () {3;}' unless defined(&PFKEYV2_LIFETIME_LASTUSE);
	eval 'sub PFKEYV2_IDENTITY_SRC () {0;}' unless defined(&PFKEYV2_IDENTITY_SRC);
	eval 'sub PFKEYV2_IDENTITY_DST () {1;}' unless defined(&PFKEYV2_IDENTITY_DST);
	eval 'sub PFKEYV2_ENCRYPTION_KEY () {0;}' unless defined(&PFKEYV2_ENCRYPTION_KEY);
	eval 'sub PFKEYV2_AUTHENTICATION_KEY () {1;}' unless defined(&PFKEYV2_AUTHENTICATION_KEY);
	eval 'sub PFKEYV2_SOCKETFLAGS_REGISTERED () {1;}' unless defined(&PFKEYV2_SOCKETFLAGS_REGISTERED);
	eval 'sub PFKEYV2_SOCKETFLAGS_PROMISC () {2;}' unless defined(&PFKEYV2_SOCKETFLAGS_PROMISC);
	eval 'sub PFKEYV2_SENDMESSAGE_UNICAST () {1;}' unless defined(&PFKEYV2_SENDMESSAGE_UNICAST);
	eval 'sub PFKEYV2_SENDMESSAGE_REGISTERED () {2;}' unless defined(&PFKEYV2_SENDMESSAGE_REGISTERED);
	eval 'sub PFKEYV2_SENDMESSAGE_BROADCAST () {3;}' unless defined(&PFKEYV2_SENDMESSAGE_BROADCAST);
    }
    eval 'sub SADB_X_CREDTYPE_NONE () {0;}' unless defined(&SADB_X_CREDTYPE_NONE);
    eval 'sub SADB_X_CREDTYPE_X509 () {1;}' unless defined(&SADB_X_CREDTYPE_X509);
    eval 'sub SADB_X_CREDTYPE_KEYNOTE () {2;}' unless defined(&SADB_X_CREDTYPE_KEYNOTE);
    eval 'sub SADB_X_CREDTYPE_MAX () {3;}' unless defined(&SADB_X_CREDTYPE_MAX);
    if(defined(&_KERNEL)) {
	eval 'sub PFKEYV2_AUTH_LOCAL () {0;}' unless defined(&PFKEYV2_AUTH_LOCAL);
	eval 'sub PFKEYV2_AUTH_REMOTE () {1;}' unless defined(&PFKEYV2_AUTH_REMOTE);
	eval 'sub PFKEYV2_CRED_LOCAL () {0;}' unless defined(&PFKEYV2_CRED_LOCAL);
	eval 'sub PFKEYV2_CRED_REMOTE () {1;}' unless defined(&PFKEYV2_CRED_REMOTE);
    }
    eval 'sub SADB_X_AUTHTYPE_NONE () {0;}' unless defined(&SADB_X_AUTHTYPE_NONE);
    eval 'sub SADB_X_AUTHTYPE_PASSPHRASE () {1;}' unless defined(&SADB_X_AUTHTYPE_PASSPHRASE);
    eval 'sub SADB_X_AUTHTYPE_RSA () {2;}' unless defined(&SADB_X_AUTHTYPE_RSA);
    eval 'sub SADB_X_AUTHTYPE_MAX () {2;}' unless defined(&SADB_X_AUTHTYPE_MAX);
    eval 'sub SADB_X_FLOW_TYPE_USE () {1;}' unless defined(&SADB_X_FLOW_TYPE_USE);
    eval 'sub SADB_X_FLOW_TYPE_ACQUIRE () {2;}' unless defined(&SADB_X_FLOW_TYPE_ACQUIRE);
    eval 'sub SADB_X_FLOW_TYPE_REQUIRE () {3;}' unless defined(&SADB_X_FLOW_TYPE_REQUIRE);
    eval 'sub SADB_X_FLOW_TYPE_BYPASS () {4;}' unless defined(&SADB_X_FLOW_TYPE_BYPASS);
    eval 'sub SADB_X_FLOW_TYPE_DENY () {5;}' unless defined(&SADB_X_FLOW_TYPE_DENY);
    eval 'sub SADB_X_FLOW_TYPE_DONTACQ () {6;}' unless defined(&SADB_X_FLOW_TYPE_DONTACQ);
    if(defined(&_KERNEL)) {
	eval 'sub EXTLEN {
	    my($x) = @_;
    	    eval q(((($x))-> &sadb_ext_len * $sizeof{ &uint64_t}));
	}' unless defined(&EXTLEN);
	eval 'sub PADUP {
	    my($x) = @_;
    	    eval q(((($x) + $sizeof{ &uint64_t} - 1) & ~($sizeof{ &uint64_t} - 1)));
	}' unless defined(&PADUP);
    }
}
1;
