File: preferences.h

package info (click to toggle)
openvas-client 1.0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 4,004 kB
  • ctags: 2,723
  • sloc: ansic: 50,142; sh: 3,617; makefile: 903
file content (77 lines) | stat: -rw-r--r-- 3,477 bytes parent folder | download
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
/* NessusClient
 * Copyright (C) 1998 Renaud Deraison
 * Copyright (C) 2004 Intevation GmbH
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2
 * as published by the Free Software Foundation.
 *
 * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 * In addition, as a special exception, Renaud Deraison
 * gives permission to link the code of this program with any
 * version of the OpenSSL library which is distributed under a
 * license identical to that listed in the included COPYING.OpenSSL
 * file, and distribute linked combinations including the two.
 * You must obey the GNU General Public License in all respects
 * for all of the code used other than OpenSSL.  If you modify
 * this file, you may extend this exception to your version of the
 * file, but you are not obligated to do so.  If you do not wish to
 * do so, delete this exception statement from your version.
 */

#ifndef _NESSUSC_PREFERENCES_H
#define _NESSUSC_PREFERENCES_H

#include "context.h"

int    preferences_init(struct context *);
void   preferences_save(struct context *);
void   preferences_save_as(struct context *, char *);
struct arglist *prefs_get_pluginset(struct context *, char *, struct nessus_plugin *);
int    preferences_process_filename(struct context *, char *);
int    preferences_generate_new_file(struct context *, const char *);
char * plugin_asc_id(struct arglist *);
char * preferences_get_altname(struct context *, const char *);
void * prefs_get_default(struct context *, const char *);
void * prefs_get_value(struct context *, const char *);
#define prefs_get_int(context, name) ((int)prefs_get_value(context, name))
#define prefs_get_string(context, name) ((const char *)prefs_get_value(context, name))
void   prefs_set_value(struct context *, const char *, void *, int);
void   prefs_set_int(struct context *, const char *, int);
void   prefs_set_string(struct context *, const char *, const char *);
int    prefs_has_options(struct context *);
char * prefs_get_nessushome(void);

#ifdef _WIN32
/* applies to some windows misunderstanding */
#define CANNOT_SET_HOMEVAR "\
There is no personal directory known, where Nessus can store the key\n\
and the configuration cache.\n\
\n\
So please set the environment variable NESSUSHOME with explicit path\n\
(eg. C:\\WHAT\\SO\\EVER\\...) to some existing directory.  Make sure that\n\
this variable is set every time you have Windows rebooted.\n\
\n\
Having finshed with the NESSUSHOME variable, close all message boxes\n\
to terminate Nessus, then restart Nessus, again."

#else /* not  _WIN32 */
#define CANNOT_SET_HOMEVAR "\
Your HOME environment variable might be unset,  or your home directiory\n\
might be unaccessable.  So you need to check/set your HOME variable.\n\
\n\
In case you do not want to change HOME, you can alternatively set the\n\
variable NESSUSHOME, instead (do not forget to \"export NESSUSHOME;\"\n\
after setting it.  NESSUSHOME overwrites the meaning of HOME for this\n\
application."
#endif /* _WIN32 */

#endif