/home/pvrabec/tmp/openscap/openscap-0.3.3/src/CPE/cpeuri.c File Reference

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

#include <string.h>
#include <stdio.h>
#include <pcre.h>
#include <ctype.h>
#include <assert.h>
#include "cpeuri.h"

Functions

cpe_tcpe_new (const char *cpestr)
 Create new CPE structure from string cpe.
char ** cpe_split (char *str, const char *delim)
 Split CPE string into individual fields separated by delim.
bool cpe_urldecode (char *str)
 In-place decodes a -encoded string.
bool cpe_name_match_one (const cpe_t *cpe, const cpe_t *against)
 Check if candidate CPE cpe matches CPE against according to CPE specification v 2.1.
bool cpe_name_match_cpes (const cpe_t *name, size_t n, cpe_t **namelist)
 Check if CPE name matches any CPE in namelist.
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.
bool cpe_check (const char *str)
 Ensures str is in proper CPE format.
const char * as_str (const char *str)
char * cpe_get_uri (const cpe_t *cpe)
 Return CPE URI as a new string.
int cpe_write (const cpe_t *cpe, FILE *f)
 Write CPE URI cpe to file a descriptor f.
bool cpe_assign_values (cpe_t *cpe, char **fields)
 Fill cpe structure with parsed fields.
void cpe_delete (cpe_t *cpe)
 Destructor.
size_t ptrarray_length (void **arr)
 Return number of elements in NULL-terminated array of pointers.

Variables

const char * CPE_PART_CHAR [] = { NULL, "h", "o", "a" }
const char * CPE_SCHEMA = "cpe:/"
const char CPE_SEP_CHAR = ':'
const char * CPE_SEP_STR = ":"
const size_t CPE_SPLIT_INIT_ALLOC = 8


Detailed Description

Interface to Common Product Enumeration (CPE) URI.

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


Generated on Thu Apr 30 13:45:38 2009 for Open SCAP Library by  doxygen 1.5.7.1