transfer IMA file measurements via PA-TNC
[strongswan.git] / src / libpts / pts / components / pts_component.h
index dd77073..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
 
 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"
 
 #include <library.h>
 
@@ -40,18 +44,48 @@ struct pts_component_t {
        pts_comp_func_name_t* (*get_comp_func_name)(pts_component_t *this);
 
        /**
-        * Do measurements on the PTS Functional Component
+        * Get the PTS Component Evidence Flags
         *
-        * @return                              TRUE if component measurements are successful
+        * @return                              PTS Component Functional Name
+        */
+       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_file_meas_t** measurements);
+
+       /**
+        * Verify the evidence measurements of the PTS Functional Component
+        *
+        * @param pts                   PTS interface
+        * @param evidence              component evidence measurement to be verified
+        * @return                              status return code
         */
-       bool (*measure)(pts_component_t *this);
+       status_t (*verify)(pts_component_t *this, pts_t *pts,
+                                          pts_comp_evidence_t *evidence);
 
        /**
-        * Verify the measurements of the PTS Functional Component
+        * Tell the PTS Functional Component to finalize pending registrations
+        * and check for missing measurements
         *
-        * @return                              TRUE if verification is successful
+        * @return                              TRUE if finalization successful
         */
-       bool (*verify)(pts_component_t *this);
+       bool (*finalize)(pts_component_t *this);
 
        /**
         * Destroys a pts_component_t object.