Open SCAP Library

Public Member Functions | Data Fields
cve_model Struct Reference
CVE

Structure holding CVE model. More...

`#include <cve_priv.h>`

## Public Member Functions
struct cve_model * | cve_model_new (void)
| New CVE model. More...
struct cve_model * | cve_model_clone (struct cve_model *old_model)
| Clone CVE model. More...
void | cve_model_free (struct cve_model *cve_model)
| Free CVE model. More...
void | cve_model_export (struct cve_model *cve, const char *file)
| Export CVE model to XML file. More...
struct cve_model * | cve_model_import (const char *file)
| Parses the specified XML file and creates a list of CVE data structures. More...
const char * | cve_model_get_nvd_xml_version (const struct cve_model *item)
bool | cve_model_set_nvd_xml_version (struct cve_model *obj, const char *newval)
const char * | cve_model_get_pub_date (const struct cve_model *item)
bool | cve_model_set_pub_date (struct cve_model *obj, const char *newval)
Setters
For lists use add functions. Parameters of set functions are duplicated in memory and need to be freed by caller.
bool | cve_model_add_entry (struct cve_model *model, struct cve_entry *new_entry)
| Add entry to CVE model. More...
Evaluators
const char * | cve_model_supported (void)
| Get supported version of CVE XML. More...

## Data Fields
char * | pub_date
char * | nvd_xml_version
struct oscap_list * | entries

## Detailed Description

Structure holding CVE model.

## Member Function Documentation

## ◆ cve_model_export()

void cve_model_export | ( | struct cve_model * | cve,
|  | const char * | file
| ) |  |

Export CVE model to XML file.

Parameters

  cve | CVE model
  file | OSCAP export target

## ◆ cve_model_get_nvd_xml_version()

const char * cve_model_get_nvd_xml_version | ( | const struct cve_model * | item | ) |

## ◆ cve_model_get_pub_date()

const char * cve_model_get_pub_date | ( | const struct cve_model * | item | ) |

## ◆ cve_model_import()

struct cve_model * cve_model_import | ( | const char * | file | ) |

Parses the specified XML file and creates a list of CVE data structures.

The returned list can be freed with cveDelAll().

Parameters

  file | filename

Returns
  non-negative value indicates the number of CVEs in the list, negative value indicates an error

## ◆ cve_model_set_nvd_xml_version()

bool cve_model_set_nvd_xml_version | ( | struct cve_model * | obj,
|  | const char * | newval
| ) |  |

## ◆ cve_model_set_pub_date()

bool cve_model_set_pub_date | ( | struct cve_model * | obj,
|  | const char * | newval
| ) |  |

The documentation for this struct was generated from the following files:

- cve_priv.c
- cve_nvd.h