Open SCAP Library
cpe_dict.h
Go to the documentation of this file.
1 
13 /*
14  * Copyright 2009--2014 Red Hat Inc., Durham, North Carolina.
15  * All Rights Reserved.
16  *
17  * This library is free software; you can redistribute it and/or
18  * modify it under the terms of the GNU Lesser General Public
19  * License as published by the Free Software Foundation; either
20  * version 2.1 of the License, or (at your option) any later version.
21  *
22  * This library is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25  * Lesser General Public License for more details.
26  *
27  * You should have received a copy of the GNU Lesser General Public
28  * License along with this library; if not, write to the Free Software
29  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
30  *
31  * Authors:
32  * Maros Barabas <mbarabas@redhat.com>
33  * Lukas Kuklinek <lkuklinek@redhat.com>
34  * Šimon Lukašík
35  */
36 
37 #ifndef CPEDICT_H_
38 #define CPEDICT_H_
39 
40 #include "oscap.h"
41 #include "cpe_name.h"
42 #include "oscap_text.h"
43 #include "oscap_source.h"
44 #include "oscap_export.h"
45 
50 struct cpe_dict_model;
51 
56 struct cpe_item;
57 
62 struct cpe_vendor;
63 
68 struct cpe_generator;
69 
74 struct cpe_check;
75 
80 struct cpe_reference;
81 
86 struct cpe_item_metadata;
87 
92 struct cpe_product;
97 struct cpe_version;
102 struct cpe_update;
107 struct cpe_edition;
112 struct cpe_language;
113 
114 /************************************************************/
126 OSCAP_API const char *cpe_item_metadata_get_modification_date(const struct cpe_item_metadata *item);
127 
132 OSCAP_API const char *cpe_item_metadata_get_status(const struct cpe_item_metadata *item);
133 
138 OSCAP_API const char *cpe_item_metadata_get_nvd_id(const struct cpe_item_metadata *item);
139 
144 OSCAP_API const char *cpe_item_metadata_get_deprecated_by_nvd_id(const struct cpe_item_metadata *item);
145 
150 OSCAP_API const char *cpe_check_get_system(const struct cpe_check *item);
151 
156 OSCAP_API const char *cpe_check_get_href(const struct cpe_check *item);
157 
162 OSCAP_API const char *cpe_check_get_identifier(const struct cpe_check *item);
163 
168 OSCAP_API const char *cpe_reference_get_href(const struct cpe_reference *item);
169 
174 OSCAP_API const char *cpe_reference_get_content(const struct cpe_reference *item);
175 
180 OSCAP_API struct cpe_name *cpe_item_get_name(const struct cpe_item *item);
181 
186 OSCAP_API struct cpe_name *cpe_item_get_deprecated_by(const struct cpe_item *item);
187 
192 OSCAP_API const char *cpe_item_get_deprecation_date(const struct cpe_item *item);
193 
198 OSCAP_API struct cpe_item_metadata *cpe_item_get_metadata(const struct cpe_item *item);
199 
204 OSCAP_API struct cpe_reference_iterator *cpe_item_get_references(const struct cpe_item *item);
205 
210 OSCAP_API struct cpe_check_iterator *cpe_item_get_checks(const struct cpe_item *item);
211 
216 OSCAP_API struct oscap_text_iterator *cpe_item_get_titles(const struct cpe_item *item);
217 
222 OSCAP_API const char *cpe_generator_get_product_name(const struct cpe_generator *item);
223 
228 OSCAP_API const char *cpe_generator_get_product_version(const struct cpe_generator *item);
229 
234 OSCAP_API const char *cpe_generator_get_schema_version(const struct cpe_generator *item);
235 
240 OSCAP_API const char *cpe_generator_get_timestamp(const struct cpe_generator *item);
241 
253 OSCAP_API int cpe_dict_model_get_base_version(const struct cpe_dict_model *item);
254 
259 OSCAP_API bool cpe_dict_model_set_base_version(struct cpe_dict_model *item, int base_version);
260 
266 OSCAP_API struct cpe_generator *cpe_dict_model_get_generator(const struct cpe_dict_model *item);
267 
272 OSCAP_API struct cpe_item_iterator *cpe_dict_model_get_items(const struct cpe_dict_model *item);
273 
278 OSCAP_API struct cpe_vendor_iterator *cpe_dict_model_get_vendors(const struct cpe_dict_model *item);
279 
284 OSCAP_API const char *cpe_vendor_get_value(const struct cpe_vendor *item);
285 
290 OSCAP_API struct oscap_text_iterator *cpe_vendor_get_titles(const struct cpe_vendor *item);
291 
296 OSCAP_API struct cpe_product_iterator *cpe_vendor_get_products(const struct cpe_vendor *item);
297 
302 OSCAP_API const char *cpe_product_get_value(const struct cpe_product *item);
303 
308 OSCAP_API cpe_part_t cpe_product_get_part(const struct cpe_product *item);
309 
315 OSCAP_API struct cpe_version_iterator *cpe_product_get_versions(const struct cpe_product *item);
316 
321 OSCAP_API const char *cpe_version_get_value(const struct cpe_version *item);
322 
328 OSCAP_API struct cpe_update_iterator *cpe_version_get_updates(const struct cpe_version *item);
329 
334 OSCAP_API const char *cpe_update_get_value(const struct cpe_update *item);
335 
341 OSCAP_API struct cpe_edition_iterator *cpe_update_get_editions(const struct cpe_update *item);
342 
347 OSCAP_API const char *cpe_edition_get_value(const struct cpe_edition *item);
348 
354 OSCAP_API struct cpe_language_iterator *cpe_edition_get_languages(const struct cpe_edition *item);
355 
360 OSCAP_API const char *cpe_language_get_value(const struct cpe_language *item);
361 
362 /************************************************************/
365 OSCAP_API void cpe_check_free(struct cpe_check *check);
368 OSCAP_API void cpe_reference_free(struct cpe_reference *ref);
370 OSCAP_API void cpe_vendor_free(struct cpe_vendor *vendor);
372 OSCAP_API void cpe_product_free(struct cpe_product *product);
374 OSCAP_API void cpe_version_free(struct cpe_version *version);
376 OSCAP_API void cpe_update_free(struct cpe_update *update);
378 OSCAP_API void cpe_edition_free(struct cpe_edition *edition);
380 OSCAP_API void cpe_language_free(struct cpe_language *language);
382 OSCAP_API void cpe_itemmetadata_free(struct cpe_item_metadata *meta);
384 OSCAP_API void cpe_dict_model_free(struct cpe_dict_model *dict);
386 OSCAP_API void cpe_generator_free(struct cpe_generator *generator);
388 OSCAP_API void cpe_item_free(struct cpe_item *item);
389 
391 OSCAP_API struct cpe_dict_model *cpe_dict_model_new(void);
393 OSCAP_API struct cpe_generator *cpe_generator_new(void);
395 OSCAP_API struct cpe_check *cpe_check_new(void);
397 OSCAP_API struct cpe_reference *cpe_reference_new(void);
399 OSCAP_API struct cpe_item *cpe_item_new(void);
401 OSCAP_API struct cpe_vendor *cpe_vendor_new(void);
403 OSCAP_API struct cpe_product *cpe_product_new(void);
405 OSCAP_API struct cpe_version *cpe_version_new(void);
407 OSCAP_API struct cpe_update *cpe_update_new(void);
409 OSCAP_API struct cpe_edition *cpe_edition_new(void);
411 OSCAP_API struct cpe_language *cpe_language_new(void);
413 OSCAP_API struct cpe_item_metadata *cpe_item_metadata_new(void);
414 
415 /************************************************************/
423 OSCAP_API bool cpe_item_set_name(struct cpe_item *item, const struct cpe_name *new_name);
425 
427 OSCAP_API bool cpe_item_set_deprecated_by(struct cpe_item *item, const struct cpe_name *new_deprecated_by);
428 
430 OSCAP_API bool cpe_item_set_deprecation_date(struct cpe_item *item, const char *new_deprecation_date);
431 
433 OSCAP_API bool cpe_item_metadata_set_modification_date(struct cpe_item_metadata *item_metadata,
434  const char *new_modification_date);
435 
437 OSCAP_API bool cpe_item_metadata_set_status(struct cpe_item_metadata *item_metadata, const char *new_status);
438 
440 OSCAP_API bool cpe_item_metadata_set_nvd_id(struct cpe_item_metadata *item_metadata, const char *new_nvd_id);
441 
443 OSCAP_API bool cpe_item_metadata_set_deprecated_by_nvd_id(struct cpe_item_metadata *item_metadata,
444  const char *new_deprecated_by_nvd_id);
445 
447 OSCAP_API bool cpe_check_set_system(struct cpe_check *check, const char *new_system);
448 
450 OSCAP_API bool cpe_check_set_href(struct cpe_check *check, const char *new_href);
451 
453 OSCAP_API bool cpe_check_set_identifier(struct cpe_check *check, const char *new_identifier);
454 
456 OSCAP_API bool cpe_reference_set_href(struct cpe_reference *reference, const char *new_href);
457 
459 OSCAP_API bool cpe_reference_set_content(struct cpe_reference *reference, const char *new_content);
460 
462 OSCAP_API bool cpe_generator_set_product_name(struct cpe_generator *generator, const char *new_product_name);
463 
465 OSCAP_API bool cpe_generator_set_product_version(struct cpe_generator *generator, const char *new_product_version);
466 
468 OSCAP_API bool cpe_generator_set_schema_version(struct cpe_generator *generator, const char *new_schema_version);
469 
471 OSCAP_API bool cpe_generator_set_timestamp(struct cpe_generator *generator, const char *new_timestamp);
472 
474 OSCAP_API bool cpe_vendor_set_value(struct cpe_vendor *vendor, const char *new_value);
475 
477 OSCAP_API bool cpe_product_set_value(struct cpe_product *product, const char *new_value);
478 
480 OSCAP_API bool cpe_product_set_part(struct cpe_product *product, cpe_part_t new_part);
481 
483 OSCAP_API bool cpe_version_set_value(struct cpe_version *version, const char *new_value);
484 
486 OSCAP_API bool cpe_update_set_value(struct cpe_update *update, const char *new_value);
487 
489 OSCAP_API bool cpe_edition_set_value(struct cpe_edition *edition, const char *new_value);
490 
492 OSCAP_API bool cpe_language_set_value(struct cpe_language *language, const char *new_value);
493 
494 /*
495  * Add functions
496  */
497 
499 OSCAP_API bool cpe_item_add_reference(struct cpe_item *item, struct cpe_reference *new_reference);
500 
502 OSCAP_API bool cpe_item_add_check(struct cpe_item *item, struct cpe_check *new_check);
503 
505 OSCAP_API bool cpe_item_add_title(struct cpe_item *item, struct oscap_text *new_title);
506 
508 OSCAP_API bool cpe_dict_model_add_item(struct cpe_dict_model *dict, struct cpe_item *new_item);
509 
511 OSCAP_API bool cpe_dict_model_add_vendor(struct cpe_dict_model *dict, struct cpe_vendor *new_vendor);
512 
514 OSCAP_API bool cpe_vendor_add_title(struct cpe_vendor *vendor, struct oscap_text *new_title);
515 
517 OSCAP_API bool cpe_vendor_add_product(struct cpe_vendor *vendor, struct cpe_product *new_product);
518 
520 OSCAP_API bool cpe_product_add_version(struct cpe_product *product, struct cpe_version *new_version);
521 
523 OSCAP_API bool cpe_version_add_update(struct cpe_version *version, struct cpe_update *new_update);
524 
526 OSCAP_API bool cpe_update_add_edition(struct cpe_update *update, struct cpe_edition *new_edition);
527 
529 OSCAP_API bool cpe_edition_add_language(struct cpe_edition *edition, struct cpe_language *new_language);
530 
531 
532 /************************************************************/
535 /************************************************************/
546 struct cpe_item_iterator;
547 
553 OSCAP_API struct cpe_item *cpe_item_iterator_next(struct cpe_item_iterator *it);
554 
560 OSCAP_API bool cpe_item_iterator_has_more(struct cpe_item_iterator *it);
561 
567 OSCAP_API void cpe_item_iterator_free(struct cpe_item_iterator *it);
568 
570 OSCAP_API void cpe_item_iterator_remove(struct cpe_item_iterator *it);
572 OSCAP_API void cpe_item_iterator_reset(struct cpe_item_iterator *it);
573 
580 
587 
594 
600 OSCAP_API void cpe_reference_iterator_free(struct cpe_reference_iterator *it);
601 
603 OSCAP_API void cpe_reference_iterator_remove(struct cpe_reference_iterator *it);
605 OSCAP_API void cpe_reference_iterator_reset(struct cpe_reference_iterator *it);
606 
612 struct cpe_check_iterator;
613 
619 OSCAP_API struct cpe_check *cpe_check_iterator_next(struct cpe_check_iterator *it);
620 
626 OSCAP_API bool cpe_check_iterator_has_more(struct cpe_check_iterator *it);
627 
633 OSCAP_API void cpe_check_iterator_free(struct cpe_check_iterator *it);
634 
636 OSCAP_API void cpe_check_iterator_remove(struct cpe_check_iterator *it);
638 OSCAP_API void cpe_check_iterator_reset(struct cpe_check_iterator *it);
639 
645 struct cpe_vendor_iterator;
646 
652 OSCAP_API struct cpe_vendor *cpe_vendor_iterator_next(struct cpe_vendor_iterator *it);
653 
659 OSCAP_API bool cpe_vendor_iterator_has_more(struct cpe_vendor_iterator *it);
660 
666 OSCAP_API void cpe_vendor_iterator_free(struct cpe_vendor_iterator *it);
667 
669 OSCAP_API void cpe_vendor_iterator_remove(struct cpe_vendor_iterator *it);
671 OSCAP_API void cpe_vendor_iterator_reset(struct cpe_vendor_iterator *it);
672 
678 struct cpe_product_iterator;
679 
685 OSCAP_API struct cpe_product *cpe_product_iterator_next(struct cpe_product_iterator *it);
686 
692 OSCAP_API bool cpe_product_iterator_has_more(struct cpe_product_iterator *it);
693 
699 OSCAP_API void cpe_product_iterator_free(struct cpe_product_iterator *it);
700 
702 OSCAP_API void cpe_product_iterator_remove(struct cpe_product_iterator *it);
704 OSCAP_API void cpe_product_iterator_reset(struct cpe_product_iterator *it);
705 
711 struct cpe_version_iterator;
712 
718 OSCAP_API struct cpe_version *cpe_version_iterator_next(struct cpe_version_iterator *it);
719 
725 OSCAP_API bool cpe_version_iterator_has_more(struct cpe_version_iterator *it);
726 
732 OSCAP_API void cpe_version_iterator_free(struct cpe_version_iterator *it);
733 
735 OSCAP_API void cpe_version_iterator_remove(struct cpe_version_iterator *it);
737 OSCAP_API void cpe_version_iterator_reset(struct cpe_version_iterator *it);
738 
744 struct cpe_update_iterator;
745 
751 OSCAP_API struct cpe_update *cpe_update_iterator_next(struct cpe_update_iterator *it);
752 
758 OSCAP_API bool cpe_update_iterator_has_more(struct cpe_update_iterator *it);
759 
765 OSCAP_API void cpe_update_iterator_free(struct cpe_update_iterator *it);
766 
768 OSCAP_API void cpe_update_iterator_remove(struct cpe_update_iterator *it);
770 OSCAP_API void cpe_update_iterator_reset(struct cpe_update_iterator *it);
771 
777 struct cpe_edition_iterator;
778 
784 OSCAP_API struct cpe_edition *cpe_edition_iterator_next(struct cpe_edition_iterator *it);
785 
791 OSCAP_API bool cpe_edition_iterator_has_more(struct cpe_edition_iterator *it);
792 
798 OSCAP_API void cpe_edition_iterator_free(struct cpe_edition_iterator *it);
799 
801 OSCAP_API void cpe_edition_iterator_remove(struct cpe_edition_iterator *it);
803 OSCAP_API void cpe_edition_iterator_reset(struct cpe_edition_iterator *it);
804 
810 struct cpe_language_iterator;
811 
818 
824 OSCAP_API bool cpe_language_iterator_has_more(struct cpe_language_iterator *it);
825 
831 OSCAP_API void cpe_language_iterator_free(struct cpe_language_iterator *it);
832 
834 OSCAP_API void cpe_language_iterator_remove(struct cpe_language_iterator *it);
836 OSCAP_API void cpe_language_iterator_reset(struct cpe_language_iterator *it);
837 
838 /************************************************************/
841 /************************************************************/
852 OSCAP_API const char * cpe_dict_model_supported(void);
853 
862 OSCAP_API bool cpe_name_match_dict(struct cpe_name *cpe, struct cpe_dict_model *dict);
863 
873 OSCAP_API bool cpe_name_applicable_dict(struct cpe_name *cpe, struct cpe_dict_model *dict, cpe_check_fn cb, void* usr);
874 
876 OSCAP_API bool cpe_item_is_applicable(struct cpe_item* item, cpe_check_fn cb, void* usr);
877 
878 /************************************************************/
886 OSCAP_API void cpe_dict_model_export(const struct cpe_dict_model *dict, const char *file);
887 
894 OSCAP_API struct cpe_dict_model *cpe_dict_model_import_source(struct oscap_source *source);
895 
896 
901 #endif /* _CPEDICT_H_ */
OSCAP_API struct cpe_item * cpe_item_iterator_next(struct cpe_item_iterator *it)
Iterator over CPE dictionary items.
Product of some vendor.
Definition: cpedict_priv.c:173
Structure representing single CPE check.
Definition: cpedict_priv.c:120
OSCAP_API bool cpe_update_set_value(struct cpe_update *update, const char *new_value)
CPE dictionary item reference.
Definition: cpedict_priv.c:131
OSCAP_API void cpe_dict_model_export(const struct cpe_dict_model *dict, const char *file)
Write the dict_model to a file.
Definition: cpedict.c:70
OSCAP_API bool cpe_version_add_update(struct cpe_version *version, struct cpe_update *new_update)
OSCAP_API bool cpe_vendor_set_value(struct cpe_vendor *vendor, const char *new_value)
OSCAP_API void cpe_product_iterator_remove(struct cpe_product_iterator *it)
OSCAP_API void cpe_vendor_iterator_reset(struct cpe_vendor_iterator *it)
Structure with information about document.
Definition: cpedict_priv.c:140
OSCAP_API const char * cpe_generator_get_schema_version(const struct cpe_generator *item)
cpe_generator functions to get document schema version
OSCAP_API struct cpe_edition_iterator * cpe_update_get_editions(const struct cpe_update *item)
cpe_update functions to get editions of update
General OpenScap functions and types.
OSCAP_API struct cpe_generator * cpe_dict_model_get_generator(const struct cpe_dict_model *item)
cpe_dict_model functions to get generator from CPE dictionary model
Edition of product update.
Definition: cpedict_priv.c:205
OSCAP_API struct cpe_item_metadata * cpe_item_get_metadata(const struct cpe_item *item)
cpe_item functions to get metadata of cpe_item
Iterator over CPE dictionary item updates.
OSCAP_API struct cpe_check * cpe_check_iterator_next(struct cpe_check_iterator *it)
Iterator over CPE item check items.
OSCAP_API struct cpe_version * cpe_version_new(void)
Definition: cpedict_priv.c:440
OSCAP_API bool cpe_language_iterator_has_more(struct cpe_language_iterator *it)
Iterator over CPE language items.
OSCAP_API const char * cpe_generator_get_product_version(const struct cpe_generator *item)
cpe_generator functions to get product version
OSCAP_API bool cpe_item_iterator_has_more(struct cpe_item_iterator *it)
Iterator over CPE dictionary items.
Structure with information about vendor.
Definition: cpe_dict.h:56
OSCAP_API struct cpe_update * cpe_update_new(void)
Definition: cpedict_priv.c:456
OSCAP_API struct cpe_reference * cpe_reference_iterator_next(struct cpe_reference_iterator *it)
Iterator over CPE item reference items.
OSCAP_API struct cpe_name * cpe_item_get_deprecated_by(const struct cpe_item *item)
cpe_item functions to get variable member deprecated_by
OSCAP_API const char * cpe_check_get_href(const struct cpe_check *item)
cpe_check functions to get href
OSCAP_API struct cpe_vendor * cpe_vendor_iterator_next(struct cpe_vendor_iterator *it)
Iterator over CPE vendor items.
OSCAP_API bool cpe_generator_set_product_name(struct cpe_generator *generator, const char *new_product_name)
OSCAP_API struct cpe_reference * cpe_reference_new(void)
Definition: cpedict_priv.c:366
OSCAP_API struct cpe_dict_model * cpe_dict_model_new(void)
Definition: cpedict_priv.c:293
OSCAP_API void cpe_reference_free(struct cpe_reference *ref)
Definition: cpedict_priv.c:1365
OSCAP_API const char * cpe_edition_get_value(const struct cpe_edition *item)
cpe_edition functions to get value of edition
OSCAP_API bool cpe_item_is_applicable(struct cpe_item *item, cpe_check_fn cb, void *usr)
Definition: cpedict.c:151
Iterator over CPE dictionary item languages.
OSCAP_API const char * cpe_item_get_deprecation_date(const struct cpe_item *item)
cpe_item functions to get variable member date
OSCAP_API bool cpe_item_metadata_set_deprecated_by_nvd_id(struct cpe_item_metadata *item_metadata, const char *new_deprecated_by_nvd_id)
Update of product version.
Definition: cpedict_priv.c:195
OSCAP_API void cpe_edition_iterator_free(struct cpe_edition_iterator *it)
Iterator over CPE edition items.
OSCAP_API bool cpe_version_iterator_has_more(struct cpe_version_iterator *it)
Iterator over CPE version items.
OSCAP_API bool cpe_check_set_system(struct cpe_check *check, const char *new_system)
OSCAP_API bool cpe_item_set_name(struct cpe_item *item, const struct cpe_name *new_name)
OSCAP_API bool cpe_vendor_add_product(struct cpe_vendor *vendor, struct cpe_product *new_product)
Iterator over CPE dictionary items.
OSCAP_API bool cpe_dict_model_add_item(struct cpe_dict_model *dict, struct cpe_item *new_item)
OSCAP_API void cpe_version_free(struct cpe_version *version)
Definition: cpedict_priv.c:1408
OSCAP_API struct oscap_text_iterator * cpe_vendor_get_titles(const struct cpe_vendor *item)
cpe_vendor functions to get vendor titles
Interface to Common Platform Enumeration (CPE) URI.
OSCAP_API const char * cpe_item_metadata_get_nvd_id(const struct cpe_item_metadata *item)
cpe_item_metadata function to get nvd ID
OSCAP_API void cpe_item_iterator_free(struct cpe_item_iterator *it)
Iterator over CPE dictionary items.
OSCAP_API void cpe_vendor_iterator_remove(struct cpe_vendor_iterator *it)
OSCAP_API void cpe_item_free(struct cpe_item *item)
Definition: cpedict_priv.c:1323
OSCAP_API void cpe_product_iterator_reset(struct cpe_product_iterator *it)
OSCAP_API const char * cpe_dict_model_supported(void)
Get the newest supported version of CPE dictionary XML.
Definition: cpedict.c:168
OSCAP_API bool cpe_version_set_value(struct cpe_version *version, const char *new_value)
OSCAP_API const char * cpe_item_metadata_get_deprecated_by_nvd_id(const struct cpe_item_metadata *item)
cpe_item_metadata function to get NVD ID of deprecated item
OSCAP_API void cpe_vendor_iterator_free(struct cpe_vendor_iterator *it)
Iterator over CPE vendor items.
OSCAP_API void cpe_reference_iterator_reset(struct cpe_reference_iterator *it)
OSCAP_API const char * cpe_item_metadata_get_status(const struct cpe_item_metadata *item)
cpe_item_metadata function to get status
Internationalized string iterator.
OSCAP_API void cpe_language_free(struct cpe_language *language)
Definition: cpedict_priv.c:1441
OSCAP_API bool cpe_generator_set_product_version(struct cpe_generator *generator, const char *new_product_version)
OSCAP_API bool cpe_name_applicable_dict(struct cpe_name *cpe, struct cpe_dict_model *dict, cpe_check_fn cb, void *usr)
Verify whether given CPE is applicable to current platform by evaluating checks associated with it...
Definition: cpedict.c:111
OSCAP_API void cpe_language_iterator_free(struct cpe_language_iterator *it)
Iterator over CPE language items.
OSCAP_API bool cpe_vendor_iterator_has_more(struct cpe_vendor_iterator *it)
Iterator over CPE vendor items.
OSCAP_API void cpe_check_iterator_free(struct cpe_check_iterator *it)
Iterator over CPE item check items.
OSCAP_API void cpe_edition_free(struct cpe_edition *edition)
Definition: cpedict_priv.c:1430
OSCAP_API bool cpe_language_set_value(struct cpe_language *language, const char *new_value)
OSCAP_API struct cpe_update * cpe_update_iterator_next(struct cpe_update_iterator *it)
Iterator over CPE update items.
OSCAP_API bool cpe_dict_model_set_base_version(struct cpe_dict_model *item, int base_version)
cpe_dict_model functions to get the base version from CPE dictionary model
OSCAP_API struct cpe_item_metadata * cpe_item_metadata_new(void)
Definition: cpedict_priv.c:313
OSCAP_API bool cpe_product_add_version(struct cpe_product *product, struct cpe_version *new_version)
OSCAP_API bool cpe_reference_iterator_has_more(struct cpe_reference_iterator *it)
Iterator over CPE item reference items.
OSCAP_API void cpe_item_iterator_reset(struct cpe_item_iterator *it)
Iterator over CPE dictionary item vendors.
OSCAP_API void cpe_item_iterator_remove(struct cpe_item_iterator *it)
OSCAP_API bool cpe_item_metadata_set_modification_date(struct cpe_item_metadata *item_metadata, const char *new_modification_date)
Iterator over CPE dictionary item editions.
OSCAP_API struct cpe_version_iterator * cpe_product_get_versions(const struct cpe_product *item)
cpe_product functions to get versions of product
OSCAP_API void cpe_generator_free(struct cpe_generator *generator)
Definition: cpedict_priv.c:1340
OSCAP_API struct cpe_update_iterator * cpe_version_get_updates(const struct cpe_version *item)
cpe_version functions to get value of version
OSCAP_API void cpe_update_iterator_free(struct cpe_update_iterator *it)
Iterator over CPE update items.
OSCAP_API bool cpe_reference_set_content(struct cpe_reference *reference, const char *new_content)
Version of product.
Definition: cpedict_priv.c:185
OSCAP_API const char * cpe_update_get_value(const struct cpe_update *item)
cpe_update functions to get updates of version
OSCAP_API bool cpe_product_set_value(struct cpe_product *product, const char *new_value)
OSCAP_API const char * cpe_generator_get_timestamp(const struct cpe_generator *item)
cpe_generator functions to get timestamp from generator
OSCAP_API bool cpe_vendor_add_title(struct cpe_vendor *vendor, struct oscap_text *new_title)
OSCAP_API struct cpe_generator * cpe_generator_new(void)
Definition: cpedict_priv.c:389
OSCAP_API bool cpe_item_add_reference(struct cpe_item *item, struct cpe_reference *new_reference)
OSCAP_API struct cpe_name * cpe_item_get_name(const struct cpe_item *item)
cpe_item functions to get variable member name
OSCAP_API bool cpe_check_iterator_has_more(struct cpe_check_iterator *it)
Iterator over CPE item check items.
OSCAP_API bool cpe_product_iterator_has_more(struct cpe_product_iterator *it)
Iterator over CPE product items.
OSCAP_API bool cpe_item_add_check(struct cpe_item *item, struct cpe_check *new_check)
OSCAP_API struct cpe_product * cpe_product_iterator_next(struct cpe_product_iterator *it)
Iterator over CPE product items.
OSCAP_API bool cpe_item_add_title(struct cpe_item *item, struct oscap_text *new_title)
Structure representing metadata of CPE item.
Definition: cpedict_priv.c:107
OSCAP_API struct cpe_product * cpe_product_new(void)
Definition: cpedict_priv.c:424
OSCAP_API struct cpe_product_iterator * cpe_vendor_get_products(const struct cpe_vendor *item)
cpe_vendor functions to get vendor products
OSCAP_API bool cpe_reference_set_href(struct cpe_reference *reference, const char *new_href)
OSCAP_API void cpe_edition_iterator_remove(struct cpe_edition_iterator *it)
OSCAP_API struct cpe_edition * cpe_edition_new(void)
Definition: cpedict_priv.c:472
Structure representing a CPE dictionary.
Definition: cpedict_priv.h:139
Multilingual text processing interface.
OSCAP_API void cpe_dict_model_free(struct cpe_dict_model *dict)
Definition: cpedict_priv.c:1311
OSCAP_API bool cpe_edition_set_value(struct cpe_edition *edition, const char *new_value)
Definition: oscap_source.c:66
OSCAP_API void cpe_language_iterator_remove(struct cpe_language_iterator *it)
OSCAP_API bool cpe_item_metadata_set_nvd_id(struct cpe_item_metadata *item_metadata, const char *new_nvd_id)
Iterator over CPE dictionary item versions.
OSCAP_API bool cpe_item_set_deprecated_by(struct cpe_item *item, const struct cpe_name *new_deprecated_by)
OSCAP_API struct cpe_language_iterator * cpe_edition_get_languages(const struct cpe_edition *item)
cpe_edition functions to get languages of edition
OSCAP_API void cpe_check_iterator_remove(struct cpe_check_iterator *it)
OSCAP_API void cpe_product_iterator_free(struct cpe_product_iterator *it)
Iterator over CPE product items.
OSCAP_API const char * cpe_reference_get_href(const struct cpe_reference *item)
cpe_reference functions to get href of reference
OSCAP_API const char * cpe_check_get_system(const struct cpe_check *item)
cpe_check functions to get system
OSCAP_API bool cpe_edition_iterator_has_more(struct cpe_edition_iterator *it)
Iterator over CPE edition items.
OSCAP_API const char * cpe_reference_get_content(const struct cpe_reference *item)
cpe_reference functions to get content of reference
OSCAP_API const char * cpe_generator_get_product_name(const struct cpe_generator *item)
cpe_generator functions to get product name
Structure representing single CPE dictionary item.
Definition: cpedict_priv.c:71
bool(* cpe_check_fn)(const char *, const char *, const char *, void *)
Shared callback definition used to evaluate checks to perform applicability tests.
Definition: cpe_name.h:341
OSCAP_API const char * cpe_item_metadata_get_modification_date(const struct cpe_item_metadata *item)
cpe_item_metadata function to get date
Structure holding Common Platform Enumeration URI data.
Definition: cpename.c:70
Iterator over CPE dictionary item products.
OSCAP_API bool cpe_generator_set_timestamp(struct cpe_generator *generator, const char *new_timestamp)
OSCAP_API bool cpe_check_set_identifier(struct cpe_check *check, const char *new_identifier)
OSCAP_API struct cpe_edition * cpe_edition_iterator_next(struct cpe_edition_iterator *it)
Iterator over CPE edition items.
OSCAP_API bool cpe_update_add_edition(struct cpe_update *update, struct cpe_edition *new_edition)
OSCAP_API void cpe_check_free(struct cpe_check *check)
Definition: cpedict_priv.c:1353
Representation of internationalizable character strings.
Definition: text_priv.h:46
OSCAP_API struct cpe_reference_iterator * cpe_item_get_references(const struct cpe_item *item)
cpe_item functions to get CPE references
Language of product edition.
Definition: cpedict_priv.c:215
OSCAP_API void cpe_vendor_free(struct cpe_vendor *vendor)
Definition: cpedict_priv.c:1385
OSCAP_API struct cpe_check * cpe_check_new(void)
Definition: cpedict_priv.c:349
OSCAP_API struct cpe_check_iterator * cpe_item_get_checks(const struct cpe_item *item)
cpe_item functions to get CPE checks
OSCAP_API void cpe_update_iterator_remove(struct cpe_update_iterator *it)
OSCAP_API void cpe_reference_iterator_free(struct cpe_reference_iterator *it)
Iterator over CPE item reference items.
OSCAP_API const char * cpe_version_get_value(const struct cpe_version *item)
cpe_version functions to get vupdates of versions
OSCAP_API struct cpe_item * cpe_item_new(void)
Definition: cpedict_priv.c:331
OSCAP_API struct cpe_language * cpe_language_new(void)
Definition: cpedict_priv.c:488
Iterator over CPE dictionary references.
OSCAP_API const char * cpe_product_get_value(const struct cpe_product *item)
cpe_product functions to get product value
OSCAP_API struct cpe_version * cpe_version_iterator_next(struct cpe_version_iterator *it)
Iterator over CPE version items.
OSCAP_API void cpe_version_iterator_remove(struct cpe_version_iterator *it)
OSCAP_API const char * cpe_check_get_identifier(const struct cpe_check *item)
cpe_check functions to get identifier
OSCAP_API struct cpe_dict_model * cpe_dict_model_import_source(struct oscap_source *source)
Load new CPE dictionary from an oscap_source.
Definition: cpedict.c:50
OSCAP_API cpe_part_t cpe_product_get_part(const struct cpe_product *item)
cpe_product functions to get product part
OSCAP_API void cpe_check_iterator_reset(struct cpe_check_iterator *it)
OSCAP_API void cpe_version_iterator_free(struct cpe_version_iterator *it)
Iterator over CPE version items.
OSCAP_API void cpe_edition_iterator_reset(struct cpe_edition_iterator *it)
OSCAP_API void cpe_version_iterator_reset(struct cpe_version_iterator *it)
OSCAP_API void cpe_update_free(struct cpe_update *update)
Definition: cpedict_priv.c:1419
OSCAP_API int cpe_dict_model_get_base_version(const struct cpe_dict_model *item)
cpe_dict_model functions to get the base version from CPE dictionary model
OSCAP_API void cpe_update_iterator_reset(struct cpe_update_iterator *it)
OSCAP_API void cpe_product_free(struct cpe_product *product)
Definition: cpedict_priv.c:1397
OSCAP_API struct cpe_language * cpe_language_iterator_next(struct cpe_language_iterator *it)
Iterator over CPE language items.
Iterator over CPE dictionary checks.
OSCAP_API void cpe_language_iterator_reset(struct cpe_language_iterator *it)
OSCAP_API struct cpe_vendor * cpe_vendor_new(void)
Definition: cpedict_priv.c:407
OSCAP_API bool cpe_generator_set_schema_version(struct cpe_generator *generator, const char *new_schema_version)
OSCAP_API struct oscap_text_iterator * cpe_item_get_titles(const struct cpe_item *item)
cpe_item functions to get CPE titles
OSCAP_API bool cpe_dict_model_add_vendor(struct cpe_dict_model *dict, struct cpe_vendor *new_vendor)
OSCAP_API bool cpe_edition_add_language(struct cpe_edition *edition, struct cpe_language *new_language)
OSCAP_API bool cpe_item_metadata_set_status(struct cpe_item_metadata *item_metadata, const char *new_status)
OSCAP_API const char * cpe_vendor_get_value(const struct cpe_vendor *item)
cpe_vendor functions to get vendor value
OSCAP_API bool cpe_item_set_deprecation_date(struct cpe_item *item, const char *new_deprecation_date)
OSCAP_API void cpe_reference_iterator_remove(struct cpe_reference_iterator *it)
OSCAP_API bool cpe_update_iterator_has_more(struct cpe_update_iterator *it)
Iterator over CPE update items.
OSCAP_API bool cpe_check_set_href(struct cpe_check *check, const char *new_href)
OSCAP_API bool cpe_name_match_dict(struct cpe_name *cpe, struct cpe_dict_model *dict)
Verify wether given CPE is known according to specified dictionary.
Definition: cpedict.c:83
OSCAP_API struct cpe_vendor_iterator * cpe_dict_model_get_vendors(const struct cpe_dict_model *item)
cpe_dict_model functions to get vendors
OSCAP_API struct cpe_item_iterator * cpe_dict_model_get_items(const struct cpe_dict_model *item)
cpe_dict_model functions to get CPE items
OSCAP_API const char * cpe_language_get_value(const struct cpe_language *item)
cpe_language functions to get value of language
OSCAP_API bool cpe_product_set_part(struct cpe_product *product, cpe_part_t new_part)
cpe_part_t
enumeration of possible CPE parts
Definition: cpe_name.h:46