transfer IMA file measurements via PA-TNC
[strongswan.git] / src / libpts / pts / components / pts_component.h
index 0950bed..970b75e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Andreas Steffen
+ * Copyright (C) 2011-2012 Andreas Steffen
  * HSR Hochschule fuer Technik Rapperswil
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@ typedef struct pts_component_t pts_component_t;
 
 #include "pts/pts.h"
 #include "pts/pts_database.h"
+#include "pts/pts_file_meas.h"
 #include "pts/components/pts_comp_func_name.h"
 #include "pts/components/pts_comp_evidence.h"
 
@@ -50,28 +51,43 @@ struct pts_component_t {
        u_int8_t (*get_evidence_flags)(pts_component_t *this);
 
        /**
+        * Get the PTS Sub-component Depth
+        *
+        * @return                              PTS Sub-component Depth
+        */
+       u_int32_t (*get_depth)(pts_component_t *this);
+
+       /**
         * Do evidence measurements on the PTS Functional Component
         *
         * @param pts                   PTS interface
         * @param evidence              returns component evidence measureemt
+        * @param measurements  additional file measurements (NULL if not present)
         * @return                              status return code
         */
        status_t (*measure)(pts_component_t *this, pts_t *pts,
-                                               pts_comp_evidence_t** evidence);
+                                               pts_comp_evidence_t** evidence,
+                                               pts_file_meas_t** measurements);
 
        /**
         * Verify the evidence measurements of the PTS Functional Component
         *
         * @param pts                   PTS interface
-        * @param pts_db                PTS measurement database
         * @param evidence              component evidence measurement to be verified
         * @return                              status return code
         */
        status_t (*verify)(pts_component_t *this, pts_t *pts,
-                                          pts_database_t *pts_db,
                                           pts_comp_evidence_t *evidence);
 
        /**
+        * Tell the PTS Functional Component to finalize pending registrations
+        * and check for missing measurements
+        *
+        * @return                              TRUE if finalization successful
+        */
+       bool (*finalize)(pts_component_t *this);
+
+       /**
         * Destroys a pts_component_t object.
         */
        void (*destroy)(pts_component_t *this);