2018-11-22 01:29:44 +08:00
|
|
|
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
|
2019-12-27 05:02:53 +08:00
|
|
|
#include <iostream>
|
2020-01-20 21:06:45 +08:00
|
|
|
#include <bpf/libbpf.h>
|
|
|
|
#include <bpf/bpf.h>
|
|
|
|
#include <bpf/btf.h>
|
2019-12-27 05:02:53 +08:00
|
|
|
#include "test_core_extern.skel.h"
|
2018-11-22 01:29:44 +08:00
|
|
|
|
|
|
|
/* do nothing, just make sure we can link successfully */
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
2019-12-27 05:02:53 +08:00
|
|
|
struct test_core_extern *skel;
|
|
|
|
|
2019-10-11 08:28:04 +08:00
|
|
|
/* libbpf.h */
|
|
|
|
libbpf_set_print(NULL);
|
2018-11-22 01:29:44 +08:00
|
|
|
|
2019-10-11 08:28:04 +08:00
|
|
|
/* bpf.h */
|
|
|
|
bpf_prog_get_fd_by_id(0);
|
2018-11-22 01:29:44 +08:00
|
|
|
|
2019-10-11 08:28:04 +08:00
|
|
|
/* btf.h */
|
|
|
|
btf__new(NULL, 0);
|
|
|
|
|
2019-12-27 05:02:53 +08:00
|
|
|
/* BPF skeleton */
|
|
|
|
skel = test_core_extern__open_and_load();
|
|
|
|
test_core_extern__destroy(skel);
|
|
|
|
|
|
|
|
std::cout << "DONE!" << std::endl;
|
|
|
|
|
2019-10-11 08:28:04 +08:00
|
|
|
return 0;
|
2018-11-22 01:29:44 +08:00
|
|
|
}
|