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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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
49 struct cpe_dict_model;
50
55 struct cpe_item;
56
61 struct cpe_vendor;
62
67 struct cpe_generator;
68
73 struct cpe_check;
74
79 struct cpe_reference;
80
85 struct cpe_item_metadata;
86
91 struct cpe_product;
96 struct cpe_version;
101 struct cpe_update;
106 struct cpe_edition;
111 struct cpe_language;
112
113 /************************************************************/
125 const char *cpe_item_metadata_get_modification_date(const struct cpe_item_metadata *item);
126
131 const char *cpe_item_metadata_get_status(const struct cpe_item_metadata *item);
132
137 const char *cpe_item_metadata_get_nvd_id(const struct cpe_item_metadata *item);
138
143 const char *cpe_item_metadata_get_deprecated_by_nvd_id(const struct cpe_item_metadata *item);
144
149 const char *cpe_check_get_system(const struct cpe_check *item);
150
155 const char *cpe_check_get_href(const struct cpe_check *item);
156
161 const char *cpe_check_get_identifier(const struct cpe_check *item);
162
167 const char *cpe_reference_get_href(const struct cpe_reference *item);
168
173 const char *cpe_reference_get_content(const struct cpe_reference *item);
174
179 struct cpe_name *cpe_item_get_name(const struct cpe_item *item);
180
185 struct cpe_name *cpe_item_get_deprecated_by(const struct cpe_item *item);
186
194 OSCAP_DEPRECATED(struct cpe_name *cpe_item_get_deprecated(const struct cpe_item *item));
195
200 const char *cpe_item_get_deprecation_date(const struct cpe_item *item);
201
206 struct cpe_item_metadata *cpe_item_get_metadata(const struct cpe_item *item);
207
212 struct cpe_reference_iterator *cpe_item_get_references(const struct cpe_item *item);
213
218 struct cpe_check_iterator *cpe_item_get_checks(const struct cpe_item *item);
219
224 struct oscap_text_iterator *cpe_item_get_titles(const struct cpe_item *item);
225
232 OSCAP_DEPRECATED(struct oscap_text_iterator *cpe_item_get_notes(const struct cpe_item *item));
233
238 const char *cpe_generator_get_product_name(const struct cpe_generator *item);
239
244 const char *cpe_generator_get_product_version(const struct cpe_generator *item);
245
250 const char *cpe_generator_get_schema_version(const struct cpe_generator *item);
251
256 const char *cpe_generator_get_timestamp(const struct cpe_generator *item);
257
269 int cpe_dict_model_get_base_version(const struct cpe_dict_model *item);
270
275 bool cpe_dict_model_set_base_version(struct cpe_dict_model *item, int base_version);
276
282 struct cpe_generator *cpe_dict_model_get_generator(const struct cpe_dict_model *item);
283
288 struct cpe_item_iterator *cpe_dict_model_get_items(const struct cpe_dict_model *item);
289
294 struct cpe_vendor_iterator *cpe_dict_model_get_vendors(const struct cpe_dict_model *item);
295
300 const char *cpe_vendor_get_value(const struct cpe_vendor *item);
301
306 struct oscap_text_iterator *cpe_vendor_get_titles(const struct cpe_vendor *item);
307
312 struct cpe_product_iterator *cpe_vendor_get_products(const struct cpe_vendor *item);
313
318 const char *cpe_product_get_value(const struct cpe_product *item);
319
324 cpe_part_t cpe_product_get_part(const struct cpe_product *item);
325
331 struct cpe_version_iterator *cpe_product_get_versions(const struct cpe_product *item);
332
337 const char *cpe_version_get_value(const struct cpe_version *item);
338
344 struct cpe_update_iterator *cpe_version_get_updates(const struct cpe_version *item);
345
350 const char *cpe_update_get_value(const struct cpe_update *item);
351
357 struct cpe_edition_iterator *cpe_update_get_editions(const struct cpe_update *item);
358
363 const char *cpe_edition_get_value(const struct cpe_edition *item);
364
370 struct cpe_language_iterator *cpe_edition_get_languages(const struct cpe_edition *item);
371
376 const char *cpe_language_get_value(const struct cpe_language *item);
377
378 /************************************************************/
381 void cpe_check_free(struct cpe_check *check);
384 void cpe_reference_free(struct cpe_reference *ref);
386 void cpe_vendor_free(struct cpe_vendor *vendor);
388 void cpe_product_free(struct cpe_product *product);
390 void cpe_version_free(struct cpe_version *version);
392 void cpe_update_free(struct cpe_update *update);
394 void cpe_edition_free(struct cpe_edition *edition);
396 void cpe_language_free(struct cpe_language *language);
398 void cpe_itemmetadata_free(struct cpe_item_metadata *meta);
400 void cpe_dict_model_free(struct cpe_dict_model *dict);
402 void cpe_generator_free(struct cpe_generator *generator);
404 void cpe_item_free(struct cpe_item *item);
405
407 struct cpe_dict_model *cpe_dict_model_new(void);
409 struct cpe_generator *cpe_generator_new(void);
411 struct cpe_check *cpe_check_new(void);
413 struct cpe_reference *cpe_reference_new(void);
415 struct cpe_item *cpe_item_new(void);
417 struct cpe_vendor *cpe_vendor_new(void);
419 struct cpe_product *cpe_product_new(void);
421 struct cpe_version *cpe_version_new(void);
423 struct cpe_update *cpe_update_new(void);
425 struct cpe_edition *cpe_edition_new(void);
427 struct cpe_language *cpe_language_new(void);
429 struct cpe_item_metadata *cpe_item_metadata_new(void);
430
431 /************************************************************/
439 bool cpe_item_set_name(struct cpe_item *item, const struct cpe_name *new_name);
441
443 bool cpe_item_set_deprecated_by(struct cpe_item *item, const struct cpe_name *new_deprecated_by);
444
446 bool cpe_item_set_deprecation_date(struct cpe_item *item, const char *new_deprecation_date);
447
449 bool cpe_item_metadata_set_modification_date(struct cpe_item_metadata *item_metadata,
450 const char *new_modification_date);
451
453 bool cpe_item_metadata_set_status(struct cpe_item_metadata *item_metadata, const char *new_status);
454
456 bool cpe_item_metadata_set_nvd_id(struct cpe_item_metadata *item_metadata, const char *new_nvd_id);
457
459 bool cpe_item_metadata_set_deprecated_by_nvd_id(struct cpe_item_metadata *item_metadata,
460 const char *new_deprecated_by_nvd_id);
461
463 bool cpe_check_set_system(struct cpe_check *check, const char *new_system);
464
466 bool cpe_check_set_href(struct cpe_check *check, const char *new_href);
467
469 bool cpe_check_set_identifier(struct cpe_check *check, const char *new_identifier);
470
472 bool cpe_reference_set_href(struct cpe_reference *reference, const char *new_href);
473
475 bool cpe_reference_set_content(struct cpe_reference *reference, const char *new_content);
476
478 bool cpe_generator_set_product_name(struct cpe_generator *generator, const char *new_product_name);
479
481 bool cpe_generator_set_product_version(struct cpe_generator *generator, const char *new_product_version);
482
484 bool cpe_generator_set_schema_version(struct cpe_generator *generator, const char *new_schema_version);
485
487 bool cpe_generator_set_timestamp(struct cpe_generator *generator, const char *new_timestamp);
488
490 bool cpe_vendor_set_value(struct cpe_vendor *vendor, const char *new_value);
491
493 bool cpe_product_set_value(struct cpe_product *product, const char *new_value);
494
496 bool cpe_product_set_part(struct cpe_product *product, cpe_part_t new_part);
497
499 bool cpe_version_set_value(struct cpe_version *version, const char *new_value);
500
502 bool cpe_update_set_value(struct cpe_update *update, const char *new_value);
503
505 bool cpe_edition_set_value(struct cpe_edition *edition, const char *new_value);
506
508 bool cpe_language_set_value(struct cpe_language *language, const char *new_value);
509
510 /*
511 * Add functions
512 */
513
515 bool cpe_item_add_reference(struct cpe_item *item, struct cpe_reference *new_reference);
516
518 bool cpe_item_add_check(struct cpe_item *item, struct cpe_check *new_check);
519
521 bool cpe_item_add_title(struct cpe_item *item, struct oscap_text *new_title);
522
528 OSCAP_DEPRECATED(bool cpe_item_add_note(struct cpe_item *item, struct oscap_text *new_title));
529
531 bool cpe_dict_model_add_item(struct cpe_dict_model *dict, struct cpe_item *new_item);
532
534 bool cpe_dict_model_add_vendor(struct cpe_dict_model *dict, struct cpe_vendor *new_vendor);
535
537 bool cpe_vendor_add_title(struct cpe_vendor *vendor, struct oscap_text *new_title);
538
540 bool cpe_vendor_add_product(struct cpe_vendor *vendor, struct cpe_product *new_product);
541
543 bool cpe_product_add_version(struct cpe_product *product, struct cpe_version *new_version);
544
546 bool cpe_version_add_update(struct cpe_version *version, struct cpe_update *new_update);
547
549 bool cpe_update_add_edition(struct cpe_update *update, struct cpe_edition *new_edition);
550
552 bool cpe_edition_add_language(struct cpe_edition *edition, struct cpe_language *new_language);
553
554
555 /************************************************************/
558 /************************************************************/
569 struct cpe_item_iterator;
570
576 struct cpe_item *cpe_item_iterator_next(struct cpe_item_iterator *it);
577
583 bool cpe_item_iterator_has_more(struct cpe_item_iterator *it);
584
590 void cpe_item_iterator_free(struct cpe_item_iterator *it);
591
593 void cpe_item_iterator_remove(struct cpe_item_iterator *it);
595 void cpe_item_iterator_reset(struct cpe_item_iterator *it);
596
602 struct cpe_reference_iterator;
603
609 struct cpe_reference *cpe_reference_iterator_next(struct cpe_reference_iterator *it);
610
616 bool cpe_reference_iterator_has_more(struct cpe_reference_iterator *it);
617
623 void cpe_reference_iterator_free(struct cpe_reference_iterator *it);
624
626 void cpe_reference_iterator_remove(struct cpe_reference_iterator *it);
628 void cpe_reference_iterator_reset(struct cpe_reference_iterator *it);
629
635 struct cpe_check_iterator;
636
642 struct cpe_check *cpe_check_iterator_next(struct cpe_check_iterator *it);
643
649 bool cpe_check_iterator_has_more(struct cpe_check_iterator *it);
650
656 void cpe_check_iterator_free(struct cpe_check_iterator *it);
657
659 void cpe_check_iterator_remove(struct cpe_check_iterator *it);
661 void cpe_check_iterator_reset(struct cpe_check_iterator *it);
662
668 struct cpe_vendor_iterator;
669
675 struct cpe_vendor *cpe_vendor_iterator_next(struct cpe_vendor_iterator *it);
676
682 bool cpe_vendor_iterator_has_more(struct cpe_vendor_iterator *it);
683
689 void cpe_vendor_iterator_free(struct cpe_vendor_iterator *it);
690
692 void cpe_vendor_iterator_remove(struct cpe_vendor_iterator *it);
694 void cpe_vendor_iterator_reset(struct cpe_vendor_iterator *it);
695
701 struct cpe_product_iterator;
702
708 struct cpe_product *cpe_product_iterator_next(struct cpe_product_iterator *it);
709
715 bool cpe_product_iterator_has_more(struct cpe_product_iterator *it);
716
722 void cpe_product_iterator_free(struct cpe_product_iterator *it);
723
725 void cpe_product_iterator_remove(struct cpe_product_iterator *it);
727 void cpe_product_iterator_reset(struct cpe_product_iterator *it);
728
734 struct cpe_version_iterator;
735
741 struct cpe_version *cpe_version_iterator_next(struct cpe_version_iterator *it);
742
748 bool cpe_version_iterator_has_more(struct cpe_version_iterator *it);
749
755 void cpe_version_iterator_free(struct cpe_version_iterator *it);
756
758 void cpe_version_iterator_remove(struct cpe_version_iterator *it);
760 void cpe_version_iterator_reset(struct cpe_version_iterator *it);
761
767 struct cpe_update_iterator;
768
774 struct cpe_update *cpe_update_iterator_next(struct cpe_update_iterator *it);
775
781 bool cpe_update_iterator_has_more(struct cpe_update_iterator *it);
782
788 void cpe_update_iterator_free(struct cpe_update_iterator *it);
789
791 void cpe_update_iterator_remove(struct cpe_update_iterator *it);
793 void cpe_update_iterator_reset(struct cpe_update_iterator *it);
794
800 struct cpe_edition_iterator;
801
807 struct cpe_edition *cpe_edition_iterator_next(struct cpe_edition_iterator *it);
808
814 bool cpe_edition_iterator_has_more(struct cpe_edition_iterator *it);
815
821 void cpe_edition_iterator_free(struct cpe_edition_iterator *it);
822
824 void cpe_edition_iterator_remove(struct cpe_edition_iterator *it);
826 void cpe_edition_iterator_reset(struct cpe_edition_iterator *it);
827
833 struct cpe_language_iterator;
834
840 struct cpe_language *cpe_language_iterator_next(struct cpe_language_iterator *it);
841
847 bool cpe_language_iterator_has_more(struct cpe_language_iterator *it);
848
854 void cpe_language_iterator_free(struct cpe_language_iterator *it);
855
857 void cpe_language_iterator_remove(struct cpe_language_iterator *it);
859 void cpe_language_iterator_reset(struct cpe_language_iterator *it);
860
861 /************************************************************/
864 /************************************************************/
875 const char * cpe_dict_model_supported(void);
876
884 OSCAP_DEPRECATED(char *cpe_dict_detect_version(const char* file));
885
894 bool cpe_name_match_dict(struct cpe_name *cpe, struct cpe_dict_model *dict);
895
904 bool cpe_name_match_dict_str(const char *cpe, struct cpe_dict_model *dict);
905
915 bool cpe_name_applicable_dict(struct cpe_name *cpe, struct cpe_dict_model *dict, cpe_check_fn cb, void* usr);
916
918 bool cpe_item_is_applicable(struct cpe_item* item, cpe_check_fn cb, void* usr);
919
920 /************************************************************/
928 void cpe_dict_model_export(const struct cpe_dict_model *dict, const char *file);
929
939 OSCAP_DEPRECATED(struct cpe_dict_model *cpe_dict_model_import(const char *file));
940
947 struct cpe_dict_model *cpe_dict_model_import_source(struct oscap_source *source);
948
949
955 bool cpe_dict_model_set_origin_file(struct cpe_dict_model* dict, const char* origin_file);
956
964 const char* cpe_dict_model_get_origin_file(const struct cpe_dict_model* dict);
965
970 #endif /* _CPEDICT_H_ */
cpe_version::cpe_product_get_versions
struct cpe_version_iterator * cpe_product_get_versions(const struct cpe_product *item)
cpe_product functions to get versions of product
cpe_version_iterator::cpe_version_iterator_next
struct cpe_version * cpe_version_iterator_next(struct cpe_version_iterator *it)
Iterator over CPE version items.
cpe_product
Product of some vendor.
Definition: cpedict_priv.c:180
cpe_version::cpe_version_free
void cpe_version_free(struct cpe_version *version)
Definition: cpedict_priv.c:1402
cpe_check::cpe_check_get_href
const char * cpe_check_get_href(const struct cpe_check *item)
cpe_check functions to get href
cpe_dict_model::cpe_dict_model_get_vendors
struct cpe_vendor_iterator * cpe_dict_model_get_vendors(const struct cpe_dict_model *item)
cpe_dict_model functions to get vendors
cpe_update::cpe_update_free
void cpe_update_free(struct cpe_update *update)
Definition: cpedict_priv.c:1413
cpe_check
Structure representing single CPE check.
Definition: cpedict_priv.c:127
cpe_reference
CPE dictionary item reference.
Definition: cpedict_priv.c:138
cpe_item::cpe_item_add_reference
bool cpe_item_add_reference(struct cpe_item *item, struct cpe_reference *new_reference)
cpe_check::cpe_check_get_identifier
const char * cpe_check_get_identifier(const struct cpe_check *item)
cpe_check functions to get identifier
cpe_dict_model::cpe_dict_model_new
struct cpe_dict_model * cpe_dict_model_new(void)
Definition: cpedict_priv.c:300
cpe_check_iterator::cpe_check_iterator_remove
void cpe_check_iterator_remove(struct cpe_check_iterator *it)
cpe_generator
Structure with information about document.
Definition: cpedict_priv.c:147
cpe_product_iterator::cpe_product_iterator_free
void cpe_product_iterator_free(struct cpe_product_iterator *it)
Iterator over CPE product items.
oscap.h
General OpenScap functions and types.
cpe_dict_model::cpe_name_match_dict_str
bool cpe_name_match_dict_str(const char *cpe, struct cpe_dict_model *dict)
Verify if CPE given by string is known according to specified dictionary.
Definition: cpedict.c:134
cpe_item_metadata::cpe_item_metadata_set_modification_date
bool cpe_item_metadata_set_modification_date(struct cpe_item_metadata *item_metadata, const char *new_modification_date)
cpe_item::cpe_item_get_deprecated
struct cpe_name * cpe_item_get_deprecated(const struct cpe_item *item)
cpe_item functions to get variable member deprecated_by
Definition: cpedict_priv.c:98
cpe_edition
Edition of product update.
Definition: cpedict_priv.c:212
cpe_update_iterator
Iterator over CPE dictionary item updates.
cpe_product::cpe_product_new
struct cpe_product * cpe_product_new(void)
Definition: cpedict_priv.c:431
cpe_dict_model::cpe_dict_model_add_item
bool cpe_dict_model_add_item(struct cpe_dict_model *dict, struct cpe_item *new_item)
cpe_edition::cpe_edition_add_language
bool cpe_edition_add_language(struct cpe_edition *edition, struct cpe_language *new_language)
cpe_item_metadata::cpe_item_metadata_get_nvd_id
const char * cpe_item_metadata_get_nvd_id(const struct cpe_item_metadata *item)
cpe_item_metadata function to get nvd ID
cpe_vendor::cpe_vendor_add_product
bool cpe_vendor_add_product(struct cpe_vendor *vendor, struct cpe_product *new_product)
cpe_product_iterator::cpe_product_iterator_next
struct cpe_product * cpe_product_iterator_next(struct cpe_product_iterator *it)
Iterator over CPE product items.
cpe_vendor
Structure with information about vendor.
Definition: cpe_dict.h:55
cpe_vendor::cpe_vendor_get_value
const char * cpe_vendor_get_value(const struct cpe_vendor *item)
cpe_vendor functions to get vendor value
cpe_check::cpe_check_set_system
bool cpe_check_set_system(struct cpe_check *check, const char *new_system)
cpe_item_metadata::cpe_item_metadata_get_status
const char * cpe_item_metadata_get_status(const struct cpe_item_metadata *item)
cpe_item_metadata function to get status
cpe_language_iterator::cpe_language_iterator_has_more
bool cpe_language_iterator_has_more(struct cpe_language_iterator *it)
Iterator over CPE language items.
cpe_check_iterator::cpe_check_iterator_free
void cpe_check_iterator_free(struct cpe_check_iterator *it)
Iterator over CPE item check items.
OSCAP_DEPRECATED
#define OSCAP_DEPRECATED(func)
This macro will warn, when a deprecated function is used.
Definition: oscap.h:50
cpe_generator::cpe_generator_set_product_name
bool cpe_generator_set_product_name(struct cpe_generator *generator, const char *new_product_name)
cpe_vendor::cpe_vendor_new
struct cpe_vendor * cpe_vendor_new(void)
Definition: cpedict_priv.c:414
cpe_check::cpe_check_set_identifier
bool cpe_check_set_identifier(struct cpe_check *check, const char *new_identifier)
cpe_edition_iterator::cpe_edition_iterator_remove
void cpe_edition_iterator_remove(struct cpe_edition_iterator *it)
cpe_check::cpe_check_get_system
const char * cpe_check_get_system(const struct cpe_check *item)
cpe_check functions to get system
cpe_version_iterator::cpe_version_iterator_remove
void cpe_version_iterator_remove(struct cpe_version_iterator *it)
cpe_dict_model::cpe_dict_model_free
void cpe_dict_model_free(struct cpe_dict_model *dict)
Definition: cpedict_priv.c:1305
cpe_generator::cpe_generator_get_timestamp
const char * cpe_generator_get_timestamp(const struct cpe_generator *item)
cpe_generator functions to get timestamp from generator
cpe_language_iterator
Iterator over CPE dictionary item languages.
cpe_item_metadata::cpe_item_metadata_new
struct cpe_item_metadata * cpe_item_metadata_new(void)
Definition: cpedict_priv.c:320
cpe_check_fn
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:362
cpe_item::cpe_item_set_deprecated_by
bool cpe_item_set_deprecated_by(struct cpe_item *item, const struct cpe_name *new_deprecated_by)
cpe_update
Update of product version.
Definition: cpedict_priv.c:202
cpe_item_metadata::cpe_item_metadata_set_status
bool cpe_item_metadata_set_status(struct cpe_item_metadata *item_metadata, const char *new_status)
cpe_version_iterator::cpe_version_iterator_free
void cpe_version_iterator_free(struct cpe_version_iterator *it)
Iterator over CPE version items.
cpe_product::cpe_product_get_value
const char * cpe_product_get_value(const struct cpe_product *item)
cpe_product functions to get product value
cpe_edition::cpe_edition_get_value
const char * cpe_edition_get_value(const struct cpe_edition *item)
cpe_edition functions to get value of edition
cpe_product::cpe_product_free
void cpe_product_free(struct cpe_product *product)
Definition: cpedict_priv.c:1391
cpe_item::cpe_item_iterator_remove
void cpe_item_iterator_remove(struct cpe_item_iterator *it)
cpe_item::cpe_item_get_name
struct cpe_name * cpe_item_get_name(const struct cpe_item *item)
cpe_item functions to get variable member name
cpe_language_iterator::cpe_language_iterator_remove
void cpe_language_iterator_remove(struct cpe_language_iterator *it)
cpe_dict_model::cpe_dict_model_add_vendor
bool cpe_dict_model_add_vendor(struct cpe_dict_model *dict, struct cpe_vendor *new_vendor)
cpe_item_iterator
Iterator over CPE dictionary items.
cpe_edition_iterator::cpe_edition_iterator_free
void cpe_edition_iterator_free(struct cpe_edition_iterator *it)
Iterator over CPE edition items.
cpe_update::cpe_update_set_value
bool cpe_update_set_value(struct cpe_update *update, const char *new_value)
cpe_language::cpe_language_get_value
const char * cpe_language_get_value(const struct cpe_language *item)
cpe_language functions to get value of language
cpe_name.h
Interface to Common Platform Enumeration (CPE) URI.
cpe_dict_model::cpe_dict_model_import_source
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
cpe_update_iterator::cpe_update_iterator_free
void cpe_update_iterator_free(struct cpe_update_iterator *it)
Iterator over CPE update items.
cpe_product::cpe_product_set_value
bool cpe_product_set_value(struct cpe_product *product, const char *new_value)
cpe_generator::cpe_generator_get_product_version
const char * cpe_generator_get_product_version(const struct cpe_generator *item)
cpe_generator functions to get product version
cpe_generator::cpe_generator_set_schema_version
bool cpe_generator_set_schema_version(struct cpe_generator *generator, const char *new_schema_version)
cpe_language_iterator::cpe_language_iterator_next
struct cpe_language * cpe_language_iterator_next(struct cpe_language_iterator *it)
Iterator over CPE language items.
cpe_update_iterator::cpe_update_iterator_has_more
bool cpe_update_iterator_has_more(struct cpe_update_iterator *it)
Iterator over CPE update items.
cpe_vendor_iterator::cpe_vendor_iterator_remove
void cpe_vendor_iterator_remove(struct cpe_vendor_iterator *it)
cpe_generator::cpe_generator_free
void cpe_generator_free(struct cpe_generator *generator)
Definition: cpedict_priv.c:1334
cpe_generator::cpe_generator_get_schema_version
const char * cpe_generator_get_schema_version(const struct cpe_generator *item)
cpe_generator functions to get document schema version
cpe_update_iterator::cpe_update_iterator_reset
void cpe_update_iterator_reset(struct cpe_update_iterator *it)
cpe_language::cpe_language_set_value
bool cpe_language_set_value(struct cpe_language *language, const char *new_value)
oscap_text_iterator
Internationalized string iterator.
cpe_edition::cpe_edition_new
struct cpe_edition * cpe_edition_new(void)
Definition: cpedict_priv.c:479
cpe_dict_model::cpe_dict_model_supported
const char * cpe_dict_model_supported(void)
Get the newest supported version of CPE dictionary XML.
Definition: cpedict.c:207
cpe_item::cpe_item_add_check
bool cpe_item_add_check(struct cpe_item *item, struct cpe_check *new_check)
cpe_edition_iterator::cpe_edition_iterator_next
struct cpe_edition * cpe_edition_iterator_next(struct cpe_edition_iterator *it)
Iterator over CPE edition items.
cpe_generator::cpe_generator_new
struct cpe_generator * cpe_generator_new(void)
Definition: cpedict_priv.c:396
cpe_item::cpe_item_get_deprecation_date
const char * cpe_item_get_deprecation_date(const struct cpe_item *item)
cpe_item functions to get variable member date
cpe_product::cpe_product_add_version
bool cpe_product_add_version(struct cpe_product *product, struct cpe_version *new_version)
cpe_language_iterator::cpe_language_iterator_reset
void cpe_language_iterator_reset(struct cpe_language_iterator *it)
cpe_version::cpe_version_set_value
bool cpe_version_set_value(struct cpe_version *version, const char *new_value)
cpe_item_metadata::cpe_item_metadata_set_deprecated_by_nvd_id
bool cpe_item_metadata_set_deprecated_by_nvd_id(struct cpe_item_metadata *item_metadata, const char *new_deprecated_by_nvd_id)
cpe_version::cpe_version_add_update
bool cpe_version_add_update(struct cpe_version *version, struct cpe_update *new_update)
cpe_language_iterator::cpe_language_iterator_free
void cpe_language_iterator_free(struct cpe_language_iterator *it)
Iterator over CPE language items.
cpe_dict_model_set_origin_file
bool cpe_dict_model_set_origin_file(struct cpe_dict_model *dict, const char *origin_file)
Sets the origin file hint.
Definition: cpedict.c:80
cpe_vendor_iterator
Iterator over CPE dictionary item vendors.
cpe_reference::cpe_reference_new
struct cpe_reference * cpe_reference_new(void)
Definition: cpedict_priv.c:373
cpe_item_metadata::cpe_item_metadata_get_modification_date
const char * cpe_item_metadata_get_modification_date(const struct cpe_item_metadata *item)
cpe_item_metadata function to get date
cpe_edition_iterator
Iterator over CPE dictionary item editions.
cpe_language::cpe_language_free
void cpe_language_free(struct cpe_language *language)
Definition: cpedict_priv.c:1435
cpe_vendor::cpe_vendor_get_titles
struct oscap_text_iterator * cpe_vendor_get_titles(const struct cpe_vendor *item)
cpe_vendor functions to get vendor titles
cpe_product_iterator::cpe_product_iterator_has_more
bool cpe_product_iterator_has_more(struct cpe_product_iterator *it)
Iterator over CPE product items.
cpe_vendor::cpe_vendor_get_products
struct cpe_product_iterator * cpe_vendor_get_products(const struct cpe_vendor *item)
cpe_vendor functions to get vendor products
cpe_item_metadata::cpe_item_metadata_get_deprecated_by_nvd_id
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
cpe_item_iterator::cpe_item_iterator_has_more
bool cpe_item_iterator_has_more(struct cpe_item_iterator *it)
Iterator over CPE dictionary items.
cpe_version
Version of product.
Definition: cpedict_priv.c:192
cpe_product::cpe_product_set_part
bool cpe_product_set_part(struct cpe_product *product, cpe_part_t new_part)
cpe_vendor_iterator::cpe_vendor_iterator_next
struct cpe_vendor * cpe_vendor_iterator_next(struct cpe_vendor_iterator *it)
Iterator over CPE vendor items.
cpe_item::cpe_item_get_references
struct cpe_reference_iterator * cpe_item_get_references(const struct cpe_item *item)
cpe_item functions to get CPE references
cpe_check_iterator::cpe_check_iterator_next
struct cpe_check * cpe_check_iterator_next(struct cpe_check_iterator *it)
Iterator over CPE item check items.
cpe_product_iterator::cpe_product_iterator_remove
void cpe_product_iterator_remove(struct cpe_product_iterator *it)
cpe_check_iterator::cpe_check_iterator_reset
void cpe_check_iterator_reset(struct cpe_check_iterator *it)
cpe_item::cpe_item_set_deprecation_date
bool cpe_item_set_deprecation_date(struct cpe_item *item, const char *new_deprecation_date)
cpe_generator::cpe_dict_model_get_generator
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
cpe_dict_model_get_origin_file
const char * cpe_dict_model_get_origin_file(const struct cpe_dict_model *dict)
Gets the file the CPE dict model was loaded from.
Definition: cpedict.c:88
cpe_generator::cpe_generator_set_timestamp
bool cpe_generator_set_timestamp(struct cpe_generator *generator, const char *new_timestamp)
cpe_update::cpe_version_get_updates
struct cpe_update_iterator * cpe_version_get_updates(const struct cpe_version *item)
cpe_version functions to get value of version
cpe_reference_iterator::cpe_reference_iterator_reset
void cpe_reference_iterator_reset(struct cpe_reference_iterator *it)
cpe_reference::cpe_reference_set_href
bool cpe_reference_set_href(struct cpe_reference *reference, const char *new_href)
cpe_check::cpe_check_set_href
bool cpe_check_set_href(struct cpe_check *check, const char *new_href)
cpe_item::cpe_item_add_note
bool cpe_item_add_note(struct cpe_item *item, struct oscap_text *new_title)
cpe_item::cpe_item_new
struct cpe_item * cpe_item_new(void)
Definition: cpedict_priv.c:338
cpe_dict_model::cpe_dict_model_import
struct cpe_dict_model * cpe_dict_model_import(const char *file)
Load new CPE dictionary from file.
Definition: cpedict.c:70
cpe_item_metadata
Structure representing metadata of CPE item.
Definition: cpedict_priv.c:114
cpe_reference_iterator::cpe_reference_iterator_remove
void cpe_reference_iterator_remove(struct cpe_reference_iterator *it)
cpe_version::cpe_version_get_value
const char * cpe_version_get_value(const struct cpe_version *item)
cpe_version functions to get vupdates of versions
cpe_version_iterator::cpe_version_iterator_has_more
bool cpe_version_iterator_has_more(struct cpe_version_iterator *it)
Iterator over CPE version items.
cpe_dict_model
Structure representing a CPE dictionary.
Definition: cpedict_priv.h:126
cpe_check::cpe_check_free
void cpe_check_free(struct cpe_check *check)
Definition: cpedict_priv.c:1347
cpe_vendor_iterator::cpe_vendor_iterator_reset
void cpe_vendor_iterator_reset(struct cpe_vendor_iterator *it)
oscap_text.h
Multilingual text processing interface.
cpe_check::cpe_check_new
struct cpe_check * cpe_check_new(void)
Definition: cpedict_priv.c:356
oscap_source
Definition: oscap_source.c:62
cpe_version::cpe_version_new
struct cpe_version * cpe_version_new(void)
Definition: cpedict_priv.c:447
cpe_version_iterator
Iterator over CPE dictionary item versions.
cpe_version_iterator::cpe_version_iterator_reset
void cpe_version_iterator_reset(struct cpe_version_iterator *it)
cpe_dict_model::cpe_dict_model_set_base_version
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
cpe_product_iterator::cpe_product_iterator_reset
void cpe_product_iterator_reset(struct cpe_product_iterator *it)
cpe_reference::cpe_reference_get_content
const char * cpe_reference_get_content(const struct cpe_reference *item)
cpe_reference functions to get content of reference
cpe_dict_model::cpe_dict_model_get_items
struct cpe_item_iterator * cpe_dict_model_get_items(const struct cpe_dict_model *item)
cpe_dict_model functions to get CPE items
cpe_reference::cpe_reference_get_href
const char * cpe_reference_get_href(const struct cpe_reference *item)
cpe_reference functions to get href of reference
cpe_item
Structure representing single CPE dictionary item.
Definition: cpedict_priv.c:71
cpe_vendor::cpe_vendor_set_value
bool cpe_vendor_set_value(struct cpe_vendor *vendor, const char *new_value)
cpe_name
Structure holding Common Platform Enumeration URI data.
Definition: cpename.c:69
cpe_update::cpe_update_get_value
const char * cpe_update_get_value(const struct cpe_update *item)
cpe_update functions to get updates of version
cpe_product_iterator
Iterator over CPE dictionary item products.
cpe_edition::cpe_edition_set_value
bool cpe_edition_set_value(struct cpe_edition *edition, const char *new_value)
cpe_reference_iterator::cpe_reference_iterator_next
struct cpe_reference * cpe_reference_iterator_next(struct cpe_reference_iterator *it)
Iterator over CPE item reference items.
cpe_item::cpe_item_get_titles
struct oscap_text_iterator * cpe_item_get_titles(const struct cpe_item *item)
cpe_item functions to get CPE titles
oscap_text
Representation of internationalizable character strings.
Definition: text_priv.h:47
cpe_language
Language of product edition.
Definition: cpedict_priv.c:222
cpe_item_iterator::cpe_item_iterator_next
struct cpe_item * cpe_item_iterator_next(struct cpe_item_iterator *it)
Iterator over CPE dictionary items.
cpe_edition_iterator::cpe_edition_iterator_has_more
bool cpe_edition_iterator_has_more(struct cpe_edition_iterator *it)
Iterator over CPE edition items.
cpe_check_iterator::cpe_check_iterator_has_more
bool cpe_check_iterator_has_more(struct cpe_check_iterator *it)
Iterator over CPE item check items.
cpe_item::cpe_item_get_checks
struct cpe_check_iterator * cpe_item_get_checks(const struct cpe_item *item)
cpe_item functions to get CPE checks
cpe_vendor::cpe_vendor_add_title
bool cpe_vendor_add_title(struct cpe_vendor *vendor, struct oscap_text *new_title)
cpe_reference_iterator
Iterator over CPE dictionary references.
cpe_update::cpe_update_new
struct cpe_update * cpe_update_new(void)
Definition: cpedict_priv.c:463
cpe_dict_model::cpe_dict_model_get_base_version
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
cpe_dict_model::cpe_name_match_dict
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:106
cpe_edition_iterator::cpe_edition_iterator_reset
void cpe_edition_iterator_reset(struct cpe_edition_iterator *it)
cpe_dict_detect_version
char * cpe_dict_detect_version(const char *file)
Detects which version the given CPE file is.
Definition: cpedict.c:256
cpe_product::cpe_product_get_part
cpe_part_t cpe_product_get_part(const struct cpe_product *item)
cpe_product functions to get product part
cpe_update::cpe_update_add_edition
bool cpe_update_add_edition(struct cpe_update *update, struct cpe_edition *new_edition)
cpe_item::cpe_item_set_name
bool cpe_item_set_name(struct cpe_item *item, const struct cpe_name *new_name)
cpe_reference_iterator::cpe_reference_iterator_has_more
bool cpe_reference_iterator_has_more(struct cpe_reference_iterator *it)
Iterator over CPE item reference items.
cpe_reference::cpe_reference_free
void cpe_reference_free(struct cpe_reference *ref)
Definition: cpedict_priv.c:1359
cpe_item_iterator::cpe_item_iterator_reset
void cpe_item_iterator_reset(struct cpe_item_iterator *it)
cpe_update_iterator::cpe_update_iterator_next
struct cpe_update * cpe_update_iterator_next(struct cpe_update_iterator *it)
Iterator over CPE update items.
cpe_item_iterator::cpe_item_iterator_free
void cpe_item_iterator_free(struct cpe_item_iterator *it)
Iterator over CPE dictionary items.
cpe_check_iterator
Iterator over CPE dictionary checks.
cpe_item::cpe_item_get_deprecated_by
struct cpe_name * cpe_item_get_deprecated_by(const struct cpe_item *item)
cpe_item functions to get variable member deprecated_by
cpe_item::cpe_item_is_applicable
bool cpe_item_is_applicable(struct cpe_item *item, cpe_check_fn cb, void *usr)
Definition: cpedict.c:190
cpe_reference_iterator::cpe_reference_iterator_free
void cpe_reference_iterator_free(struct cpe_reference_iterator *it)
Iterator over CPE item reference items.
cpe_item::cpe_item_add_title
bool cpe_item_add_title(struct cpe_item *item, struct oscap_text *new_title)
cpe_vendor_iterator::cpe_vendor_iterator_has_more
bool cpe_vendor_iterator_has_more(struct cpe_vendor_iterator *it)
Iterator over CPE vendor items.
cpe_item_metadata::cpe_item_metadata_set_nvd_id
bool cpe_item_metadata_set_nvd_id(struct cpe_item_metadata *item_metadata, const char *new_nvd_id)
cpe_generator::cpe_generator_get_product_name
const char * cpe_generator_get_product_name(const struct cpe_generator *item)
cpe_generator functions to get product name
cpe_dict_model::cpe_name_applicable_dict
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:150
cpe_generator::cpe_generator_set_product_version
bool cpe_generator_set_product_version(struct cpe_generator *generator, const char *new_product_version)
cpe_vendor_iterator::cpe_vendor_iterator_free
void cpe_vendor_iterator_free(struct cpe_vendor_iterator *it)
Iterator over CPE vendor items.
cpe_item::cpe_item_get_metadata
struct cpe_item_metadata * cpe_item_get_metadata(const struct cpe_item *item)
cpe_item functions to get metadata of cpe_item
cpe_item::cpe_item_get_notes
struct oscap_text_iterator * cpe_item_get_notes(const struct cpe_item *item)
cpe_item functions to get CPE notes
cpe_language::cpe_language_new
struct cpe_language * cpe_language_new(void)
Definition: cpedict_priv.c:495
cpe_item::cpe_item_free
void cpe_item_free(struct cpe_item *item)
Definition: cpedict_priv.c:1317
cpe_update_iterator::cpe_update_iterator_remove
void cpe_update_iterator_remove(struct cpe_update_iterator *it)
cpe_dict_model::cpe_dict_model_export
void cpe_dict_model_export(const struct cpe_dict_model *dict, const char *file)
Write the dict_model to a file.
Definition: cpedict.c:93
cpe_vendor::cpe_vendor_free
void cpe_vendor_free(struct cpe_vendor *vendor)
Definition: cpedict_priv.c:1379
cpe_reference::cpe_reference_set_content
bool cpe_reference_set_content(struct cpe_reference *reference, const char *new_content)
cpe_edition::cpe_update_get_editions
struct cpe_edition_iterator * cpe_update_get_editions(const struct cpe_update *item)
cpe_update functions to get editions of update
cpe_edition::cpe_edition_free
void cpe_edition_free(struct cpe_edition *edition)
Definition: cpedict_priv.c:1424
cpe_language::cpe_edition_get_languages
struct cpe_language_iterator * cpe_edition_get_languages(const struct cpe_edition *item)
cpe_edition functions to get languages of edition
cpe_part_t
cpe_part_t
enumeration of possible CPE parts
Definition: cpe_name.h:45