Thread (7 messages) read the whole thread 7 messages, 2 authors, 2017-03-20

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

From: Alexei Starovoitov <hidden>
Date: 2017-03-20 15:57:09

On Sun, Mar 19, 2017 at 05:08:44PM -0700, 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>
---
 samples/bpf/cookie_uid_helper_example.c      | 229 +++++++++++++++++++++++++++
 samples/bpf/libbpf.h                         |  10 ++
 samples/bpf/run_cookie_uid_helper_example.sh |  14 ++
Makefile update missing?
+ * Compile:
+ * gcc -I ../../usr/include -I ../../tools/lib -I ../../tools/include \
+ * -I ./ -Wall cookie_uid_helper_example.c ../../tools/lib/bpf/bpf.c -o \
+ * perSocketStats_example
this can be part of Makefile and please drop CamelStyle.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help