Commit 3dd85d16 authored by Brenden Blanco's avatar Brenden Blanco

Include bcc headers in /usr/include

* Add wrapper bcc.h to include dependencies
* Add text bpf_module_create_* to list of exports
Signed-off-by: default avatarBrenden Blanco <bblanco@plumgrid.com>
parent 8a9747c9
......@@ -44,3 +44,5 @@ target_link_libraries(bpfprog ${clang_libs} ${llvm_libs} LLVMBPFCodeGen)
install(TARGETS bpfprog LIBRARY DESTINATION lib${LIBSUFFIX})
install(DIRECTORY export/ DESTINATION share/bcc/include/bcc
FILES_MATCHING PATTERN "*.h")
install(FILES bpf_common.h ../libbpf.h DESTINATION include/bcc)
install(FILES bcc.h DESTINATION include)
/*
* Copyright (c) 2015 PLUMgrid, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef BCC_H
#define BCC_H
#include <bcc/bpf_common.h>
#include <linux/bpf.h>
#include <bcc/libbpf.h>
#endif
......@@ -13,15 +13,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#ifndef BPF_COMMON_H
#define BPF_COMMON_H
#include <stdint.h>
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
void * bpf_module_create(const char *filename, const char *proto_filename, unsigned flags);
void * bpf_module_create_from_string(const char *text, unsigned flags);
void bpf_module_destroy(void *program);
char * bpf_module_license(void *program);
unsigned bpf_module_kern_version(void *program);
......@@ -34,3 +38,5 @@ const char * bpf_table_leaf_desc(void *program, const char *table_name);
#ifdef __cplusplus
}
#endif
#endif
......@@ -15,7 +15,8 @@
*/
/* eBPF mini library */
#pragma once
#ifndef LIBBPF_H
#define LIBBPF_H
#ifdef __cplusplus
extern "C" {
......@@ -210,3 +211,5 @@ extern char bpf_log_buf[LOG_BUF_SIZE];
#ifdef __cplusplus
}
#endif
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment