eal/windows: add missing SPDX license tag
[dpdk.git] / lib / librte_eal / include / rte_version.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2010-2014 Intel Corporation
3  */
4
5 /**
6  * @file
7  * Definitions of DPDK version numbers
8  */
9
10 #ifndef _RTE_VERSION_H_
11 #define _RTE_VERSION_H_
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16
17 #include <stdint.h>
18 #include <string.h>
19 #include <stdio.h>
20 #include <rte_common.h>
21
22 /**
23  * Macro to compute a version number usable for comparisons
24  */
25 #define RTE_VERSION_NUM(a,b,c,d) ((a) << 24 | (b) << 16 | (c) << 8 | (d))
26
27 /**
28  * All version numbers in one to compare with RTE_VERSION_NUM()
29  */
30 #define RTE_VERSION RTE_VERSION_NUM( \
31                         rte_version_year(), \
32                         rte_version_month(), \
33                         rte_version_minor(), \
34                         rte_version_release())
35
36 /**
37  * Function to return DPDK version prefix string
38  */
39 const char *rte_version_prefix(void);
40
41 /**
42  * Function to return DPDK version year
43  */
44 unsigned int rte_version_year(void);
45
46 /**
47  * Function to return DPDK version month
48  */
49 unsigned int rte_version_month(void);
50
51 /**
52  * Function to return DPDK minor version number
53  */
54 unsigned int rte_version_minor(void);
55
56 /**
57  * Function to return DPDK version suffix for any release candidates
58  */
59 const char *rte_version_suffix(void);
60
61 /**
62  * Function to return DPDK version release candidate value
63  */
64 unsigned int rte_version_release(void);
65
66 /**
67  * Function returning version string
68  * @return
69  *     DPDK version string
70  */
71 const char *rte_version(void);
72
73 #ifdef __cplusplus
74 }
75 #endif
76
77 #endif /* RTE_VERSION_H */