00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef XCCDF_POLICY_H_
00023 #define XCCDF_POLICY_H_
00024
00025 #include <stdbool.h>
00026 #include <time.h>
00027 #include <oscap.h>
00028 #include <xccdf.h>
00029
00052 struct xccdf_policy_model;
00053
00059 struct xccdf_policy;
00060 struct xccdf_policy_iterator;
00061
00067 struct xccdf_value_binding;
00068 struct xccdf_value_binding_iterator;
00069
00070
00071 struct xccdf_policy_model *xccdf_policy_model_new(struct xccdf_benchmark *);
00072 struct xccdf_policy * xccdf_policy_new(struct xccdf_profile * profile);
00073
00074 struct xccdf_benchmark * xccdf_policy_model_get_benchmark(const struct xccdf_policy_model * item);
00075
00076 struct xccdf_policy_iterator *xccdf_policy_model_get_policies(const struct xccdf_policy_model *);
00077
00084 struct xccdf_select_iterator *xccdf_policy_get_selected_rules(struct xccdf_policy *);
00085
00091 bool xccdf_policy_evaluate(struct xccdf_policy *);
00092
00093 struct xccdf_value_binding * xccdf_value_binding_new(const struct xccdf_profile * profile);
00094
00095 struct xccdf_value_binding_iterator *xccdf_policy_get_bound_values(struct xccdf_policy *);
00096
00100 void xccdf_policy_export_variables(struct xccdf_policy *, char *export_namespace, struct oscap_export_target *);
00101 void xccdf_policy_export_controls (struct xccdf_policy *, char *export_namespace, struct oscap_export_target *);
00102 void xccdf_policy_import_results(struct xccdf_policy *, char *import_namespace, struct oscap_import_source *);
00103 void xccdf_policy_export_results(struct xccdf_policy *, char *scoring_model_namespace, struct oscap_export_target *);
00104
00108 void xccdf_policy_model_free(struct xccdf_policy_model *);
00109 void xccdf_policy_free(struct xccdf_policy *);
00110 void xccdf_value_binding_free(struct xccdf_value_binding *);
00111
00113 bool xccdf_policy_model_add_policy(struct xccdf_policy_model *, struct xccdf_policy *);
00115 struct xccdf_profile * xccdf_policy_get_profile(const struct xccdf_policy *);
00117 struct xccdf_select_iterator * xccdf_policy_get_rules(const struct xccdf_policy *);
00119 struct xccdf_value_binding_iterator * xccdf_policy_get_values(const struct xccdf_policy *);
00121 bool xccdf_policy_add_rule(struct xccdf_policy *, struct xccdf_select *);
00123 bool xccdf_policy_add_value(struct xccdf_policy *, struct xccdf_value_binding *);
00124
00126 struct xccdf_refine_rule_iterator * xccdf_value_binding_get_refine_rules(const struct xccdf_value_binding *);
00128 struct xccdf_refine_value_iterator * xccdf_value_binding_get_refine_values(const struct xccdf_value_binding *);
00130 struct xccdf_setvalue_iterator * xccdf_value_binding_get_setvalues(const struct xccdf_value_binding *);
00132 bool xccdf_value_binding_add_refine_rule(struct xccdf_value_binding *, struct xccdf_refine_rule *);
00134 bool xccdf_value_binding_add_refine_value(struct xccdf_value_binding *, struct xccdf_refine_value *);
00136 bool xccdf_value_binding_add_setvalue(struct xccdf_value_binding *, struct xccdf_setvalue *);
00137
00139 bool xccdf_policy_set_selected(struct xccdf_policy * policy, char * idref);
00140
00141 #endif
00142
00143