Open SCAP Library
|
Interface to Common Platform Enumeration (CPE) Language.
See more details at http://nvd.nist.gov/cpe.cfm
#include <libxml/xmlreader.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <stdbool.h>
#include "public/cpe_dict.h"
#include "public/cpe_name.h"
#include "cpedict_ext_priv.h"
#include "cpedict_priv.h"
#include "cpe_ctx_priv.h"
#include "common/list.h"
#include "common/elements.h"
#include "common/text_priv.h"
#include "common/util.h"
#include "common/_error.h"
#include "common/xmlns_priv.h"
#include "common/xmltext_priv.h"
#include "source/oscap_source_priv.h"
#include "source/public/oscap_source.h"
Data Structures | |
struct | cpe_item |
Structure representing single CPE dictionary item. More... | |
struct | cpe_item_metadata |
Structure representing metadata of CPE item. More... | |
struct | cpe_check |
Structure representing single CPE check. More... | |
struct | cpe_reference |
CPE dictionary item reference. More... | |
struct | cpe_generator |
Structure with information about document. 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... | |
Functions | |
struct cpe_name * | cpe_item_get_deprecated (const struct cpe_item *item) |
OSCAP_ITERATOR_REMOVE_F (cpe_reference) | |
OSCAP_IGETINS_GEN (cpe_item, OSCAP_ITERATOR_REMOVE_Fc cpe_dict_model, items, item) | |
struct cpe_notes * | cpe_notes_new (void) |
void | cpe_notes_free (struct cpe_notes *notes) |
struct cpe_dict_model * | cpe_dict_model_new () |
struct cpe_item_metadata * | cpe_item_metadata_new () |
struct cpe_item * | cpe_item_new () |
struct cpe_check * | cpe_check_new () |
struct cpe_reference * | cpe_reference_new () |
struct cpe_generator * | cpe_generator_new () |
struct cpe_vendor * | cpe_vendor_new () |
struct cpe_product * | cpe_product_new () |
struct cpe_version * | cpe_version_new () |
struct cpe_update * | cpe_update_new () |
struct cpe_edition * | cpe_edition_new () |
struct cpe_language * | cpe_language_new () |
struct cpe_dict_model * | cpe_dict_model_parse (struct cpe_parser_ctx *ctx) |
Load new CPE dictionary from XML node. More... | |
struct cpe_generator * | cpe_generator_parse (struct cpe_parser_ctx *ctx) |
Parse generator part of CPE dictionary XML file. More... | |
struct cpe_item * | cpe_item_parse (struct cpe_parser_ctx *ctx) |
New dictionary item from XML. More... | |
struct cpe_vendor * | cpe_vendor_parse (xmlTextReaderPtr reader) |
Parsing function to parse vendors of CPE dictionary. More... | |
void | cpe_dict_model_export_xml (const struct cpe_dict_model *dict, const char *file) |
Export function for CPE dictionary model. More... | |
void | cpe_dict_export (const struct cpe_dict_model *dict, xmlTextWriterPtr writer) |
Internal export function for CPE dictionary model. More... | |
void | cpe_generator_export (const struct cpe_generator *generator, xmlTextWriterPtr writer) |
Exporting function for CPE generator - information of XML document. More... | |
void | cpe_item_export (const struct cpe_item *item, xmlTextWriterPtr writer, int base_version) |
Exporting function for CPE item. More... | |
void | cpe_vendor_export (const struct cpe_vendor *vendor, xmlTextWriterPtr writer) |
Exporting function for CPE vendor. More... | |
void | cpe_dict_model_free (struct cpe_dict_model *dict) |
void | cpe_item_free (struct cpe_item *item) |
void | cpe_generator_free (struct cpe_generator *generator) |
void | cpe_check_free (struct cpe_check *check) |
void | cpe_reference_free (struct cpe_reference *ref) |
void | cpe_vendor_free (struct cpe_vendor *vendor) |
void | cpe_product_free (struct cpe_product *product) |
void | cpe_version_free (struct cpe_version *version) |
void | cpe_update_free (struct cpe_update *update) |
void | cpe_edition_free (struct cpe_edition *edition) |
void | cpe_language_free (struct cpe_language *language) |
void | cpe_itemmetadata_free (struct cpe_item_metadata *meta) |
Variables | |
const char * | PART_TO_CHAR [] = { NULL, "h", "o", "a" } |
void cpe_dict_export | ( | const struct cpe_dict_model * | dict, |
xmlTextWriterPtr | writer | ||
) |
Internal export function for CPE dictionary model.
dict | CPE dictionary |
writer | xmlTextWriterPtr representing XML model |
void cpe_dict_model_export_xml | ( | const struct cpe_dict_model * | dict, |
const char * | file | ||
) |
Export function for CPE dictionary model.
dict | CPE dictionary structure |
file | filename to export |
struct cpe_dict_model* cpe_dict_model_parse | ( | struct cpe_parser_ctx * | ctx | ) |
Load new CPE dictionary from XML node.
ctx | CPE parser context |
NULL | on failure |
void cpe_generator_export | ( | const struct cpe_generator * | generator, |
xmlTextWriterPtr | writer | ||
) |
Exporting function for CPE generator - information of XML document.
generator | CPE generator structure |
writer | xmlTextWriterPtr representing XML model |
struct cpe_generator* cpe_generator_parse | ( | struct cpe_parser_ctx * | ctx | ) |
Parse generator part of CPE dictionary XML file.
ctx | CPE Parser's context |
void cpe_item_export | ( | const struct cpe_item * | item, |
xmlTextWriterPtr | writer, | ||
int | base_version | ||
) |
Exporting function for CPE item.
item | CPE item structure |
writer | xmlTextWriterPtr representing XML model |
base_version | what is the base version of target CPE dict (1 for CPE 1.x, 2 for CPE 2.x, ...) |
struct cpe_item* cpe_item_parse | ( | struct cpe_parser_ctx * | ctx | ) |
New dictionary item from XML.
ctx | CPE parser's context |
NULL | on failure |
void cpe_vendor_export | ( | const struct cpe_vendor * | vendor, |
xmlTextWriterPtr | writer | ||
) |
Exporting function for CPE vendor.
vendor | CPE vendor structure |
writer | xmlTextWriterPtr representing XML model |
struct cpe_vendor* cpe_vendor_parse | ( | xmlTextReaderPtr | reader | ) |
Parsing function to parse vendors of CPE dictionary.
reader | xmlTextReaderPtr representing XML model |
OSCAP_ITERATOR_REMOVE_F | ( | cpe_reference | ) |
< representation of <notes> element
< xml:lang attribute
< list of inner <note> elements