|
When I write code like this, it show errors, need Community help... ebpf code: #include "vmlinux.h"
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
#include <bpf/bpf_core_read.h>
char __license[] SEC("license") = "Dual MIT/GPL";
SEC("kprobe/__tcp_transmit_skb")
int kprobe_tcp_transmit_skb(struct pt_regs *ctx)
{
struct sk_buff *skb = (struct sk_buff *)PT_REGS_PARM2(ctx);
u16 len = BPF_CORE_READ(skb, len);
bpf_trace_printk("sk_buff len: %p\n", len);
return 0;
}cilium ebpf load program and run with errors like: |
Answered by
actor168
Sep 7, 2023
Replies: 1 comment
|
closed, it is because |
0 replies
Answer selected by
actor168
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
closed, it is because
bpf_trace_printk, should bebpf_printk