]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
android: Handle ITA PA-TNC attributes
authorTobias Brunner <tobias@strongswan.org>
Fri, 26 Apr 2013 16:17:07 +0000 (18:17 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 8 Jul 2013 16:49:27 +0000 (18:49 +0200)
src/frontends/android/jni/libandroidbridge/byod/imc_android.c

index 9d30ad9b2473512eee82893fef71f92b32be1ed3..4079e4c2808411b4dc7dde91cebf8a13a05246aa 100644 (file)
@@ -30,6 +30,8 @@
 #include <ietf/ietf_attr_installed_packages.h>
 #include <ietf/ietf_attr_product_info.h>
 #include <ietf/ietf_attr_string_version.h>
+#include <ita/ita_attr.h>
+#include <ita/ita_attr_get_settings.h>
 #include <os_info/os_info.h>
 
 #include <tncif_pa_subtypes.h>
@@ -282,6 +284,22 @@ static void handle_ietf_attribute(pen_type_t attr_type, pa_tnc_attr_t *attr,
        }
 }
 
+/**
+ * Handle an ITA attribute
+ */
+static void handle_ita_attribute(pen_type_t attr_type, pa_tnc_attr_t *attr,
+                                                                imc_msg_t *out_msg)
+{
+       if (attr_type.type == ITA_ATTR_GET_SETTINGS)
+       {
+               ita_attr_get_settings_t *attr_cast;
+
+               attr_cast = (ita_attr_get_settings_t*)attr;
+               add_measurement((pen_type_t){ PEN_ITA, ITA_ATTR_SETTINGS },
+                                               out_msg, attr_cast->create_enumerator(attr_cast));
+       }
+}
+
 /**
  * see section 3.8.3 of TCG TNC IF-IMC Specification 1.3
  */