2 * Copyright (C) 2012-2014 Andreas Steffen
3 * HSR Hochschule fuer Technik Rapperswil
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>.
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
17 * @defgroup ietf_attr_installed_packagest ietf_attr_installed_packages
18 * @{ @ingroup ietf_attr
21 #ifndef IETF_ATTR_INSTALLED_PACKAGES_H_
22 #define IETF_ATTR_INSTALLED_PACKAGES_H_
24 typedef struct ietf_attr_installed_packages_t ietf_attr_installed_packages_t
;
26 #include "ietf_attr.h"
27 #include "pa_tnc/pa_tnc_attr.h"
29 #define IETF_INSTALLED_PACKAGES_MIN_SIZE 4
32 * Class implementing the IETF PA-TNC Installed Packages attribute.
35 struct ietf_attr_installed_packages_t
{
38 * Public PA-TNC attribute interface
40 pa_tnc_attr_t pa_tnc_attribute
;
45 * @param name package name
46 * @param version package version number
48 void (*add
)(ietf_attr_installed_packages_t
*this, chunk_t name
,
52 * Enumerates over all packages
53 * Format: chunk_t name, chunk_t version
57 enumerator_t
* (*create_enumerator
)(ietf_attr_installed_packages_t
*this);
62 * Creates an ietf_attr_installed_packages_t object
65 pa_tnc_attr_t
* ietf_attr_installed_packages_create(void);
68 * Creates an ietf_attr_installed_packages_t object from received data
70 * @param length Total length of attribute value
71 * @param value Unparsed attribute value (might be a segment)
73 pa_tnc_attr_t
* ietf_attr_installed_packages_create_from_data(size_t length
,
76 #endif /** IETF_ATTR_INSTALLED_PACKAGES_H_ @}*/