Deleted Added
full compact
sysctl_ctx_init.9 (84306) sysctl_ctx_init.9 (89124)
1.\"
2.\" Copyright (c) 2000, Andrzej Bialecki <abial@FreeBSD.org>
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
1.\"
2.\" Copyright (c) 2000, Andrzej Bialecki <abial@FreeBSD.org>
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.\" $FreeBSD: head/share/man/man9/sysctl_ctx_init.9 84306 2001-10-01 16:09:29Z ru $
28.\" $FreeBSD: head/share/man/man9/sysctl_ctx_init.9 89124 2002-01-09 11:43:48Z mpp $
29.\"
30.Dd July 15, 2000
31.Dt SYSCTL_CTX_INIT 9
32.Os
33.Sh NAME
34.Nm sysctl_ctx_init ,
35.Nm sysctl_ctx_free ,
36.Nm sysctl_ctx_entry_add ,

--- 68 unchanged lines hidden (view full) ---

105.Ed
106.Pp
107Each context entry points to one dynamic oid that it manages.
108Newly created oids are always inserted in the front of the list.
109.Pp
110The
111.Fn sysctl_ctx_free
112function removes the context and associated oids it manages.
29.\"
30.Dd July 15, 2000
31.Dt SYSCTL_CTX_INIT 9
32.Os
33.Sh NAME
34.Nm sysctl_ctx_init ,
35.Nm sysctl_ctx_free ,
36.Nm sysctl_ctx_entry_add ,

--- 68 unchanged lines hidden (view full) ---

105.Ed
106.Pp
107Each context entry points to one dynamic oid that it manages.
108Newly created oids are always inserted in the front of the list.
109.Pp
110The
111.Fn sysctl_ctx_free
112function removes the context and associated oids it manages.
113If the function completes successfuly,
113If the function completes successfully,
114all managed oids have been unregistered
115(removed from the tree)
116and freed,
117together with all their allocated memory,
118and the entries of the context have been freed as well.
119.Pp
120The removal operation is performed in two steps.
121First, for each context entry, the function

--- 44 unchanged lines hidden (view full) ---

166pointer remains intact.
167Thereafter, the programmer is responsible for managing the resources
168allocated to this oid.
169.Pp
170The
171.Fn sysctl_ctx_entry_find
172function searches for a given
173.Fa oidp
114all managed oids have been unregistered
115(removed from the tree)
116and freed,
117together with all their allocated memory,
118and the entries of the context have been freed as well.
119.Pp
120The removal operation is performed in two steps.
121First, for each context entry, the function

--- 44 unchanged lines hidden (view full) ---

166pointer remains intact.
167Thereafter, the programmer is responsible for managing the resources
168allocated to this oid.
169.Pp
170The
171.Fn sysctl_ctx_entry_find
172function searches for a given
173.Fa oidp
174witin a context list,
174within a context list,
175either returning a pointer to the
176.Fa struct sysctl_ctx_entry
177found,
178or
179.Dv NULL .
180.Sh EXAMPLES
181The following is an example of how to create a new top-level category
182and how to hook up another subtree to an existing static node.

--- 63 unchanged lines hidden ---
175either returning a pointer to the
176.Fa struct sysctl_ctx_entry
177found,
178or
179.Dv NULL .
180.Sh EXAMPLES
181The following is an example of how to create a new top-level category
182and how to hook up another subtree to an existing static node.

--- 63 unchanged lines hidden ---