---
name: "bpf_prog_create"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/bpf_prog_create"
---

# bpf\_prog\_create(9)

create an unattached filter

## NAME

bpf\_prog\_create - create an unattached filter

## SYNOPSIS

**int bpf\_prog\_create(struct bpf\_prog \*\*** *pfp***, struct sock\_fprog\_kern \*** *fprog***);**

## ARGUMENTS

*pfp*

the unattached filter that is created

*fprog*

the filter program

## DESCRIPTION

Create a filter independent of any socket. We first run some sanity checks on it to make sure it does not explode on us later. If an error occurs or there is insufficient memory for the filter a negative errno code is returned. On success the return is zero.

## COPYRIGHT
