mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
fix: Hashmap type check
This commit is contained in:
@ -1,5 +1,13 @@
|
||||
#include <linux/bpf.h>
|
||||
#include <bpf/bpf_helpers.h>
|
||||
#define u64 unsigned long long
|
||||
|
||||
struct {
|
||||
__uint(type, BPF_MAP_TYPE_HASH);
|
||||
__uint(max_entries, 1);
|
||||
__type(key, u64);
|
||||
__type(value, u64);
|
||||
} last SEC(".maps");
|
||||
|
||||
SEC("tracepoint/syscalls/sys_enter_execve")
|
||||
int hello(struct pt_regs *ctx) {
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
from pythonbpf.decorators import bpf, bpfglobal, section
|
||||
from ctypes import c_void_p, c_int64, c_int32
|
||||
from ctypes import c_void_p, c_int64, c_int32, c_uint64
|
||||
from pythonbpf.helpers import bpf_ktime_get_ns
|
||||
from pythonbpf.maps import HashMap
|
||||
|
||||
|
||||
@bpf
|
||||
|
||||
Reference in New Issue
Block a user