xref: /dpdk/lib/eal/include/rte_version.h (revision 719834a6849e1daf4a70ff7742bbcc3ae7e25607)
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 #include <string.h>
14 #include <stdio.h>
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 /**
21  * Macro to compute a version number usable for comparisons
22  */
23 #define RTE_VERSION_NUM(a,b,c,d) ((a) << 24 | (b) << 16 | (c) << 8 | (d))
24 
25 /**
26  * All version numbers in one to compare with RTE_VERSION_NUM()
27  */
28 #define RTE_VERSION RTE_VERSION_NUM( \
29 			RTE_VER_YEAR, \
30 			RTE_VER_MONTH, \
31 			RTE_VER_MINOR, \
32 			RTE_VER_RELEASE)
33 
34 /**
35  * Function to return DPDK version prefix string
36  */
37 const char *rte_version_prefix(void);
38 
39 /**
40  * Function to return DPDK version year
41  */
42 unsigned int rte_version_year(void);
43 
44 /**
45  * Function to return DPDK version month
46  */
47 unsigned int rte_version_month(void);
48 
49 /**
50  * Function to return DPDK minor version number
51  */
52 unsigned int rte_version_minor(void);
53 
54 /**
55  * Function to return DPDK version suffix for any release candidates
56  */
57 const char *rte_version_suffix(void);
58 
59 /**
60  * Function to return DPDK version release candidate value
61  */
62 unsigned int rte_version_release(void);
63 
64 /**
65  * Function returning version string
66  * @return
67  *     DPDK version string
68  */
69 const char *rte_version(void);
70 
71 #ifdef __cplusplus
72 }
73 #endif
74 
75 #endif /* RTE_VERSION_H */
76