summaryrefslogtreecommitdiffstats
path: root/samples/bpf/libbpf.h
diff options
context:
space:
mode:
authorChenbo Feng2017-03-23 01:27:35 +0100
committerDavid S. Miller2017-03-24 01:01:02 +0100
commit6acc5c2910689fc6ee181bf63085c5efff6a42bd (patch)
tree049fec629362ea0f3017381bc96f4e117ed3e903 /samples/bpf/libbpf.h
parentAdd a helper function to get socket cookie in eBPF (diff)
downloadkernel-qcow2-linux-6acc5c2910689fc6ee181bf63085c5efff6a42bd.tar.gz
kernel-qcow2-linux-6acc5c2910689fc6ee181bf63085c5efff6a42bd.tar.xz
kernel-qcow2-linux-6acc5c2910689fc6ee181bf63085c5efff6a42bd.zip
Add a eBPF helper function to retrieve socket uid
Returns the owner uid of the socket inside a sk_buff. This is useful to perform per-UID accounting of network traffic or per-UID packet filtering. The socket need to be a fullsock otherwise overflowuid is returned. Signed-off-by: Chenbo Feng <fengc@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'samples/bpf/libbpf.h')
0 files changed, 0 insertions, 0 deletions