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