Add supported security list to AP info in test app 31/323131/1 accepted/tizen_unified accepted/tizen_unified_x tizen accepted/tizen/unified/20250428.091813 accepted/tizen/unified/x/20250429.081911
authorJaehyun Kim <jeik01.kim@samsung.com>
Wed, 23 Apr 2025 07:31:02 +0000 (16:31 +0900)
committerJaehyun Kim <jeik01.kim@samsung.com>
Wed, 23 Apr 2025 07:31:02 +0000 (16:31 +0900)
Change-Id: Ie6bf8fd62c1147a20023d044c124a5639fed4ceb
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
tools/manager-test/wman_test_ap.c

index 69b5c94f8ea669c2f6c917c96253486c1ebeadbc..038c8e26221746f11c25e7917287f1d88159fc95 100644 (file)
@@ -1011,6 +1011,42 @@ static inline int __test_found_print_ap_network_info_cb(wifi_manager_ap_h ap)
        return 0;
 }
 
+typedef struct {
+       int sec_type;
+       char *sec_type_str;
+} security_list_str_s;
+
+static security_list_str_s security_list_str_table[] = {
+               { WIFI_MANAGER_SECURITY_TYPE_NONE, "None" },
+               { WIFI_MANAGER_SECURITY_TYPE_WEP, "WEP" },
+               { WIFI_MANAGER_SECURITY_TYPE_WPA_PSK, "PSK" },
+               { WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK, "RSN" },
+               { WIFI_MANAGER_SECURITY_TYPE_EAP, "EAP" },
+               { WIFI_MANAGER_SECURITY_TYPE_WPA_FT_PSK, "FT_PSK" },
+               { WIFI_MANAGER_SECURITY_TYPE_SAE, "SAE" },
+               { WIFI_MANAGER_SECURITY_TYPE_OWE, "OWE" },
+               { WIFI_MANAGER_SECURITY_TYPE_DPP, "DPP" },
+               { -1, "" },
+};
+
+static inline void __test_found_print_ap_security_list(wifi_manager_ap_h ap)
+{
+       bool supported = false;
+       int count = 0;
+
+       printf("Supported security types: ");
+
+       while (security_list_str_table[count].sec_type >= 0) {
+               if (WIFI_MANAGER_ERROR_NONE == wifi_manager_ap_is_security_type_supported(
+                               ap, security_list_str_table[count].sec_type, &supported) &&
+                               supported)
+                       printf("%s ", security_list_str_table[count].sec_type_str);
+               count++;
+       }
+
+       printf("\n");
+}
+
 static inline int __test_found_print_ap_security_info_cb(wifi_manager_ap_h ap)
 {
        bool bool_value;
@@ -1023,6 +1059,8 @@ static inline int __test_found_print_ap_security_info_cb(wifi_manager_ap_h ap)
        else
                printf("Fail to get Security type\n");
 
+       __test_found_print_ap_security_list(ap);
+
        if (wifi_manager_ap_get_encryption_type(ap, &enc_type) == WIFI_MANAGER_ERROR_NONE)
                printf("Encryption type : %d\n", enc_type);
        else