Annotation of embedaddon/strongswan/src/libimcv/ietf/ietf_attr_numeric_version.h, revision 1.1.1.1

1.1       misho       1: /*
                      2:  * Copyright (C) 2012-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 ietf_attr_numeric_version ietf_attr_numeric_version
                     18:  * @{ @ingroup ietf_attr
                     19:  */
                     20: 
                     21: #ifndef IETF_ATTR_NUMERIC_VERSION_H_
                     22: #define IETF_ATTR_NUMERIC_VERSION_H_
                     23: 
                     24: typedef struct ietf_attr_numeric_version_t ietf_attr_numeric_version_t;
                     25: 
                     26: #include "ietf_attr.h"
                     27: #include "pa_tnc/pa_tnc_attr.h"
                     28: 
                     29: 
                     30: /**
                     31:  * Class implementing the IETF PA-TNC String Version attribute.
                     32:  *
                     33:  */
                     34: struct ietf_attr_numeric_version_t {
                     35: 
                     36:        /**
                     37:         * Public PA-TNC attribute interface
                     38:         */
                     39:        pa_tnc_attr_t pa_tnc_attribute;
                     40: 
                     41:        /**
                     42:         * Gets the Major and Minor Version Numbers
                     43:         *
                     44:         * @param major                 Major Version Number
                     45:         * @param minor                 Minor Version Number
                     46:         */
                     47:        void (*get_version)(ietf_attr_numeric_version_t *this,
                     48:                                                uint32_t *major, uint32_t *minor);
                     49: 
                     50:        /**
                     51:         * Gets the Build Number
                     52:         *
                     53:         * @param major                 Major Version Number
                     54:         * @param minor                 Minor Version Number
                     55:         */
                     56:        uint32_t (*get_build)(ietf_attr_numeric_version_t *this);
                     57: 
                     58:        /**
                     59:         * Gets the Major and Minor Numbers of the Service Pack
                     60:         *
                     61:         * @param major                 Service Pack Major Number
                     62:         * @param minor                 Service Pack Minor Number
                     63:         */
                     64:        void (*get_service_pack)(ietf_attr_numeric_version_t *this,
                     65:                                                         uint16_t *major, uint16_t *minor);
                     66: };
                     67: 
                     68: /**
                     69:  * Creates an ietf_attr_numeric_version_t object
                     70:  *
                     71:  */
                     72: pa_tnc_attr_t* ietf_attr_numeric_version_create(uint32_t major, uint32_t minor,
                     73:                                                                                                uint32_t build,
                     74:                                                                                                uint16_t service_pack_major,
                     75:                                                                                                uint16_t service_pack_minor);
                     76: 
                     77: /**
                     78:  * Creates an ietf_attr_numeric_version_t object from received data
                     79:  *
                     80:  * @param length                       Total length of attribute value
                     81:  * @param value                                Unparsed attribute value (might be a segment)
                     82:  */
                     83: pa_tnc_attr_t* ietf_attr_numeric_version_create_from_data(size_t length,
                     84:                                                                                                                  chunk_t value);
                     85: 
                     86: #endif /** IETF_ATTR_NUMERIC_VERSION_H_ @}*/

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