Merge branch 'openssl-providers'
[strongswan.git] / src / libimcv / os_info / os_info.h
1 /*
2 * Copyright (C) 2012-2014 Andreas Steffen
3 * HSR Hochschule fuer Technik Rapperswil
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 */
15
16 /**
17 * @defgroup os_info os_info
18 * @{ @ingroup libimcv
19 */
20
21 #ifndef OS_INFO_H_
22 #define OS_INFO_H_
23
24 typedef enum os_type_t os_type_t;
25 typedef enum os_fwd_status_t os_fwd_status_t;
26 typedef enum os_package_state_t os_package_state_t;
27
28 #include <library.h>
29
30 #include <time.h>
31
32 enum os_type_t {
33 OS_TYPE_UNKNOWN,
34 OS_TYPE_DEBIAN,
35 OS_TYPE_UBUNTU,
36 OS_TYPE_RASPBIAN,
37 OS_TYPE_FEDORA,
38 OS_TYPE_REDHAT,
39 OS_TYPE_CENTOS,
40 OS_TYPE_SUSE,
41 OS_TYPE_GENTOO,
42 OS_TYPE_ANDROID,
43 OS_TYPE_WINDOWS,
44 OS_TYPE_ROOF
45 };
46
47 extern enum_name_t *os_type_names;
48
49 /**
50 * Defines the security state of a package stored in the database
51 */
52 enum os_package_state_t {
53 OS_PACKAGE_STATE_UPDATE = 0, /* latest update */
54 OS_PACKAGE_STATE_SECURITY = 1, /* latest security fix */
55 OS_PACKAGE_STATE_BLACKLIST = 2 /* blacklisted package */
56 };
57
58 extern enum_name_t *os_package_state_names;
59
60 /**
61 * Defines the IPv4 forwarding status
62 */
63 enum os_fwd_status_t {
64 OS_FWD_DISABLED = 0,
65 OS_FWD_ENABLED = 1,
66 OS_FWD_UNKNOWN = 2
67 };
68
69 extern enum_name_t *os_fwd_status_names;
70
71 /**
72 * Convert an OS name into an OS enumeration type
73 *
74 * @param name OS name
75 * @return OS enumeration type
76 */
77 os_type_t os_type_from_name(chunk_t name);
78
79 #endif /** OS_INFO_H_ @}*/