Data Structures | |
struct | cpe_testexpr |
CPE language boolean expression. More... | |
struct | cpe_lang_model |
CPE platform specification. More... | |
struct | cpe_platform |
Single platform representation in CPE language. More... | |
struct | cpe_platform_iterator |
Iterator over CPE dictionary items. More... | |
Modules | |
Private members | |
Files | |
file | cpelang_priv.h |
Interface to Common Platform Enumeration (CPE) Language. | |
file | cpelang.h |
Interface to Common Platform Enumeration (CPE) Language. | |
Enumerations | |
enum | cpe_lang_oper_t { CPE_LANG_OPER_HALT = 0x00, CPE_LANG_OPER_AND = 0x01, CPE_LANG_OPER_OR = 0x02, CPE_LANG_OPER_MATCH = 0x04, CPE_LANG_OPER_MASK = 0xFF, CPE_LANG_OPER_NOT = 0x100, CPE_LANG_OPER_NAND = CPE_LANG_OPER_AND | CPE_LANG_OPER_NOT, CPE_LANG_OPER_NOR = CPE_LANG_OPER_OR | CPE_LANG_OPER_NOT } |
CPE language operators. More... | |
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. | |
struct cpe_platform * | cpe_lang_model_get_item (const struct cpe_lang_model *item, const char *key) |
cpe_lang_oper_t | cpe_testexpr::cpe_testexpr_get_oper (const struct cpe_testexpr *item) |
cpe_testexpr functions to get variable members | |
struct cpe_testexpr * | cpe_testexpr::cpe_testexpr_get_meta_expr (const struct cpe_testexpr *item) |
Get CPE expression subexpression. | |
struct cpe_name * | cpe_testexpr::cpe_testexpr_get_meta_cpe (const struct cpe_testexpr *item) |
Get CPE name to match against. | |
struct cpe_testexpr * | cpe_testexpr::cpe_testexpr_get_next (const struct cpe_testexpr *expr) |
Function to get next expr from array. | |
const char * | cpe_lang_model::cpe_lang_model_get_ns_prefix (const struct cpe_lang_model *item) |
cpe_lang_model function to get namespace prefix | |
struct cpe_platform_iterator * | cpe_lang_model::cpe_lang_model_get_platforms (const struct cpe_lang_model *item) |
cpe_lang_model function to get CPE platforms | |
struct xml_metadata_iterator * | cpe_lang_model::cpe_lang_model_get_xmlns (const struct cpe_lang_model *item) |
cpe_lang_model function to get xmlns attribute | |
const char * | cpe_platform::cpe_platform_get_id (const struct cpe_platform *item) |
cpe_platform functions to get id | |
const char * | cpe_platform::cpe_platform_get_remark (const struct cpe_platform *item) |
cpe_platform functions to get remark | |
struct oscap_title_iterator * | cpe_platform::cpe_platform_get_titles (const struct cpe_platform *item) |
cpe_platform functions to get titles | |
struct cpe_testexpr * | cpe_platform::cpe_platform_get_expr (const struct cpe_platform *item) |
cpe_platform functions to get test expression | |
Iterator functions | |
Functions to iterate throught lists. | |
struct cpe_platform * | cpe_platform_iterator::cpe_platform_iterator_next (struct cpe_platform_iterator *it) |
bool | cpe_platform_iterator::cpe_platform_iterator_has_more (struct cpe_platform_iterator *it) |
void | cpe_platform_iterator::cpe_platform_iterator_free (struct cpe_platform_iterator *it) |
Add functions | |
Get XML namespace from CPE lang model Functions to add member to list. Return value is true if added succesfuly or false in case of error. | |
bool | cpe_lang_model::cpe_lang_model_add_platform (struct cpe_lang_model *lang, struct cpe_platform *platform) |
Add platform to CPE lang model. | |
bool | cpe_lang_model::cpe_lang_model_add_xml (struct cpe_lang_model *lang, struct xml_metadata *xml) |
Add xml metadata to CPE lang model. | |
bool | cpe_platform::cpe_platform_add_title (struct cpe_platform *platform, struct oscap_title *title) |
Add title to platform. | |
Remove functions | |
Add XML namespace to CPE lang model Functions to remove list memebers that the given iterator is pointing to. | |
void | cpe_platform_iterator::cpe_platform_iterator_remove (struct cpe_platform_iterator *it, struct cpe_lang_model *parent) |
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_lang_model * | cpe_lang_model::cpe_lang_model_new (void) |
Constructor of CPE Language model. | |
struct cpe_testexpr * | cpe_testexpr::cpe_testexpr_new (void) |
Constructor of CPE test expression. | |
struct cpe_platform * | cpe_platform::cpe_platform_new (void) |
Constructor of CPE Platform. | |
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_lang_model::cpe_lang_model_set_ns_prefix (struct cpe_lang_model *model, const char *new_prefix) |
Set ns_prefix to CPE lang model. | |
bool | cpe_platform::cpe_platform_set_id (struct cpe_platform *platform, const char *new_id) |
Set ID of CPE platform. | |
bool | cpe_platform::cpe_platform_set_remark (struct cpe_platform *platform, const char *new_remark) |
Set remark of CPE platform. | |
Free functions | |
Destructors of CVE model structures. Functions free structures with all members recursively. For simple deletion of entity use remove functions. | |
void | cpe_testexpr::cpe_testexpr_free (struct cpe_testexpr *expr) |
Free function of CPE test expression. | |
void | cpe_lang_model::cpe_lang_model_free (struct cpe_lang_model *platformspec) |
Free function of CPE test expression. | |
void | cpe_platform::cpe_platform_free (struct cpe_platform *platform) |
Free function of CPE Platform. | |
Other functions | |
| |
bool | cpe_lang_model::cpe_platform_match_cpe (struct cpe_name **cpe, size_t n, const struct cpe_platform *platform) |
Function to match cpe in platform. | |
struct cpe_lang_model * | cpe_lang_model::cpe_lang_model_import (const struct oscap_import_source *source) |
Load CPE language model from a XML document. | |
void | cpe_lang_model::cpe_lang_model_export (const struct cpe_lang_model *spec, struct oscap_export_target *target) |
Write the lang_model to a file. |
enum cpe_lang_oper_t |
void cpe_lang_model_export | ( | const struct cpe_lang_model * | spec, | |
struct oscap_export_target * | target | |||
) | [related, inherited] |
Write the lang_model to a file.
spec | CPE lang model | |
target | target structure with filename, endcoding and indent information |
void cpe_platform_iterator_free | ( | struct cpe_platform_iterator * | it | ) | [related, inherited] |
bool cpe_platform_iterator_has_more | ( | struct cpe_platform_iterator * | it | ) | [related, inherited] |
struct cpe_platform * cpe_platform_iterator_next | ( | struct cpe_platform_iterator * | it | ) | [related, inherited] |
void cpe_platform_iterator_remove | ( | struct cpe_platform_iterator * | it, | |
struct cpe_lang_model * | parent | |||
) | [related, inherited] |
bool cpe_platform_match_cpe | ( | struct cpe_name ** | cpe, | |
size_t | n, | |||
const struct cpe_platform * | platform | |||
) | [related, inherited] |
Function to match cpe in platform.
cpe | to be matched with | |
n | size | |
platform | CPE platform |
struct cpe_name * cpe_testexpr_get_meta_cpe | ( | const struct cpe_testexpr * | item | ) | [related, inherited] |
Get CPE name to match against.
Only valid for CPE_LANG_OPER_MATCH.
struct cpe_testexpr * cpe_testexpr_get_meta_expr | ( | const struct cpe_testexpr * | item | ) | [related, inherited] |
Get CPE expression subexpression.
Not valid for CPE_LANG_OPER_MATCH operation.
struct cpe_testexpr * cpe_testexpr_get_next | ( | const struct cpe_testexpr * | expr | ) | [related, inherited] |
Function to get next expr from array.
expr | CPE Test expression structure |