Annotation of embedaddon/strongswan/src/libimcv/tcg/seg/tcg_seg_attr_seg_env.h, revision 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 tcg_seg_attr_seg_env tcg_seg_attr_seg_env
        !            18:  * @{ @ingroup tcg_attr
        !            19:  */
        !            20: 
        !            21: #ifndef TCG_SEG_ATTR_SEG_ENV_H_
        !            22: #define TCG_SEG_ATTR_SEG_ENV_H_
        !            23: 
        !            24: typedef struct tcg_seg_attr_seg_env_t tcg_seg_attr_seg_env_t;
        !            25: 
        !            26: #include "tcg/tcg_attr.h"
        !            27: 
        !            28: #define TCG_SEG_ATTR_SEG_ENV_HEADER            4
        !            29: 
        !            30: /**
        !            31:  * Class implementing the TCG Segmentation Envelope Attribute
        !            32:  */
        !            33: struct tcg_seg_attr_seg_env_t {
        !            34: 
        !            35:        /**
        !            36:         * Public PA-TNC attribute interface
        !            37:         */
        !            38:        pa_tnc_attr_t pa_tnc_attribute;
        !            39: 
        !            40:        /**
        !            41:         * Get enveloped attribute segment
        !            42:         *
        !            43:         * @param flags                 Segmentation flags
        !            44:         * @return                              Segment
        !            45:         */
        !            46:        chunk_t (*get_segment)(tcg_seg_attr_seg_env_t *this, uint8_t *flags);
        !            47: 
        !            48:        /**
        !            49:         * Get Base Attribute ID
        !            50:         *
        !            51:         * @return                              Base Attribute ID
        !            52:         */
        !            53:        uint32_t (*get_base_attr_id)(tcg_seg_attr_seg_env_t *this);
        !            54: 
        !            55: };
        !            56: 
        !            57: /**
        !            58:  * Creates an tcg_seg_attr_seg_env_t object
        !            59:  *
        !            60:  * @param segment                      Attribute segment
        !            61:  * @param flags                                Segmentation flags
        !            62:  * @param base_attr_id         Base Attribute ID
        !            63:  */
        !            64: pa_tnc_attr_t* tcg_seg_attr_seg_env_create(chunk_t segment, uint8_t flags,
        !            65:                                                                                   uint32_t base_attr_id);
        !            66: 
        !            67: /**
        !            68:  * Creates an tcg_seg_attr_seg_env_t object from received data
        !            69:  *
        !            70:  * @param length                       Total length of attribute value
        !            71:  * @param value                                Unparsed attribute value (might be a segment)
        !            72:  */
        !            73: pa_tnc_attr_t* tcg_seg_attr_seg_env_create_from_data(size_t length,
        !            74:                                                                                                         chunk_t value);
        !            75: 
        !            76: #endif /** TCG_SEG_ATTR_SEG_ENV_H_ @}*/

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