kernel: Add further support for fixed-width integer type sysctls.
[dragonfly.git] / share / man / man9 / sysctl_add_oid.9
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
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\" 3. The name of the author may not be used to endorse or promote products
14 .\"    derived from this software without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
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: src/share/man/man9/sysctl_add_oid.9,v 1.21 2006/04/28 10:45:27 rwatson Exp $
29 .\"
30 .Dd October 6, 2018
31 .Dt SYSCTL_ADD_OID 9
32 .Os
33 .Sh NAME
34 .Nm sysctl_add_oid ,
35 .Nm sysctl_remove_oid ,
36 .Nm SYSCTL_CHILDREN ,
37 .Nm SYSCTL_STATIC_CHILDREN ,
38 .Nm SYSCTL_ADD_OID ,
39 .Nm SYSCTL_ADD_NODE ,
40 .Nm SYSCTL_ADD_STRING ,
41 .Nm SYSCTL_ADD_INT ,
42 .Nm SYSCTL_ADD_U32 ,
43 .Nm SYSCTL_ADD_UINT ,
44 .Nm SYSCTL_ADD_LONG ,
45 .Nm SYSCTL_ADD_ULONG ,
46 .Nm SYSCTL_ADD_QUAD ,
47 .Nm SYSCTL_ADD_UQUAD ,
48 .Nm SYSCTL_ADD_OPAQUE ,
49 .Nm SYSCTL_ADD_STRUCT ,
50 .Nm SYSCTL_ADD_PROC
51 .Nd runtime sysctl tree manipulation
52 .Sh SYNOPSIS
53 .In sys/sysctl.h
54 .Ft struct sysctl_oid *
55 .Fo sysctl_add_oid
56 .Fa "struct sysctl_ctx_list *ctx"
57 .Fa "struct sysctl_oid_list *parent"
58 .Fa "int number"
59 .Fa "const char *name"
60 .Fa "int kind"
61 .Fa "void *arg1"
62 .Fa "int arg2"
63 .Fa "int (*handler) (SYSCTL_HANDLER_ARGS)"
64 .Fa "const char *format"
65 .Fa "const char *descr"
66 .Fc
67 .Ft int
68 .Fo sysctl_remove_oid
69 .Fa "struct sysctl_oid *oidp"
70 .Fa "int del"
71 .Fa "int recurse"
72 .Fc
73 .Ft struct sysctl_oid_list *
74 .Fo SYSCTL_CHILDREN
75 .Fa "struct sysctl_oid *oidp"
76 .Fc
77 .Ft struct sysctl_oid_list *
78 .Fo SYSCTL_STATIC_CHILDREN
79 .Fa "struct sysctl_oid_list oid_name"
80 .Fc
81 .Ft struct sysctl_oid *
82 .Fo SYSCTL_ADD_OID
83 .Fa "struct sysctl_ctx_list *ctx"
84 .Fa "struct sysctl_oid_list *parent"
85 .Fa "int number"
86 .Fa "const char *name"
87 .Fa "int kind"
88 .Fa "void *arg1"
89 .Fa "int arg2"
90 .Fa "int (*handler) (SYSCTL_HANDLER_ARGS)"
91 .Fa "const char *format"
92 .Fa "const char *descr"
93 .Fc
94 .Ft struct sysctl_oid *
95 .Fo SYSCTL_ADD_NODE
96 .Fa "struct sysctl_ctx_list *ctx"
97 .Fa "struct sysctl_oid_list *parent"
98 .Fa "int number"
99 .Fa "const char *name"
100 .Fa "int access"
101 .Fa "int (*handler) (SYSCTL_HANDLER_ARGS)"
102 .Fa "const char *descr"
103 .Fc
104 .Ft struct sysctl_oid *
105 .Fo SYSCTL_ADD_S8
106 .Fa "struct sysctl_ctx_list *ctx"
107 .Fa "struct sysctl_oid_list *parent"
108 .Fa "int number"
109 .Fa "const char *name"
110 .Fa "int access"
111 .Fa "int8_t *arg"
112 .Fa "int len"
113 .Fa "const char *descr"
114 .Fc
115 .Ft struct sysctl_oid *
116 .Fo SYSCTL_ADD_S16
117 .Fa "struct sysctl_ctx_list *ctx"
118 .Fa "struct sysctl_oid_list *parent"
119 .Fa "int number"
120 .Fa "const char *name"
121 .Fa "int access"
122 .Fa "int16_t *arg"
123 .Fa "int len"
124 .Fa "const char *descr"
125 .Fc
126 .Ft struct sysctl_oid *
127 .Fo SYSCTL_ADD_S32
128 .Fa "struct sysctl_ctx_list *ctx"
129 .Fa "struct sysctl_oid_list *parent"
130 .Fa "int number"
131 .Fa "const char *name"
132 .Fa "int access"
133 .Fa "int32_t *arg"
134 .Fa "int len"
135 .Fa "const char *descr"
136 .Fc
137 .Ft struct sysctl_oid *
138 .Fo SYSCTL_ADD_S64
139 .Fa "struct sysctl_ctx_list *ctx"
140 .Fa "struct sysctl_oid_list *parent"
141 .Fa "int number"
142 .Fa "const char *name"
143 .Fa "int access"
144 .Fa "int64_t *arg"
145 .Fa "int len"
146 .Fa "const char *descr"
147 .Fc
148 .Ft struct sysctl_oid *
149 .Fo SYSCTL_ADD_STRING
150 .Fa "struct sysctl_ctx_list *ctx"
151 .Fa "struct sysctl_oid_list *parent"
152 .Fa "int number"
153 .Fa "const char *name"
154 .Fa "int access"
155 .Fa "char *arg"
156 .Fa "int len"
157 .Fa "const char *descr"
158 .Fc
159 .Ft struct sysctl_oid *
160 .Fo SYSCTL_ADD_INT
161 .Fa "struct sysctl_ctx_list *ctx"
162 .Fa "struct sysctl_oid_list *parent"
163 .Fa "int number"
164 .Fa "const char *name"
165 .Fa "int access"
166 .Fa "int *arg"
167 .Fa "int len"
168 .Fa "const char *descr"
169 .Fc
170 .Ft struct sysctl_oid *
171 .Fo SYSCTL_ADD_U8
172 .Fa "struct sysctl_ctx_list *ctx"
173 .Fa "struct sysctl_oid_list *parent"
174 .Fa "int number"
175 .Fa "const char *name"
176 .Fa "int access"
177 .Fa "uint8_t *arg"
178 .Fa "int len"
179 .Fa "const char *descr"
180 .Fc
181 .Ft struct sysctl_oid *
182 .Fo SYSCTL_ADD_U16
183 .Fa "struct sysctl_ctx_list *ctx"
184 .Fa "struct sysctl_oid_list *parent"
185 .Fa "int number"
186 .Fa "const char *name"
187 .Fa "int access"
188 .Fa "uint16_t *arg"
189 .Fa "int len"
190 .Fa "const char *descr"
191 .Fc
192 .Ft struct sysctl_oid *
193 .Fo SYSCTL_ADD_U32
194 .Fa "struct sysctl_ctx_list *ctx"
195 .Fa "struct sysctl_oid_list *parent"
196 .Fa "int number"
197 .Fa "const char *name"
198 .Fa "int access"
199 .Fa "uint32_t *arg"
200 .Fa "const char *descr"
201 .Fc
202 .Ft struct sysctl_oid *
203 .Fo SYSCTL_ADD_U64
204 .Fa "struct sysctl_ctx_list *ctx"
205 .Fa "struct sysctl_oid_list *parent"
206 .Fa "int number"
207 .Fa "const char *name"
208 .Fa "int access"
209 .Fa "uint64_t *arg"
210 .Fa "int len"
211 .Fa "const char *descr"
212 .Fc
213 .Ft struct sysctl_oid *
214 .Fo SYSCTL_ADD_UINT
215 .Fa "struct sysctl_ctx_list *ctx"
216 .Fa "struct sysctl_oid_list *parent"
217 .Fa "int number"
218 .Fa "const char *name"
219 .Fa "int access"
220 .Fa "unsigned int *arg"
221 .Fa "int val"
222 .Fa "const char *descr"
223 .Fc
224 .Ft struct sysctl_oid *
225 .Fo SYSCTL_ADD_LONG
226 .Fa "struct sysctl_ctx_list *ctx"
227 .Fa "struct sysctl_oid_list *parent"
228 .Fa "int number"
229 .Fa "const char *name"
230 .Fa "int access"
231 .Fa "long *arg"
232 .Fa "const char *descr"
233 .Fc
234 .Ft struct sysctl_oid *
235 .Fo SYSCTL_ADD_ULONG
236 .Fa "struct sysctl_ctx_list *ctx"
237 .Fa "struct sysctl_oid_list *parent"
238 .Fa "int number"
239 .Fa "const char *name"
240 .Fa "int access"
241 .Fa "unsigned long *arg"
242 .Fa "const char *descr"
243 .Fc
244 .Ft struct sysctl_oid *
245 .Fo SYSCTL_ADD_QUAD
246 .Fa "struct sysctl_ctx_list *ctx"
247 .Fa "struct sysctl_oid_list *parent"
248 .Fa "int number"
249 .Fa "const char *name"
250 .Fa "int access"
251 .Fa "quad_t *arg"
252 .Fa "int val"
253 .Fa "const char *descr"
254 .Fc
255 .Ft struct sysctl_oid *
256 .Fo SYSCTL_ADD_UQUAD
257 .Fa "struct sysctl_ctx_list *ctx"
258 .Fa "struct sysctl_oid_list *parent"
259 .Fa "int number"
260 .Fa "const char *name"
261 .Fa "int access"
262 .Fa "u_quad_t *arg"
263 .Fa "int val"
264 .Fa "const char *descr"
265 .Fc
266 .Ft struct sysctl_oid *
267 .Fo SYSCTL_ADD_OPAQUE
268 .Fa "struct sysctl_ctx_list *ctx"
269 .Fa "struct sysctl_oid_list *parent"
270 .Fa "int number"
271 .Fa "const char *name"
272 .Fa "int access"
273 .Fa "void *arg"
274 .Fa "int len"
275 .Fa "const char *format"
276 .Fa "const char *descr"
277 .Fc
278 .Ft struct sysctl_oid *
279 .Fo SYSCTL_ADD_STRUCT
280 .Fa "struct sysctl_ctx_list *ctx"
281 .Fa "struct sysctl_oid_list *parent"
282 .Fa "int number"
283 .Fa "const char *name"
284 .Fa "int access"
285 .Fa "void *arg"
286 .Fa STRUCT_NAME
287 .Fa "const char *descr"
288 .Fc
289 .Ft struct sysctl_oid *
290 .Fo SYSCTL_ADD_PROC
291 .Fa "struct sysctl_ctx_list *ctx"
292 .Fa "struct sysctl_oid_list *parent"
293 .Fa "int number"
294 .Fa "const char *name"
295 .Fa "int access"
296 .Fa "void *arg1"
297 .Fa "int arg2"
298 .Fa "int (*handler) (SYSCTL_HANDLER_ARGS)"
299 .Fa "const char *format"
300 .Fa "const char *descr"
301 .Fc
302 .Sh DESCRIPTION
303 These functions and macros provide an interface
304 for creating and deleting sysctl oids at runtime
305 (e.g.\& during lifetime of a module).
306 The alternative method,
307 based on linker sets (see
308 .In sys/linker_set.h
309 and
310 .\" XXX Manual pages should avoid referencing source files
311 .Pa /sys/kern/kern_sysctl.c
312 for details), only allows creation and deletion
313 on module load and unload respectively.
314 .Pp
315 Dynamic oids of type
316 .Dv CTLTYPE_NODE
317 are reusable
318 so that several code sections can create and delete them,
319 but in reality they are allocated and freed
320 based on their reference count.
321 As a consequence,
322 it is possible for two or more code sections
323 to create partially overlapping trees that they both can use.
324 It is not possible to create overlapping leaves,
325 nor to create different child types with the same name and parent.
326 .Pp
327 Newly created oids are connected to their parent nodes.
328 In all these functions and macros
329 (with the exception of
330 .Fn sysctl_remove_oid ) ,
331 one of the required parameters is
332 .Fa parent ,
333 which points to the head of the parent's list of children.
334 .Pp
335 Most top level categories are created statically.
336 When connecting to existing static oids,
337 this pointer can be obtained with the
338 .Fn SYSCTL_STATIC_CHILDREN
339 macro, where the
340 .Fa OID_NAME
341 argument is name of the parent oid of type
342 .Dv CTLTYPE_NODE
343 (i.e., the name displayed by
344 .Xr sysctl 8 ,
345 preceded by underscore, and with all dots replaced with underscores).
346 .Pp
347 When connecting to an existing dynamic oid, this pointer
348 can be obtained with the
349 .Fn SYSCTL_CHILDREN
350 macro, where the
351 .Fa oidp
352 argument points to the parent oid of type
353 .Dv CTLTYPE_NODE .
354 .Pp
355 The
356 .Fn sysctl_add_oid
357 function creates raw oids of any type.
358 If the oid is successfully created,
359 the function returns a pointer to it;
360 otherwise it returns
361 .Dv NULL .
362 Many of the arguments for
363 .Fn sysctl_add_oid
364 are common to the macros.
365 The arguments are as follows:
366 .Bl -tag -width handler
367 .It Fa ctx
368 A pointer to an optional sysctl context, or
369 .Dv NULL .
370 See
371 .Xr sysctl_ctx_init 9
372 for details.
373 Programmers are strongly advised to use contexts
374 to organize the dynamic oids which they create,
375 unless special creation and deletion sequences are required.
376 If
377 .Fa ctx
378 is not
379 .Dv NULL ,
380 the newly created oid will be added to this context
381 as its first entry.
382 .It Fa parent
383 A pointer to a
384 .Li struct sysctl_oid_list ,
385 which is the head of the parent's list of children.
386 .It Fa number
387 The oid number that will be assigned to this oid.
388 In almost all cases this should be set to
389 .Dv OID_AUTO ,
390 which will result in the assignment of the next available oid number.
391 .It Fa name
392 The name of the oid.
393 The newly created oid will contain a copy of the name.
394 .It Fa kind
395 The kind of oid,
396 specified as a bit mask of the type and access values defined in the
397 .In sys/sysctl.h
398 header file.
399 Oids created dynamically always have the
400 .Dv CTLFLAG_DYN
401 flag set.
402 Access flags specify whether this oid is read-only or read-write,
403 and whether it may be modified by all users
404 or by the superuser only.
405 .It Fa arg1
406 A pointer to any data that the oid should reference, or
407 .Dv NULL .
408 .It Fa arg2
409 The size of
410 .Fa arg1 ,
411 or 0 if
412 .Fa arg1
413 is
414 .Dv NULL .
415 .It Fa handler
416 A pointer to the function
417 that is responsible for handling read and write requests
418 to this oid.
419 There are several standard handlers
420 that support operations on nodes,
421 integers, strings and opaque objects.
422 It is possible also to define new handlers using the
423 .Fn SYSCTL_ADD_PROC
424 macro.
425 .It Fa format
426 A pointer to a string
427 which specifies the format of the oid symbolically.
428 This format is used as a hint by
429 .Xr sysctl 8
430 to apply proper data formatting for display purposes.
431 Currently used format names are:
432 .Dq N
433 for node,
434 .Dq A
435 for
436 .Li "char *" ,
437 .Dq I
438 for
439 .Li "int" ,
440 .Dq IU
441 for
442 .Li "unsigned int" ,
443 .Dq IK
444 for temperature in tenths of kelvins,
445 .Dq L
446 for
447 .Li "long" ,
448 .Dq LU
449 for
450 .Li "unsigned long"
451 and
452 .Dq S,TYPE
453 for
454 .Li "struct TYPE"
455 structures.
456 .It Fa descr
457 A pointer to a textual description of the oid.
458 .El
459 .Pp
460 The
461 .Fn sysctl_remove_oid
462 function removes a dynamically created oid from the tree,
463 optionally freeing its resources.
464 It takes the following arguments:
465 .Bl -tag -width recurse
466 .It Fa oidp
467 A pointer to the dynamic oid to be removed.
468 If the oid is not dynamic, or the pointer is
469 .Dv NULL ,
470 the function returns
471 .Er EINVAL .
472 .It Fa del
473 If non-zero,
474 .Fn sysctl_remove_oid
475 will try to free the oid's resources
476 when the reference count of the oid becomes zero.
477 However, if
478 .Fa del
479 is set to 0,
480 the routine will only deregister the oid from the tree,
481 without freeing its resources.
482 This behaviour is useful when the caller expects to rollback
483 (possibly partially failed)
484 deletion of many oids later.
485 .It Fa recurse
486 If non-zero, attempt to remove the node and all its children.
487 If
488 .Fa recurse
489 is set to 0,
490 any attempt to remove a node that contains any children
491 will result in a
492 .Er ENOTEMPTY
493 error.
494 .Em WARNING : "use recursive deletion with extreme caution" !
495 Normally it should not be needed if contexts are used.
496 Contexts take care of tracking inter-dependencies
497 between users of the tree.
498 However, in some extreme cases it might be necessary
499 to remove part of the subtree no matter how it was created,
500 in order to free some other resources.
501 Be aware, though, that this may result in a system
502 .Xr panic 9
503 if other code sections continue to use removed subtrees.
504 .El
505 .Pp
506 .\" XXX sheldonh finished up to here
507 Again, in most cases the programmer should use contexts,
508 as described in
509 .Xr sysctl_ctx_init 9 ,
510 to keep track of created oids,
511 and to delete them later in orderly fashion.
512 .Pp
513 There is a set of macros defined
514 that helps to create oids of given type.
515 .Pp
516 They are as follows:
517 .Bl -tag -width SYSCTL_ADD_STRINGXX
518 .It Fn SYSCTL_ADD_OID
519 creates a raw oid.
520 This macro is functionally equivalent to the
521 .Fn sysctl_add_oid
522 function.
523 .It Fn SYSCTL_ADD_NODE
524 creates an oid of type
525 .Dv CTLTYPE_NODE ,
526 to which child oids may be added.
527 .It Fn SYSCTL_ADD_S8
528 creates an oid that handles an
529 .Li int8_t
530 variable.
531 .It Fn SYSCTL_ADD_S16
532 creates an oid that handles an
533 .Li int16_t
534 variable.
535 .It Fn SYSCTL_ADD_S32
536 creates an oid that handles an
537 .Li int16_t
538 variable.
539 .It Fn SYSCTL_ADD_S64
540 creates an oid that handles an
541 .Li int64_t
542 variable.
543 .It Fn SYSCTL_ADD_STRING
544 creates an oid that handles a zero-terminated character string.
545 .It Fn SYSCTL_ADD_INT
546 creates an oid that handles an
547 .Li int
548 variable.
549 .It Fn SYSCTL_ADD_U8
550 creates an oid that handles a
551 .Li uint8_t
552 variable.
553 .It Fn SYSCTL_ADD_U16
554 creates an oid that handles a
555 .Li uint16_t
556 variable.
557 .It Fn SYSCTL_ADD_U32
558 creates an oid that handles a
559 .Li uint32_t
560 variable.
561 .It Fn SYSCTL_ADD_U64
562 creates an oid that handles a
563 .Li uint64_t
564 variable.
565 .It Fn SYSCTL_ADD_UINT
566 creates an oid that handles an
567 .Li unsigned int
568 variable.
569 .It Fn SYSCTL_ADD_LONG
570 creates an oid that handles a
571 .Li long
572 variable.
573 .It Fn SYSCTL_ADD_ULONG
574 creates an oid that handles an
575 .Li unsigned long
576 variable.
577 .It Fn SYSCTL_ADD_QUAD
578 creates an oid that handles a 64-bit
579 .Li int
580 variable.
581 .It Fn SYSCTL_ADD_UQUAD
582 creates an oid that handles a 64-bit
583 .Li unsigned int
584 variable.
585 .It Fn SYSCTL_ADD_OPAQUE
586 creates an oid that handles any chunk of opaque data
587 of the size specified by the
588 .Fa len
589 argument,
590 which is a pointer to a
591 .Li "size_t *" .
592 .It Fn SYSCTL_ADD_STRUCT
593 creates an oid that handles a
594 .Li "struct TYPE"
595 structure.
596 The
597 .Fa format
598 parameter will be set to
599 .Dq S,TYPE
600 to provide proper hints to the
601 .Xr sysctl 8
602 utility.
603 .It Fn SYSCTL_ADD_PROC
604 creates an oid with the specified
605 .Fa handler
606 function.
607 The handler is responsible for handling read and write requests
608 to the oid.
609 This oid type is especially useful
610 if the kernel data is not easily accessible,
611 or needs to be processed before exporting.
612 .El
613 .Sh EXAMPLES
614 The following is an example of
615 how to create a new top-level category
616 and how to hook up another subtree to an existing static node.
617 This example does not use contexts,
618 which results in tedious management of all intermediate oids,
619 as they need to be freed later on:
620 .Bd -literal
621 #include <sys/sysctl.h>
622  ...
623 /* Need to preserve pointers to newly created subtrees, to be able
624  * to free them later.
625  */
626 struct sysctl_oid *root1, *root2, *oidp;
627 int a_int;
628 char *string = "dynamic sysctl";
629  ...
630
631 root1 = SYSCTL_ADD_NODE( NULL, SYSCTL_STATIC_CHILDREN(/* tree top */),
632         OID_AUTO, "newtree", CTLFLAG_RW, 0, "new top level tree");
633 oidp = SYSCTL_ADD_INT( NULL, SYSCTL_CHILDREN(root1),
634         OID_AUTO, "newint", CTLFLAG_RW, &a_int, 0, "new int leaf");
635  ...
636 root2 = SYSCTL_ADD_NODE( NULL, SYSCTL_STATIC_CHILDREN(_debug),
637         OID_AUTO, "newtree", CTLFLAG_RW, 0, "new tree under debug");
638 oidp = SYSCTL_ADD_STRING( NULL, SYSCTL_CHILDREN(root2),
639         OID_AUTO, "newstring", CTLFLAG_RD, string, 0, "new string leaf");
640 .Ed
641 .Pp
642 This example creates the following subtrees:
643 .Bd -literal -offset indent
644 debug.newtree.newstring
645 newtree.newint
646 .Ed
647 .Pp
648 .Em "Care should be taken to free all oids once they are no longer needed!"
649 .Sh SEE ALSO
650 .Xr sysctl 8 ,
651 .Xr sysctl 9 ,
652 .Xr sysctl_ctx_free 9 ,
653 .Xr sysctl_ctx_init 9
654 .Sh HISTORY
655 These functions first appeared in
656 .Fx 4.2 .
657 .Sh AUTHORS
658 .An Andrzej Bialecki Aq Mt abial@FreeBSD.org
659 .Sh BUGS
660 Sharing nodes between many code sections
661 causes interdependencies that sometimes may lock the resources.
662 For example,
663 if module A hooks up a subtree to an oid created by module B,
664 module B will be unable to delete that oid.
665 These issues are handled properly by sysctl contexts.
666 .Pp
667 Many operations on the tree involve traversing linked lists.
668 For this reason, oid creation and removal is relatively costly.