1SK_FILTER_TRIM_CAP(9)          Linux Networking          SK_FILTER_TRIM_CAP(9)
2
3
4

NAME

6       sk_filter_trim_cap - run a packet through a socket filter
7

SYNOPSIS

9       int sk_filter_trim_cap(struct sock * sk, struct sk_buff * skb,
10                              unsigned int cap);
11

ARGUMENTS

13       sk
14           sock associated with sk_buff
15
16       skb
17           buffer to filter
18
19       cap
20           limit on how short the eBPF program may trim the packet
21

DESCRIPTION

23       Run the filter code and then cut skb->data to correct size returned by
24       sk_run_filter. If pkt_len is 0 we toss packet. If skb->len is smaller
25       than pkt_len we keep whole skb->data. This is the socket level wrapper
26       to sk_run_filter. It returns 0 if the packet should be accepted or
27       -EPERM if the packet should be tossed.
28
30Kernel Hackers Manual 3.10         June 2019             SK_FILTER_TRIM_CAP(9)
Impressum