Unified in-app VPN SDK's for Microsoft Windows Vista+, Android 4.4+, Mac OS 10.7+, iOS 9.0+, Ubuntu Linux LTS 18.04+. Earlier OS versions can be supported as well by request. Please contact [email protected] to receive your own API key.

Copyright © 2019 VPNWholesaler.com. All rights reserved.

Back

3.31 checkTapAdapterStatus Windows Example

checkTapAdapterStatus() function could be written in the following way:

void checkTapAdapterStatus()
{
    json_object *j_obj;
    char szCmd[1024];
    j_obj = json_object_new_object();
    json_object_object_add(j_obj, "cmd", json_object_new_int(OVS_CMD_CHECK_TAP_ADAPTER));
    snprintf(szCmd, sizeof(szCmd), "%s", json_object_get_string(j_obj));
    json_object_put(j_obj);
    CmdProc(szCmd); 
}

Result will be returned via callback as a JSON:

code will be OVS_NOTIFY_CHECK_TAP_ADAPTER

err will be TAP_ADAPTER_STATUS_OK in case of success

data will be null

Where err code has one of the following values:

  1. TAP_ADAPTER_STATUS_OK
  2. TAP_ADAPTER_STATUS_NOT_INSTALLED
  3. TAP_ADAPTER_STATUS_DISABLE