Loading...
Searching...
No Matches
oval_agent_api.h
Go to the documentation of this file.
/*
* Copyright 2009,2010 Red Hat Inc., Durham, North Carolina.
* All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef OVAL_AGENT_API_H_
#define OVAL_AGENT_API_H_
#include "oval_definitions.h"
#include "oval_system_characteristics.h"
#include "oval_results.h"
#include "oval_variables.h"
#include "oscap_export.h"
//#include "oval_probe.h"
struct oval_agent_session;
typedef struct oval_agent_session oval_agent_session_t;
OSCAP_API oval_agent_session_t * oval_agent_new_session(struct oval_definition_model * model, const char * name);
OSCAP_API struct oval_definition_model* oval_agent_get_definition_model(oval_agent_session_t* ag_sess);
OSCAP_API void oval_agent_set_product_name(oval_agent_session_t *, char *);
OSCAP_API int oval_agent_eval_definition(oval_agent_session_t *, const char *);
OSCAP_API int oval_agent_get_definition_result(oval_agent_session_t *, const char *, oval_result_t *);
OSCAP_API struct oval_result_definition * oval_agent_get_result_definition(oval_agent_session_t *ag_sess, const char *id);
OSCAP_API int oval_agent_reset_session(oval_agent_session_t * ag_sess);
OSCAP_API void oval_agent_reset_syschar(oval_agent_session_t * ag_sess);
OSCAP_API void oval_agent_reset_results(oval_agent_session_t * ag_sess);
OSCAP_API int oval_agent_abort_session(oval_agent_session_t *ag_sess);
typedef int (*agent_reporter)(const struct oval_result_definition * res_def, void *arg);
OSCAP_API int oval_agent_eval_system(oval_agent_session_t * ag_sess, agent_reporter cb, void *arg);
OSCAP_API struct oval_results_model * oval_agent_get_results_model(oval_agent_session_t * ag_sess);
OSCAP_API const char * oval_agent_get_filename(oval_agent_session_t * ag_sess);
OSCAP_API void oval_agent_destroy_session(oval_agent_session_t * ag_sess);
#endif
oval_agent_abort_session
OSCAP_API int oval_agent_abort_session(oval_agent_session_t *ag_sess)
Abort a running probe session.
Definition oval_agent.c:273
oval_agent_reset_syschar
OSCAP_API void oval_agent_reset_syschar(oval_agent_session_t *ag_sess)
Clean system characteristics that were generated in this agent session.
Definition oval_agent.c:258
oval_agent_session_t
struct oval_agent_session oval_agent_session_t
Agent session consists of connection to system checking engine, definition model, system characterist...
Definition oval_agent_api.h:54
oval_agent_get_results_model
OSCAP_API struct oval_results_model * oval_agent_get_results_model(oval_agent_session_t *ag_sess)
Get a result model from agent session.
Definition oval_agent.c:329
oval_agent_eval_definition
OSCAP_API int oval_agent_eval_definition(oval_agent_session_t *, const char *)
Probe the system and evaluate specified definition.
Definition oval_agent.c:174
oval_agent_reset_session
OSCAP_API int oval_agent_reset_session(oval_agent_session_t *ag_sess)
Clean resuls that were generated in this agent session.
Definition oval_agent.c:225
oval_agent_set_product_name
OSCAP_API void oval_agent_set_product_name(oval_agent_session_t *, char *)
Set a product name for the provided agent session.
Definition oval_agent.c:148
oval_agent_new_session
OSCAP_API oval_agent_session_t * oval_agent_new_session(struct oval_definition_model *model, const char *name)
Create new session for OVAL agent from OVAL definition model.
Definition oval_agent.c:92
oval_agent_get_definition_model
OSCAP_API struct oval_definition_model * oval_agent_get_definition_model(oval_agent_session_t *ag_sess)
Retrieves OVAL definition model associated with given session.
Definition oval_agent.c:143
oval_agent_reset_results
OSCAP_API void oval_agent_reset_results(oval_agent_session_t *ag_sess)
Clean results that were generated in this agent session.
Definition oval_agent.c:262
oval_agent_get_result_definition
OSCAP_API struct oval_result_definition * oval_agent_get_result_definition(oval_agent_session_t *ag_sess, const char *id)
Get the OVAL result definition from an agent session.
Definition oval_agent.c:212
oval_agent_get_definition_result
OSCAP_API int oval_agent_get_definition_result(oval_agent_session_t *, const char *, oval_result_t *)
Get the OVAL result of a definition from an agent session.
Definition oval_agent.c:190
oval_agent_destroy_session
OSCAP_API void oval_agent_destroy_session(oval_agent_session_t *ag_sess)
Finish OVAL agent session.
Definition oval_agent.c:345
oval_agent_get_filename
OSCAP_API const char * oval_agent_get_filename(oval_agent_session_t *ag_sess)
Get a filename under which was created.
Definition oval_agent.c:339
oval_agent_eval_system
OSCAP_API int oval_agent_eval_system(oval_agent_session_t *ag_sess, agent_reporter cb, void *arg)
Probe and evaluate all definitions from the content, call the callback functions upon single evaluati...
Definition oval_agent.c:289
oval_result_t
oval_result_t
Result values for the evaluation of an OVAL Definition or an OVAL Test.
Definition oval_types.h:445
oval_definitions.h
oval_results.h
oval_system_characteristics.h
oval_variables.h
oval_agent_session
Definition oval_agent.c:54
oval_definition_model
Oval definition model.
Definition oval_defModel.c:53
oval_result_definition
Definition oval_resultDefinition.c:46
oval_results_model
OVAL Results Model holds OVAL results structure instances.
Definition oval_resModel.c:56