Open SCAP Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions | Data Fields
cvss_metrics Struct Reference

CVSS metrics. More...

#include <cvss_score.h>

Public Member Functions

OSCAP_API struct cvss_metricscvss_metrics_new (enum cvss_category category)
 
OSCAP_API struct cvss_metricscvss_metrics_clone (const struct cvss_metrics *metrics)
 
OSCAP_API void cvss_metrics_free (struct cvss_metrics *metrics)
 
OSCAP_API enum cvss_category cvss_metrics_get_category (const struct cvss_metrics *metrics)
 
OSCAP_API const char * cvss_metrics_get_source (const struct cvss_metrics *metrics)
 
OSCAP_API bool cvss_metrics_set_source (struct cvss_metrics *metrics, const char *new_source)
 
OSCAP_API const char * cvss_metrics_get_generated_on_datetime (const struct cvss_metrics *metrics)
 
OSCAP_API bool cvss_metrics_set_generated_on_datetime (struct cvss_metrics *metrics, const char *new_datetime)
 
OSCAP_API const char * cvss_metrics_get_upgraded_from_version (const struct cvss_metrics *metrics)
 
OSCAP_API bool cvss_metrics_set_upgraded_from_version (struct cvss_metrics *metrics, const char *new_upgraded_from_version)
 
OSCAP_API float cvss_metrics_get_score (const struct cvss_metrics *metrics)
 
OSCAP_API bool cvss_metrics_set_score (struct cvss_metrics *metrics, float score)
 
OSCAP_API bool cvss_metrics_is_valid (const struct cvss_metrics *metrics)
 Validate CVSS metrics completeness.
 
Vector values

Functions to get or set individual CVSS vector values.

Functions check for correct type of metrics (base/temporal/environmental). Setters return false and getters undefined/default value when attempted to query wrong type of metrics.

Todo:
Getters/setters for the "approximated" flag
OSCAP_API enum cvss_access_vector cvss_metrics_get_access_vector (const struct cvss_metrics *metrics)
 
OSCAP_API enum
cvss_access_complexity 
cvss_metrics_get_access_complexity (const struct cvss_metrics *metrics)
 
OSCAP_API enum cvss_authentication cvss_metrics_get_authentication (const struct cvss_metrics *metrics)
 
OSCAP_API enum cvss_cia_impact cvss_metrics_get_confidentiality_impact (const struct cvss_metrics *metrics)
 
OSCAP_API enum cvss_cia_impact cvss_metrics_get_integrity_impact (const struct cvss_metrics *metrics)
 
OSCAP_API enum cvss_cia_impact cvss_metrics_get_availability_impact (const struct cvss_metrics *metrics)
 
OSCAP_API enum cvss_exploitability cvss_metrics_get_exploitability (const struct cvss_metrics *metrics)
 
OSCAP_API enum
cvss_remediation_level 
cvss_metrics_get_remediation_level (const struct cvss_metrics *metrics)
 
OSCAP_API enum
cvss_report_confidence 
cvss_metrics_get_report_confidence (const struct cvss_metrics *metrics)
 
OSCAP_API enum
cvss_collateral_damage_potential 
cvss_metrics_get_collateral_damage_potential (const struct cvss_metrics *metrics)
 
OSCAP_API enum
cvss_target_distribution 
cvss_metrics_get_target_distribution (const struct cvss_metrics *metrics)
 
OSCAP_API enum cvss_cia_requirement cvss_metrics_get_confidentiality_requirement (const struct cvss_metrics *metrics)
 
OSCAP_API enum cvss_cia_requirement cvss_metrics_get_integrity_requirement (const struct cvss_metrics *metrics)
 
OSCAP_API enum cvss_cia_requirement cvss_metrics_get_availability_requirement (const struct cvss_metrics *metrics)
 
OSCAP_API bool cvss_metrics_set_access_vector (struct cvss_metrics *metrics, enum cvss_access_vector)
 
OSCAP_API bool cvss_metrics_set_access_complexity (struct cvss_metrics *metrics, enum cvss_access_complexity)
 
OSCAP_API bool cvss_metrics_set_authentication (struct cvss_metrics *metrics, enum cvss_authentication)
 
OSCAP_API bool cvss_metrics_set_confidentiality_impact (struct cvss_metrics *metrics, enum cvss_cia_impact)
 
OSCAP_API bool cvss_metrics_set_integrity_impact (struct cvss_metrics *metrics, enum cvss_cia_impact)
 
OSCAP_API bool cvss_metrics_set_availability_impact (struct cvss_metrics *metrics, enum cvss_cia_impact)
 
OSCAP_API bool cvss_metrics_set_exploitability (struct cvss_metrics *metrics, enum cvss_exploitability)
 
OSCAP_API bool cvss_metrics_set_remediation_level (struct cvss_metrics *metrics, enum cvss_remediation_level)
 
OSCAP_API bool cvss_metrics_set_report_confidence (struct cvss_metrics *metrics, enum cvss_report_confidence)
 
OSCAP_API bool cvss_metrics_set_collateral_damage_potential (struct cvss_metrics *metrics, enum cvss_collateral_damage_potential)
 
OSCAP_API bool cvss_metrics_set_target_distribution (struct cvss_metrics *metrics, enum cvss_target_distribution)
 
OSCAP_API bool cvss_metrics_set_confidentiality_requirement (struct cvss_metrics *metrics, enum cvss_cia_requirement)
 
OSCAP_API bool cvss_metrics_set_integrity_requirement (struct cvss_metrics *metrics, enum cvss_cia_requirement)
 
OSCAP_API bool cvss_metrics_set_availability_requirement (struct cvss_metrics *metrics, enum cvss_cia_requirement)
 

Data Fields

enum cvss_category category
 
float score
 
char * source
 
char * upgraded_from_version
 
char * generated_on_datetime
 
union {
   unsigned   BASE [CVSS_KEY_BASE_NUM]
 
   unsigned   TEMPORAL [CVSS_KEY_TEMPORAL_NUM]
 
   unsigned   ENVIRONMENTAL [CVSS_KEY_ENVIRONMENTAL_NUM]
 
   unsigned   ANY [CVSSMAX(CVSSMAX(CVSS_KEY_BASE_NUM,
      CVSS_KEY_TEMPORAL_NUM),
      CVSS_KEY_ENVIRONMENTAL_NUM)]
 
metrics
 

Detailed Description

CVSS metrics.

base, temporal or environmental metrics


The documentation for this struct was generated from the following files: