projects
/
platform
/
upstream
/
bcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
77e2b34
)
Update tcpconnect to use "__u32 af" instead of "int af"
author
marselester
<marselester@gmail.com>
Fri, 21 May 2021 00:36:49 +0000
(20:36 -0400)
committer
yonghong-song
<ys114321@gmail.com>
Fri, 21 May 2021 02:30:42 +0000
(19:30 -0700)
It helps to decode an address family in Go frontend
generated by bpf2go tool, here is an example
https://github.com/marselester/libbpf-tools/blob/master/cmd/tcpconnect/main.go
libbpf-tools/tcpconnect.h
patch
|
blob
|
history
diff --git
a/libbpf-tools/tcpconnect.h
b/libbpf-tools/tcpconnect.h
index 65b768fd8f3d05eb76bdcd8f398d3eb5175494df..fffe70fa0fdc899848acfed7040409983d94f030 100644
(file)
--- a/
libbpf-tools/tcpconnect.h
+++ b/
libbpf-tools/tcpconnect.h
@@
-34,7
+34,7
@@
struct event {
};
char task[TASK_COMM_LEN];
__u64 ts_us;
-
int
af; // AF_INET or AF_INET6
+
__u32
af; // AF_INET or AF_INET6
__u32 pid;
__u32 uid;
__u16 dport;