version.h 2.44 KB
Newer Older
1 2 3
/**
 * \file version.h
 *
4 5
 * \brief Run-time version information
 *
6
 *  Copyright (C) 2006-2013, Brainspark B.V.
Paul Bakker's avatar
Paul Bakker committed
7 8
 *
 *  This file is part of PolarSSL (http://www.polarssl.org)
9
 *  Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
Paul Bakker's avatar
Paul Bakker committed
10
 *
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
 *  All rights reserved.
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along
 *  with this program; if not, write to the Free Software Foundation, Inc.,
 *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 27
 */
/*
28 29 30 31 32 33
 * This set of compile-time defines and run-time variables can be used to
 * determine the version number of the PolarSSL library used.
 */
#ifndef POLARSSL_VERSION_H
#define POLARSSL_VERSION_H

34
#include "config.h"
35 36 37 38 39

/**
 * The version number x.y.z is split into three parts.
 * Major, Minor, Patchlevel
 */
40
#define POLARSSL_VERSION_MAJOR  1
Paul Bakker's avatar
Paul Bakker committed
41
#define POLARSSL_VERSION_MINOR  3
Paul Bakker's avatar
Paul Bakker committed
42
#define POLARSSL_VERSION_PATCH  6
43 44 45 46 47 48

/**
 * The single version number has the following structure:
 *    MMNNPP00
 *    Major version | Minor version | Patch version
 */
Paul Bakker's avatar
Paul Bakker committed
49 50 51
#define POLARSSL_VERSION_NUMBER         0x01030600
#define POLARSSL_VERSION_STRING         "1.3.6"
#define POLARSSL_VERSION_STRING_FULL    "PolarSSL 1.3.6"
52 53 54

#if defined(POLARSSL_VERSION_C)

55 56 57 58
#ifdef __cplusplus
extern "C" {
#endif

59 60 61
/**
 * Get the version number.
 *
62
 * \return          The constructed version number in the format
63 64
 *                  MMNNPP00 (Major, Minor, Patch).
 */
65
unsigned int version_get_number( void );
66 67 68 69

/**
 * Get the version string ("x.y.z").
 *
70
 * \param string    The string that will receive the value.
71 72 73 74 75 76 77
 *                  (Should be at least 9 bytes in size)
 */
void version_get_string( char *string );

/**
 * Get the full version string ("PolarSSL x.y.z").
 *
78
 * \param string    The string that will receive the value.
79 80 81 82
 *                  (Should be at least 18 bytes in size)
 */
void version_get_string_full( char *string );

83 84 85 86
#ifdef __cplusplus
}
#endif

87 88 89
#endif /* POLARSSL_VERSION_C */

#endif /* version.h */