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.