Open SCAP Library
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
cve_model Struct Reference

Structure holding CVE model. More...

#include <cve_priv.h>

Collaboration diagram for cve_model:
[legend]

Public Member Functions

OSCAP_API struct cve_modelcve_model_new (void)
 New CVE model. More...
 
OSCAP_API struct cve_modelcve_model_clone (struct cve_model *old_model)
 Clone CVE model. More...
 
OSCAP_API void cve_model_free (struct cve_model *cve_model)
 Free CVE model. More...
 
OSCAP_API void cve_model_export (struct cve_model *cve, const char *file)
 Export CVE model to XML file. More...
 
OSCAP_API struct cve_modelcve_model_import (const char *file)
 Parses the specified XML file and creates a list of CVE data structures. More...
 
OSCAP_API const char * cve_model_get_nvd_xml_version (const struct cve_model *item)
 
OSCAP_API bool cve_model_set_nvd_xml_version (struct cve_model *obj, const char *newval)
 
OSCAP_API const char * cve_model_get_pub_date (const struct cve_model *item)
 
OSCAP_API 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.

OSCAP_API bool cve_model_add_entry (struct cve_model *model, struct cve_entry *new_entry)
 Add entry to CVE model. More...
 
Evaluators
OSCAP_API const char * cve_model_supported (void)
 Get supported version of CVE XML. More...
 

Data Fields

char * pub_date
 
char * nvd_xml_version
 
struct oscap_listentries
 

Detailed Description

Structure holding CVE model.

Member Function Documentation

◆ cve_model_export()

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

Export CVE model to XML file.

Parameters
cveCVE model
fileOSCAP export target

◆ cve_model_import()

OSCAP_API 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
filefilename
Returns
non-negative value indicates the number of CVEs in the list, negative value indicates an error

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