00001
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef OVAL_AGENT_API_H_
00038 #define OVAL_AGENT_API_H_
00039
00040 #include "oval_definitions.h"
00041 #include "oval_system_characteristics.h"
00042 #include "oval_results.h"
00043 #include "oval_variables.h"
00044 #include "oval_probe.h"
00045
00046 #ifdef ENABLE_XCCDF
00047 #include "xccdf_policy.h"
00048 #endif
00049
00050 struct oval_agent_session;
00051
00057 typedef struct oval_agent_session oval_agent_session_t;
00058
00065 typedef int (oval_agent_result_cb_t) (const char *id, int result, void *arg);
00066
00070 oval_agent_session_t * oval_agent_new_session(struct oval_definition_model * model);
00071
00075 oval_result_t oval_agent_eval_definition(oval_agent_session_t * ag_sess, const char *id);
00076
00080 int oval_agent_reset_session(oval_agent_session_t * ag_sess);
00081
00085 int oval_agent_eval_system(oval_agent_session_t * ag_sess, oval_agent_result_cb_t * cb, void *arg);
00086
00090 struct oval_results_model * oval_agent_get_results_model(oval_agent_session_t * ag_sess);
00091
00095 void oval_agent_destroy_session(oval_agent_session_t * ag_sess);
00096
00097
00098 #ifdef ENABLE_XCCDF
00099
00100
00115 typedef xccdf_test_result_type_t (xccdf_policy_eval_rule_cb_t) (struct xccdf_policy * policy, const char * rule_id,
00116 const char * id, struct xccdf_value_binding_iterator * it, void * usr);
00117
00133 xccdf_test_result_type_t oval_agent_eval_rule (struct xccdf_policy * policy, const char * rule_id,
00134 const char * id, struct xccdf_value_binding_iterator * it, void * usr);
00135
00143 void oval_agent_resolve_variables(struct oval_agent_session * session, struct xccdf_value_binding_iterator *it);
00144
00145
00153 bool xccdf_policy_model_register_engine_oval(struct xccdf_policy_model * model, struct oval_agent_session * sess);
00154
00160 void oval_agent_export_sysinfo_to_xccdf_result(struct oval_agent_session * session, struct xccdf_result * ritem);
00161
00162
00165 #endif
00166
00171 #endif