/home/pvrabec/tmp/openscap/openscap-0.1.4/src/CPE/cpelang.h File Reference

Interface to Common Product Enumeration (CPE) Language. More...

#include <stdlib.h>
#include "cpeuri.h"

Go to the source code of this file.

Classes

struct  cpe_lang_expr
 CPE language boolean expression. More...
struct  cpe_platform_spec
struct  cpe_platform

Typedefs

typedef struct cpe_lang_expr cpe_lang_expr_t
 CPE language boolean expression.
typedef struct cpe_platform_spec cpe_platform_spec_t
typedef struct cpe_platform cpe_platform_t

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 = 0x03,
  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...

Functions

cpe_platform_spec_tcpe_platformspec_new (const char *fname)
bool cpe_platformspec_add (cpe_platform_spec_t *platformspec, cpe_platform_t *platform)
void cpe_platformspec_delete (cpe_platform_spec_t *platformspec)
bool cpe_language_match_cpe (cpe_t **cpe, size_t n, const cpe_platform_t *platform)
void cpe_platform_delete (cpe_platform_t *platform)
void cpe_langexpr_delete (cpe_lang_expr_t *expr)


Detailed Description

Interface to Common Product Enumeration (CPE) Language.

See more details at http://nvd.nist.gov/cpe.cfm


Typedef Documentation

CPE platform specification

typedef struct cpe_platform cpe_platform_t

Single platform representation in CPE language


Enumeration Type Documentation

CPE language operators.

Enumerator:
CPE_LANG_OPER_HALT  end of instruction list
CPE_LANG_OPER_AND  logical AND
CPE_LANG_OPER_OR  logical OR
CPE_LANG_OPER_MATCH  match against specified CPE
CPE_LANG_OPER_MASK  mask to extract operator
CPE_LANG_OPER_NOT  negate


Function Documentation

void cpe_langexpr_delete ( cpe_lang_expr_t expr  ) 

Delete CPE language boolean expression

Parameters:
expr expression to be deleted

bool cpe_language_match_cpe ( cpe_t **  cpe,
size_t  n,
const cpe_platform_t platform 
)

Match list of CPEs against CPE language platform specification

Parameters:
cpe List of CPEs describing tested platform as a list of pointers
n number of CPEs
platform CPE language platform, that is expected (not) to match given list of CPEs
Returns:
result of expression evaluation

void cpe_platform_delete ( cpe_platform_t platform  ) 

Delete single CPE paltform specification

Parameters:
platform platform to be deleted

bool cpe_platformspec_add ( cpe_platform_spec_t platformspec,
cpe_platform_t platform 
)

Add new platform entry to platformspec

Note:
platformspec will take over memory management of platform
Parameters:
platformspec list of platforms being extended
platform platform to add to the list
Returns:
true on success

void cpe_platformspec_delete ( cpe_platform_spec_t platformspec  ) 

Free specified platform specification list

Parameters:
platformspec pointer to list to be deleted

cpe_platform_spec_t* cpe_platformspec_new ( const char *  fname  ) 

New platform specification from file

Parameters:
fname file name to load
Returns:
new platform specification list
Return values:
NULL on failure


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