/usr/include/openvas/omp/omp.h is in libopenvas-dev 9.0.1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | /* openvase-libraries/omp
* $Id$
* Description: Header for OMP client interface.
*
* Authors:
* Matthew Mundell <matt@mundell.ukfsn.org>
*
* Copyright:
* Copyright (C) 2009 Greenbone Networks GmbH
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef _OPENVAS_LIBRARIES_OMP_H
#define _OPENVAS_LIBRARIES_OMP_H
#include "../base/array.h"
#include "xml.h"
#ifdef __cplusplus
extern "C"
{
#if 0
}
#endif
#endif
/**
* @brief Struct holding options for authentication.
*/
typedef struct
{
int timeout; ///< Timeout for authentication.
const char *username; ///< Password.
const char *password; ///< Username.
char **role; ///< [out] Role.
char **severity; ///< [out] Severity class setting.
char **timezone; ///< [out] Timezone if any, else NULL.
char **pw_warning; ///< [out] Password warning, NULL if password is okay.
} omp_authenticate_info_opts_t;
/**
* @brief Sensible default values for omp_authenticate_info_opts_t
*/
static const omp_authenticate_info_opts_t omp_authenticate_info_opts_defaults =
{ 0, NULL, NULL, NULL, NULL, NULL, NULL };
/**
* @brief Struct holding options for omp get_report command.
*/
typedef struct
{
const char* sort_field;
const char* sort_order;
const char* format_id; ///< ID of required report format.
const char* levels; ///< Result levels to include.
const char* report_id; ///< ID of single report to get.
int first_result; ///< First result to get.
int max_results; ///< Maximum number of results to return.
int timeout; ///< Timeout for OMP response.
int host_first_result; ///< Skip over results before this result number.
int host_max_results; ///< Maximum number of results to return.
int autofp; ///< Whether to trust vendor security updates. 0 No, 1 full match, 2 partial.
char *type; ///< Type of report.
char *filter; ///< Term to filter results.
char *filt_id; ///< ID of filter, to filter results.
char *host; ///< Host for asset report.
char *pos; ///< Position of report from end.
char *timezone; ///< Timezone.
char *alert_id; ///< ID of alert.
char *delta_report_id; ///< ID of report to compare single report to.
char *delta_states; ///< Delta states (Changed Gone New Same) to include.
char *host_levels; ///< Letter encoded threat level filter, for hosts.
char *search_phrase; ///< Search phrase result filter.
char *host_search_phrase;///< Search phrase result filter.
char *min_cvss_base; ///< Minimum CVSS base filter.
char *min_qod; ///< Minimum QoD filter.
/* Boolean flags: */
int notes; ///< Whether to include associated notes.
int notes_details; ///< Whether to include details of above.
int overrides; ///< Whether to include overrides in the report.
int override_details; ///< If overrides, whether to include details.
int apply_overrides; ///< Whether overrides are applied.
int result_hosts_only; ///< Whether to include only hosts that have results.
int ignore_pagination; ///< Whether to ignore pagination filters.
} omp_get_report_opts_t;
/**
* @brief Sensible default values for omp_get_report_opts_t.
*/
static const omp_get_report_opts_t omp_get_report_opts_defaults =
{
"ROWID", "ascending", "a994b278-1f62-11e1-96ac-406186ea4fc5", "hmlgd",
NULL, 1, -1, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0
};
/**
* @brief Struct holding options for omp get_tasks command.
*/
typedef struct
{
const char* filter; ///< Filter argument.
int timeout; ///< Timeout for OMP response.
const char* actions; ///< Actions argument.
/* Boolean flags: */
int details; ///< Whether to include overrides in the tasks.
int rcfile; ///< Ignored. Removed since OMP 6.0.
} omp_get_tasks_opts_t;
/**
* @brief Sensible default values for omp_get_tasks_opts_t.
*/
static const omp_get_tasks_opts_t omp_get_tasks_opts_defaults =
{ "", 0, NULL, 0, 0 };
/**
* @brief Struct holding options for omp get_tasks command.
*/
typedef struct
{
const char* actions; ///< Actions argument.
const char* task_id; ///< ID of single task to get.
/* Boolean flags: */
int details; ///< Whether to include overrides in the tasks.
int rcfile; ///< Ignored. Removed since OMP 6.0.
} omp_get_task_opts_t;
/**
* @brief Sensible default values for omp_get_tasks_opts_t.
*/
static const omp_get_task_opts_t omp_get_task_opts_defaults =
{ NULL, NULL, 0, 0 };
/**
* @brief Struct holding options for omp create_task command.
*/
typedef struct
{
array_t* alert_ids; ///< Array of alert IDs.
const char* config_id; ///< ID of config.
const char* scanner_id; ///< ID of task scanner.
const char* schedule_id; ///< ID of task schedule.
const char* slave_id; ///< ID of task schedule.
const char* target_id; ///< ID of target.
const char* name; ///< Name of task.
const char* comment; ///< Comment on task.
const char* hosts_ordering; ///< Order for scanning target hosts.
const char* observers; ///< Comma-separated string of observer users.
array_t* observer_groups;///< IDs of observer groups.
int schedule_periods; ///< Number of periods the schedule must run for.
/* Preferences */
const char* in_assets; ///< In assets preference.
const char* max_hosts; ///< Max hosts preference.
const char* max_checks; ///< Max checks preference.
const char* source_iface; ///< Source iface preference.
/* Boolean flags: */
int alterable; ///< Whether the task is alterable.
} omp_create_task_opts_t;
/**
* @brief Sensible default values for omp_get_report_opts_t.
*/
static const omp_create_task_opts_t omp_create_task_opts_defaults =
{
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL,
NULL, NULL, NULL, 0
};
/**
* @brief Struct holding options for omp create_target command.
*/
typedef struct
{
int ssh_credential_port; ///< Port for SSH access.
const char* ssh_credential_id; ///< ID of SSH credential.
const char* smb_credential_id; ///< ID of SMB credential.
const char* esxi_credential_id; ///< ID of ESXi credential.
const char* snmp_credential_id; ///< ID of SNMP credential.
const char* port_range; ///< Port range.
const char* name; ///< Name of target.
const char* comment; ///< Comment on target.
const char* hosts; ///< Name of target.
const char* exclude_hosts; ///< Hosts to exclude.
const char* alive_tests; ///< Alive tests.
/* Boolean flags: */
int reverse_lookup_only; ///< Scanner pref reverse_lookup_only.
int reverse_lookup_unify; ///< Scanner pref reverse_lookup_unify.
} omp_create_target_opts_t;
/**
* @brief Sensible default values for omp_get_report_opts_t.
*/
static const omp_create_target_opts_t omp_create_target_opts_defaults =
{ 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0 };
/**
* @brief Struct holding options for omp get_system_reports command.
*/
typedef struct
{
const char* name; ///< Name of report.
const char* duration; ///< Duration.
const char* start_time; ///< Time of first data point.
const char* end_time; ///< Time of last data point.
const char* slave_id; ///< ID of the slave to get report from.
int brief; ///< Brief flag.
} omp_get_system_reports_opts_t;
/**
* @brief Sensible default values for omp_get_report_opts_t.
*/
static const omp_get_system_reports_opts_t omp_get_system_reports_opts_defaults =
{ NULL, NULL, NULL, NULL, NULL, 0 };
/**
* @brief Struct holding options for omp create_lsc_credential command.
*/
typedef struct
{
const char *name; ///< Name of LSC credential.
const char *community; ///< SNMP community.
const char *login; ///< Login.
const char *passphrase; ///< Passphrase.
const char *private_key; ///< Private key.
const char *auth_algorithm; ///< SNMP authentication algorithm.
const char *privacy_password; ///< SNMP privacy password.
const char *privacy_algorithm; ///< SNMP privacy algorithm.
const char *comment; ///< Comment on LSC credential.
} omp_create_lsc_credential_opts_t;
/**
* @brief Sensible default values for omp_create_lsc_credential_opts_t.
*/
static const omp_create_lsc_credential_opts_t omp_create_lsc_credential_opts_defaults =
{ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL };
/**
* @brief Struct holding options for various omp delete_[...] commands.
*/
typedef struct
{
int ultimate; /// Whether to delete ultimately.
} omp_delete_opts_t;
/**
* @brief Sensible default values for omp_get_report_opts_t.
*/
static const omp_delete_opts_t omp_delete_opts_defaults =
{ 0 };
/**
* @brief Default values for omp_get_report_opts_t for ultimate deletion.
*/
static const omp_delete_opts_t omp_delete_opts_ultimate_defaults =
{ 1 };
int check_response (gnutls_session_t *);
int omp_read_create_response (gnutls_session_t*, gchar **);
const char *omp_task_status (entity_t status_response);
int omp_ping (gnutls_session_t *, int);
int omp_authenticate (gnutls_session_t * session, const char *username,
const char *password);
int omp_authenticate_info_ext (gnutls_session_t*, omp_authenticate_info_opts_t);
int omp_authenticate_info_ext_c (openvas_connection_t *,
omp_authenticate_info_opts_t);
int omp_create_task (gnutls_session_t *, const char *, const char *,
const char *, const char *, gchar **);
int omp_create_task_ext (gnutls_session_t *, omp_create_task_opts_t, gchar **);
int omp_start_task_report (gnutls_session_t *, const char *, char **);
int omp_start_task_report_c (openvas_connection_t *, const char *, char **);
int omp_stop_task (gnutls_session_t *, const char *);
int omp_stop_task_c (openvas_connection_t *, const char *);
int omp_resume_task_report (gnutls_session_t*, const char*, char**);
int omp_resume_task_report_c (openvas_connection_t *, const char *, char **);
int omp_get_tasks (gnutls_session_t *, const char *, int, int, entity_t *);
int omp_get_tasks_ext (gnutls_session_t *, omp_get_tasks_opts_t, entity_t *);
int omp_get_task_ext (gnutls_session_t *, omp_get_task_opts_t, entity_t *);
int omp_get_targets (gnutls_session_t *, const char *, int, int, entity_t *);
int omp_get_report_ext (gnutls_session_t *, omp_get_report_opts_t, entity_t *);
int omp_delete_port_list_ext (gnutls_session_t *, const char *, omp_delete_opts_t);
int omp_delete_task (gnutls_session_t *, const char *);
int omp_delete_task_ext (gnutls_session_t *, const char *, omp_delete_opts_t);
int omp_modify_task_file (gnutls_session_t *, const char *, const char *,
const void *, gsize);
int omp_delete_report (gnutls_session_t*, const char*);
int omp_create_target_ext (gnutls_session_t *, omp_create_target_opts_t,
gchar**);
int omp_delete_target_ext (gnutls_session_t *, const char *, omp_delete_opts_t);
int omp_delete_config_ext (gnutls_session_t *, const char *, omp_delete_opts_t);
int omp_create_lsc_credential_ext (gnutls_session_t*, omp_create_lsc_credential_opts_t,
gchar**);
int omp_create_lsc_credential (gnutls_session_t *, const char *, const char *,
const char *, const char *, gchar **);
int omp_create_lsc_credential_key (gnutls_session_t *, const char *,
const char *, const char *, const char *,
const char *, gchar **);
int omp_delete_lsc_credential_ext (gnutls_session_t *, const char *,
omp_delete_opts_t);
int omp_get_system_reports (gnutls_session_t *, const char *, int, entity_t *);
int omp_get_system_reports_ext (gnutls_session_t *,
omp_get_system_reports_opts_t,
entity_t *);
#if 0
{
#endif
#ifdef __cplusplus
}
#endif
#endif /* not _OPENVAS_LIBRARIES_OMP_H */
|