Annotation of embedaddon/strongswan/src/libimcv/ietf/ietf_attr_remediation_instr.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_remediation_instrt ietf_attr_remediation_instr
                     18:  * @{ @ingroup ietf_attr
                     19:  */
                     20: 
                     21: #ifndef IETF_ATTR_REMEDIATION_INSTR_H_
                     22: #define IETF_ATTR_REMEDIATION_INSTR_H_
                     23: 
                     24: typedef struct ietf_attr_remediation_instr_t ietf_attr_remediation_instr_t;
                     25: typedef enum ietf_remediation_parameters_t ietf_remediation_parameters_t;
                     26: 
                     27: #include "ietf_attr.h"
                     28: #include "pa_tnc/pa_tnc_attr.h"
                     29: 
                     30: enum ietf_remediation_parameters_t {
                     31:        IETF_REMEDIATION_PARAMETERS_URI =    1,
                     32:        IETF_REMEDIATION_PARAMETERS_STRING = 2
                     33: };
                     34: 
                     35: /**
                     36:  * Class implementing the IETF PA-TNC Remediation Instructions attribute.
                     37:  *
                     38:  */
                     39: struct ietf_attr_remediation_instr_t {
                     40: 
                     41:        /**
                     42:         * Public PA-TNC attribute interface
                     43:         */
                     44:        pa_tnc_attr_t pa_tnc_attribute;
                     45: 
                     46:        /**
                     47:         * Get the Remediation Parameters Type (Vendor ID and Type)
                     48:         *
                     49:         * @return                              Remediation Parameters Type
                     50:         */
                     51:        pen_type_t (*get_parameters_type)(ietf_attr_remediation_instr_t *this);
                     52: 
                     53:        /**
                     54:         * Get the Remediation Parameters
                     55:         *
                     56:         * @return                              Remediation Parameters
                     57:         */
                     58:        chunk_t (*get_parameters)(ietf_attr_remediation_instr_t *this);
                     59: 
                     60:        /**
                     61:         * Get the Remediation URI
                     62:         *
                     63:         * @return                              Remediation URI
                     64:         */
                     65:        chunk_t (*get_uri)(ietf_attr_remediation_instr_t *this);
                     66: 
                     67:        /**
                     68:         * Get the Remediation String
                     69:         *
                     70:         * @param lang_code             Optional Language Code
                     71:         * @return                              Remediation String
                     72:         */
                     73:        chunk_t (*get_string)(ietf_attr_remediation_instr_t *this,
                     74:                                                  chunk_t *lang_code);
                     75: };
                     76: 
                     77: /**
                     78:  * Creates a general ietf_attr_remediation_instr_t object
                     79:  *
                     80:  * @param parameters_type      Remediation Parameters Type
                     81:  * @param parameters           Remediation Parameters
                     82:  */
                     83: pa_tnc_attr_t* ietf_attr_remediation_instr_create(pen_type_t parameters_type,
                     84:                                                                                                  chunk_t parameters);
                     85: 
                     86: /**
                     87:  * Creates an ietf_attr_remediation_instr_t object of Remediation URI Type
                     88:  *
                     89:  * @param uri                          Remediation URI
                     90:  */
                     91: pa_tnc_attr_t* ietf_attr_remediation_instr_create_from_uri(chunk_t uri);
                     92: 
                     93: /**
                     94:  * Creates an ietf_attr_remediation_instr_t object of Remediation String Type
                     95:  *
                     96:  * @param string                       Remediation String
                     97:  * @param lang_code                    Remediation String Language Code
                     98:  */
                     99: pa_tnc_attr_t* ietf_attr_remediation_instr_create_from_string(chunk_t string,
                    100:                                                                                                                          chunk_t lang_code);
                    101: 
                    102: /**
                    103:  * Creates an ietf_attr_remediation_instr_t object from received data
                    104:  *
                    105:  * @param length                       Total length of attribute value
                    106:  * @param value                                Unparsed attribute value (might be a segment)
                    107:  */
                    108: pa_tnc_attr_t* ietf_attr_remediation_instr_create_from_data(size_t length,
                    109:                                                                                                                        chunk_t value);
                    110: 
                    111: #endif /** IETF_ATTR_REMEDIATION_INSTR_H_ @}*/

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