DPDK
20.05.0
Main Page
Related Pages
Data Structures
Files
Examples
File List
Globals
lib
librte_eal
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_VERSION_NUM(a,b,c,d) ((a) << 24 | (b) << 16 | (c) << 8 | (d))
26
30
#define RTE_VERSION RTE_VERSION_NUM( \
31
RTE_VER_YEAR, \
32
RTE_VER_MONTH, \
33
RTE_VER_MINOR, \
34
RTE_VER_RELEASE)
35
41
static
inline
const
char
*
42
rte_version
(
void
)
43
{
44
static
char
version[32];
45
if
(version[0] != 0)
46
return
version;
47
if
(strlen(RTE_VER_SUFFIX) == 0)
48
snprintf(version,
sizeof
(version),
"%s %d.%02d.%d"
,
49
RTE_VER_PREFIX,
50
RTE_VER_YEAR,
51
RTE_VER_MONTH,
52
RTE_VER_MINOR);
53
else
54
snprintf(version,
sizeof
(version),
"%s %d.%02d.%d%s%d"
,
55
RTE_VER_PREFIX,
56
RTE_VER_YEAR,
57
RTE_VER_MONTH,
58
RTE_VER_MINOR,
59
RTE_VER_SUFFIX,
60
RTE_VER_RELEASE);
61
return
version;
62
}
63
64
#ifdef __cplusplus
65
}
66
#endif
67
68
#endif
/* RTE_VERSION_H */
rte_version
static const char * rte_version(void)
Definition:
rte_version.h:42
rte_common.h
Generated by
1.8.9.1