Merge branch 'swima'
[strongswan.git] / src / libimcv / swima / swima_error.h
1 /*
2 * Copyright (C) 2017 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 swima_error swima_error
18 * @{ @ingroup libimcv_swid
19 */
20
21 #ifndef SWIMA_ERROR_H_
22 #define SWIMA_ERROR_H_
23
24 typedef enum swima_error_code_t swima_error_code_t;
25
26 #include "pa_tnc/pa_tnc_attr.h"
27 #include "ietf/ietf_attr_pa_tnc_error.h"
28
29 #include <library.h>
30
31 /**
32 * Creates a SWIMA Error Attribute
33 * see section 5.16 of IETF SW Inventory Message and Attributes for PA-TNC
34 *
35 * @param code PA-TNC error code
36 * @param request SWID request ID
37 * @param max_attr_size Maximum PA-TNC attribute size (if applicable)
38 * @param description Optional description string or NULL
39 */
40 pa_tnc_attr_t* swima_error_create(pa_tnc_error_code_t code, uint32_t request,
41 uint32_t max_attr_size, char *description);
42
43 #endif /** SWIMA_ERROR_H_ @}*/