Helper function bpf_get_socket_uid
Definition
Copyright (c) 2015 The Libbpf Authors. All rights reserved.
Get the owner UID of the socked associated to skb.
Returns
The owner UID of the socket associated to skb. If the socket is NULL, or if it is not a full socket (i.e. if it is a time-wait or a request socket instead), overflowuid value is returned (note that overflowuid might also be the actual UID value for the socket).
static __u32 (* const bpf_get_socket_uid)(struct __sk_buff *skb) = (void *) 47;
Usage
Docs could be improved
This part of the docs is incomplete, contributions are very welcome
Program types
This helper call can be used in the following program types:
BPF_PROG_TYPE_CGROUP_SKB
BPF_PROG_TYPE_SCHED_ACT
BPF_PROG_TYPE_SCHED_CLS
BPF_PROG_TYPE_SK_SKB
BPF_PROG_TYPE_SOCKET_FILTER
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome