#define G_SUPPLICANT_KEYMGMT_WPA_EAP_256 (1 << 8)
#define G_SUPPLICANT_KEYMGMT_WPS (1 << 9)
+#define G_SUPPLICANT_PROTO_WPA (1 << 0)
+#define G_SUPPLICANT_PROTO_RSN (1 << 1)
+
#define G_SUPPLICANT_GROUP_WEP40 (1 << 0)
#define G_SUPPLICANT_GROUP_WEP104 (1 << 1)
#define G_SUPPLICANT_GROUP_TKIP (1 << 2)
unsigned int scan_ssid;
GSupplicantMode mode;
GSupplicantSecurity security;
+ unsigned int protocol;
unsigned int pairwise_cipher;
unsigned int group_cipher;
unsigned int freq;
g_free(group);
}
+static void add_network_security_proto(DBusMessageIter *dict,
+ GSupplicantSSID *ssid)
+{
+ unsigned int protocol, i;
+ char *proto;
+ char *protos[3];
+
+ protocol = ssid->protocol;
+
+ if (protocol == 0)
+ return;
+
+ i = 0;
+
+ if (protocol & G_SUPPLICANT_PROTO_RSN)
+ protos[i++] = "RSN";
+
+ if (protocol & G_SUPPLICANT_PROTO_WPA)
+ protos[i++] = "WPA";
+
+ protos[i] = NULL;
+
+ proto = g_strjoinv(" ", protos);
+
+ SUPPLICANT_DBG("proto %s", proto);
+
+ supplicant_dbus_dict_append_basic(dict, "proto",
+ DBUS_TYPE_STRING,
+ &proto);
+
+ g_free(proto);
+}
+
static void add_network_security(DBusMessageIter *dict, GSupplicantSSID *ssid)
{
char *key_mgmt;
case G_SUPPLICANT_SECURITY_PSK:
key_mgmt = "WPA-PSK";
add_network_security_psk(dict, ssid);
+ add_network_security_proto(dict, ssid);
break;
case G_SUPPLICANT_SECURITY_IEEE8021X:
key_mgmt = "WPA-EAP";
add_network_security_eap(dict, ssid);
+ add_network_security_proto(dict, ssid);
break;
}