'\" t .\" Title: bpf_prog_create .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: July 2017 .\" Manual: Linux Networking .\" Source: Kernel Hackers Manual 4.12.2 .\" Language: English .\" .TH "BPF_PROG_CREATE" "9" "July 2017" "Kernel Hackers Manual 4\&.12\&" "Linux Networking" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" bpf_prog_create \- create an unattached filter .SH "SYNOPSIS" .HP \w'int\ bpf_prog_create('u .BI "int bpf_prog_create(struct\ bpf_prog\ **\ " "pfp" ", struct\ sock_fprog_kern\ *\ " "fprog" ");" .SH "ARGUMENTS" .PP \fIstruct bpf_prog ** pfp\fR .RS 4 the unattached filter that is created .RE .PP \fIstruct sock_fprog_kern * fprog\fR .RS 4 the filter program .RE .SH "DESCRIPTION" .PP 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\&. .SH "COPYRIGHT" .br