cpe_name Struct Reference
[CPE URIs]

Structure holding Common Platform Enumeration URI data. More...

#include <cpeuri.h>

Data Fields

cpe_part_t part
char * vendor
char * product
char * version
char * update
char * edition
char * language

Related Functions

(Note that these are not member functions.)



New functions

Constructors of CVE model structures.

Free function returns new empty allocated structure. If returns non NULL it need to be freed by the caller.



struct cpe_namecpe_name_new (const char *cpe)
 Create a new CPE structure from string cpe.
Free functions

Destructors of CVE model structures.

Functions free structures with all members recursively. For simple deletion of entity use remove functions.



void cpe_name_free (struct cpe_name *cpe)
 Destructor.
Get functions

Functions for getting attributes from CVE model structures.

Return value is pointer to structure's member. Do not free unless you null the pointer in the structure. Use remove function otherwise.



cpe_part_t cpe_name_get_part (const struct cpe_name *cpe)
 Get CPE name part type field.
const char * cpe_name_get_vendor (const struct cpe_name *cpe)
 Get CPE name vendor field.
const char * cpe_name_get_product (const struct cpe_name *cpe)
 Get CPE name product field.
const char * cpe_name_get_version (const struct cpe_name *cpe)
 Get CPE name version field.
const char * cpe_name_get_update (const struct cpe_name *cpe)
 Get CPE name update field.
const char * cpe_name_get_edition (const struct cpe_name *cpe)
 Get CPE name edition field.
const char * cpe_name_get_language (const struct cpe_name *cpe)
 Get CPE name language field.
Set functions

Set functions assign values to members of structures except lists.

For lists use add functions. Parameters of set functions are duplicated in memory and need to be freed by caller.



bool cpe_name_set_part (struct cpe_name *cpe, cpe_part_t newval)
 Set CPE name part type field.
bool cpe_name_set_vendor (struct cpe_name *cpe, const char *newval)
 Set CPE name vendor field.
bool cpe_name_set_product (struct cpe_name *cpe, const char *newval)
 Set CPE name product field.
bool cpe_name_set_version (struct cpe_name *cpe, const char *newval)
 Set CPE name version field.
bool cpe_name_set_update (struct cpe_name *cpe, const char *newval)
 Set CPE name update field.
bool cpe_name_set_edition (struct cpe_name *cpe, const char *newval)
 Set CPE name edition field.
bool cpe_name_set_language (struct cpe_name *cpe, const char *newval)
 Set CPE name language field.
Other functions



bool cpe_name_match_one (const struct cpe_name *cpe, const struct cpe_name *against)
 Check if candidate CPE cpe matches CPE against according to CPE specification v 2.1.
bool cpe_name_match_cpes (const struct cpe_name *name, size_t n, struct cpe_name **namelist)
 Check if CPE name matches any CPE in namelist.
char * cpe_name_get_uri (const struct cpe_name *cpe)
 Return CPE URI as a new string.
int cpe_name_write (const struct cpe_name *cpe, FILE *f)
 Write CPE URI cpe to file a descriptor f.
bool cpe_name_check (const char *str)
 Ensures str is in proper CPE format.
int cpe_name_match_strs (const char *candidate, size_t n, char **targets)
 Match CPE URI candidate against list of n CPE URIs given by targets.

Detailed Description

Structure holding Common Platform Enumeration URI data.

Empty components are set to NULL.


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

Generated on 4 Jan 2010 for Open SCAP Library by  doxygen 1.6.1