Changeset View
Changeset View
Standalone View
Standalone View
share/man/man9/domain.9
Show All 20 Lines | |||||
.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | .\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||||
.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||||
.\" DAMAGE. | .\" DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd April 29, 2020 | .Dd April 13, 2021 | ||||
.Dt DOMAIN 9 | .Dt DOMAIN 9 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm domain_add , | .Nm domain_add , | ||||
.Nm pfctlinput , | .Nm pfctlinput , | ||||
.Nm pfctlinput2 , | |||||
.Nm pffinddomain , | .Nm pffinddomain , | ||||
.Nm pffindproto , | .Nm pffindproto , | ||||
.Nm pffindtype , | .Nm pffindtype , | ||||
.Nm DOMAIN_SET | .Nm DOMAIN_SET | ||||
.Nd "network domain management" | .Nd "network domain management" | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.In sys/param.h | .In sys/param.h | ||||
.In sys/kernel.h | .In sys/kernel.h | ||||
.In sys/protosw.h | .In sys/protosw.h | ||||
.In sys/domain.h | .In sys/domain.h | ||||
.Ft void | .Ft void | ||||
.Fn domain_add "void *data" | .Fn domain_add "void *data" | ||||
.Ft void | .Ft void | ||||
.Fn pfctlinput "int cmd" "struct sockaddr *sa" | .Fn pfctlinput "int cmd" "struct sockaddr *sa" | ||||
.Ft void | |||||
.Fn pfctlinput2 "int cmd" "struct sockaddr *sa" "void *ctlparam" | |||||
.Ft struct domain * | .Ft struct domain * | ||||
.Fn pffinddomain "int family" | .Fn pffinddomain "int family" | ||||
.Ft struct protosw * | .Ft struct protosw * | ||||
.Fn pffindproto "int family" "int protocol" "int type" | .Fn pffindproto "int family" "int protocol" "int type" | ||||
.Ft struct protosw * | .Ft struct protosw * | ||||
.Fn pffindtype "int family" "int type" | .Fn pffindtype "int family" "int type" | ||||
.Ft void | .Ft void | ||||
.Fn DOMAIN_SET "name" | .Fn DOMAIN_SET "name" | ||||
▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | |||||
.Tn ICMP | .Tn ICMP | ||||
message types. | message types. | ||||
When called, | When called, | ||||
.Fn pfctlinput | .Fn pfctlinput | ||||
calls the protocol specific | calls the protocol specific | ||||
.Fn pr_ctlinput | .Fn pr_ctlinput | ||||
function for each protocol in that has defined one, in every domain. | function for each protocol in that has defined one, in every domain. | ||||
.Pp | .Pp | ||||
.Fn pfctlinput2 | |||||
provides that same functionality of | |||||
.Fn pfctlinput , | |||||
but with a few additional checks and a new | |||||
.Vt "void *" | |||||
argument that is passed directly to the protocol's | |||||
.Fn pr_ctlinput | |||||
function. | |||||
Unlike | |||||
.Fn pfctlinput , | |||||
.Fn pfctlinput2 | |||||
verifies that | |||||
.Fa sa | |||||
is not | |||||
.Dv NULL , | |||||
and that only the protocol families that are the same as | |||||
.Fa sa | |||||
have their | |||||
.Fn pr_ctlinput | |||||
function called. | |||||
.Pp | |||||
.Fn domain_add | .Fn domain_add | ||||
adds a new protocol domain to the system. | adds a new protocol domain to the system. | ||||
The argument | The argument | ||||
.Fa data | .Fa data | ||||
is cast directly to | is cast directly to | ||||
.Vt "struct domain *" | .Vt "struct domain *" | ||||
within the function, but is declared | within the function, but is declared | ||||
.Vt "void *" | .Vt "void *" | ||||
▲ Show 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | |||||
.Dv SOCK_RAW | .Dv SOCK_RAW | ||||
types if the domain has a default raw protocol. | types if the domain has a default raw protocol. | ||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr socket 2 | .Xr socket 2 | ||||
.Sh HISTORY | .Sh HISTORY | ||||
The functions | The functions | ||||
.Fn domain_add , | .Fn domain_add , | ||||
.Fn pfctlinput , | .Fn pfctlinput , | ||||
.Fn pfctlinput2 , | |||||
.Fn pffinddomain , | .Fn pffinddomain , | ||||
.Fn pffindproto , | .Fn pffindproto , | ||||
.Fn pffindtype | .Fn pffindtype | ||||
and | and | ||||
.Fn DOMAIN_SET | .Fn DOMAIN_SET | ||||
first appeared in | first appeared in | ||||
.Fx 4.4 . | .Fx 4.4 . | ||||
.Sh AUTHORS | .Sh AUTHORS | ||||
This manual page was written by | This manual page was written by | ||||
.An Chad David Aq Mt davidc@acns.ab.ca . | .An Chad David Aq Mt davidc@acns.ab.ca . |