Commit d147b915 authored by Doug Hudson's avatar Doug Hudson Committed by Erich Keane

Remove WiFi and Ethernet connectivity type options in RI.

- Replace with IPv4 and IPv6 options.
- Note that IPv6 is not currently supported
- Update C/C++ sample apps
- Update C/C++ unit tests
- Update several services files to support mod.

Change-Id: I086580d76665355d14cfa240347252cef969fa64
Signed-off-by: default avatarDoug Hudson <douglas.hudson@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/995Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: default avatarSakthivel Samidurai <sakthivel.samidurai@intel.com>
Reviewed-by: default avatarJoseph Morrow <joseph.l.morrow@intel.com>
Reviewed-by: default avatarMandeep Shetty <mandeep.shetty@intel.com>
Reviewed-by: default avatarErich Keane <erich.keane@intel.com>
parent 581024e2
......@@ -39,7 +39,7 @@ void MiddleClient::findResources()
{
m_resourceMap.clear();
OC::OCPlatform::findResource("", OC_WELL_KNOWN_QUERY, OC_WIFI, m_findCB);
OC::OCPlatform::findResource("", OC_WELL_KNOWN_QUERY, OC_ALL, m_findCB);
}
void MiddleClient::foundOCResource(shared_ptr<OCResource> resource)
......
......@@ -201,8 +201,8 @@ typedef enum
*/
typedef enum
{
OC_ETHERNET = 0,
OC_WIFI,
OC_IPV4 = 0,
OC_IPV6,
OC_EDR,
OC_LE,
OC_ALL // Multicast message: send over all the interfaces.
......
......@@ -35,9 +35,9 @@ static const char * UNICAST_DISCOVERY_QUERY = "coap://%s:6298/oc/core";
static const char * UNICAST_DEVICE_DISCOVERY_QUERY = "coap://%s:6298/oc/core/d";
static const char * MULTICAST_DEVICE_DISCOVERY_QUERY = "/oc/core/d";
static const char * MULTICAST_RESOURCE_DISCOVERY_QUERY = "/oc/core";
//The following variable determines the interface (wifi, ethernet etc.)
//to be used for sending unicast messages. Default set to WIFI.
static OCConnectivityType OC_CONNTYPE = OC_WIFI;
//The following variable determines the interface protocol (IPv4, IPv6, etc)
//to be used for sending unicast messages. Default set to IPv4.
static OCConnectivityType OC_CONNTYPE = OC_IPV4;
static std::string putPayload = "{\"oc\":[{\"rep\":{\"power\":15,\"state\":true}}]}";
static std::string coapServerIP = "255.255.255.255";
static std::string coapServerPort = "5683";
......@@ -74,7 +74,7 @@ static void PrintUsage()
{
OC_LOG(INFO, TAG, "Usage : occlient -u <0|1> -t <1..17> -c <0|1>");
OC_LOG(INFO, TAG, "-u <0|1> : Perform multicast/unicast discovery of resources");
OC_LOG(INFO, TAG, "-c <0|1> : Send unicast messages over Ethernet or WIFI");
OC_LOG(INFO, TAG, "-c <0|1> : IPv4/IPv6 (IPv6 not currently supported)");
OC_LOG(INFO, TAG, "-t 1 : Discover Resources");
OC_LOG(INFO, TAG, "-t 2 : Discover Resources and Initiate Nonconfirmable Get Request");
OC_LOG(INFO, TAG, "-t 3 : Discover Resources and Initiate Nonconfirmable Get Request"
......@@ -741,7 +741,10 @@ int main(int argc, char* argv[])
TEST_CASE = atoi(optarg);
break;
case 'c':
OC_CONNTYPE = OCConnectivityType(atoi(optarg));
// TODO: re-enable IPv4/IPv6 command line selection when IPv6 is supported
// OC_CONNTYPE = OCConnectivityType(atoi(optarg));
OC_CONNTYPE = OC_IPV4;
OC_LOG(INFO, TAG, "IPv6 not currently supported, using IPv4.");
break;
default:
PrintUsage();
......@@ -856,11 +859,11 @@ std::string getConnectivityType (OCConnectivityType connType)
{
switch (connType)
{
case OC_ETHERNET:
return "Ethernet";
case OC_IPV4:
return "IPv4";
case OC_WIFI:
return "WiFi";
case OC_IPV6:
return "IPv6";
case OC_LE:
return "BLE";
......
......@@ -41,9 +41,9 @@ static int TEST_CASE = 0;
static const char UNICAST_DISCOVERY_QUERY[] = "coap://%s:6298/oc/core";
static std::string putPayload = "{\"state\":\"off\",\"power\":10}";
//The following variable determines the interface (wifi, ethernet etc.)
//to be used for sending unicast messages. Default set to WIFI.
static OCConnectivityType OC_CONNTYPE = OC_WIFI;
//The following variable determines the interface protocol (IPv4, IPv6, etc)
//to be used for sending unicast messages. Default set to IPv4.
static OCConnectivityType OC_CONNTYPE = OC_IPV4;
static const char * MULTICAST_RESOURCE_DISCOVERY_QUERY = "/oc/core";
int gQuitFlag = 0;
......@@ -69,8 +69,8 @@ static void PrintUsage()
" Initiate Nonconfirmable Get/Put/Post Requests");
OC_LOG(INFO, TAG, "-t 3 : Discover Resources and Initiate "
"Confirmable Get/Put/Post Requests");
OC_LOG(INFO, TAG, "-c <0|1> : Send unicast messages over Ethernet or WIFI.");
OC_LOG(INFO, TAG, "Default connectivityType WIFI");
OC_LOG(INFO, TAG, "-c <0|1> : IPv4/IPv6 (IPv6 not currently supported)");
OC_LOG(INFO, TAG, "Default connectivityType IPv4");
}
/*
......@@ -645,11 +645,14 @@ void printResourceList()
printf("port = %s\n", iter->port);
switch (iter->connType)
{
case OC_ETHERNET:
printf("connType = %s\n","Ethernet");
case OC_IPV4:
printf("connType = %s\n","IPv4");
break;
case OC_WIFI:
printf("connType = %s\n","WiFi");
case OC_IPV6:
// TODO: Allow IPv6 when support is added
printf("IPv6 not currently supported, default to IPv4\n");
//printf("connType = %s\n","IPv6");
printf("connType = %s\n","IPv4");
break;
case OC_LE:
printf("connType = %s\n","BLE");
......@@ -698,7 +701,10 @@ int main(int argc, char* argv[])
TEST_CASE = atoi(optarg);
break;
case 'c':
OC_CONNTYPE = OCConnectivityType(atoi(optarg));
// TODO: re-enable IPv4/IPv6 command line selection when IPv6 is supported
// OC_CONNTYPE = OCConnectivityType(atoi(optarg));
OC_CONNTYPE = OC_IPV4;
OC_LOG(INFO, TAG, "Using default IPv4, IPv6 not currently supported.");
break;
default:
PrintUsage();
......
......@@ -76,9 +76,9 @@ testToTextMap queryInterface[] = {
static std::string putPayload = "{\"state\":\"off\",\"power\":\"0\"}";
//The following variable determines the interface (wifi, ethernet etc.)
//to be used for sending unicast messages. Default set to WIFI.
static OCConnectivityType OC_CONNTYPE = OC_WIFI;
//The following variable determines the interface protocol (IPv4, IPv6, etc)
//to be used for sending unicast messages. Default set to IPv4.
static OCConnectivityType OC_CONNTYPE = OC_IPV4;
static const char * MULTICAST_RESOURCE_DISCOVERY_QUERY = "/oc/core";
// The handle for the observe registration
......@@ -107,24 +107,24 @@ int InitDiscovery();
void PrintUsage()
{
OC_LOG(INFO, TAG, "Usage : occlientcoll -t <Test Case> -c <CA connectivity Type>");
OC_LOG(INFO, TAG, "-c <0|1> : Send messages over Ethernet or WIFI");
OC_LOG(INFO, TAG, "Test Case 1 : Discover Resources && Initiate GET Request on an"\
OC_LOG(INFO, TAG, "-c <0|1> : IPv4/IPv6 (IPv6 not currently supported)");
OC_LOG(INFO, TAG, "Test Case 1 : Discover Resources && Initiate GET Request on an "\
"available resource using default interface.");
OC_LOG(INFO, TAG, "Test Case 2 : Discover Resources && Initiate GET Request on an"\
OC_LOG(INFO, TAG, "Test Case 2 : Discover Resources && Initiate GET Request on an "\
"available resource using batch interface.");
OC_LOG(INFO, TAG, "Test Case 3 : Discover Resources && Initiate GET Request on an"\
OC_LOG(INFO, TAG, "Test Case 3 : Discover Resources && Initiate GET Request on an "\
"available resource using link list interface.");
OC_LOG(INFO, TAG, "Test Case 4 : Discover Resources && Initiate GET & PUT Request on an"\
OC_LOG(INFO, TAG, "Test Case 4 : Discover Resources && Initiate GET & PUT Request on an "\
"available resource using default interface.");
OC_LOG(INFO, TAG, "Test Case 5 : Discover Resources && Initiate GET & PUT Request on an"\
OC_LOG(INFO, TAG, "Test Case 5 : Discover Resources && Initiate GET & PUT Request on an "\
"available resource using batch interface.");
OC_LOG(INFO, TAG, "Test Case 6 : Discover Resources && Initiate GET & PUT Request on an"\
OC_LOG(INFO, TAG, "Test Case 6 : Discover Resources && Initiate GET & PUT Request on an "\
"available resource using link list interface.");
OC_LOG(INFO, TAG, "Test Case 7 : Discover Resources && Initiate GET Request on an"\
OC_LOG(INFO, TAG, "Test Case 7 : Discover Resources && Initiate GET Request on an "\
"unavailable resource using default interface.");
OC_LOG(INFO, TAG, "Test Case 8 : Discover Resources && Initiate GET Request on an"\
OC_LOG(INFO, TAG, "Test Case 8 : Discover Resources && Initiate GET Request on an "\
"unavailable resource using batch interface.");
OC_LOG(INFO, TAG, "Test Case 9 : Discover Resources && Initiate GET Request on an"\
OC_LOG(INFO, TAG, "Test Case 9 : Discover Resources && Initiate GET Request on an "\
"unavailable resource using link list interface.");
}
......@@ -358,7 +358,9 @@ int main(int argc, char* argv[])
TEST = atoi(optarg);
break;
case 'c':
OC_CONNTYPE = OCConnectivityType(atoi(optarg));
// TODO: re-enable IPv4/IPv6 command line selection when IPv6 is supported
// OC_CONNTYPE = OCConnectivityType(atoi(optarg));
OC_CONNTYPE = OC_IPV4;
break;
default:
PrintUsage();
......
......@@ -37,9 +37,9 @@ static std::string coapServerIP = "255.255.255.255";
static std::string coapServerPort = "5683";
static std::string coapServerResource = "/a/led";
//The following variable determines the interface (wifi, ethernet etc.)
//to be used for sending unicast messages. Default set to WIFI.
static OCConnectivityType OC_CONNTYPE = OC_WIFI;
//The following variable determines the interface protocol (IPv4, IPv6, etc)
//to be used for sending unicast messages. Default set to IPv4.
static OCConnectivityType OC_CONNTYPE = OC_IPV4;
static const char * MULTICAST_RESOURCE_DISCOVERY_QUERY = "/oc/core";
static int IPV4_ADDR_SIZE = 16;
void StripNewLineChar(char* str);
......@@ -58,7 +58,7 @@ void handleSigInt(int signum)
static void PrintUsage()
{
OC_LOG(INFO, TAG, "Usage : occlient -c <0|1> -u <0|1> -t <1|2|3>");
OC_LOG(INFO, TAG, "-c <0|1> : Send unicast messages over Ethernet or WIFI");
OC_LOG(INFO, TAG, "-c <0|1> : IPv4/IPv6 (IPv6 not currently supported)");
OC_LOG(INFO, TAG, "-u <0|1> : Perform multicast/unicast discovery of resources");
OC_LOG(INFO, TAG, "-t 1 : Discover Resources");
OC_LOG(INFO, TAG, "-t 2 : Discover Resources and Initiate Nonconfirmable Get Request");
......@@ -241,7 +241,9 @@ int main(int argc, char* argv[])
TEST_CASE = atoi(optarg);
break;
case 'c':
OC_CONNTYPE = OCConnectivityType(atoi(optarg));
// TODO: re-enable IPv4/IPv6 command line selection when IPv6 is supported
// OC_CONNTYPE = OCConnectivityType(atoi(optarg));
OC_CONNTYPE = OC_IPV4;
break;
default:
PrintUsage();
......
......@@ -258,9 +258,7 @@ int InitDiscovery()
OC_LOG(ERROR, TAG, "!! Bad input for IPV4 address. !!");
return OC_STACK_INVALID_PARAM;
}
printf("Select Connectivity type on which discovery request needs to be send : ");
printf("0:ETH, 1:WIFI\n");
discoveryReqConnType = ((getchar() - '0') == 0) ? OC_ETHERNET : OC_WIFI;
discoveryReqConnType = OC_IPV4;
}
else
{
......
......@@ -654,11 +654,11 @@ OCStackResult OCToCATransportType(OCConnectivityType ocConType, CATransportType_
switch(ocConType)
{
case OC_ETHERNET:
case OC_IPV4:
*caConType = CA_IPV4;
break;
case OC_WIFI:
*caConType = CA_IPV4;
case OC_IPV6:
*caConType = CA_IPV6;
break;
case OC_EDR:
*caConType = CA_EDR;
......@@ -667,7 +667,7 @@ OCStackResult OCToCATransportType(OCConnectivityType ocConType, CATransportType_
*caConType = CA_LE;
break;
case OC_ALL:
// Currently OC_ALL represents WIFI and ETHERNET
// Currently OC_ALL represents IPv4
// Add other connectivity types as they are enabled in future
*caConType = (CATransportType_t) (CA_IPV4);
break;
......@@ -685,7 +685,10 @@ OCStackResult CAToOCConnectivityType(CATransportType_t caConType, OCConnectivity
switch(caConType)
{
case CA_IPV4:
*ocConType = OC_ETHERNET;
*ocConType = OC_IPV4;
break;
case CA_IPV6:
*ocConType = OC_IPV6;
break;
case CA_EDR:
*ocConType = OC_EDR;
......
......@@ -905,16 +905,12 @@ OCStackResult SendAction(OCDoHandle *handle, const char *targetUri,
cbdata.cd = NULL;
cbdata.context = (void*)DEFAULT_CONTEXT_VALUE;
// TODO: Selecting OC_WIFI for android, tizen and OC_ETHERNET for linux platform.
// TODO: Selecting OC_IPV4.
// It is temporary change as OC_ALL is not working currently. Remove this code and use OC_ALL
// once it is functioning.
#if defined(__ANDROID__) || defined(__TIZEN__)
return OCDoResource(handle, OC_REST_PUT, targetUri,
NULL, (char *) action, OC_WIFI, OC_NA_QOS, &cbdata, NULL, 0);
#else
return OCDoResource(handle, OC_REST_PUT, targetUri,
NULL, (char *) action, OC_ETHERNET, OC_NA_QOS, &cbdata, NULL, 0);
#endif
NULL, (char *) action, OC_IPV4, OC_NA_QOS, &cbdata, NULL, 0);
}
OCStackResult DoAction(OCResource* resource, OCActionSet* actionset,
......
......@@ -200,7 +200,7 @@ TEST(StackDiscovery, DISABLED_DoResourceDeviceDiscovery)
szQueryUri,
0,
0,
OC_WIFI,
OC_IPV4,
OC_LOW_QOS,
&cbData,
NULL,
......@@ -236,7 +236,7 @@ TEST(StackResource, DISABLED_UpdateResourceNullURI)
szQueryUri,
0,
0,
OC_WIFI,
OC_IPV4,
OC_LOW_QOS,
&cbData,
NULL,
......
......@@ -116,7 +116,7 @@ int main(int argc, char* argv[]) {
std::ostringstream requestURI;
std::string deviceDiscoveryURI = "/oc/core/d";
OCConnectivityType connectivityType = OC_WIFI;
OCConnectivityType connectivityType = OC_IPV4;
if(argc == 2)
{
......@@ -129,34 +129,37 @@ int main(int argc, char* argv[]) {
{
if(optionSelected == 0)
{
connectivityType = OC_ETHERNET;
connectivityType = OC_IPV4;
}
else if(optionSelected == 1)
{
connectivityType = OC_WIFI;
// TODO: re-enable IPv4/IPv6 command line selection when IPv6 is supported
//connectivityType = OC_IPV6;
connectivityType = OC_IPV4;
std::cout << "IPv6 not currently supported. Using default IPv4" << std::endl;
}
else
{
std::cout << "Invalid connectivity type selected. Using default WIFI"
std::cout << "Invalid connectivity type selected. Using default IPv4"
<< std::endl;
}
}
else
{
std::cout << "Invalid connectivity type selected. Using default WIFI" << std::endl;
std::cout << "Invalid connectivity type selected. Using default IPv4" << std::endl;
}
}
catch(std::exception&)
{
std::cout << "Invalid input argument. Using WIFI as connectivity type" << std::endl;
std::cout << "Invalid input argument. Using IPv4 as connectivity type" << std::endl;
}
}
else
{
std::cout << "Usage devicediscoveryclient <connectivityType(0|1)>" << std::endl;
std::cout<<"connectivityType: Default WIFI" << std::endl;
std::cout << "connectivityType 0: ETHERNET" << std::endl;
std::cout << "connectivityType 1: WIFI" << std::endl;
std::cout << "connectivityType: Default IPv4" << std::endl;
std::cout << "connectivityType 0: IPv4" << std::endl;
std::cout << "connectivityType 1: IPv6 (not currently supported)" << std::endl;
}
// Create PlatformConfig object
PlatformConfig cfg {
......
......@@ -267,7 +267,7 @@ class ClientFridge
int main(int argc, char* argv[])
{
OCConnectivityType connectivityType = OC_WIFI;
OCConnectivityType connectivityType = OC_IPV4;
if(argc == 2)
{
try
......@@ -279,34 +279,37 @@ int main(int argc, char* argv[])
{
if(optionSelected == 0)
{
connectivityType = OC_ETHERNET;
connectivityType = OC_IPV4;
}
else if(optionSelected == 1)
{
connectivityType = OC_WIFI;
// TODO: re-enable IPv4/IPv6 command line selection when IPv6 is supported
//connectivityType = OC_IPV6;
connectivityType = OC_IPV4;
std::cout << "IPv6 not currently supported. Using default IPv4" << std::endl;
}
else
{
std::cout << "Invalid connectivity type selected. Using default WIFI"
std::cout << "Invalid connectivity type selected. Using default IPv4"
<< std::endl;
}
}
else
{
std::cout << "Invalid connectivity type selected. Using default WIFI" << std::endl;
std::cout << "Invalid connectivity type selected. Using default IPv4" << std::endl;
}
}
catch(std::exception&)
{
std::cout << "Invalid input argument. Using WIFI as connectivity type" << std::endl;
std::cout << "Invalid input argument. Using IPv4 as connectivity type" << std::endl;
}
}
else
{
std::cout<<"Usage: fridgeclient <ConnectivityType(0|1)>\n";
std::cout<<"ConnectivityType: Default WIFI\n";
std::cout<<"ConnectivityType 0: ETHERNET\n";
std::cout<<"ConnectivityType 1: WIFI\n";
std::cout << "Usage: fridgeclient <ConnectivityType(0|1)>\n";
std::cout << "connectivityType: Default IPv4" << std::endl;
std::cout << "connectivityType 0: IPv4" << std::endl;
std::cout << "connectivityType 1: IPv6 (not currently supported)" << std::endl;
}
PlatformConfig cfg
......
......@@ -288,49 +288,6 @@ int main(int argc, char* argv[]) {
std::ostringstream requestURI;
OCConnectivityType connectivityType = OC_WIFI;
if(argc == 2)
{
try
{
std::size_t inputValLen;
int optionSelected = std::stoi(argv[1], &inputValLen);
if(inputValLen == strlen(argv[1]))
{
if(optionSelected == 0)
{
connectivityType = OC_ETHERNET;
}
else if(optionSelected == 1)
{
connectivityType = OC_WIFI;
}
else
{
std::cout << "Invalid connectivity type selected. Using default WIFI"
<< std::endl;
}
}
else
{
std::cout << "Invalid connectivity type selected. Using default WIFI" << std::endl;
}
}
catch(std::exception&)
{
std::cout << "Invalid input argument. Using WIFI as connectivity type" << std::endl;
}
}
else
{
std::cout<<"Usage: garageclient <ConnectivityType(0|1)>\n";
std::cout<<"ConnectivityType: Default WIFI\n";
std::cout<<"ConnectivityType 0: ETHERNET\n";
std::cout<<"ConnectivityType 1: WIFI\n";
}
// Create PlatformConfig object
PlatformConfig cfg {
OC::ServiceType::InProc,
......
......@@ -173,49 +173,6 @@ int main(int argc, char* argv[])
ostringstream requestURI;
requestURI << OC_MULTICAST_DISCOVERY_URI << "?rt=a.collection";
OCConnectivityType connectivityType = OC_WIFI;
if(argc == 2)
{
try
{
std::size_t inputValLen;
int optionSelected = stoi(argv[1], &inputValLen);
if(inputValLen == strlen(argv[1]))
{
if(optionSelected == 0)
{
connectivityType = OC_ETHERNET;
}
else if(optionSelected == 1)
{
connectivityType = OC_WIFI;
}
else
{
std::cout << "Invalid connectivity type selected. Using default WIFI"
<< std::endl;
}
}
else
{
std::cout << "Invalid connectivity type selected. Using default WIFI" << std::endl;
}
}
catch(exception&)
{
std::cout << "Invalid input argument. Using WIFI as connectivity type" << std::endl;
}
}
else
{
std::cout<<"Usage: groupclient <ConnectivityType(0|1)>\n";
std::cout<<"ConnectivityType: Default WIFI\n";
std::cout<<"ConnectivityType 0: ETHERNET\n";
std::cout<<"ConnectivityType 1: WIFI\n";
}
PlatformConfig config
{ OC::ServiceType::InProc, ModeType::Client, "0.0.0.0", 0, OC::QualityOfService::LowQos };
......
......@@ -80,49 +80,6 @@ int main(int argc, char* argv[])
{
ostringstream requestURI;
OCConnectivityType connectivityType = OC_WIFI;
if(argc == 2)
{
try
{
std::size_t inputValLen;
int optionSelected = stoi(argv[1], &inputValLen);
if(inputValLen == strlen(argv[1]))
{
if(optionSelected == 0)
{
connectivityType = OC_ETHERNET;
}
else if(optionSelected == 1)
{
connectivityType = OC_WIFI;
}
else
{
std::cout << "Invalid connectivity type selected. Using default WIFI"
<< std::endl;
}
}
else
{
std::cout << "Invalid connectivity type selected. Using default WIFI" << std::endl;
}
}
catch(exception&)
{
std::cout << "Invalid input argument. Using WIFI as connectivity type" << std::endl;
}
}
else
{
std::cout<<"Usage: groupclient <ConnectivityType(0|1)>\n";
std::cout<<"ConnectivityType: Default WIFI\n";
std::cout<<"ConnectivityType 0: ETHERNET\n";
std::cout<<"ConnectivityType 1: WIFI\n";
}
PlatformConfig config
{ OC::ServiceType::InProc, ModeType::Both, "0.0.0.0", 0, OC::QualityOfService::LowQos };
......
......@@ -35,7 +35,7 @@ std::shared_ptr<OCResource> curResource;
std::mutex resourceLock;
static int TEST_CASE = 0;
static OCConnectivityType connectivityType = OC_WIFI;
static OCConnectivityType connectivityType = OC_IPV4;
/**
* List of methods that can be inititated from the client
......@@ -63,9 +63,9 @@ void printUsage()
<< std::endl;
std::cout << "-t 6 : Discover Resources and Initiate Multicast Presence with two Filters"
<< std::endl;
std::cout<<"ConnectivityType: Default WIFI" << std::endl;
std::cout << "-c 0 : Send message over ETHERNET interface" << std::endl;
std::cout << "-c 1 : Send message over WIFI interface" << std::endl;
std::cout<<"ConnectivityType: Default IPv4" << std::endl;
std::cout << "-c 0 : Send message with IPv4" << std::endl;
std::cout << "-c 1 : Send message with IPv6" << std::endl;
}
// Callback to presence
......@@ -221,21 +221,26 @@ int main(int argc, char* argv[]) {
{
if(optionSelected == 0)
{
connectivityType = OC_ETHERNET;
connectivityType = OC_IPV4;
}
else if(optionSelected == 1)
{
connectivityType = OC_WIFI;
// TODO: re-enable IPv4/IPv6 command line selection when IPv6
// is supported
//connectivityType = OC_IPV6;
connectivityType = OC_IPV4;
std::cout << "IPv6 not currently supported. Using default IPv4"
<< std::endl;
}
else
{
std::cout << "Invalid connectivity type selected. Using default WIFI"
std::cout << "Invalid connectivity type selected. Using default IPv4"
<< std::endl;
}
}