require '_h2ph_pre.ph';

unless(defined(&_WANPIPE_SOCK_DRIVER_COMMON_H)) {
    eval 'sub _WANPIPE_SOCK_DRIVER_COMMON_H () {1;}' unless defined(&_WANPIPE_SOCK_DRIVER_COMMON_H);
    require 'linux/version.ph';
    if((defined(&LINUX_VERSION_CODE) ? &LINUX_VERSION_CODE : 0) >=  &KERNEL_VERSION(2,3,0)) {
	eval 'sub netdevice_t () {\'struct net_device\';}' unless defined(&netdevice_t);
    } else {
	eval 'sub netdevice_t () {\'struct device\';}' unless defined(&netdevice_t);
    }
    eval("sub WANSOCK_UNCONFIGURED () { 0; }") unless defined(&WANSOCK_UNCONFIGURED);
    eval("sub WANSOCK_DISCONNECTED () { 1; }") unless defined(&WANSOCK_DISCONNECTED);
    eval("sub WANSOCK_CONNECTING () { 2; }") unless defined(&WANSOCK_CONNECTING);
    eval("sub WANSOCK_CONNECTED () { 3; }") unless defined(&WANSOCK_CONNECTED);
    eval("sub WANSOCK_LIMIT () { 4; }") unless defined(&WANSOCK_LIMIT);
    eval("sub WANSOCK_DUALPORT () { 5; }") unless defined(&WANSOCK_DUALPORT);
    eval("sub WANSOCK_DISCONNECTING () { 6; }") unless defined(&WANSOCK_DISCONNECTING);
    eval("sub WANSOCK_BINDED () { 7; }") unless defined(&WANSOCK_BINDED);
    eval("sub WANSOCK_BIND_LISTEN () { 8; }") unless defined(&WANSOCK_BIND_LISTEN);
    eval("sub WANSOCK_LISTEN () { 9; }") unless defined(&WANSOCK_LISTEN);
}
1;
