blob: 5dd2875ba2ae3249d8099974afc16f3c418bba7a [file] [log] [blame]
Paul Bakker3ac1b2d2010-06-18 22:47:29 +00001/**
2 * \file version.h
3 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00004 * \brief Run-time version information
5 *
Paul Bakker84f12b72010-07-18 10:13:04 +00006 * Copyright (C) 2006-2010, Brainspark B.V.
Paul Bakkerb96f1542010-07-18 20:36:00 +00007 *
8 * This file is part of PolarSSL (http://www.polarssl.org)
Paul Bakker84f12b72010-07-18 10:13:04 +00009 * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
Paul Bakkerb96f1542010-07-18 20:36:00 +000010 *
Paul Bakker3ac1b2d2010-06-18 22:47:29 +000011 * All rights reserved.
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Paul Bakkerf3b86c12011-01-27 15:24:17 +000026 */
27/*
Paul Bakker3ac1b2d2010-06-18 22:47:29 +000028 * This set of compile-time defines and run-time variables can be used to
29 * determine the version number of the PolarSSL library used.
30 */
31#ifndef POLARSSL_VERSION_H
32#define POLARSSL_VERSION_H
33
34#include "polarssl/config.h"
35
36/**
37 * The version number x.y.z is split into three parts.
38 * Major, Minor, Patchlevel
39 */
40#define POLARSSL_VERSION_MAJOR 0
Paul Bakker7c8fc712010-08-16 12:41:27 +000041#define POLARSSL_VERSION_MINOR 14
42#define POLARSSL_VERSION_PATCH 0
Paul Bakker3ac1b2d2010-06-18 22:47:29 +000043
44/**
45 * The single version number has the following structure:
46 * MMNNPP00
47 * Major version | Minor version | Patch version
48 */
Paul Bakker7c8fc712010-08-16 12:41:27 +000049#define POLARSSL_VERSION_NUMBER 0x000E0000
50#define POLARSSL_VERSION_STRING "0.14.0"
51#define POLARSSL_VERSION_STRING_FULL "PolarSSL 0.14.0"
Paul Bakker3ac1b2d2010-06-18 22:47:29 +000052
53#if defined(POLARSSL_VERSION_C)
54
55/**
56 * Get the version number.
57 *
Paul Bakker0f5f72e2011-01-18 14:58:55 +000058 * \return The constructed version number in the format
Paul Bakker3ac1b2d2010-06-18 22:47:29 +000059 * MMNNPP00 (Major, Minor, Patch).
60 */
61unsigned int version_get_number();
62
63/**
64 * Get the version string ("x.y.z").
65 *
Paul Bakker0f5f72e2011-01-18 14:58:55 +000066 * \param string The string that will receive the value.
Paul Bakker3ac1b2d2010-06-18 22:47:29 +000067 * (Should be at least 9 bytes in size)
68 */
69void version_get_string( char *string );
70
71/**
72 * Get the full version string ("PolarSSL x.y.z").
73 *
Paul Bakker0f5f72e2011-01-18 14:58:55 +000074 * \param string The string that will receive the value.
Paul Bakker3ac1b2d2010-06-18 22:47:29 +000075 * (Should be at least 18 bytes in size)
76 */
77void version_get_string_full( char *string );
78
79#endif /* POLARSSL_VERSION_C */
80
81#endif /* version.h */