Annotation of embedaddon/strongswan/src/libimcv/pts/pts_ima_bios_list.h, revision 1.1.1.1

1.1       misho       1: /*
                      2:  * Copyright (C) 2014 Andreas Steffen
                      3:  * HSR Hochschule fuer Technik Rapperswil
                      4:  *
                      5:  * This program is free software; you can redistribute it and/or modify it
                      6:  * under the terms of the GNU General Public License as published by the
                      7:  * Free Software Foundation; either version 2 of the License, or (at your
                      8:  * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
                      9:  *
                     10:  * This program is distributed in the hope that it will be useful, but
                     11:  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
                     12:  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
                     13:  * for more details.
                     14:  */
                     15: 
                     16: /**
                     17:  * @defgroup pts_ima_bios_list pts_ima_bios_list
                     18:  * @{ @ingroup pts
                     19:  */
                     20: 
                     21: #ifndef PTS_IMA_BIOS_LIST_H_
                     22: #define PTS_IMA_BIOS_LIST_H_
                     23: 
                     24: #include <time.h>
                     25: 
                     26: #include <library.h>
                     27: 
                     28: typedef struct pts_ima_bios_list_t pts_ima_bios_list_t;
                     29: 
                     30: /**
                     31:  * Class retrieving Linux IMA BIOS measurements
                     32:  *
                     33:  */
                     34: struct pts_ima_bios_list_t {
                     35: 
                     36:        /**
                     37:         * Get the time the BIOS measurements were taken
                     38:         *
                     39:         * @return                              Measurement time
                     40:         */
                     41:        time_t (*get_time)(pts_ima_bios_list_t *this);
                     42: 
                     43:        /**
                     44:         * Get the number of non-processed BIOS measurements
                     45:         *
                     46:         * @return                              Number of measurements left
                     47:         */
                     48:        int (*get_count)(pts_ima_bios_list_t *this);
                     49: 
                     50:        /**
                     51:         * Get the next BIOS measurement and remove it from the list
                     52:         *
                     53:         * @param pcr                   PCR where the measurement was extended into
                     54:         * @param measurement   Measurement hash
                     55:         * @return                              Return code
                     56:         */
                     57:        status_t (*get_next)(pts_ima_bios_list_t *this, uint32_t *pcr,
                     58:                                                                                                        chunk_t *measurement);
                     59: 
                     60:        /**
                     61:         * Destroys a pts_ima_bios_list_t object.
                     62:         */
                     63:        void (*destroy)(pts_ima_bios_list_t *this);
                     64: 
                     65: };
                     66: 
                     67: /**
                     68:  * Create a PTS IMA BIOS measurement object
                     69:  *
                     70:  * @param file                         Pathname pointing to the BIOS measurements
                     71:  */
                     72: pts_ima_bios_list_t* pts_ima_bios_list_create(char *file);
                     73: 
                     74: #endif /** PTS_IMA_BIOS_LIST_H_ @}*/

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>