require '_h2ph_pre.ph';

unless(defined(&__LINUX_CAPI_H__)) {
    eval 'sub __LINUX_CAPI_H__ () {1;}' unless defined(&__LINUX_CAPI_H__);
    require 'asm/types.ph';
    require 'linux/ioctl.ph';
    unless(defined(&__KERNEL__)) {
	require 'linux/kernelcapi.ph';
    }
    eval 'sub CAPI_REGISTER () { &_IOW(ord(\'C\'),0x1,\'struct capi_register_params\');}' unless defined(&CAPI_REGISTER);
    eval 'sub CAPI_MANUFACTURER_LEN () {64;}' unless defined(&CAPI_MANUFACTURER_LEN);
    eval 'sub CAPI_GET_MANUFACTURER () { &_IOWR(ord(\'C\'),0x6, &CAPI_MANUFACTURER_LEN);}' unless defined(&CAPI_GET_MANUFACTURER);
    eval 'sub CAPI_GET_VERSION () { &_IOWR(ord(\'C\'),0x7,\'struct capi_version\');}' unless defined(&CAPI_GET_VERSION);
    eval 'sub CAPI_SERIAL_LEN () {8;}' unless defined(&CAPI_SERIAL_LEN);
    eval 'sub CAPI_GET_SERIAL () { &_IOWR(ord(\'C\'),0x8,  &CAPI_SERIAL_LEN);}' unless defined(&CAPI_GET_SERIAL);
    eval 'sub CAPI_GET_PROFILE () { &_IOWR(ord(\'C\'),0x9,\'struct capi_profile\');}' unless defined(&CAPI_GET_PROFILE);
    eval 'sub CAPI_MANUFACTURER_CMD () { &_IOWR(ord(\'C\'),0x20, \'struct capi_manufacturer_cmd\');}' unless defined(&CAPI_MANUFACTURER_CMD);
    eval 'sub CAPI_GET_ERRCODE () { &_IOR(ord(\'C\'),0x21,  &__u16);}' unless defined(&CAPI_GET_ERRCODE);
    eval 'sub CAPI_INSTALLED () { &_IOR(ord(\'C\'),0x22,  &__u16);}' unless defined(&CAPI_INSTALLED);
    eval 'sub CAPIFLAG_HIGHJACKING () {0x1;}' unless defined(&CAPIFLAG_HIGHJACKING);
    eval 'sub CAPI_GET_FLAGS () { &_IOR(ord(\'C\'),0x23, \'unsigned\');}' unless defined(&CAPI_GET_FLAGS);
    eval 'sub CAPI_SET_FLAGS () { &_IOR(ord(\'C\'),0x24, \'unsigned\');}' unless defined(&CAPI_SET_FLAGS);
    eval 'sub CAPI_CLR_FLAGS () { &_IOR(ord(\'C\'),0x25, \'unsigned\');}' unless defined(&CAPI_CLR_FLAGS);
    eval 'sub CAPI_NCCI_OPENCOUNT () { &_IOR(ord(\'C\'),0x26, \'unsigned\');}' unless defined(&CAPI_NCCI_OPENCOUNT);
    eval 'sub CAPI_NCCI_GETUNIT () { &_IOR(ord(\'C\'),0x27, \'unsigned\');}' unless defined(&CAPI_NCCI_GETUNIT);
}
1;
