DPDK
18.11.11
Main Page
Related Pages
Data Structures
Files
Examples
File List
Globals
lib
librte_eal
common
include
rte_version.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-3-Clause
2
* Copyright(c) 2010-2014 Intel Corporation
3
*/
4
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
25
#define RTE_VER_PREFIX "DPDK"
26
30
#define RTE_VER_YEAR 18
31
35
#define RTE_VER_MONTH 11
36
40
#define RTE_VER_MINOR 11
41
45
#define RTE_VER_SUFFIX ""
46
52
#define RTE_VER_RELEASE 16
53
57
#define RTE_VERSION_NUM(a,b,c,d) ((a) << 24 | (b) << 16 | (c) << 8 | (d))
58
62
#define RTE_VERSION RTE_VERSION_NUM( \
63
RTE_VER_YEAR, \
64
RTE_VER_MONTH, \
65
RTE_VER_MINOR, \
66
RTE_VER_RELEASE)
67
73
static
inline
const
char
*
74
rte_version
(
void
)
75
{
76
static
char
version[32];
77
if
(version[0] != 0)
78
return
version;
79
if
(strlen(
RTE_VER_SUFFIX
) == 0)
80
snprintf(version,
sizeof
(version),
"%s %d.%02d.%d"
,
81
RTE_VER_PREFIX
,
82
RTE_VER_YEAR
,
83
RTE_VER_MONTH
,
84
RTE_VER_MINOR
);
85
else
86
snprintf(version,
sizeof
(version),
"%s %d.%02d.%d%s%d"
,
87
RTE_VER_PREFIX
,
88
RTE_VER_YEAR
,
89
RTE_VER_MONTH
,
90
RTE_VER_MINOR
,
91
RTE_VER_SUFFIX
,
92
RTE_VER_RELEASE
< 16 ?
93
RTE_VER_RELEASE
:
94
RTE_VER_RELEASE
- 16);
95
return
version;
96
}
97
98
#ifdef __cplusplus
99
}
100
#endif
101
102
#endif
/* RTE_VERSION_H */
RTE_VER_YEAR
#define RTE_VER_YEAR
Definition:
rte_version.h:30
rte_version
static const char * rte_version(void)
Definition:
rte_version.h:74
RTE_VER_PREFIX
#define RTE_VER_PREFIX
Definition:
rte_version.h:25
RTE_VER_SUFFIX
#define RTE_VER_SUFFIX
Definition:
rte_version.h:45
rte_common.h
RTE_VER_MINOR
#define RTE_VER_MINOR
Definition:
rte_version.h:40
RTE_VER_MONTH
#define RTE_VER_MONTH
Definition:
rte_version.h:35
RTE_VER_RELEASE
#define RTE_VER_RELEASE
Definition:
rte_version.h:52
Generated by
1.8.9.1