
The ebpf implementations uses cgo, but only to access some C struct definitions. Instead of using cgo simply duplicate the defintion of those two structs in Go and add a test to check that the duplicate definitions remain synchronized. Fixes #2827
14 lines
433 B
Go
14 lines
433 B
Go
//go:build linux && amd64 && cgo && go1.16
|
|
// +build linux,amd64,cgo,go1.16
|
|
|
|
package testhelper
|
|
|
|
// #include "../bpf/include/function_vals.bpf.h"
|
|
import "C"
|
|
|
|
// Function_parameter_t exports function_parameter_t from function_vals.bpf.h
|
|
type Function_parameter_t C.function_parameter_t
|
|
|
|
// Function_parameter_list_t exports function_parameter_list_t from function_vals.bpf.h
|
|
type Function_parameter_list_t C.function_parameter_list_t
|