Open SCAP Library

Files | Data Structures | Functions
CPE Dictionary
CPE

## Files
file | cpe_dict.h
| Interface to Common Platform Enumeration (CPE) Dictionary.

## Data Structures
struct | cpe_dict_model
| Structure representing a CPE dictionary. More...
struct | cpe_item
| Structure representing single CPE dictionary item. More...
struct | cpe_vendor
| Structure with information about vendor. More...
struct | cpe_generator
| Structure with information about document. More...
struct | cpe_check
| Structure representing single CPE check. More...
struct | cpe_reference
| CPE dictionary item reference. More...
struct | cpe_item_metadata
| Structure representing metadata of CPE item. More...
struct | cpe_product
| Product of some vendor. More...
struct | cpe_version
| Version of product. More...
struct | cpe_update
| Update of product version. More...
struct | cpe_edition
| Edition of product update. More...
struct | cpe_language
| Language of product edition. More...
struct | cpe_item_iterator
| Iterator over CPE dictionary items. More...
struct | cpe_reference_iterator
| Iterator over CPE dictionary references. More...
struct | cpe_check_iterator
| Iterator over CPE dictionary checks. More...
struct | cpe_vendor_iterator
| Iterator over CPE dictionary item vendors. More...
struct | cpe_product_iterator
| Iterator over CPE dictionary item products. More...
struct | cpe_version_iterator
| Iterator over CPE dictionary item versions. More...
struct | cpe_update_iterator
| Iterator over CPE dictionary item updates. More...
struct | cpe_edition_iterator
| Iterator over CPE dictionary item editions. More...
struct | cpe_language_iterator
| Iterator over CPE dictionary item languages. More...

## Functions
bool | cpe_dict_model_set_origin_file (struct cpe_dict_model *dict, const char *origin_file)
| Sets the origin file hint. More...
const char * | cpe_dict_model_get_origin_file (const struct cpe_dict_model *dict)
| Gets the file the CPE dict model was loaded from.
void | cpe_check::cpe_check_free (struct cpe_check *check)
void | cpe_reference::cpe_reference_free (struct cpe_reference *ref)
void | cpe_vendor::cpe_vendor_free (struct cpe_vendor *vendor)
void | cpe_product::cpe_product_free (struct cpe_product *product)
void | cpe_version::cpe_version_free (struct cpe_version *version)
void | cpe_update::cpe_update_free (struct cpe_update *update)
void | cpe_edition::cpe_edition_free (struct cpe_edition *edition)
void | cpe_language::cpe_language_free (struct cpe_language *language)
void | cpe_dict_model::cpe_dict_model_free (struct cpe_dict_model *dict)
void | cpe_generator::cpe_generator_free (struct cpe_generator *generator)
void | cpe_item::cpe_item_free (struct cpe_item *item)
struct cpe_dict_model * | cpe_dict_model::cpe_dict_model_new (void)
struct cpe_generator * | cpe_generator::cpe_generator_new (void)
struct cpe_check * | cpe_check::cpe_check_new (void)
struct cpe_reference * | cpe_reference::cpe_reference_new (void)
struct cpe_item * | cpe_item::cpe_item_new (void)
struct cpe_vendor * | cpe_vendor::cpe_vendor_new (void)
struct cpe_product * | cpe_product::cpe_product_new (void)
struct cpe_version * | cpe_version::cpe_version_new (void)
struct cpe_update * | cpe_update::cpe_update_new (void)
struct cpe_edition * | cpe_edition::cpe_edition_new (void)
struct cpe_language * | cpe_language::cpe_language_new (void)
struct cpe_item_metadata * | cpe_item_metadata::cpe_item_metadata_new (void)
void | cpe_dict_model::cpe_dict_model_export (const struct cpe_dict_model *dict, const char *file)
| Write the dict_model to a file. More...
struct cpe_dict_model * | cpe_dict_model::cpe_dict_model_import (const char *file)
| Load new CPE dictionary from file. More...
struct cpe_dict_model * | cpe_dict_model::cpe_dict_model_import_source (struct oscap_source *source)
| Load new CPE dictionary from an oscap_source. More...

## Getters
Return value is pointer to structure's member. Do not free unless you null the pointer in the structure. Use remove function otherwise.
const char * | cpe_item_metadata::cpe_item_metadata_get_modification_date (const struct cpe_item_metadata *item)
| cpe_item_metadata function to get date More...
const char * | cpe_item_metadata::cpe_item_metadata_get_status (const struct cpe_item_metadata *item)
| cpe_item_metadata function to get status More...
const char * | cpe_item_metadata::cpe_item_metadata_get_nvd_id (const struct cpe_item_metadata *item)
| cpe_item_metadata function to get nvd ID More...
const char * | cpe_item_metadata::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 More...
const char * | cpe_check::cpe_check_get_system (const struct cpe_check *item)
| cpe_check functions to get system More...
const char * | cpe_check::cpe_check_get_href (const struct cpe_check *item)
| cpe_check functions to get href More...
const char * | cpe_check::cpe_check_get_identifier (const struct cpe_check *item)
| cpe_check functions to get identifier More...
const char * | cpe_reference::cpe_reference_get_href (const struct cpe_reference *item)
| cpe_reference functions to get href of reference More...
const char * | cpe_reference::cpe_reference_get_content (const struct cpe_reference *item)
| cpe_reference functions to get content of reference More...
struct cpe_name * | cpe_item::cpe_item_get_name (const struct cpe_item *item)
| cpe_item functions to get variable member name More...
struct cpe_name * | cpe_item::cpe_item_get_deprecated_by (const struct cpe_item *item)
| cpe_item functions to get variable member deprecated_by More...
struct cpe_name * | cpe_item::cpe_item_get_deprecated (const struct cpe_item *item)
| cpe_item functions to get variable member deprecated_by More...
const char * | cpe_item::cpe_item_get_deprecation_date (const struct cpe_item *item)
| cpe_item functions to get variable member date More...
struct cpe_item_metadata * | cpe_item::cpe_item_get_metadata (const struct cpe_item *item)
| cpe_item functions to get metadata of cpe_item More...
struct cpe_reference_iterator * | cpe_item::cpe_item_get_references (const struct cpe_item *item)
| cpe_item functions to get CPE references More...
struct cpe_check_iterator * | cpe_item::cpe_item_get_checks (const struct cpe_item *item)
| cpe_item functions to get CPE checks More...
struct oscap_text_iterator * | cpe_item::cpe_item_get_titles (const struct cpe_item *item)
| cpe_item functions to get CPE titles More...
struct oscap_text_iterator * | cpe_item::cpe_item_get_notes (const struct cpe_item *item)
| cpe_item functions to get CPE notes More...
const char * | cpe_generator::cpe_generator_get_product_name (const struct cpe_generator *item)
| cpe_generator functions to get product name More...
const char * | cpe_generator::cpe_generator_get_product_version (const struct cpe_generator *item)
| cpe_generator functions to get product version More...
const char * | cpe_generator::cpe_generator_get_schema_version (const struct cpe_generator *item)
| cpe_generator functions to get document schema version More...
const char * | cpe_generator::cpe_generator_get_timestamp (const struct cpe_generator *item)
| cpe_generator functions to get timestamp from generator More...
int | cpe_dict_model::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 More...
bool | cpe_dict_model::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 More...
struct cpe_generator * | cpe_generator::cpe_dict_model_get_generator (const struct cpe_dict_model *item)
| cpe_dict_model functions to get generator from CPE dictionary model More...
struct cpe_item_iterator * | cpe_dict_model::cpe_dict_model_get_items (const struct cpe_dict_model *item)
| cpe_dict_model functions to get CPE items More...
struct cpe_vendor_iterator * | cpe_dict_model::cpe_dict_model_get_vendors (const struct cpe_dict_model *item)
| cpe_dict_model functions to get vendors More...
const char * | cpe_vendor::cpe_vendor_get_value (const struct cpe_vendor *item)
| cpe_vendor functions to get vendor value More...
struct oscap_text_iterator * | cpe_vendor::cpe_vendor_get_titles (const struct cpe_vendor *item)
| cpe_vendor functions to get vendor titles More...
struct cpe_product_iterator * | cpe_vendor::cpe_vendor_get_products (const struct cpe_vendor *item)
| cpe_vendor functions to get vendor products More...
const char * | cpe_product::cpe_product_get_value (const struct cpe_product *item)
| cpe_product functions to get product value More...
cpe_part_t | cpe_product::cpe_product_get_part (const struct cpe_product *item)
| cpe_product functions to get product part More...
struct cpe_version_iterator * | cpe_version::cpe_product_get_versions (const struct cpe_product *item)
| cpe_product functions to get versions of product More...
const char * | cpe_version::cpe_version_get_value (const struct cpe_version *item)
| cpe_version functions to get vupdates of versions More...
struct cpe_update_iterator * | cpe_update::cpe_version_get_updates (const struct cpe_version *item)
| cpe_version functions to get value of version More...
const char * | cpe_update::cpe_update_get_value (const struct cpe_update *item)
| cpe_update functions to get updates of version More...
struct cpe_edition_iterator * | cpe_edition::cpe_update_get_editions (const struct cpe_update *item)
| cpe_update functions to get editions of update More...
const char * | cpe_edition::cpe_edition_get_value (const struct cpe_edition *item)
| cpe_edition functions to get value of edition More...
struct cpe_language_iterator * | cpe_language::cpe_edition_get_languages (const struct cpe_edition *item)
| cpe_edition functions to get languages of edition More...
const char * | cpe_language::cpe_language_get_value (const struct cpe_language *item)
| cpe_language functions to get value of language More...

## Setters
For lists use add functions. Parameters of set functions are duplicated in memory and need to be freed by caller.
bool | cpe_item::cpe_item_set_name (struct cpe_item *item, const struct cpe_name *new_name)
bool | cpe_item::cpe_item_set_deprecated_by (struct cpe_item *item, const struct cpe_name *new_deprecated_by)
bool | cpe_item::cpe_item_set_deprecation_date (struct cpe_item *item, const char *new_deprecation_date)
bool | cpe_item_metadata::cpe_item_metadata_set_modification_date (struct cpe_item_metadata *item_metadata, const char *new_modification_date)
bool | cpe_item_metadata::cpe_item_metadata_set_status (struct cpe_item_metadata *item_metadata, const char *new_status)
bool | cpe_item_metadata::cpe_item_metadata_set_nvd_id (struct cpe_item_metadata *item_metadata, const char *new_nvd_id)
bool | cpe_item_metadata::cpe_item_metadata_set_deprecated_by_nvd_id (struct cpe_item_metadata *item_metadata, const char *new_deprecated_by_nvd_id)
bool | cpe_check::cpe_check_set_system (struct cpe_check *check, const char *new_system)
bool | cpe_check::cpe_check_set_href (struct cpe_check *check, const char *new_href)
bool | cpe_check::cpe_check_set_identifier (struct cpe_check *check, const char *new_identifier)
bool | cpe_reference::cpe_reference_set_href (struct cpe_reference *reference, const char *new_href)
bool | cpe_reference::cpe_reference_set_content (struct cpe_reference *reference, const char *new_content)
bool | cpe_generator::cpe_generator_set_product_name (struct cpe_generator *generator, const char *new_product_name)
bool | cpe_generator::cpe_generator_set_product_version (struct cpe_generator *generator, const char *new_product_version)
bool | cpe_generator::cpe_generator_set_schema_version (struct cpe_generator *generator, const char *new_schema_version)
bool | cpe_generator::cpe_generator_set_timestamp (struct cpe_generator *generator, const char *new_timestamp)
bool | cpe_vendor::cpe_vendor_set_value (struct cpe_vendor *vendor, const char *new_value)
bool | cpe_product::cpe_product_set_value (struct cpe_product *product, const char *new_value)
bool | cpe_product::cpe_product_set_part (struct cpe_product *product, cpe_part_t new_part)
bool | cpe_version::cpe_version_set_value (struct cpe_version *version, const char *new_value)
bool | cpe_update::cpe_update_set_value (struct cpe_update *update, const char *new_value)
bool | cpe_edition::cpe_edition_set_value (struct cpe_edition *edition, const char *new_value)
bool | cpe_language::cpe_language_set_value (struct cpe_language *language, const char *new_value)
bool | cpe_item::cpe_item_add_reference (struct cpe_item *item, struct cpe_reference *new_reference)
bool | cpe_item::cpe_item_add_check (struct cpe_item *item, struct cpe_check *new_check)
bool | cpe_item::cpe_item_add_title (struct cpe_item *item, struct oscap_text *new_title)
bool | cpe_item::cpe_item_add_note (struct cpe_item *item, struct oscap_text *new_title)
bool | cpe_dict_model::cpe_dict_model_add_item (struct cpe_dict_model *dict, struct cpe_item *new_item)
bool | cpe_dict_model::cpe_dict_model_add_vendor (struct cpe_dict_model *dict, struct cpe_vendor *new_vendor)
bool | cpe_vendor::cpe_vendor_add_title (struct cpe_vendor *vendor, struct oscap_text *new_title)
bool | cpe_vendor::cpe_vendor_add_product (struct cpe_vendor *vendor, struct cpe_product *new_product)
bool | cpe_product::cpe_product_add_version (struct cpe_product *product, struct cpe_version *new_version)
bool | cpe_version::cpe_version_add_update (struct cpe_version *version, struct cpe_update *new_update)
bool | cpe_update::cpe_update_add_edition (struct cpe_update *update, struct cpe_edition *new_edition)
bool | cpe_edition::cpe_edition_add_language (struct cpe_edition *edition, struct cpe_language *new_language)

## Iterators
struct cpe_item * | cpe_item_iterator::cpe_item_iterator_next (struct cpe_item_iterator *it)
| Iterator over CPE dictionary items. More...
bool | cpe_item_iterator::cpe_item_iterator_has_more (struct cpe_item_iterator *it)
| Iterator over CPE dictionary items. More...
void | cpe_item_iterator::cpe_item_iterator_free (struct cpe_item_iterator *it)
| Iterator over CPE dictionary items. More...
void | cpe_item::cpe_item_iterator_remove (struct cpe_item_iterator *it)
void | cpe_item_iterator::cpe_item_iterator_reset (struct cpe_item_iterator *it)
struct cpe_reference * | cpe_reference_iterator::cpe_reference_iterator_next (struct cpe_reference_iterator *it)
| Iterator over CPE item reference items. More...
bool | cpe_reference_iterator::cpe_reference_iterator_has_more (struct cpe_reference_iterator *it)
| Iterator over CPE item reference items. More...
void | cpe_reference_iterator::cpe_reference_iterator_free (struct cpe_reference_iterator *it)
| Iterator over CPE item reference items. More...
void | cpe_reference_iterator::cpe_reference_iterator_remove (struct cpe_reference_iterator *it)
void | cpe_reference_iterator::cpe_reference_iterator_reset (struct cpe_reference_iterator *it)
struct cpe_check * | cpe_check_iterator::cpe_check_iterator_next (struct cpe_check_iterator *it)
| Iterator over CPE item check items. More...
bool | cpe_check_iterator::cpe_check_iterator_has_more (struct cpe_check_iterator *it)
| Iterator over CPE item check items. More...
void | cpe_check_iterator::cpe_check_iterator_free (struct cpe_check_iterator *it)
| Iterator over CPE item check items. More...
void | cpe_check_iterator::cpe_check_iterator_remove (struct cpe_check_iterator *it)
void | cpe_check_iterator::cpe_check_iterator_reset (struct cpe_check_iterator *it)
struct cpe_vendor * | cpe_vendor_iterator::cpe_vendor_iterator_next (struct cpe_vendor_iterator *it)
| Iterator over CPE vendor items. More...
bool | cpe_vendor_iterator::cpe_vendor_iterator_has_more (struct cpe_vendor_iterator *it)
| Iterator over CPE vendor items. More...
void | cpe_vendor_iterator::cpe_vendor_iterator_free (struct cpe_vendor_iterator *it)
| Iterator over CPE vendor items. More...
void | cpe_vendor_iterator::cpe_vendor_iterator_remove (struct cpe_vendor_iterator *it)
void | cpe_vendor_iterator::cpe_vendor_iterator_reset (struct cpe_vendor_iterator *it)
struct cpe_product * | cpe_product_iterator::cpe_product_iterator_next (struct cpe_product_iterator *it)
| Iterator over CPE product items. More...
bool | cpe_product_iterator::cpe_product_iterator_has_more (struct cpe_product_iterator *it)
| Iterator over CPE product items. More...
void | cpe_product_iterator::cpe_product_iterator_free (struct cpe_product_iterator *it)
| Iterator over CPE product items. More...
void | cpe_product_iterator::cpe_product_iterator_remove (struct cpe_product_iterator *it)
void | cpe_product_iterator::cpe_product_iterator_reset (struct cpe_product_iterator *it)
struct cpe_version * | cpe_version_iterator::cpe_version_iterator_next (struct cpe_version_iterator *it)
| Iterator over CPE version items. More...
bool | cpe_version_iterator::cpe_version_iterator_has_more (struct cpe_version_iterator *it)
| Iterator over CPE version items. More...
void | cpe_version_iterator::cpe_version_iterator_free (struct cpe_version_iterator *it)
| Iterator over CPE version items. More...
void | cpe_version_iterator::cpe_version_iterator_remove (struct cpe_version_iterator *it)
void | cpe_version_iterator::cpe_version_iterator_reset (struct cpe_version_iterator *it)
struct cpe_update * | cpe_update_iterator::cpe_update_iterator_next (struct cpe_update_iterator *it)
| Iterator over CPE update items. More...
bool | cpe_update_iterator::cpe_update_iterator_has_more (struct cpe_update_iterator *it)
| Iterator over CPE update items. More...
void | cpe_update_iterator::cpe_update_iterator_free (struct cpe_update_iterator *it)
| Iterator over CPE update items. More...
void | cpe_update_iterator::cpe_update_iterator_remove (struct cpe_update_iterator *it)
void | cpe_update_iterator::cpe_update_iterator_reset (struct cpe_update_iterator *it)
struct cpe_edition * | cpe_edition_iterator::cpe_edition_iterator_next (struct cpe_edition_iterator *it)
| Iterator over CPE edition items. More...
bool | cpe_edition_iterator::cpe_edition_iterator_has_more (struct cpe_edition_iterator *it)
| Iterator over CPE edition items. More...
void | cpe_edition_iterator::cpe_edition_iterator_free (struct cpe_edition_iterator *it)
| Iterator over CPE edition items. More...
void | cpe_edition_iterator::cpe_edition_iterator_remove (struct cpe_edition_iterator *it)
void | cpe_edition_iterator::cpe_edition_iterator_reset (struct cpe_edition_iterator *it)
struct cpe_language * | cpe_language_iterator::cpe_language_iterator_next (struct cpe_language_iterator *it)
| Iterator over CPE language items. More...
bool | cpe_language_iterator::cpe_language_iterator_has_more (struct cpe_language_iterator *it)
| Iterator over CPE language items. More...
void | cpe_language_iterator::cpe_language_iterator_free (struct cpe_language_iterator *it)
| Iterator over CPE language items. More...
void | cpe_language_iterator::cpe_language_iterator_remove (struct cpe_language_iterator *it)
void | cpe_language_iterator::cpe_language_iterator_reset (struct cpe_language_iterator *it)

## Evaluators
char * | cpe_dict_detect_version (const char *file)
| Detects which version the given CPE file is. More...
const char * | cpe_dict_model::cpe_dict_model_supported (void)
| Get the newest supported version of CPE dictionary XML. More...
bool | cpe_dict_model::cpe_name_match_dict (struct cpe_name *cpe, struct cpe_dict_model *dict)
| Verify wether given CPE is known according to specified dictionary. More...
bool | cpe_dict_model::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. More...
bool | cpe_dict_model::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. More...
bool | cpe_item::cpe_item_is_applicable (struct cpe_item *item, cpe_check_fn cb, void *usr)

## Detailed Description

Class diagram

## Function Documentation

## ◆ cpe_check_free()

void cpe_check_free | ( | struct cpe_check * | check | ) |

## ◆ cpe_check_get_href()

const char * cpe_check_get_href | ( | const struct cpe_check * | item | ) |

cpe_check functions to get href

Parameters

  item | CPE check item

## ◆ cpe_check_get_identifier()

const char * cpe_check_get_identifier | ( | const struct cpe_check * | item | ) |

cpe_check functions to get identifier

Parameters

  item | CPE check item

## ◆ cpe_check_get_system()

const char * cpe_check_get_system | ( | const struct cpe_check * | item | ) |

cpe_check functions to get system

Parameters

  item | CPE check item

## ◆ cpe_check_iterator_free()

void cpe_check_iterator_free | ( | struct cpe_check_iterator * | it | ) |

Iterator over CPE item check items.

See also
  oscap_iterator

## ◆ cpe_check_iterator_has_more()

bool cpe_check_iterator_has_more | ( | struct cpe_check_iterator * | it | ) |

Iterator over CPE item check items.

See also
  oscap_iterator

## ◆ cpe_check_iterator_next()

struct cpe_check * cpe_check_iterator_next | ( | struct cpe_check_iterator * | it | ) |

Iterator over CPE item check items.

See also
  oscap_iterator

## ◆ cpe_check_iterator_remove()

void cpe_check_iterator_remove | ( | struct cpe_check_iterator * | it | ) |

## ◆ cpe_check_iterator_reset()

void cpe_check_iterator_reset | ( | struct cpe_check_iterator * | it | ) |

## ◆ cpe_check_new()

struct cpe_check * cpe_check_new | ( | void |  | ) |

## ◆ cpe_check_set_href()

bool cpe_check_set_href | ( | struct cpe_check * | check,
|  | const char * | new_href
| ) |  |

## ◆ cpe_check_set_identifier()

bool cpe_check_set_identifier | ( | struct cpe_check * | check,
|  | const char * | new_identifier
| ) |  |

## ◆ cpe_check_set_system()

bool cpe_check_set_system | ( | struct cpe_check * | check,
|  | const char * | new_system
| ) |  |

## ◆ cpe_dict_detect_version()

char* cpe_dict_detect_version | ( | const char * | file | ) |

Detects which version the given CPE file is.

Deallocate the result after use with "free(..)".

Deprecated:
  This function has been deprecated by oscap_source_get_schema_version. This function may be dropped from later versions of the library.

## ◆ cpe_dict_model_add_item()

bool cpe_dict_model_add_item | ( | struct cpe_dict_model * | dict,
|  | struct cpe_item * | new_item
| ) |  |

## ◆ cpe_dict_model_add_vendor()

bool cpe_dict_model_add_vendor | ( | struct cpe_dict_model * | dict,
|  | struct cpe_vendor * | new_vendor
| ) |  |

## ◆ 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.

Parameters

  dict | CPE Dict model

## ◆ cpe_dict_model_free()

void cpe_dict_model_free | ( | struct cpe_dict_model * | dict | ) |

## ◆ 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

The base version is the major CPE version, 1 or 2. These two versions differ in namespace when exporting so we have to remember which version we loaded.

CPE 1.0 also doesn't have cpe_generator structure inside so we can't get the version info from there.

Parameters

  item | dictionary model

## ◆ 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

Parameters

  item | dictionary 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

Parameters

  item | dictionary 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

Parameters

  item | dictionary model

## ◆ cpe_dict_model_import()

struct cpe_dict_model * cpe_dict_model_import | ( | const char * | file | ) |

Load new CPE dictionary from file.

Parameters

  file | filename

Returns
  new dictionary

Return values

  NULL | on failure

Deprecated:
  This function has been deprecated by cpe_dict_model_import_source. This function may be dropped from later versions of the library.

## ◆ 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.

Parameters

  source | The oscap_source to parse content from

Returns
  new dictionary or NULL

## ◆ cpe_dict_model_new()

struct cpe_dict_model * cpe_dict_model_new | ( | void |  | ) |

## ◆ 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

Parameters

  item | dictionary model

## ◆ 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.

Note
  This is intended for internal use only!

See also
  cpe_dict_model_get_origin_file

## ◆ cpe_dict_model_supported()

const char * cpe_dict_model_supported | ( | void |  | ) |

Get the newest supported version of CPE dictionary XML.

Returns
  version of XML file format

## ◆ cpe_edition_add_language()

bool cpe_edition_add_language | ( | struct cpe_edition * | edition,
|  | struct cpe_language * | new_language
| ) |  |

## ◆ cpe_edition_free()

void cpe_edition_free | ( | struct cpe_edition * | edition | ) |

## ◆ 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

Parameters

  item | cpe_edition of update

## ◆ cpe_edition_get_value()

const char * cpe_edition_get_value | ( | const struct cpe_edition * | item | ) |

cpe_edition functions to get value of edition

Parameters

  item | cpe_edition of update

## ◆ cpe_edition_iterator_free()

void cpe_edition_iterator_free | ( | struct cpe_edition_iterator * | it | ) |

Iterator over CPE edition items.

See also
  oscap_iterator

## ◆ cpe_edition_iterator_has_more()

bool cpe_edition_iterator_has_more | ( | struct cpe_edition_iterator * | it | ) |

Iterator over CPE edition items.

See also
  oscap_iterator

## ◆ cpe_edition_iterator_next()

struct cpe_edition * cpe_edition_iterator_next | ( | struct cpe_edition_iterator * | it | ) |

Iterator over CPE edition items.

See also
  oscap_iterator

## ◆ cpe_edition_iterator_remove()

void cpe_edition_iterator_remove | ( | struct cpe_edition_iterator * | it | ) |

## ◆ cpe_edition_iterator_reset()

void cpe_edition_iterator_reset | ( | struct cpe_edition_iterator * | it | ) |

## ◆ cpe_edition_new()

struct cpe_edition * cpe_edition_new | ( | void |  | ) |

## ◆ cpe_edition_set_value()

bool cpe_edition_set_value | ( | struct cpe_edition * | edition,
|  | const char * | new_value
| ) |  |

## ◆ cpe_generator_free()

void cpe_generator_free | ( | struct cpe_generator * | 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

Parameters

  item | document 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

Parameters

  item | document 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

Parameters

  item | document generator

## ◆ cpe_generator_get_timestamp()

const char * cpe_generator_get_timestamp | ( | const struct cpe_generator * | item | ) |

cpe_generator functions to get timestamp from generator

Parameters

  item | document generator

## ◆ cpe_generator_new()

struct cpe_generator * cpe_generator_new | ( | void |  | ) |

## ◆ cpe_generator_set_product_name()

bool cpe_generator_set_product_name | ( | struct cpe_generator * | generator,
|  | const char * | new_product_name
| ) |  |

## ◆ cpe_generator_set_product_version()

bool cpe_generator_set_product_version | ( | struct cpe_generator * | generator,
|  | const char * | new_product_version
| ) |  |

## ◆ cpe_generator_set_schema_version()

bool cpe_generator_set_schema_version | ( | struct cpe_generator * | generator,
|  | const char * | new_schema_version
| ) |  |

## ◆ cpe_generator_set_timestamp()

bool cpe_generator_set_timestamp | ( | struct cpe_generator * | generator,
|  | const char * | new_timestamp
| ) |  |

## ◆ cpe_item_add_check()

bool cpe_item_add_check | ( | struct cpe_item * | item,
|  | struct cpe_check * | new_check
| ) |  |

## ◆ cpe_item_add_note()

bool cpe_item_add_note | ( | struct cpe_item * | item,
|  | struct oscap_text * | new_title
| ) |  |

Deprecated:
  This function has been deprecated and it may be dropped from later versions of the library. (Please see upstream ticket #339 for further details).

## ◆ cpe_item_add_reference()

bool cpe_item_add_reference | ( | struct cpe_item * | item,
|  | struct cpe_reference * | new_reference
| ) |  |

## ◆ cpe_item_add_title()

bool cpe_item_add_title | ( | struct cpe_item * | item,
|  | struct oscap_text * | new_title
| ) |  |

## ◆ cpe_item_free()

void cpe_item_free | ( | struct cpe_item * | 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

Parameters

  item | 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

Parameters

  item | CPE item

Returns
  deprecated_by attribute

Deprecated:
  This function has been deprecated by cpe_item_get_deprecated_by. This function may be dropped from later versions of the library.

## ◆ 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

Parameters

  item | 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

Parameters

  item | 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

Parameters

  item | 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

Parameters

  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

Parameters

  item | CPE item

Deprecated:
  This function has been deprecated and it may be dropped from later versions of the library. (Please see upstream ticket #339 for further details).

## ◆ cpe_item_get_references()

struct cpe_reference_iterator * cpe_item_get_references | ( | const struct cpe_item * | item | ) |

cpe_item functions to get CPE references

Parameters

  item | 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

Parameters

  item | CPE item

## ◆ cpe_item_is_applicable()

bool cpe_item_is_applicable | ( | struct cpe_item * | item,
|  | cpe_check_fn | cb,
|  | void * | usr
| ) |  |

## ◆ cpe_item_iterator_free()

void cpe_item_iterator_free | ( | struct cpe_item_iterator * | it | ) |

Iterator over CPE dictionary items.

See also
  oscap_iterator

## ◆ cpe_item_iterator_has_more()

bool cpe_item_iterator_has_more | ( | struct cpe_item_iterator * | it | ) |

Iterator over CPE dictionary items.

See also
  oscap_iterator

## ◆ cpe_item_iterator_next()

struct cpe_item * cpe_item_iterator_next | ( | struct cpe_item_iterator * | it | ) |

Iterator over CPE dictionary items.

See also
  oscap_iterator

## ◆ cpe_item_iterator_remove()

void cpe_item_iterator_remove | ( | struct cpe_item_iterator * | it | ) |

## ◆ cpe_item_iterator_reset()

void cpe_item_iterator_reset | ( | struct cpe_item_iterator * | it | ) |

## ◆ 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

Parameters

  item | metadata of CPE item

## ◆ 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

Parameters

  item | metadata of CPE item

## ◆ 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

Parameters

  item | metadata of CPE item

## ◆ 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

Parameters

  item | metadata of CPE item

## ◆ cpe_item_metadata_new()

struct cpe_item_metadata * cpe_item_metadata_new | ( | void |  | ) |

## ◆ 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_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_metadata_set_nvd_id()

bool cpe_item_metadata_set_nvd_id | ( | struct cpe_item_metadata * | item_metadata,
|  | const char * | new_nvd_id
| ) |  |

## ◆ cpe_item_metadata_set_status()

bool cpe_item_metadata_set_status | ( | struct cpe_item_metadata * | item_metadata,
|  | const char * | new_status
| ) |  |

## ◆ cpe_item_new()

struct cpe_item * cpe_item_new | ( | void |  | ) |

## ◆ cpe_item_set_deprecated_by()

bool cpe_item_set_deprecated_by | ( | struct cpe_item * | item,
|  | const struct cpe_name * | new_deprecated_by
| ) |  |

## ◆ cpe_item_set_deprecation_date()

bool cpe_item_set_deprecation_date | ( | struct cpe_item * | item,
|  | const char * | new_deprecation_date
| ) |  |

## ◆ cpe_item_set_name()

bool cpe_item_set_name | ( | struct cpe_item * | item,
|  | const struct cpe_name * | new_name
| ) |  |

## ◆ cpe_language_free()

void cpe_language_free | ( | struct cpe_language * | language | ) |

## ◆ cpe_language_get_value()

const char * cpe_language_get_value | ( | const struct cpe_language * | item | ) |

cpe_language functions to get value of language

Parameters

  item | language

## ◆ cpe_language_iterator_free()

void cpe_language_iterator_free | ( | struct cpe_language_iterator * | it | ) |

Iterator over CPE language items.

See also
  oscap_iterator

## ◆ cpe_language_iterator_has_more()

bool cpe_language_iterator_has_more | ( | struct cpe_language_iterator * | it | ) |

Iterator over CPE language items.

See also
  oscap_iterator

## ◆ cpe_language_iterator_next()

struct cpe_language * cpe_language_iterator_next | ( | struct cpe_language_iterator * | it | ) |

Iterator over CPE language items.

See also
  oscap_iterator

## ◆ cpe_language_iterator_remove()

void cpe_language_iterator_remove | ( | struct cpe_language_iterator * | it | ) |

## ◆ cpe_language_iterator_reset()

void cpe_language_iterator_reset | ( | struct cpe_language_iterator * | it | ) |

## ◆ cpe_language_new()

struct cpe_language * cpe_language_new | ( | void |  | ) |

## ◆ cpe_language_set_value()

bool cpe_language_set_value | ( | struct cpe_language * | language,
|  | const char * | new_value
| ) |  |

## ◆ 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.

Parameters

  cpe | CPE to verify
  dict | used CPE dictionary

Returns
  true if dictionary contains given CPE and the CPE is applicable

## ◆ 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.

Parameters

  cpe | CPE to verify
  dict | used CPE dictionary

Returns
  true if dictionary contains given CPE

## ◆ 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.

Parameters

  cpe | CPE to verify
  dict | used CPE dictionary

Returns
  true if dictionary contains given CPE

## ◆ cpe_product_add_version()

bool cpe_product_add_version | ( | struct cpe_product * | product,
|  | struct cpe_version * | new_version
| ) |  |

## ◆ cpe_product_free()

void cpe_product_free | ( | struct cpe_product * | product | ) |

## ◆ cpe_product_get_part()

cpe_part_t cpe_product_get_part | ( | const struct cpe_product * | item | ) |

cpe_product functions to get product part

Parameters

  item | cpe_product

## ◆ cpe_product_get_value()

const char * cpe_product_get_value | ( | const struct cpe_product * | item | ) |

cpe_product functions to get product value

Parameters

  item | cpe_product

## ◆ 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

Parameters

  item | cpe_product

## ◆ cpe_product_iterator_free()

void cpe_product_iterator_free | ( | struct cpe_product_iterator * | it | ) |

Iterator over CPE product items.

See also
  oscap_iterator

## ◆ cpe_product_iterator_has_more()

bool cpe_product_iterator_has_more | ( | struct cpe_product_iterator * | it | ) |

Iterator over CPE product items.

See also
  oscap_iterator

## ◆ cpe_product_iterator_next()

struct cpe_product * cpe_product_iterator_next | ( | struct cpe_product_iterator * | it | ) |

Iterator over CPE product items.

See also
  oscap_iterator

## ◆ cpe_product_iterator_remove()

void cpe_product_iterator_remove | ( | struct cpe_product_iterator * | it | ) |

## ◆ cpe_product_iterator_reset()

void cpe_product_iterator_reset | ( | struct cpe_product_iterator * | it | ) |

## ◆ cpe_product_new()

struct cpe_product * cpe_product_new | ( | void |  | ) |

## ◆ cpe_product_set_part()

bool cpe_product_set_part | ( | struct cpe_product * | product,
|  | cpe_part_t | new_part
| ) |  |

## ◆ cpe_product_set_value()

bool cpe_product_set_value | ( | struct cpe_product * | product,
|  | const char * | new_value
| ) |  |

## ◆ cpe_reference_free()

void cpe_reference_free | ( | struct cpe_reference * | ref | ) |

## ◆ cpe_reference_get_content()

const char * cpe_reference_get_content | ( | const struct cpe_reference * | item | ) |

cpe_reference functions to get content of reference

Parameters

  item | CPE reference item

## ◆ cpe_reference_get_href()

const char * cpe_reference_get_href | ( | const struct cpe_reference * | item | ) |

cpe_reference functions to get href of reference

Parameters

  item | CPE reference item

## ◆ cpe_reference_iterator_free()

void cpe_reference_iterator_free | ( | struct cpe_reference_iterator * | it | ) |

Iterator over CPE item reference items.

See also
  oscap_iterator

## ◆ cpe_reference_iterator_has_more()

bool cpe_reference_iterator_has_more | ( | struct cpe_reference_iterator * | it | ) |

Iterator over CPE item reference items.

See also
  oscap_iterator

## ◆ cpe_reference_iterator_next()

struct cpe_reference * cpe_reference_iterator_next | ( | struct cpe_reference_iterator * | it | ) |

Iterator over CPE item reference items.

See also
  oscap_iterator

## ◆ cpe_reference_iterator_remove()

void cpe_reference_iterator_remove | ( | struct cpe_reference_iterator * | it | ) |

## ◆ cpe_reference_iterator_reset()

void cpe_reference_iterator_reset | ( | struct cpe_reference_iterator * | it | ) |

## ◆ cpe_reference_new()

struct cpe_reference * cpe_reference_new | ( | void |  | ) |

## ◆ cpe_reference_set_content()

bool cpe_reference_set_content | ( | struct cpe_reference * | reference,
|  | const char * | new_content
| ) |  |

## ◆ cpe_reference_set_href()

bool cpe_reference_set_href | ( | struct cpe_reference * | reference,
|  | const char * | new_href
| ) |  |

## ◆ cpe_update_add_edition()

bool cpe_update_add_edition | ( | struct cpe_update * | update,
|  | struct cpe_edition * | new_edition
| ) |  |

## ◆ cpe_update_free()

void cpe_update_free | ( | struct cpe_update * | update | ) |

## ◆ 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

Parameters

  item | cpe_update of product element

## ◆ cpe_update_get_value()

const char * cpe_update_get_value | ( | const struct cpe_update * | item | ) |

cpe_update functions to get updates of version

Parameters

  item |

## ◆ cpe_update_iterator_free()

void cpe_update_iterator_free | ( | struct cpe_update_iterator * | it | ) |

Iterator over CPE update items.

See also
  oscap_iterator

## ◆ cpe_update_iterator_has_more()

bool cpe_update_iterator_has_more | ( | struct cpe_update_iterator * | it | ) |

Iterator over CPE update items.

See also
  oscap_iterator

## ◆ cpe_update_iterator_next()

struct cpe_update * cpe_update_iterator_next | ( | struct cpe_update_iterator * | it | ) |

Iterator over CPE update items.

See also
  oscap_iterator

## ◆ cpe_update_iterator_remove()

void cpe_update_iterator_remove | ( | struct cpe_update_iterator * | it | ) |

## ◆ cpe_update_iterator_reset()

void cpe_update_iterator_reset | ( | struct cpe_update_iterator * | it | ) |

## ◆ cpe_update_new()

struct cpe_update * cpe_update_new | ( | void |  | ) |

## ◆ cpe_update_set_value()

bool cpe_update_set_value | ( | struct cpe_update * | update,
|  | const char * | new_value
| ) |  |

## ◆ cpe_vendor_add_product()

bool cpe_vendor_add_product | ( | struct cpe_vendor * | vendor,
|  | struct cpe_product * | new_product
| ) |  |

## ◆ cpe_vendor_add_title()

bool cpe_vendor_add_title | ( | struct cpe_vendor * | vendor,
|  | struct oscap_text * | new_title
| ) |  |

## ◆ cpe_vendor_free()

void cpe_vendor_free | ( | struct cpe_vendor * | 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

Parameters

  item | 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

Parameters

  item | cpe_vendor

## ◆ cpe_vendor_get_value()

const char * cpe_vendor_get_value | ( | const struct cpe_vendor * | item | ) |

cpe_vendor functions to get vendor value

Parameters

  item | cpe_vendor

## ◆ cpe_vendor_iterator_free()

void cpe_vendor_iterator_free | ( | struct cpe_vendor_iterator * | it | ) |

Iterator over CPE vendor items.

See also
  oscap_iterator

## ◆ cpe_vendor_iterator_has_more()

bool cpe_vendor_iterator_has_more | ( | struct cpe_vendor_iterator * | it | ) |

Iterator over CPE vendor items.

See also
  oscap_iterator

## ◆ cpe_vendor_iterator_next()

struct cpe_vendor * cpe_vendor_iterator_next | ( | struct cpe_vendor_iterator * | it | ) |

Iterator over CPE vendor items.

See also
  oscap_iterator

## ◆ cpe_vendor_iterator_remove()

void cpe_vendor_iterator_remove | ( | struct cpe_vendor_iterator * | it | ) |

## ◆ cpe_vendor_iterator_reset()

void cpe_vendor_iterator_reset | ( | struct cpe_vendor_iterator * | it | ) |

## ◆ cpe_vendor_new()

struct cpe_vendor * cpe_vendor_new | ( | void |  | ) |

## ◆ cpe_vendor_set_value()

bool cpe_vendor_set_value | ( | struct cpe_vendor * | vendor,
|  | const char * | new_value
| ) |  |

## ◆ cpe_version_add_update()

bool cpe_version_add_update | ( | struct cpe_version * | version,
|  | struct cpe_update * | new_update
| ) |  |

## ◆ cpe_version_free()

void cpe_version_free | ( | struct cpe_version * | version | ) |

## ◆ 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

Parameters

  item | 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

Parameters

  item | cpe_version

## ◆ cpe_version_iterator_free()

void cpe_version_iterator_free | ( | struct cpe_version_iterator * | it | ) |

Iterator over CPE version items.

See also
  oscap_iterator

## ◆ cpe_version_iterator_has_more()

bool cpe_version_iterator_has_more | ( | struct cpe_version_iterator * | it | ) |

Iterator over CPE version items.

See also
  oscap_iterator

## ◆ cpe_version_iterator_next()

struct cpe_version * cpe_version_iterator_next | ( | struct cpe_version_iterator * | it | ) |

Iterator over CPE version items.

See also
  oscap_iterator

## ◆ cpe_version_iterator_remove()

void cpe_version_iterator_remove | ( | struct cpe_version_iterator * | it | ) |

## ◆ cpe_version_iterator_reset()

void cpe_version_iterator_reset | ( | struct cpe_version_iterator * | it | ) |

## ◆ cpe_version_new()

struct cpe_version * cpe_version_new | ( | void |  | ) |

## ◆ cpe_version_set_value()

bool cpe_version_set_value | ( | struct cpe_version * | version,
|  | const char * | new_value
| ) |  |