require '_h2ph_pre.ph';

unless(defined(&_LINUX_NETDEVICE_H)) {
    eval 'sub _LINUX_NETDEVICE_H () {1;}' unless defined(&_LINUX_NETDEVICE_H);
    require 'linux/if.ph';
    require 'linux/if_ether.ph';
    require 'linux/if_packet.ph';
    require 'asm/cache.ph';
    require 'asm/byteorder.ph';
    eval 'sub HAVE_ALLOC_NETDEV () {1;}' unless defined(&HAVE_ALLOC_NETDEV);
    eval 'sub NET_XMIT_SUCCESS () {0;}' unless defined(&NET_XMIT_SUCCESS);
    eval 'sub NET_XMIT_DROP () {1;}' unless defined(&NET_XMIT_DROP);
    eval 'sub NET_XMIT_CN () {2;}' unless defined(&NET_XMIT_CN);
    eval 'sub NET_XMIT_POLICED () {3;}' unless defined(&NET_XMIT_POLICED);
    eval 'sub NET_XMIT_BYPASS () {4;}' unless defined(&NET_XMIT_BYPASS);
    eval 'sub NET_RX_SUCCESS () {0;}' unless defined(&NET_RX_SUCCESS);
    eval 'sub NET_RX_DROP () {1;}' unless defined(&NET_RX_DROP);
    eval 'sub NET_RX_CN_LOW () {2;}' unless defined(&NET_RX_CN_LOW);
    eval 'sub NET_RX_CN_MOD () {3;}' unless defined(&NET_RX_CN_MOD);
    eval 'sub NET_RX_CN_HIGH () {4;}' unless defined(&NET_RX_CN_HIGH);
    eval 'sub NET_RX_BAD () {5;}' unless defined(&NET_RX_BAD);
    eval 'sub net_xmit_errno {
        local($e) = @_;
	    eval q((($e) !=  &NET_XMIT_CN ? - &ENOBUFS : 0));
    }' unless defined(&net_xmit_errno);
    eval 'sub MAX_ADDR_LEN () {8;}' unless defined(&MAX_ADDR_LEN);
    if(!defined( &CONFIG_AX25)  && !defined( &CONFIG_AX25_MODULE)  && !defined( &CONFIG_TR)) {
	eval 'sub LL_MAX_HEADER () {32;}' unless defined(&LL_MAX_HEADER);
    } else {
	if(defined( &CONFIG_AX25) || defined( &CONFIG_AX25_MODULE)) {
	    eval 'sub LL_MAX_HEADER () {96;}' unless defined(&LL_MAX_HEADER);
	} else {
	    eval 'sub LL_MAX_HEADER () {48;}' unless defined(&LL_MAX_HEADER);
	}
    }
    if(!defined( &CONFIG_NET_IPIP)  && !defined( &CONFIG_IPV6)  && !defined( &CONFIG_IPV6_MODULE)) {
	eval 'sub MAX_HEADER () { &LL_MAX_HEADER;}' unless defined(&MAX_HEADER);
    } else {
	eval 'sub MAX_HEADER () {( &LL_MAX_HEADER + 48);}' unless defined(&MAX_HEADER);
    }
    eval("sub IF_PORT_UNKNOWN () { 0; }") unless defined(&IF_PORT_UNKNOWN);
    eval("sub IF_PORT_10BASE2 () { 1; }") unless defined(&IF_PORT_10BASE2);
    eval("sub IF_PORT_10BASET () { 2; }") unless defined(&IF_PORT_10BASET);
    eval("sub IF_PORT_AUI () { 3; }") unless defined(&IF_PORT_AUI);
    eval("sub IF_PORT_100BASET () { 4; }") unless defined(&IF_PORT_100BASET);
    eval("sub IF_PORT_100BASETX () { 5; }") unless defined(&IF_PORT_100BASETX);
    eval("sub IF_PORT_100BASEFX () { 6; }") unless defined(&IF_PORT_100BASEFX);
}
1;
