require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_IF_UMBREG_H_)) {
    eval 'sub _IF_UMBREG_H_ () {1;}' unless defined(&_IF_UMBREG_H_);
    eval 'sub MBIM_REGSTATE_DESCRIPTIONS () {{ {  &MBIM_REGSTATE_UNKNOWN, "unknown" }, {  &MBIM_REGSTATE_DEREGISTERED, "not registered" }, {  &MBIM_REGSTATE_SEARCHING, "searching" }, {  &MBIM_REGSTATE_HOME, "home network" }, {  &MBIM_REGSTATE_ROAMING, "roaming network" }, {  &MBIM_REGSTATE_PARTNER, "partner network" }, {  &MBIM_REGSTATE_DENIED, "access denied" }, { 0,  &NULL } };}' unless defined(&MBIM_REGSTATE_DESCRIPTIONS);
    eval 'sub MBIM_DATACLASS_DESCRIPTIONS () {{ {  &MBIM_DATACLASS_NONE, "none" }, {  &MBIM_DATACLASS_GPRS, "GPRS" }, {  &MBIM_DATACLASS_EDGE, "EDGE" }, {  &MBIM_DATACLASS_UMTS, "UMTS" }, {  &MBIM_DATACLASS_HSDPA, "HSDPA" }, {  &MBIM_DATACLASS_HSUPA, "HSUPA" }, {  &MBIM_DATACLASS_HSDPA| &MBIM_DATACLASS_HSUPA, "HSPA" }, {  &MBIM_DATACLASS_LTE, "LTE" }, {  &MBIM_DATACLASS_1XRTT, "CDMA2000" }, {  &MBIM_DATACLASS_1XEVDO, "CDMA2000" }, {  &MBIM_DATACLASS_1XEVDO_REV_A, "CDMA2000" }, {  &MBIM_DATACLASS_1XEVDV, "CDMA2000" }, {  &MBIM_DATACLASS_3XRTT, "CDMA2000" }, {  &MBIM_DATACLASS_1XEVDO_REV_B, "CDMA2000" }, {  &MBIM_DATACLASS_UMB, "CDMA2000" }, {  &MBIM_DATACLASS_CUSTOM, "custom" }, { 0,  &NULL } };}' unless defined(&MBIM_DATACLASS_DESCRIPTIONS);
    eval 'sub MBIM_1TO1_DESCRIPTION {
        my($m) = @_;
	    eval q({ ($m), $m });
    }' unless defined(&MBIM_1TO1_DESCRIPTION);
    eval 'sub MBIM_MESSAGES_DESCRIPTIONS () {{  &MBIM_1TO1_DESCRIPTION( &MBIM_OPEN_MSG),  &MBIM_1TO1_DESCRIPTION( &MBIM_CLOSE_MSG),  &MBIM_1TO1_DESCRIPTION( &MBIM_COMMAND_MSG),  &MBIM_1TO1_DESCRIPTION( &MBIM_HOST_ERROR_MSG),  &MBIM_1TO1_DESCRIPTION( &MBIM_OPEN_DONE),  &MBIM_1TO1_DESCRIPTION( &MBIM_CLOSE_DONE),  &MBIM_1TO1_DESCRIPTION( &MBIM_COMMAND_DONE),  &MBIM_1TO1_DESCRIPTION( &MBIM_FUNCTION_ERROR_MSG),  &MBIM_1TO1_DESCRIPTION( &MBIM_INDICATE_STATUS_MSG), { 0,  &NULL } };}' unless defined(&MBIM_MESSAGES_DESCRIPTIONS);
    eval 'sub MBIM_STATUS_DESCRIPTION {
        my($m) = @_;
	    eval q({  &MBIM_STATUS_  $m, $m });
    }' unless defined(&MBIM_STATUS_DESCRIPTION);
    eval 'sub MBIM_STATUS_DESCRIPTIONS () {{  &MBIM_STATUS_DESCRIPTION( &SUCCESS),  &MBIM_STATUS_DESCRIPTION( &BUSY),  &MBIM_STATUS_DESCRIPTION( &FAILURE),  &MBIM_STATUS_DESCRIPTION( &SIM_NOT_INSERTED),  &MBIM_STATUS_DESCRIPTION( &BAD_SIM),  &MBIM_STATUS_DESCRIPTION( &PIN_REQUIRED),  &MBIM_STATUS_DESCRIPTION( &PIN_DISABLED),  &MBIM_STATUS_DESCRIPTION( &NOT_REGISTERED),  &MBIM_STATUS_DESCRIPTION( &PROVIDERS_NOT_FOUND),  &MBIM_STATUS_DESCRIPTION( &NO_DEVICE_SUPPORT),  &MBIM_STATUS_DESCRIPTION( &PROVIDER_NOT_VISIBLE),  &MBIM_STATUS_DESCRIPTION( &DATA_CLASS_NOT_AVAILABLE),  &MBIM_STATUS_DESCRIPTION( &PACKET_SERVICE_DETACHED),  &MBIM_STATUS_DESCRIPTION( &MAX_ACTIVATED_CONTEXTS),  &MBIM_STATUS_DESCRIPTION( &NOT_INITIALIZED),  &MBIM_STATUS_DESCRIPTION( &VOICE_CALL_IN_PROGRESS),  &MBIM_STATUS_DESCRIPTION( &CONTEXT_NOT_ACTIVATED),  &MBIM_STATUS_DESCRIPTION( &SERVICE_NOT_ACTIVATED),  &MBIM_STATUS_DESCRIPTION( &INVALID_ACCESS_STRING),  &MBIM_STATUS_DESCRIPTION( &INVALID_USER_NAME_PWD),  &MBIM_STATUS_DESCRIPTION( &RADIO_POWER_OFF),  &MBIM_STATUS_DESCRIPTION( &INVALID_PARAMETERS),  &MBIM_STATUS_DESCRIPTION( &READ_FAILURE),  &MBIM_STATUS_DESCRIPTION( &WRITE_FAILURE),  &MBIM_STATUS_DESCRIPTION( &NO_PHONEBOOK),  &MBIM_STATUS_DESCRIPTION( &PARAMETER_TOO_LONG),  &MBIM_STATUS_DESCRIPTION( &STK_BUSY),  &MBIM_STATUS_DESCRIPTION( &OPERATION_NOT_ALLOWED),  &MBIM_STATUS_DESCRIPTION( &MEMORY_FAILURE),  &MBIM_STATUS_DESCRIPTION( &INVALID_MEMORY_INDEX),  &MBIM_STATUS_DESCRIPTION( &MEMORY_FULL),  &MBIM_STATUS_DESCRIPTION( &FILTER_NOT_SUPPORTED),  &MBIM_STATUS_DESCRIPTION( &DSS_INSTANCE_LIMIT),  &MBIM_STATUS_DESCRIPTION( &INVALID_DEVICE_SERVICE_OPERATION),  &MBIM_STATUS_DESCRIPTION( &AUTH_INCORRECT_AUTN),  &MBIM_STATUS_DESCRIPTION( &AUTH_SYNC_FAILURE),  &MBIM_STATUS_DESCRIPTION( &AUTH_AMF_NOT_SET),  &MBIM_STATUS_DESCRIPTION( &CONTEXT_NOT_SUPPORTED),  &MBIM_STATUS_DESCRIPTION( &SMS_UNKNOWN_SMSC_ADDRESS),  &MBIM_STATUS_DESCRIPTION( &SMS_NETWORK_TIMEOUT),  &MBIM_STATUS_DESCRIPTION( &SMS_LANG_NOT_SUPPORTED),  &MBIM_STATUS_DESCRIPTION( &SMS_ENCODING_NOT_SUPPORTED),  &MBIM_STATUS_DESCRIPTION( &SMS_FORMAT_NOT_SUPPORTED), { 0,  &NULL } };}' unless defined(&MBIM_STATUS_DESCRIPTIONS);
    eval 'sub MBIM_ERROR_DESCRIPTION {
        my($m) = @_;
	    eval q({  &MBIM_ERROR_  $m, $m });
    }' unless defined(&MBIM_ERROR_DESCRIPTION);
    eval 'sub MBIM_ERROR_DESCRIPTIONS () {{  &MBIM_ERROR_DESCRIPTION( &TIMEOUT_FRAGMENT),  &MBIM_ERROR_DESCRIPTION( &FRAGMENT_OUT_OF_SEQUENCE),  &MBIM_ERROR_DESCRIPTION( &LENGTH_MISMATCH),  &MBIM_ERROR_DESCRIPTION( &DUPLICATED_TID),  &MBIM_ERROR_DESCRIPTION( &NOT_OPENED),  &MBIM_ERROR_DESCRIPTION( &UNKNOWN),  &MBIM_ERROR_DESCRIPTION( &CANCEL),  &MBIM_ERROR_DESCRIPTION( &MAX_TRANSFER), { 0,  &NULL } };}' unless defined(&MBIM_ERROR_DESCRIPTIONS);
    eval 'sub MBIM_CID_DESCRIPTIONS () {{  &MBIM_1TO1_DESCRIPTION( &MBIM_CID_DEVICE_CAPS),  &MBIM_1TO1_DESCRIPTION( &MBIM_CID_SUBSCRIBER_READY_STATUS),  &MBIM_1TO1_DESCRIPTION( &MBIM_CID_RADIO_STATE),  &MBIM_1TO1_DESCRIPTION( &MBIM_CID_PIN),  &MBIM_1TO1_DESCRIPTION( &MBIM_CID_PIN_LIST),  &MBIM_1TO1_DESCRIPTION( &MBIM_CID_HOME_PROVIDER),  &MBIM_1TO1_DESCRIPTION( &MBIM_CID_PREFERRED_PROVIDERS),  &MBIM_1TO1_DESCRIPTION( &MBIM_CID_VISIBLE_PROVIDERS),  &MBIM_1TO1_DESCRIPTION( &MBIM_CID_REGISTER_STATE),  &MBIM_1TO1_DESCRIPTION( &MBIM_CID_PACKET_SERVICE),  &MBIM_1TO1_DESCRIPTION( &MBIM_CID_SIGNAL_STATE),  &MBIM_1TO1_DESCRIPTION( &MBIM_CID_CONNECT),  &MBIM_1TO1_DESCRIPTION( &MBIM_CID_PROVISIONED_CONTEXTS),  &MBIM_1TO1_DESCRIPTION( &MBIM_CID_SERVICE_ACTIVATION),  &MBIM_1TO1_DESCRIPTION( &MBIM_CID_IP_CONFIGURATION),  &MBIM_1TO1_DESCRIPTION( &MBIM_CID_DEVICE_SERVICES),  &MBIM_1TO1_DESCRIPTION( &MBIM_CID_DEVICE_SERVICE_SUBSCRIBE_LIST),  &MBIM_1TO1_DESCRIPTION( &MBIM_CID_PACKET_STATISTICS),  &MBIM_1TO1_DESCRIPTION( &MBIM_CID_NETWORK_IDLE_HINT),  &MBIM_1TO1_DESCRIPTION( &MBIM_CID_EMERGENCY_MODE),  &MBIM_1TO1_DESCRIPTION( &MBIM_CID_IP_PACKET_FILTERS),  &MBIM_1TO1_DESCRIPTION( &MBIM_CID_MULTICARRIER_PROVIDERS), { 0,  &NULL } };}' unless defined(&MBIM_CID_DESCRIPTIONS);
    eval 'sub MBIM_SIMSTATE_DESCRIPTIONS () {{ {  &MBIM_SIMSTATE_NOTINITIALIZED, "not initialized" }, {  &MBIM_SIMSTATE_INITIALIZED, "initialized" }, {  &MBIM_SIMSTATE_NOTINSERTED, "not inserted" }, {  &MBIM_SIMSTATE_BADSIM, "bad type" }, {  &MBIM_SIMSTATE_FAILURE, "failed" }, {  &MBIM_SIMSTATE_NOTACTIVATED, "not activated" }, {  &MBIM_SIMSTATE_LOCKED, "locked" }, { 0,  &NULL } };}' unless defined(&MBIM_SIMSTATE_DESCRIPTIONS);
    eval 'sub MBIM_PINTYPE_DESCRIPTIONS () {{ {  &MBIM_PIN_TYPE_NONE, "none" }, {  &MBIM_PIN_TYPE_CUSTOM, "custom" }, {  &MBIM_PIN_TYPE_PIN1, "PIN1" }, {  &MBIM_PIN_TYPE_PIN2, "PIN2" }, {  &MBIM_PIN_TYPE_DEV_SIM_PIN, "device PIN" }, {  &MBIM_PIN_TYPE_DEV_FIRST_SIM_PIN, "device 1st PIN" }, {  &MBIM_PIN_TYPE_NETWORK_PIN, "network PIN" }, {  &MBIM_PIN_TYPE_NETWORK_SUBSET_PIN, "network subset PIN" }, {  &MBIM_PIN_TYPE_SERVICE_PROVIDER_PIN, "provider PIN" }, {  &MBIM_PIN_TYPE_CORPORATE_PIN, "corporate PIN" }, {  &MBIM_PIN_TYPE_SUBSIDY_LOCK, "subsidy lock" }, {  &MBIM_PIN_TYPE_PUK1, "PUK" }, {  &MBIM_PIN_TYPE_PUK2, "PUK2" }, {  &MBIM_PIN_TYPE_DEV_FIRST_SIM_PUK, "device 1st PUK" }, {  &MBIM_PIN_TYPE_NETWORK_PUK, "network PUK" }, {  &MBIM_PIN_TYPE_NETWORK_SUBSET_PUK, "network subset PUK" }, {  &MBIM_PIN_TYPE_SERVICE_PROVIDER_PUK, "provider PUK" }, {  &MBIM_PIN_TYPE_CORPORATE_PUK, "corporate PUK" }, { 0,  &NULL } };}' unless defined(&MBIM_PINTYPE_DESCRIPTIONS);
    eval 'sub MBIM_PKTSRV_STATE_DESCRIPTIONS () {{ {  &MBIM_PKTSERVICE_STATE_UNKNOWN, "unknown" }, {  &MBIM_PKTSERVICE_STATE_ATTACHING, "attaching" }, {  &MBIM_PKTSERVICE_STATE_ATTACHED, "attached" }, {  &MBIM_PKTSERVICE_STATE_DETACHING, "detaching" }, {  &MBIM_PKTSERVICE_STATE_DETACHED, "detached" }, { 0,  &NULL } };}' unless defined(&MBIM_PKTSRV_STATE_DESCRIPTIONS);
    eval 'sub MBIM_ACTIVATION_STATE_DESCRIPTIONS () {{ {  &MBIM_ACTIVATION_STATE_UNKNOWN, "unknown" }, {  &MBIM_ACTIVATION_STATE_ACTIVATED, "activated" }, {  &MBIM_ACTIVATION_STATE_ACTIVATING, "activating" }, {  &MBIM_ACTIVATION_STATE_DEACTIVATED, "deactivated" }, {  &MBIM_ACTIVATION_STATE_DEACTIVATING, "deactivating" }, { 0,  &NULL } };}' unless defined(&MBIM_ACTIVATION_STATE_DESCRIPTIONS);
    eval("sub UMB_S_DOWN () { 0; }") unless defined(&UMB_S_DOWN);
    eval("sub UMB_S_OPEN () { 1; }") unless defined(&UMB_S_OPEN);
    eval("sub UMB_S_CID () { 2; }") unless defined(&UMB_S_CID);
    eval("sub UMB_S_RADIO () { 3; }") unless defined(&UMB_S_RADIO);
    eval("sub UMB_S_SIMREADY () { 4; }") unless defined(&UMB_S_SIMREADY);
    eval("sub UMB_S_ATTACHED () { 5; }") unless defined(&UMB_S_ATTACHED);
    eval("sub UMB_S_CONNECTED () { 6; }") unless defined(&UMB_S_CONNECTED);
    eval("sub UMB_S_UP () { 7; }") unless defined(&UMB_S_UP);
    eval 'sub UMB_INTERNAL_STATE_DESCRIPTIONS () {{ {  &UMB_S_DOWN, "down" }, {  &UMB_S_OPEN, "open" }, {  &UMB_S_CID, "CID allocated" }, {  &UMB_S_RADIO, "radio on" }, {  &UMB_S_SIMREADY, "SIM is ready" }, {  &UMB_S_ATTACHED, "attached" }, {  &UMB_S_CONNECTED, "connected" }, {  &UMB_S_UP, "up" }, { 0,  &NULL } };}' unless defined(&UMB_INTERNAL_STATE_DESCRIPTIONS);
    eval 'sub UMB_APN_MAXLEN () {100;}' unless defined(&UMB_APN_MAXLEN);
    eval 'sub UMB_USERNAME_MAXLEN () {205;}' unless defined(&UMB_USERNAME_MAXLEN);
    eval 'sub UMB_PASSWORD_MAXLEN () {205;}' unless defined(&UMB_PASSWORD_MAXLEN);
    eval 'sub UMB_PIN_REQUIRED () {0;}' unless defined(&UMB_PIN_REQUIRED);
    eval 'sub UMB_PIN_UNLOCKED () {1;}' unless defined(&UMB_PIN_UNLOCKED);
    eval 'sub UMB_PUK_REQUIRED () {2;}' unless defined(&UMB_PUK_REQUIRED);
    eval 'sub UMB_PROVIDERNAME_MAXLEN () {20;}' unless defined(&UMB_PROVIDERNAME_MAXLEN);
    eval 'sub UMB_PHONENR_MAXLEN () {22;}' unless defined(&UMB_PHONENR_MAXLEN);
    eval 'sub UMB_SUBSCRIBERID_MAXLEN () {15;}' unless defined(&UMB_SUBSCRIBERID_MAXLEN);
    eval 'sub UMB_ICCID_MAXLEN () {20;}' unless defined(&UMB_ICCID_MAXLEN);
    eval 'sub UMB_ROAMINGTEXT_MAXLEN () {63;}' unless defined(&UMB_ROAMINGTEXT_MAXLEN);
    eval 'sub UMB_DEVID_MAXLEN () {18;}' unless defined(&UMB_DEVID_MAXLEN);
    eval 'sub UMB_FWINFO_MAXLEN () {30;}' unless defined(&UMB_FWINFO_MAXLEN);
    eval 'sub UMB_HWINFO_MAXLEN () {30;}' unless defined(&UMB_HWINFO_MAXLEN);
    eval 'sub UMB_VALUE_UNKNOWN () {-999;}' unless defined(&UMB_VALUE_UNKNOWN);
    eval 'sub UMB_BER_EXCELLENT () {0;}' unless defined(&UMB_BER_EXCELLENT);
    eval 'sub UMB_BER_VERYGOOD () {1;}' unless defined(&UMB_BER_VERYGOOD);
    eval 'sub UMB_BER_GOOD () {2;}' unless defined(&UMB_BER_GOOD);
    eval 'sub UMB_BER_OK () {3;}' unless defined(&UMB_BER_OK);
    eval 'sub UMB_BER_MEDIUM () {4;}' unless defined(&UMB_BER_MEDIUM);
    eval 'sub UMB_BER_BAD () {5;}' unless defined(&UMB_BER_BAD);
    eval 'sub UMB_BER_VERYBAD () {6;}' unless defined(&UMB_BER_VERYBAD);
    eval 'sub UMB_BER_EXTREMELYBAD () {7;}' unless defined(&UMB_BER_EXTREMELYBAD);
    eval 'sub UMB_MAX_DNSSRV () {2;}' unless defined(&UMB_MAX_DNSSRV);
    if(!defined(&ifr_mtu)) {
	eval 'sub ifr_mtu () { ($ifr_ifru->{ifru_metric});}' unless defined(&ifr_mtu);
    }
    if(defined(&_KERNEL)) {
	eval 'sub GET_IFP {
	    my($sc) = @_;
    	    eval q((($sc)-> &sc_if));
	}' unless defined(&GET_IFP);
	eval 'sub UMBFLG_FCC_AUTH_REQUIRED () {0x1;}' unless defined(&UMBFLG_FCC_AUTH_REQUIRED);
	eval 'sub sc_state () { ($sc_info->{state});}' unless defined(&sc_state);
	eval 'sub sc_roaming () { ($sc_info->{enable_roaming});}' unless defined(&sc_roaming);
    }
}
1;
