#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
Go to the source code of this file.
Data Structures | |
struct | cpe_t |
Structure holding Common Platform Enumeration URI data. More... | |
Enumerations | |
enum | cpe_part_t { CPE_PART_NONE, CPE_PART_HW, CPE_PART_OS, CPE_PART_APP } |
enumeration of possible CPE parts More... | |
enum | cpe_field_t { CPE_FIELD_TYPE, CPE_FIELD_VENDOR, CPE_FIELD_PRODUCT, CPE_FIELD_VERSION, CPE_FIELD_UPDATE, CPE_FIELD_EDITION, CPE_FIELD_LANGUAGE, CPE_FIELDNUM } |
enumeration of CPE URI fields (useful for indexing arrays) | |
Functions | |
cpe_t * | cpe_new (const char *cpe) |
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. | |
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 [4] |
string representation of CPE parts, order corresponds with values in enum above | |
const char * | CPE_SCHEMA |
CPE URI schema string. | |
const char | CPE_SEP_CHAR |
CPE URI component separator character. | |
const char * | CPE_SEP_STR |
CPE URI component separator character as string. |
See more details at http://nvd.nist.gov/cpe.cfm