2 * Copyright (C) 2012 Andreas Steffen
3 * HSR Hochschule fuer Technik Rapperswil
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>.
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
17 * @defgroup os_info os_info
24 typedef struct os_info_t os_info_t
;
25 typedef enum os_fwd_status_t os_fwd_status_t
;
32 * Defines the IPv4 forwarding status
34 enum os_fwd_status_t
{
40 extern enum_name_t
*os_fwd_status_names
;
43 * Interface for the Operating System (OS) information module
48 * Get the OS product name or distribution
52 chunk_t (*get_name
)(os_info_t
*this);
55 * Get the OS version or release
59 chunk_t (*get_version
)(os_info_t
*this);
62 * Get the OS IPv4 forwarding status
64 * @return IP forwarding status
66 os_fwd_status_t (*get_fwd_status
)(os_info_t
*this);
69 * Get the OS uptime in seconds
73 time_t (*get_uptime
)(os_info_t
*this);
76 * Enumerates over all installed packages
78 * @return return package enumerator
80 enumerator_t
* (*create_package_enumerator
)(os_info_t
*this);
83 * Destroys an os_info_t object.
85 void (*destroy
)(os_info_t
*this);
89 * Create an os_info_t object
91 os_info_t
* os_info_create(void);
93 #endif /** OS_INFO_H_ @}*/