Annotation of embedaddon/strongswan/src/libimcv/os_info/os_info.h, revision 1.1.1.1

1.1       misho       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_FEDORA,
                     37:        OS_TYPE_REDHAT,
                     38:        OS_TYPE_CENTOS,
                     39:        OS_TYPE_SUSE,
                     40:        OS_TYPE_GENTOO,
                     41:        OS_TYPE_ANDROID,
                     42:        OS_TYPE_WINDOWS,
                     43:        OS_TYPE_ROOF
                     44: };
                     45: 
                     46: extern enum_name_t *os_type_names;
                     47: 
                     48: /**
                     49:  * Defines the security state of a package stored in the database
                     50:  */
                     51: enum os_package_state_t {
                     52:        OS_PACKAGE_STATE_UPDATE =    0,         /* latest update */
                     53:        OS_PACKAGE_STATE_SECURITY =  1,         /* latest security fix */
                     54:        OS_PACKAGE_STATE_BLACKLIST = 2          /* blacklisted package */
                     55: };
                     56: 
                     57: extern enum_name_t *os_package_state_names;
                     58: 
                     59: /**
                     60:  * Defines the IPv4 forwarding status
                     61:  */
                     62: enum os_fwd_status_t {
                     63:        OS_FWD_DISABLED =       0,
                     64:        OS_FWD_ENABLED =        1,
                     65:        OS_FWD_UNKNOWN =        2
                     66: };
                     67: 
                     68: extern enum_name_t *os_fwd_status_names;
                     69: 
                     70: /**
                     71:  * Convert an OS name into an OS enumeration type
                     72:  *
                     73:  * @param name                                                 OS name
                     74:  * @return                                                             OS enumeration type
                     75:  */
                     76: os_type_t os_type_from_name(chunk_t name);
                     77: 
                     78: #endif /** OS_INFO_H_ @}*/

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>