Go to the documentation of this file.
43 #include "oscap_source.h"
44 #include "oscap_export.h"
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);
386 OSCAP_API
void cpe_generator_free(
struct cpe_generator *generator);
388 OSCAP_API
void cpe_item_free(
struct cpe_item *item);
395 OSCAP_API
struct cpe_check *cpe_check_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);
423 OSCAP_API
bool cpe_item_set_name(
struct cpe_item *item,
const struct cpe_name *new_name);
427 OSCAP_API
bool cpe_item_set_deprecated_by(
struct cpe_item *item,
const struct cpe_name *new_deprecated_by);
430 OSCAP_API
bool cpe_item_set_deprecation_date(
struct cpe_item *item,
const char *new_deprecation_date);
433 OSCAP_API
bool cpe_item_metadata_set_modification_date(
struct cpe_item_metadata *item_metadata,
434 const char *new_modification_date);
437 OSCAP_API
bool cpe_item_metadata_set_status(
struct cpe_item_metadata *item_metadata,
const char *new_status);
440 OSCAP_API
bool cpe_item_metadata_set_nvd_id(
struct cpe_item_metadata *item_metadata,
const char *new_nvd_id);
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);
447 OSCAP_API
bool cpe_check_set_system(
struct cpe_check *check,
const char *new_system);
450 OSCAP_API
bool cpe_check_set_href(
struct cpe_check *check,
const char *new_href);
453 OSCAP_API
bool cpe_check_set_identifier(
struct cpe_check *check,
const char *new_identifier);
456 OSCAP_API
bool cpe_reference_set_href(
struct cpe_reference *reference,
const char *new_href);
459 OSCAP_API
bool cpe_reference_set_content(
struct cpe_reference *reference,
const char *new_content);
462 OSCAP_API
bool cpe_generator_set_product_name(
struct cpe_generator *generator,
const char *new_product_name);
465 OSCAP_API
bool cpe_generator_set_product_version(
struct cpe_generator *generator,
const char *new_product_version);
468 OSCAP_API
bool cpe_generator_set_schema_version(
struct cpe_generator *generator,
const char *new_schema_version);
471 OSCAP_API
bool cpe_generator_set_timestamp(
struct cpe_generator *generator,
const char *new_timestamp);
474 OSCAP_API
bool cpe_vendor_set_value(
struct cpe_vendor *vendor,
const char *new_value);
477 OSCAP_API
bool cpe_product_set_value(
struct cpe_product *product,
const char *new_value);
483 OSCAP_API
bool cpe_version_set_value(
struct cpe_version *version,
const char *new_value);
486 OSCAP_API
bool cpe_update_set_value(
struct cpe_update *update,
const char *new_value);
489 OSCAP_API
bool cpe_edition_set_value(
struct cpe_edition *edition,
const char *new_value);
492 OSCAP_API
bool cpe_language_set_value(
struct cpe_language *language,
const char *new_value);
502 OSCAP_API
bool cpe_item_add_check(
struct cpe_item *item,
struct cpe_check *new_check);
505 OSCAP_API
bool cpe_item_add_title(
struct cpe_item *item,
struct oscap_text *new_title);
Definition: cpedict_priv.c:140
OSCAP_API struct cpe_vendor * cpe_vendor_iterator_next(struct cpe_vendor_iterator *it)
Iterator over CPE vendor items.
const OSCAP_API char * cpe_product_get_value(const struct cpe_product *item)
cpe_product functions to get product value
const OSCAP_API char * cpe_language_get_value(const struct cpe_language *item)
cpe_language functions to get value of language
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
const OSCAP_API char * cpe_item_metadata_get_nvd_id(const struct cpe_item_metadata *item)
cpe_item_metadata function to get nvd ID
const OSCAP_API char * cpe_vendor_get_value(const struct cpe_vendor *item)
cpe_vendor functions to get vendor value
const OSCAP_API char * cpe_reference_get_href(const struct cpe_reference *item)
cpe_reference functions to get href of reference
OSCAP_API struct cpe_reference * cpe_reference_iterator_next(struct cpe_reference_iterator *it)
Iterator over CPE item reference items.
OSCAP_API void cpe_edition_iterator_free(struct cpe_edition_iterator *it)
Iterator over CPE edition items.
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 bool cpe_update_iterator_has_more(struct cpe_update_iterator *it)
Iterator over CPE update items.
Definition: oscap_source.c:66
Definition: cpedict_priv.c:205
OSCAP_API void cpe_item_iterator_free(struct cpe_item_iterator *it)
Iterator over CPE dictionary items.
Definition: cpedict_priv.c:71
cpe_part_t
enumeration of possible CPE parts
Definition: cpe_name.h:46
OSCAP_API struct cpe_item_metadata * cpe_item_get_metadata(const struct cpe_item *item)
cpe_item functions to get metadata of cpe_item
OSCAP_API bool cpe_item_iterator_has_more(struct cpe_item_iterator *it)
Iterator over CPE dictionary items.
OSCAP_API struct cpe_check * cpe_check_iterator_next(struct cpe_check_iterator *it)
Iterator over CPE item check items.
Definition: cpedict_priv.c:131
OSCAP_API void cpe_check_iterator_free(struct cpe_check_iterator *it)
Iterator over CPE item check items.
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 void cpe_language_iterator_free(struct cpe_language_iterator *it)
Iterator over CPE language items.
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 void cpe_vendor_iterator_free(struct cpe_vendor_iterator *it)
Iterator over CPE vendor items.
Definition: cpedict_priv.c:120
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
const OSCAP_API char * cpe_generator_get_product_name(const struct cpe_generator *item)
cpe_generator functions to get product name
OSCAP_API bool cpe_version_iterator_has_more(struct cpe_version_iterator *it)
Iterator over CPE version items.
OSCAP_API bool cpe_language_iterator_has_more(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.
const OSCAP_API char * cpe_item_metadata_get_status(const struct cpe_item_metadata *item)
cpe_item_metadata function to get status
OSCAP_API struct cpe_version_iterator * cpe_product_get_versions(const struct cpe_product *item)
cpe_product functions to get versions of product
Definition: cpedict_priv.c:195
const OSCAP_API char * cpe_version_get_value(const struct cpe_version *item)
cpe_version functions to get vupdates of versions
const OSCAP_API char * cpe_item_metadata_get_modification_date(const struct cpe_item_metadata *item)
cpe_item_metadata function to get date
Definition: cpedict_priv.h:139
OSCAP_API struct cpe_product_iterator * cpe_vendor_get_products(const struct cpe_vendor *item)
cpe_vendor functions to get vendor products
const OSCAP_API char * cpe_generator_get_product_version(const struct cpe_generator *item)
cpe_generator functions to get 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 struct oscap_text_iterator * cpe_vendor_get_titles(const struct cpe_vendor *item)
cpe_vendor functions to get vendor titles
OSCAP_API bool cpe_product_iterator_has_more(struct cpe_product_iterator *it)
Iterator over CPE product items.
const OSCAP_API char * cpe_reference_get_content(const struct cpe_reference *item)
cpe_reference functions to get content of reference
OSCAP_API void cpe_update_iterator_free(struct cpe_update_iterator *it)
Iterator over CPE update items.
const OSCAP_API char * cpe_check_get_system(const struct cpe_check *item)
cpe_check functions to get system
OSCAP_API bool cpe_reference_iterator_has_more(struct cpe_reference_iterator *it)
Iterator over CPE item reference items.
Definition: cpe_dict.h:56
const OSCAP_API char * cpe_dict_model_supported(void)
Get the newest supported version of CPE dictionary XML.
Definition: cpedict.c:168
OSCAP_API struct cpe_product * cpe_product_iterator_next(struct cpe_product_iterator *it)
Iterator over CPE product items.
Interface to Common Platform Enumeration (CPE) URI.
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 struct cpe_name * cpe_item_get_name(const struct cpe_item *item)
cpe_item functions to get variable member name
const OSCAP_API char * cpe_generator_get_schema_version(const struct cpe_generator *item)
cpe_generator functions to get document schema version
OSCAP_API struct cpe_reference_iterator * cpe_item_get_references(const struct cpe_item *item)
cpe_item functions to get CPE references
Definition: cpedict_priv.c:185
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 struct cpe_edition * cpe_edition_iterator_next(struct cpe_edition_iterator *it)
Iterator over CPE edition items.
const OSCAP_API char * cpe_check_get_href(const struct cpe_check *item)
cpe_check functions to get href
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_reference_iterator_free(struct cpe_reference_iterator *it)
Iterator over CPE item reference items.
OSCAP_API void cpe_product_iterator_free(struct cpe_product_iterator *it)
Iterator over CPE product items.
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 cpe_part_t cpe_product_get_part(const struct cpe_product *item)
cpe_product functions to get product part
OSCAP_API bool cpe_check_iterator_has_more(struct cpe_check_iterator *it)
Iterator over CPE item check items.
OSCAP_API bool cpe_edition_iterator_has_more(struct cpe_edition_iterator *it)
Iterator over CPE edition items.
const OSCAP_API char * cpe_check_get_identifier(const struct cpe_check *item)
cpe_check functions to get identifier
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
Definition: cpedict_priv.c:215
Definition: cpedict_priv.c:173
const OSCAP_API 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 struct oscap_text_iterator * cpe_item_get_titles(const struct cpe_item *item)
cpe_item functions to get CPE titles
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_free(struct cpe_version_iterator *it)
Iterator over CPE version items.
const OSCAP_API char * cpe_item_get_deprecation_date(const struct cpe_item *item)
cpe_item functions to get variable member date
OSCAP_API struct cpe_vendor_iterator * cpe_dict_model_get_vendors(const struct cpe_dict_model *item)
cpe_dict_model functions to get vendors
const OSCAP_API char * cpe_generator_get_timestamp(const struct cpe_generator *item)
cpe_generator functions to get timestamp from generator
OSCAP_API struct cpe_language * cpe_language_iterator_next(struct cpe_language_iterator *it)
Iterator over CPE language items.
OSCAP_API struct cpe_item * cpe_item_iterator_next(struct cpe_item_iterator *it)
Iterator over CPE dictionary items.
const OSCAP_API char * cpe_update_get_value(const struct cpe_update *item)
cpe_update functions to get updates of version
const OSCAP_API char * cpe_edition_get_value(const struct cpe_edition *item)
cpe_edition functions to get value of edition
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
OSCAP_API struct cpe_edition_iterator * cpe_update_get_editions(const struct cpe_update *item)
cpe_update functions to get editions of update
OSCAP_API struct cpe_name * cpe_item_get_deprecated_by(const struct cpe_item *item)
cpe_item functions to get variable member deprecated_by
Definition: text_priv.h:46