require '_h2ph_pre.ph';

unless(defined(&__LINUX_NETLINK_H)) {
    eval 'sub __LINUX_NETLINK_H () {1;}' unless defined(&__LINUX_NETLINK_H);
    eval 'sub NETLINK_ROUTE () {0;}' unless defined(&NETLINK_ROUTE);
    eval 'sub NETLINK_SKIP () {1;}' unless defined(&NETLINK_SKIP);
    eval 'sub NETLINK_USERSOCK () {2;}' unless defined(&NETLINK_USERSOCK);
    eval 'sub NETLINK_FIREWALL () {3;}' unless defined(&NETLINK_FIREWALL);
    eval 'sub NETLINK_TCPDIAG () {4;}' unless defined(&NETLINK_TCPDIAG);
    eval 'sub NETLINK_NFLOG () {5;}' unless defined(&NETLINK_NFLOG);
    eval 'sub NETLINK_ARPD () {8;}' unless defined(&NETLINK_ARPD);
    eval 'sub NETLINK_ROUTE6 () {11;}' unless defined(&NETLINK_ROUTE6);
    eval 'sub NETLINK_IP6_FW () {13;}' unless defined(&NETLINK_IP6_FW);
    eval 'sub NETLINK_DNRTMSG () {14;}' unless defined(&NETLINK_DNRTMSG);
    eval 'sub NETLINK_TAPBASE () {16;}' unless defined(&NETLINK_TAPBASE);
    eval 'sub MAX_LINKS () {32;}' unless defined(&MAX_LINKS);
    eval 'sub NLM_F_REQUEST () {1;}' unless defined(&NLM_F_REQUEST);
    eval 'sub NLM_F_MULTI () {2;}' unless defined(&NLM_F_MULTI);
    eval 'sub NLM_F_ACK () {4;}' unless defined(&NLM_F_ACK);
    eval 'sub NLM_F_ECHO () {8;}' unless defined(&NLM_F_ECHO);
    eval 'sub NLM_F_ROOT () {0x100;}' unless defined(&NLM_F_ROOT);
    eval 'sub NLM_F_MATCH () {0x200;}' unless defined(&NLM_F_MATCH);
    eval 'sub NLM_F_ATOMIC () {0x400;}' unless defined(&NLM_F_ATOMIC);
    eval 'sub NLM_F_DUMP () {( &NLM_F_ROOT| &NLM_F_MATCH);}' unless defined(&NLM_F_DUMP);
    eval 'sub NLM_F_REPLACE () {0x100;}' unless defined(&NLM_F_REPLACE);
    eval 'sub NLM_F_EXCL () {0x200;}' unless defined(&NLM_F_EXCL);
    eval 'sub NLM_F_CREATE () {0x400;}' unless defined(&NLM_F_CREATE);
    eval 'sub NLM_F_APPEND () {0x800;}' unless defined(&NLM_F_APPEND);
    eval 'sub NLMSG_ALIGNTO () {4;}' unless defined(&NLMSG_ALIGNTO);
    eval 'sub NLMSG_ALIGN {
        local($len) = @_;
	    eval q(( (($len)+ &NLMSG_ALIGNTO-1) & ~( &NLMSG_ALIGNTO-1) ));
    }' unless defined(&NLMSG_ALIGN);
    eval 'sub NLMSG_LENGTH {
        local($len) = @_;
	    eval q((($len)+ &NLMSG_ALIGN($sizeof{\'struct nlmsghdr\'})));
    }' unless defined(&NLMSG_LENGTH);
    eval 'sub NLMSG_SPACE {
        local($len) = @_;
	    eval q( &NLMSG_ALIGN( &NLMSG_LENGTH($len)));
    }' unless defined(&NLMSG_SPACE);
    eval 'sub NLMSG_DATA {
        local($nlh) = @_;
	    eval q(((($nlh) +  &NLMSG_LENGTH(0))));
    }' unless defined(&NLMSG_DATA);
    eval 'sub NLMSG_NEXT {
        local($nlh,$len) = @_;
	    eval q(( -=  &NLMSG_ALIGN(-> &nlmsg_len), ((($nlh)) +  &NLMSG_ALIGN(($nlh)-> &nlmsg_len))));
    }' unless defined(&NLMSG_NEXT);
    eval 'sub NLMSG_OK {
        local($nlh,$len) = @_;
	    eval q((($len) > 0 && ($nlh)-> &nlmsg_len >= $sizeof{\'struct nlmsghdr\'}  && ($nlh)-> &nlmsg_len <= ($len)));
    }' unless defined(&NLMSG_OK);
    eval 'sub NLMSG_PAYLOAD {
        local($nlh,$len) = @_;
	    eval q((($nlh)-> &nlmsg_len -  &NLMSG_SPACE(($len))));
    }' unless defined(&NLMSG_PAYLOAD);
    eval 'sub NLMSG_NOOP () {0x1;}' unless defined(&NLMSG_NOOP);
    eval 'sub NLMSG_ERROR () {0x2;}' unless defined(&NLMSG_ERROR);
    eval 'sub NLMSG_DONE () {0x3;}' unless defined(&NLMSG_DONE);
    eval 'sub NLMSG_OVERRUN () {0x4;}' unless defined(&NLMSG_OVERRUN);
    eval 'sub NET_MAJOR () {36;}' unless defined(&NET_MAJOR);
}
1;
