mocks.OnCallFunc(cloudProvisioningStatusCallback).Do(
[& cntForReceivedCallbackWithSuccess](std::shared_ptr< CloudPropProvisioningStatus > status)
{
- // Will called twice
- if(status->getESResult() == ES_OK || status->getESResult() == ES_FOUND_ENROLLEE)
+ if(status->getESResult() == ES_OK)
{
cntForReceivedCallbackWithSuccess++;
}
std::unique_lock< std::mutex > lock{ mutexForCondition };
responseCon.wait_for(lock, g_waitForResponse);
- EXPECT_EQ(cntForReceivedCallbackWithSuccess, 3);
+ EXPECT_EQ(cntForReceivedCallbackWithSuccess, 2);
ESTerminateEnrollee();
}
ES_OK = 0,
/**
- * Successfully found Enrollee in a given network. This will be given in Cloud provisioning step.
+ * Enrollee discovery fails in cloud provisioning
*/
- ES_FOUND_ENROLLEE = 1,
+ ES_ENROLLEE_DISCOVERY_FAILURE = 11,
/**
- * Not found Enrollee in a give network. This will be given in Cloud provisioning step.
+ * Valid GET or POST request fails for some reason.
+ * This failure may happen when it failed to receive any response from Enrollee by a timeout threshold
*/
- ES_NOT_FOUND_ENROLLEE = 11,
+ ES_COMMUNICATION_ERROR,
/**
- * Security opertion is not supported because it is built as unsecured mode.
+ * Security opertion is not supported because Mediator is built as unsecured mode.
*/
ES_SEC_OPERATION_IS_NOT_SUPPORTED = 20,
/**
- * A previous request is denied due to its unauthority. It means, Mediator is not unauthroized
- * to Enrollee for some reaons.
+ * Security resource discovery fails due to loss of discovery packet or absence of the resource in a network
*/
- ES_UNAUTHORIZED_REQ = 21,
+ ES_SECURE_RESOURCE_DISCOVERY_FAILURE,
/**
- * Security provisioning fails. The reasons would be: a packet loss for unowned/owned device
- * discovery request or ownership transfer request, or a denial to ownership transfer by Enrollee
- * for some reason.
+ * Ownership transfer fails because DTLS handshake failure happens
*/
- ES_SEC_PROVISION_FAILS = 22,
+ ES_OWNERSHIP_TRANSFER_FAILURE,
+
+ /**
+ * ACL provisioning fails in cloud provisioning.
+ * It could be that UUID format of cloud server is wrong.
+ * Or any response for the provisioning request is not arrived at Mediator
+ */
+ ES_ACL_PROVISIONING_FAILURE,
+
+ /**
+ * Cert. provisioning fails in cloud provisioning.
+ * It could be that you put a wrong cred ID of which the corresponding certificate does not exist in SVR DB.
+ * Or any response for the provisioning request is not arrived at Mediator
+ */
+ ES_CERT_PROVISIONING_FAILURE,
/**
* Provisioning fails for some reason.
*/
- ES_ERROR = 255,
+ ES_ERROR = 255
} ESResult;
/**
# For bring up purposes only, the forked version will live here.
easy_setup_env.AppendUnique(CPPPATH = [env.get('SRC_DIR') + '/resource/csdk/connectivity/lib/libcoap-4.1.1/include'])
easy_setup_env.AppendUnique(CPPPATH = [
- env.get('SRC_DIR') + '/resource/csdk/connectivity/lib/libcoap-4.1.1',
env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include',
env.get('SRC_DIR') + '/resource/csdk/security/include/internal',
env.get('SRC_DIR') + '/resource/csdk/connectivity/api/',
OIC_LOG(DEBUG, ES_CLOUD_RES_TAG,"onCloudProvResponse : onCloudProvResponse is failed ");
- if (eCode == OCStackResult::OC_STACK_UNAUTHORIZED_REQ)
+ if(eCode == OCStackResult::OC_STACK_COMM_ERROR)
{
- OIC_LOG(DEBUG, ES_CLOUD_RES_TAG, "Mediator is unauthorized from Enrollee.");
- result = ESResult::ES_UNAUTHORIZED_REQ;
+ OIC_LOG_V (DEBUG, ES_CLOUD_RES_TAG,
+ "can't receive any response from Enrollee by a timeout threshold.");
+ result = ESResult::ES_COMMUNICATION_ERROR;
}
std::shared_ptr< CloudPropProvisioningStatus > provStatus = std::make_shared<
if (eCode > OCStackResult::OC_STACK_RESOURCE_CHANGED)
{
+ ESResult result = ESResult::ES_ERROR;
+
OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
- "onProvisioningResponse : Provisioning is failed ");
+ "onProvisioningResponse : Provisioning is failed ");
+
+ if(eCode == OCStackResult::OC_STACK_COMM_ERROR)
+ {
+ OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
+ "can't receive any response from Enrollee by a timeout threshold.");
+ result = ESResult::ES_COMMUNICATION_ERROR;
+ }
+
std::shared_ptr< DevicePropProvisioningStatus > provStatus = std::make_shared<
- DevicePropProvisioningStatus >(ESResult::ES_ERROR);
+ DevicePropProvisioningStatus >(result);
m_devicePropProvStatusCb(provStatus);
return;
}
OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
"onGetStatusResponse : onGetStatusResponse is failed ");
- if (eCode == OCStackResult::OC_STACK_UNAUTHORIZED_REQ)
+ if(eCode == OCStackResult::OC_STACK_COMM_ERROR)
{
OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
- "Mediator is unauthorized from Enrollee.");
- result = ESResult::ES_UNAUTHORIZED_REQ;
+ "can't receive any response from Enrollee by a timeout threshold.");
+ result = ESResult::ES_COMMUNICATION_ERROR;
}
EnrolleeStatus enrolleeStatus(rep);
if (eCode > OCStackResult::OC_STACK_RESOURCE_CHANGED)
{
- ESResult result = ESResult::ES_ERROR;
+ ESResult result = ESResult::ES_ERROR;
OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
"onGetConfigurationResponse : onGetConfigurationResponse is failed ");
- if (eCode == OCStackResult::OC_STACK_UNAUTHORIZED_REQ)
+ if(eCode == OCStackResult::OC_STACK_COMM_ERROR)
{
OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
- "Mediator is unauthorized from Enrollee.");
- result = ESResult::ES_UNAUTHORIZED_REQ;
+ "can't receive any response from Enrollee by a timeout threshold.");
+ result = ESResult::ES_COMMUNICATION_ERROR;
}
EnrolleeConf enrolleeConf(rep);
if (hasError)
{
OIC_LOG(ERROR, ENROLEE_SECURITY_TAG,"Error!!! in OwnershipTransfer");
-
- std::string uuid;
- convertUUIDToString(result->at(0).deviceId.id, uuid);
- std::shared_ptr< SecProvisioningStatus > securityProvisioningStatus =
- std::make_shared< SecProvisioningStatus >(uuid, ES_ERROR);
- m_securityProvStatusCb(securityProvisioningStatus);
- return;
+ OTMResult = false;
}
else
{
for (unsigned int i = 0; i < result->size(); i++)
{
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Result is = %d for device",result->at(i).res);
- std::string uuid;
- convertUUIDToString(result->at(0).deviceId.id, uuid);
-
- OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "UUID : %s",uuid.c_str());
- std::shared_ptr< SecProvisioningStatus > securityProvisioningStatus =
- std::make_shared< SecProvisioningStatus >(uuid, ES_OK);
- m_securityProvStatusCb(securityProvisioningStatus);
- return;
}
-
delete result;
+ OTMResult = true;
}
+ m_cond.notify_all();
}
- void EnrolleeSecurity::provisionOwnership()
+ ESResult EnrolleeSecurity::provisionOwnership()
{
+ ESResult res = ESResult::ES_ERROR;
+
OC::DeviceList_t pUnownedDevList, pOwnedDevList;
pOwnedDevList.clear();
if (result != OC_STACK_OK)
{
OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "Owned Discovery failed.");
- //Throw exception
- throw ESPlatformException(result);
+ res = ESResult:: ES_SECURE_RESOURCE_DISCOVERY_FAILURE;
+ return res;
}
else if (pOwnedDevList.size())
{
if (ownedDevice)
{
- std::shared_ptr< SecProvisioningStatus > securityProvisioningStatus =
- std::make_shared< SecProvisioningStatus >(ownedDevice->getDeviceID(), ES_OK);
- m_securityProvStatusCb(securityProvisioningStatus);
- return;
+ if (isOwnedDeviceRegisteredInSVRDB())
+ {
+ res = ESResult::ES_OK;
+ }
+ else
+ {
+ OIC_LOG(ERROR, ENROLEE_SECURITY_TAG,
+ "The found owned device is not in Mediator's PDM.");
+ res = ESResult::ES_ERROR;
+ }
+ return res;
}
}
if (result != OC_STACK_OK)
{
OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "UnOwned Discovery failed.");
- //Throw exception
- throw ESPlatformException(result);
+ res = ESResult:: ES_SECURE_RESOURCE_DISCOVERY_FAILURE;
+ return res;
}
else if (pUnownedDevList.size())
{
&EnrolleeSecurity::removeDeviceWithUuidCB,
this, std::placeholders::_1, std::placeholders::_2);
- OCSecure::removeDeviceWithUuid(DISCOVERY_TIMEOUT,
- m_ocResource->sid(),
- removeDeviceWithUuidCB);
+ result = OCSecure::removeDeviceWithUuid(DISCOVERY_TIMEOUT,
+ m_ocResource->sid(),
+ removeDeviceWithUuidCB);
+ if(result != OC_STACK_OK)
+ {
+ OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "removeDeviceWithUuid failed.");
+ res = ESResult:: ES_OWNERSHIP_TRANSFER_FAILURE;
+ return res;
+ }
+
+ std::unique_lock<std::mutex> lck(m_mtx);
+ m_cond.wait(lck);
+
+ if(!removeDeviceResult)
+ {
+ res = ESResult:: ES_OWNERSHIP_TRANSFER_FAILURE;
+ return res;
+ }
}
- else
+
+ res = performOwnershipTransfer();
+
+ if(res != ESResult::ES_OK)
+ {
+ OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "Ownership-Transfer failed.");
+ res = ESResult:: ES_OWNERSHIP_TRANSFER_FAILURE;
+ return res;
+ }
+
+ std::unique_lock<std::mutex> lck(m_mtx);
+ m_cond.wait(lck);
+
+ if(!OTMResult)
{
- performOwnershipTransfer();
+ res = ESResult::ES_OWNERSHIP_TRANSFER_FAILURE;
}
}
else
{
OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "No matched unowned devices found.");
- throw ESException("No matched unowned devices found.");
+ res = ESResult:: ES_SECURE_RESOURCE_DISCOVERY_FAILURE;
}
}
else
{
OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "No unowned devices found.");
- throw ESException("No unowned devices found.");
+ res = ESResult:: ES_SECURE_RESOURCE_DISCOVERY_FAILURE;
}
+ return res;
}
- void EnrolleeSecurity::performOwnershipTransfer()
+ ESResult EnrolleeSecurity::performOwnershipTransfer()
{
OCStackResult result = OC_STACK_ERROR;
if (result != OC_STACK_OK)
{
OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "doOwnershipTransfer is failed");
- throw ESPlatformException(result);
+ return ESResult::ES_ERROR;
}
+ return ESResult::ES_OK;
}
void EnrolleeSecurity::removeDeviceWithUuidCB(OC::PMResultList_t *result, int hasError)
if (hasError)
{
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "Error in removeDeviceWithUuid operation!");
- throw ESException("removeDeviceWithUuid Error");
+ removeDeviceResult = false;
}
else
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG,
"Result is = %d for device %s", result->at(i).res, uuid.c_str());
}
- performOwnershipTransfer();
+ removeDeviceResult = true;
}
+ m_cond.notify_all();
}
bool EnrolleeSecurity::isOwnedDeviceRegisteredInSVRDB()
};
#if defined(__WITH_DTLS__) && defined(__WITH_TLS__)
- void EnrolleeSecurity::provisionSecurityForCloudServer(
+ ESResult EnrolleeSecurity::provisionSecurityForCloudServer(
std::string cloudUuid, int credId)
{
+ ESResult res = ESResult::ES_ERROR;
+
// Need to discover Owned device in a given network, again
OC::DeviceList_t pOwnedDevList;
std::shared_ptr< OC::OCSecureResource > ownedDevice = NULL;
if (result != OC_STACK_OK)
{
OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "Owned Discovery failed.");
- //Throw exception
- throw ESPlatformException(result);
+ res = ESResult::ES_SECURE_RESOURCE_DISCOVERY_FAILURE;
+ return res;
}
else if (pOwnedDevList.size())
{
if (!ownedDevice)
{
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "Not found matched owned device.");
- throw ESException("Not found matched owned device.");
+ res = ESResult::ES_SECURE_RESOURCE_DISCOVERY_FAILURE;
+ return res;
}
}
else
{
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "Not found owned devices.");
- throw ESException("Not found owned devices.");
+ res = ESResult::ES_SECURE_RESOURCE_DISCOVERY_FAILURE;
+ return res;
}
if(cloudUuid.empty())
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG,
"ACL provisioning is skipped due to empty UUID of cloud server");
}
- else if(performACLProvisioningForCloudServer(ownedDevice, cloudUuid) != ESResult::ES_OK)
+ else
{
- OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "error performACLProvisioningForCloudServer");
- throw ESException("error performACLProvisioningForCloudServer");
+ res = performACLProvisioningForCloudServer(ownedDevice, cloudUuid);
+ if(res != ESResult::ES_OK)
+ {
+ OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "error performACLProvisioningForCloudServer");
+ return res;
+ }
}
if(credId < 1)
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG,
"Cert. provisioning is skipped due to wrong cred ID (<1)");
}
- else if(performCertProvisioningForCloudServer(ownedDevice, credId) != ESResult::ES_OK)
+ else
{
- OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "error performCertProvisioningForCloudServer");
- throw ESException("error performCertProvisioningForCloudServer");
+ res = performCertProvisioningForCloudServer(ownedDevice, credId);
+ if(res != ESResult::ES_OK)
+ {
+ OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "error performCertProvisioningForCloudServer");
+ return res;
+ }
}
+
+ return res;
}
ESResult EnrolleeSecurity::performCertProvisioningForCloudServer(
std::shared_ptr< OC::OCSecureResource > ownedDevice, int credId)
{
- ESResult res = ESResult::ES_ERROR;
+ ESResult res = ESResult::ES_CERT_PROVISIONING_FAILURE;
if(!ownedDevice)
{
}
std::unique_lock<std::mutex> lck(m_mtx);
- m_cond.wait_for(lck, std::chrono::seconds(ES_SEC_DISCOVERY_TIMEOUT));
+ m_cond.wait(lck);
if(certResult)
{
ESResult EnrolleeSecurity::performACLProvisioningForCloudServer(
std::shared_ptr< OC::OCSecureResource > ownedDevice, std::string& cloudUuid)
{
- ESResult res = ESResult::ES_ERROR;
+ ESResult res = ESResult::ES_ACL_PROVISIONING_FAILURE;
if(!ownedDevice)
{
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "Invalid param");
return res;
}
- if(cloudUuid.empty())
- {
- OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "Invalid param");
- return res;
- }
OicUuid_t uuid;
ConvertStrToUuid(cloudUuid.c_str(), &uuid);
}
std::unique_lock<std::mutex> lck(m_mtx);
- m_cond.wait_for(lck, std::chrono::seconds(ES_SEC_DISCOVERY_TIMEOUT));
+ m_cond.wait(lck);
if(aclResult)
{
const SecurityProvStatusCb securityProvStatusCb,
const SecurityPinCb securityPinCb,
const SecProvisioningDbPathCb secProvisioningDbPathCb);
- void provisionOwnership();
+ ESResult provisionOwnership();
std::string getUUID() const;
private:
std::mutex m_mtx;
std::condition_variable m_cond;
- std::atomic<bool> aclResult;
- std::atomic<bool> certResult;
+ std::atomic<bool> OTMResult;
+ std::atomic<bool> removeDeviceResult;
+ std::atomic<bool> aclResult;
+ std::atomic<bool> certResult;
std::shared_ptr< OC::OCSecureResource > m_securedResource;
std::shared_ptr< OC::OCSecureResource > findEnrolleeSecurityResource(
OC::DeviceList_t &list);
- void performOwnershipTransfer();
+ ESResult performOwnershipTransfer();
bool isOwnedDeviceRegisteredInSVRDB();
void removeDeviceWithUuidCB(OC::PMResultList_t *result, int hasError);
void ownershipTransferCb(OC::PMResultList_t *result, int hasError);
#if defined(__WITH_DTLS__) && defined(__WITH_TLS__)
public:
- void provisionSecurityForCloudServer(
+ ESResult provisionSecurityForCloudServer(
std::string cloudUuid, int credId);
private:
ESResult performCertProvisioningForCloudServer(
void RemoteEnrollee::provisionSecurity(const SecurityProvStatusCb callback)
{
#ifdef __WITH_DTLS__
- std::cout << __func__ << std::endl;
+ ESResult res = ESResult::ES_ERROR;
if(!callback)
{
throw ESInvalidParameterException("Callback is empty");
m_enrolleeSecurity->registerCallbackHandler(securityProvStatusCb, m_securityPinCb,
m_secProvisioningDbPathCb);
- try
- {
- m_enrolleeSecurity->provisionOwnership();
- }
- catch (const std::exception& e)
- {
- OIC_LOG_V(ERROR, ES_REMOTE_ENROLLEE_TAG,
- "Exception for performOwnershipTransfer : %s", e.what());
-
- OIC_LOG(DEBUG,ES_REMOTE_ENROLLEE_TAG,"Fail performOwnershipTransfer");
- std::shared_ptr< SecProvisioningStatus > securityProvisioningStatus =
- std::make_shared< SecProvisioningStatus >
- (m_enrolleeSecurity->getUUID(), ES_ERROR);
- m_securityProvStatusCb(securityProvisioningStatus);
- return ;
- }
+ res = m_enrolleeSecurity->provisionOwnership();
+
+ std::shared_ptr< SecProvisioningStatus > securityProvisioningStatus =
+ std::make_shared< SecProvisioningStatus >(m_enrolleeSecurity->getUUID(), res);
+ m_securityProvStatusCb(securityProvisioningStatus);
#else
OIC_LOG(DEBUG,ES_REMOTE_ENROLLEE_TAG,"Mediator is unsecured.");
if(!callback)
if(m_ocResource != nullptr)
{
m_cloudResource = std::make_shared<CloudResource>(m_ocResource);
-
- std::shared_ptr< CloudPropProvisioningStatus > provStatus = std::make_shared<
- CloudPropProvisioningStatus >(ESResult::ES_FOUND_ENROLLEE);
-
- m_cloudPropProvStatusCb(provStatus);
}
else
{
"Exception caught in provisionCloudProperties = %s", e.what());
std::shared_ptr< CloudPropProvisioningStatus > provStatus = std::make_shared<
- CloudPropProvisioningStatus >(ESResult::ES_NOT_FOUND_ENROLLEE);
+ CloudPropProvisioningStatus >(ESResult::ES_ENROLLEE_DISCOVERY_FAILURE);
m_cloudPropProvStatusCb(provStatus);
return;
}
#if defined(__WITH_DTLS__) && defined(__WITH_TLS__)
- try
+ if(!(cloudProp.getCloudID().empty() && cloudProp.getCredID() <= 0))
{
- if(!(cloudProp.getCloudID().empty() && cloudProp.getCredID() <= 0))
- {
- m_enrolleeSecurity = std::make_shared <EnrolleeSecurity> (m_ocResource, "");
+ ESResult res = ESResult::ES_ERROR;
+ m_enrolleeSecurity = std::make_shared <EnrolleeSecurity> (m_ocResource, "");
- m_enrolleeSecurity->provisionSecurityForCloudServer(cloudProp.getCloudID(),
- cloudProp.getCredID());
- }
- else
+ res = m_enrolleeSecurity->provisionSecurityForCloudServer(cloudProp.getCloudID(),
+ cloudProp.getCredID());
+
+ if(res != ESResult::ES_OK)
{
- OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "ACL and Cert. provisioning are skipped.");
+ m_cloudResource = nullptr;
+ std::shared_ptr< CloudPropProvisioningStatus > provStatus = std::make_shared<
+ CloudPropProvisioningStatus >(res);
+ m_cloudPropProvStatusCb(provStatus);
+ return;
}
}
-
- catch (const std::exception& e)
+ else
{
- OIC_LOG_V(ERROR, ES_REMOTE_ENROLLEE_TAG,
- "Exception caught in provisionCloudProperties = %s", e.what());
-
- m_cloudResource = nullptr;
-
- std::shared_ptr< CloudPropProvisioningStatus > provStatus = std::make_shared<
- CloudPropProvisioningStatus >(ESResult::ES_ERROR);
- m_cloudPropProvStatusCb(provStatus);
- return;
+ OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "ACL and Cert. provisioning are skipped.");
}
#endif //defined(__WITH_DTLS__) && defined(__WITH_TLS__)
mocks.OnCallFunc(cloudPropProvStatusCb).Do(
[& cntForReceivedCallbackWithSuccess](std::shared_ptr< CloudPropProvisioningStatus > status)
{
- // Will called twice
- if(status->getESResult() == ES_OK || status->getESResult() == ES_FOUND_ENROLLEE)
+ if(status->getESResult() == ES_OK)
{
cntForReceivedCallbackWithSuccess++;
}
std::unique_lock< std::mutex > lock{ mutexForCondition };
responseCon.wait_for(lock, g_waitForResponse);
- EXPECT_EQ(cntForReceivedCallbackWithSuccess, 2);
+ EXPECT_EQ(cntForReceivedCallbackWithSuccess, 1);
ESTerminateEnrollee();
}
case ES_OK:
cout << "Cloud Provisioning is success." << endl;
break;
- case ES_FOUND_ENROLLEE:
- cout << "Enrollee is found in a given network." << endl;
- break;
- case ES_NOT_FOUND_ENROLLEE:
+ case ES_SECURE_RESOURCE_DISCOVERY_FAILURE:
cout << "Enrollee is not found in a given network." << endl;
break;
+ case ES_ACL_PROVISIONING_FAILURE:
+ cout << "ACL provisioning is failed." << endl;
+ break;
+ case ES_CERT_PROVISIONING_FAILURE:
+ cout << "CERT provisioning is failed." << endl;
+ break;
default:
cout << "Cloud Provisioning is failed." << endl;
break;
PlatformConfig config
{
- OC::ServiceType::InProc, ModeType::Both, "0.0.0.0", 0, OC::QualityOfService::LowQos, &ps
+ OC::ServiceType::InProc, ModeType::Both, "0.0.0.0", 0, OC::QualityOfService::HighQos, &ps
};
OCPlatform::Configure(config);