---
name: "sk_run_filter"
section: "9"
platform: "linux"
package: "linux-manual-3.2"
version: "3.2.78-1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/sk_run_filter"
---

# sk\_run\_filter(9)

run a filter on a socket

## NAME

sk\_run\_filter - run a filter on a socket

## SYNOPSIS

**unsigned int sk\_run\_filter(const struct sk\_buff \*** *skb***, const struct sock\_filter \*** *fentry***);**

## ARGUMENTS

*skb*

buffer to run the filter on

*fentry*

filter to apply

## DESCRIPTION

Decode and apply filter instructions to the skb-\>data. Return length to keep, 0 for none. *skb* is the data we are filtering, *filter* is the array of filter instructions. Because all jumps are guaranteed to be before last instruction, and last instruction guaranteed to be a RET, we dont need to check flen. (We used to pass to this function the length of filter)

## COPYRIGHT
