domain.9 (186748) | domain.9 (232051) |
---|---|
1.\" 2.\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice(s), this list of conditions and the following disclaimer as --- 10 unchanged lines hidden (view full) --- 19.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 21.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 22.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 25.\" DAMAGE. 26.\" | 1.\" 2.\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice(s), this list of conditions and the following disclaimer as --- 10 unchanged lines hidden (view full) --- 19.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 21.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 22.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 25.\" DAMAGE. 26.\" |
27.\" $FreeBSD: head/share/man/man9/domain.9 186748 2009-01-04 19:23:44Z rwatson $ | 27.\" $FreeBSD: head/share/man/man9/domain.9 232051 2012-02-23 17:47:19Z brueffer $ |
28.\" | 28.\" |
29.Dd December 23, 2008 | 29.Dd February 23, 2012 |
30.Dt DOMAIN 9 31.Os 32.Sh NAME | 30.Dt DOMAIN 9 31.Os 32.Sh NAME |
33.Nm net_add_domain , | 33.Nm domain_add , |
34.Nm pfctlinput , 35.Nm pfctlinput2 , 36.Nm pffindproto , 37.Nm pffindtype , 38.Nm DOMAIN_SET 39.Nd "network domain management" 40.Sh SYNOPSIS 41.In sys/param.h 42.In sys/kernel.h 43.In sys/protosw.h 44.In sys/domain.h 45.Ft void | 34.Nm pfctlinput , 35.Nm pfctlinput2 , 36.Nm pffindproto , 37.Nm pffindtype , 38.Nm DOMAIN_SET 39.Nd "network domain management" 40.Sh SYNOPSIS 41.In sys/param.h 42.In sys/kernel.h 43.In sys/protosw.h 44.In sys/domain.h 45.Ft void |
46.Fn net_add_domain "void *data" | 46.Fn domain_add "void *data" |
47.Ft void 48.Fn pfctlinput "int cmd" "struct sockaddr *sa" 49.Ft void 50.Fn pfctlinput2 "int cmd" "struct sockaddr *sa" "void *ctlparam" 51.Ft struct protosw * 52.Fn pffindproto "int family" "int protocol" "int type" 53.Ft struct protosw * 54.Fn pffindtype "int family" "int type" --- 82 unchanged lines hidden (view full) --- 137is not 138.Dv NULL , 139and that only the protocol families that are the same as 140.Fa sa 141have their 142.Fn pr_ctlinput 143function called. 144.Pp | 47.Ft void 48.Fn pfctlinput "int cmd" "struct sockaddr *sa" 49.Ft void 50.Fn pfctlinput2 "int cmd" "struct sockaddr *sa" "void *ctlparam" 51.Ft struct protosw * 52.Fn pffindproto "int family" "int protocol" "int type" 53.Ft struct protosw * 54.Fn pffindtype "int family" "int type" --- 82 unchanged lines hidden (view full) --- 137is not 138.Dv NULL , 139and that only the protocol families that are the same as 140.Fa sa 141have their 142.Fn pr_ctlinput 143function called. 144.Pp |
145.Fn net_add_domain | 145.Fn domain_add |
146adds a new protocol domain to the system. 147The argument 148.Fa data 149is cast directly to 150.Vt "struct domain *" 151within the function, but is declared 152.Vt "void *" 153in order to prevent compiler warnings when new domains are registered with 154.Fn SYSINIT . 155In most cases | 146adds a new protocol domain to the system. 147The argument 148.Fa data 149is cast directly to 150.Vt "struct domain *" 151within the function, but is declared 152.Vt "void *" 153in order to prevent compiler warnings when new domains are registered with 154.Fn SYSINIT . 155In most cases |
156.Fn net_add_domain | 156.Fn domain_add |
157is not called directly, instead 158.Fn DOMAIN_SET 159is used. 160.Pp 161If the new domain has defined an initialization routine, it is called by | 157is not called directly, instead 158.Fn DOMAIN_SET 159is used. 160.Pp 161If the new domain has defined an initialization routine, it is called by |
162.Fn net_add_domain ; | 162.Fn domain_add ; |
163as well, each of the protocols within the domain that have defined an 164initialization routine will have theirs called. 165.Pp 166Once a domain is added it cannot be unloaded. 167This is because there is 168no reference counting system in place to determine if there are any 169active references from sockets within that domain. 170.Pp --- 56 unchanged lines hidden --- | 163as well, each of the protocols within the domain that have defined an 164initialization routine will have theirs called. 165.Pp 166Once a domain is added it cannot be unloaded. 167This is because there is 168no reference counting system in place to determine if there are any 169active references from sockets within that domain. 170.Pp --- 56 unchanged lines hidden --- |