/home/pvrabec/tmp/openscap/openscap-0.1.4/src/CVE/cve.c File Reference

Interface to Common Vulnerability and Exposure dictionary. More...

#include "config.h"
#include <libxml/xmlreader.h>
#include <libxml/xmlstring.h>
#include "cve.h"

Classes

struct  tagStack_t

Defines

#define TAG_ENTRY_STR   BAD_CAST "entry"
#define TAG_PUBLISHED_STR   BAD_CAST "published-datetime"
#define TAG_MODIFIED_STR   BAD_CAST "last-modified-datetime"
#define TAG_CWE_STR   BAD_CAST "cwe"
#define TAG_SUMMARY_STR   BAD_CAST "summary"
#define ATTR_CWEID_STR   BAD_CAST "id"
#define ATTR_ID_STR   BAD_CAST "id"
#define TAG_SCORE_STR   BAD_CAST "score"
#define TAG_VECTOR_STR   BAD_CAST "access-vector"
#define TAG_COMPLEXITY_STR   BAD_CAST "access-complexity"
#define TAG_AUTHENTICATION_STR   BAD_CAST "authentication"
#define TAG_CONFIDENTIALITY_STR   BAD_CAST "confidentiality-impact"
#define TAG_INTEGRITY_STR   BAD_CAST "integrity-impact"
#define TAG_AVAILABILITY_STR   BAD_CAST "availability-impact"
#define TAG_CVSSSOURCE_STR   BAD_CAST "source"
#define TAG_GENERATED_STR   BAD_CAST "generated-on-datetime"
#define TAG_REFS_STR   BAD_CAST "references"
#define ATTR_REFTYPE_STR   BAD_CAST "reference_type"
#define ATTR_HREF_STR   BAD_CAST "href"
#define TAG_SOURCE_STR   BAD_CAST "source"
#define TAG_REF_STR   BAD_CAST "reference"
#define URI_VULN_STR   BAD_CAST "http://scap.nist.gov/schema/vulnerability/0.4"
#define URI_CVSS_STR   BAD_CAST "http://scap.nist.gov/schema/cvss-v2/0.2"

Enumerations

enum  {
  TAG_UNKNOWN = 0, TAG_ENTRY, TAG_CVEID, TAG_PUBLISHED,
  TAG_MODIFIED, TAG_CWE, TAG_REFS, TAG_SOURCE,
  TAG_REF, TAG_SUMMARY, TAG_SCORE, TAG_VECTOR,
  TAG_COMPLEXITY, TAG_AUTHENTICATION, TAG_CONFIDENTIALITY, TAG_INTEGRITY,
  TAG_AVAILABILITY, TAG_CVSSSOURCE, TAG_GENERATED
}

Functions

cve_reference_tcveReferenceNew ()
void cveReferenceDel (cve_reference_t *reference)
void cveReferenceDelAll (cve_reference_t *ref)
cve_info_tcveNew ()
void cveDel (cve_info_t *cve)
void cveDelAll (cve_info_t *cve)
int cveParse (char *xmlfile, cve_info_t **outCveList)


Detailed Description

Interface to Common Vulnerability and Exposure dictionary.

See details at: http://cve.mitre.org/ http://nvd.nist.gov/download.cfm


Function Documentation

void cveDel ( cve_info_t cve  ) 

Free the CVE structure and its data.

Parameters:
cve CVE to be freed

void cveDelAll ( cve_info_t cve  ) 

Free the whole CVE list.

Parameters:
cve root of the CVE list to be freed

cve_info_t* cveNew (  ) 

Create new CVE structure.

Note:
The returned memory must be freed by the caller.
Returns:
new zeroed CVE structure
Return values:
NULL on failure

int cveParse ( char *  xmlfile,
cve_info_t **  outCveList 
)

Parses the specified XML file and creates a list of CVE data structures. The returned list can be freed with cveDelAll().

Parameters:
xmlfile path to the file to be parsed
outCveList address of the pointer to which the root element of the list is to be stored
Returns:
non-negative value indicates the number of CVEs in the list, negative value indicates an error

void cveReferenceDel ( cve_reference_t reference  ) 

Free the CVE Reference structure and its data.

Parameters:
reference CVE Reference to be freed

void cveReferenceDelAll ( cve_reference_t ref  ) 

Free the whole CVE Reference list.

Parameters:
ref root of the CVE Reference list to be freed

cve_reference_t* cveReferenceNew (  ) 

Create new CVE Reference structure.

Note:
The returned memory must be freed by the caller.
Returns:
new zeroed CVE Reference structure
Return values:
NULL on failure


Generated on Sun Mar 29 13:29:21 2009 for Open SCAP Library by  doxygen 1.5.6