2
/* $Id: os_matrix.h,v 1.5 2005/02/08 20:00:35 mederchik Exp $ */
4
** Copyright (C) 2001 Fyodor Yarochkin <fygrave@tigerteam.net>,
5
** Ofir Arkin <ofir@sys-security.com>
7
** This program is free software; you can redistribute it and/or modify
8
** it under the terms of the GNU General Public License as published by
9
** the Free Software Foundation; either version 2 of the License, or
10
** (at your option) any later version.
13
** This program is distributed in the hope that it will be useful,
14
** but WITHOUT ANY WARRANTY; without even the implied warranty of
15
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
** GNU General Public License for more details.
18
** You should have received a copy of the GNU General Public License
19
** along with this program; if not, write to the Free Software
20
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
36
#define XPROBE_MATCH_NO 0
37
#define XPROBE_MATCH_PROBABLY_NO 1
38
#define XPROBE_MATCH_PROBABLY_YES 2
39
#define XPROBE_MATCH_YES 3
43
map <int, string> osid_name;
47
const string osid2str(int);
48
const char *osid2char(int id) {
49
string s = osid2str(id);
52
int add_os(string &os_name);
53
int find_os(string &os_name);
55
int get_osnum(void) { return id_count; }
63
/* we may need this later: map<int, int> mod_score; */
68
void add_result(int, int);
69
int get_total(void) { return total; }
70
int get_os_id(void) { return os_id; }
71
friend bool os_vector_compare(const OS_Vector &, const OS_Vector &);
77
vector <OS_Vector> osid_vec;
83
virtual ~OS_Matrix(void);
84
void add_result(int, int, int, int times = 1);
85
/* returns top num scored OS id */
87
/* returns given os_id score */
89
/* returns maximum possible score --> max score by number of
91
int get_max_score(void);
92
/* returns given os_id score in percent */
93
int get_prcnt_score(int);
96
#endif /* INTERFACE_H */