.. | .. |
---|
1 | | -// SPDX-License-Identifier: LGPL-2.1 |
---|
| 1 | +// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) |
---|
2 | 2 | |
---|
3 | 3 | /* |
---|
4 | 4 | * Copyright (C) 2013-2015 Alexei Starovoitov <ast@kernel.org> |
---|
5 | 5 | * Copyright (C) 2015 Wang Nan <wangnan0@huawei.com> |
---|
6 | 6 | * Copyright (C) 2015 Huawei Inc. |
---|
7 | 7 | * Copyright (C) 2017 Nicira, Inc. |
---|
8 | | - * |
---|
9 | | - * This program is free software; you can redistribute it and/or |
---|
10 | | - * modify it under the terms of the GNU Lesser General Public |
---|
11 | | - * License as published by the Free Software Foundation; |
---|
12 | | - * version 2.1 of the License (not later!) |
---|
13 | | - * |
---|
14 | | - * This program is distributed in the hope that it will be useful, |
---|
15 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
17 | | - * GNU Lesser General Public License for more details. |
---|
18 | | - * |
---|
19 | | - * You should have received a copy of the GNU Lesser General Public |
---|
20 | | - * License along with this program; if not, see <http://www.gnu.org/licenses> |
---|
21 | 8 | */ |
---|
22 | 9 | |
---|
23 | 10 | #undef _GNU_SOURCE |
---|
.. | .. |
---|
25 | 12 | #include <string.h> |
---|
26 | 13 | |
---|
27 | 14 | #include "libbpf.h" |
---|
| 15 | + |
---|
| 16 | +/* make sure libbpf doesn't use kernel-only integer typedefs */ |
---|
| 17 | +#pragma GCC poison u8 u16 u32 u64 s8 s16 s32 s64 |
---|
28 | 18 | |
---|
29 | 19 | #define ERRNO_OFFSET(e) ((e) - __LIBBPF_ERRNO__START) |
---|
30 | 20 | #define ERRCODE_OFFSET(c) ERRNO_OFFSET(LIBBPF_ERRNO__##c) |
---|
.. | .. |
---|
43 | 33 | [ERRCODE_OFFSET(PROGTYPE)] = "Kernel doesn't support this program type", |
---|
44 | 34 | [ERRCODE_OFFSET(WRNGPID)] = "Wrong pid in netlink message", |
---|
45 | 35 | [ERRCODE_OFFSET(INVSEQ)] = "Invalid netlink sequence", |
---|
| 36 | + [ERRCODE_OFFSET(NLPARSE)] = "Incorrect netlink message parsing", |
---|
46 | 37 | }; |
---|
47 | 38 | |
---|
48 | 39 | int libbpf_strerror(int err, char *buf, size_t size) |
---|