Remove WiFi and Ethernet connectivity type options in RI.
[platform/upstream/iotivity.git] / resource / examples / devicediscoveryclient.cpp
index e3dba58..5c7511c 100644 (file)
@@ -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 {