Thread (7 messages) flat view 7 messages, 2 authors, 2017-03-20

Re: [PATCH net-next v5 3/3] A Sample of using socket cookie and uid for traffic monitoring

From: Daniel Borkmann <daniel@iogearbox.net>
Date: 2017-03-20 23:07:55

On 03/20/2017 07:41 PM, Chenbo Feng wrote:
From: Chenbo Feng <redacted>

Add a sample program to demostrate the possible usage of
get_socket_cookie and get_socket_uid helper function. The program will
store bytes and packets counting of in/out traffic monitored by iptables
and store the stats in a bpf map in per socket base. The owner uid of
the socket will be stored as part of the data entry. A shell script for
running the program is also included.

Signed-off-by: Chenbo Feng <redacted>
[...]
+int main(int argc, char *argv[])
+{
+	if (argc > 2) {
+		printf("Too many argument provided\n");
+		return 1;
[...]
+
+	return 0;
+}
+
+
+
+
+
+
Did these bits slip in accidentally?
quoted hunk ↗ jump to hunk
diff --git a/samples/bpf/libbpf.h b/samples/bpf/libbpf.h
index 3705fba..8ab36a0 100644
--- a/samples/bpf/libbpf.h
+++ b/samples/bpf/libbpf.h
@@ -135,6 +135,16 @@ struct bpf_insn;
  		.off   = OFF,					\
  		.imm   = 0 })
[...]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help