Annotation of embedaddon/strongswan/src/libimcv/tcg/seg/tcg_seg_attr_max_size.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_max_size tcg_seg_attr_max_size
        !            18:  * @{ @ingroup tcg_attr
        !            19:  */
        !            20: 
        !            21: #ifndef TCG_SEG_ATTR_MAX_SIZE_H_
        !            22: #define TCG_SEG_ATTR_MAX_SIZE_H_
        !            23: 
        !            24: typedef struct tcg_seg_attr_max_size_t tcg_seg_attr_max_size_t;
        !            25: 
        !            26: #include "tcg/tcg_attr.h"
        !            27: 
        !            28: #define TCG_SEG_ATTR_MAX_SIZE_SIZE             8
        !            29: 
        !            30: /**
        !            31:  * Class implementing the TCG Segmentation Maximum Attribute Size Attribute
        !            32:  */
        !            33: struct tcg_seg_attr_max_size_t {
        !            34: 
        !            35:        /**
        !            36:         * Public PA-TNC attribute interface
        !            37:         */
        !            38:        pa_tnc_attr_t pa_tnc_attribute;
        !            39: 
        !            40:        /**
        !            41:         * Get maximum IF-M attribute and segment size in octets
        !            42:         *
        !            43:         * @param max_attr_size         Maximum IF-M attribute size in octets
        !            44:         * @param max_seg_size          Maximum IF-M attribute segment size in octets
        !            45:         */
        !            46:        void (*get_attr_size)(tcg_seg_attr_max_size_t *this,
        !            47:                                                  uint32_t *max_attr_size, uint32_t *max_seg_size);
        !            48: 
        !            49: };
        !            50: 
        !            51: /**
        !            52:  * Creates an tcg_seg_attr_max_size_t object
        !            53:  *
        !            54:  * @param max_attr_size                Maximum IF-M attribute size in octets
        !            55:  * @param max_seg_size         Maximum IF-M attribute segment size in octets
        !            56:  * @param request                      TRUE for a request, FALSE for a response
        !            57:  */
        !            58: pa_tnc_attr_t* tcg_seg_attr_max_size_create(uint32_t max_attr_size,
        !            59:                                                                                        uint32_t max_seg_size,
        !            60:                                                                                        bool request);
        !            61: 
        !            62: /**
        !            63:  * Creates an tcg_seg_attr_max_size_t object from received data
        !            64:  *
        !            65:  * @param length                       Total length of attribute value
        !            66:  * @param value                                Unparsed attribute value (might be a segment)
        !            67:  * @param request                      TRUE for a request, FALSE for a response
        !            68:  */
        !            69: pa_tnc_attr_t* tcg_seg_attr_max_size_create_from_data(size_t length,
        !            70:                                                                                                          chunk_t value,
        !            71:                                                                                                          bool request);
        !            72: 
        !            73: #endif /** TCG_SEG_ATTR_MAX_SIZE_H_ @}*/

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