Skip to content
Commit 51570a5a authored by Chenbo Feng's avatar Chenbo Feng Committed by David S. Miller
Browse files

A Sample of using socket cookie and uid for traffic monitoring



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.

Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
Acked-by: default avatarWillem de Bruijn <willemb@google.com>
Signed-off-by: default avatarChenbo Feng <fengc@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6acc5c29
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment