]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - lib/libc/gen/fts.3
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / lib / libc / gen / fts.3
1 .\" Copyright (c) 1989, 1991, 1993, 1994
2 .\"     The Regents of the University of California.  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, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 4. Neither the name of the University nor the names of its contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 .\"     @(#)fts.3       8.5 (Berkeley) 4/16/94
29 .\" $FreeBSD$
30 .\"
31 .Dd November 25, 2009
32 .Dt FTS 3
33 .Os
34 .Sh NAME
35 .Nm fts
36 .Nd traverse a file hierarchy
37 .Sh LIBRARY
38 .Lb libc
39 .Sh SYNOPSIS
40 .In sys/types.h
41 .In sys/stat.h
42 .In fts.h
43 .Ft FTS *
44 .Fn fts_open "char * const *path_argv" "int options" "int (*compar)(const FTSENT * const *, const FTSENT * const *)"
45 .Ft FTSENT *
46 .Fn fts_read "FTS *ftsp"
47 .Ft FTSENT *
48 .Fn fts_children "FTS *ftsp" "int options"
49 .Ft int
50 .Fn fts_set "FTS *ftsp" "FTSENT *f" "int options"
51 .Ft void
52 .Fn fts_set_clientptr "FTS *ftsp" "void *clientdata"
53 .Ft void *
54 .Fn fts_get_clientptr "FTS *ftsp"
55 .Ft FTS *
56 .Fn fts_get_stream "FTSENT *f"
57 .Ft int
58 .Fn fts_close "FTS *ftsp"
59 .Sh DESCRIPTION
60 The
61 .Nm
62 functions are provided for traversing
63 .Ux
64 file hierarchies.
65 A simple overview is that the
66 .Fn fts_open
67 function returns a
68 .Dq handle
69 on a file hierarchy, which is then supplied to
70 the other
71 .Nm
72 functions.
73 The function
74 .Fn fts_read
75 returns a pointer to a structure describing one of the files in the file
76 hierarchy.
77 The function
78 .Fn fts_children
79 returns a pointer to a linked list of structures, each of which describes
80 one of the files contained in a directory in the hierarchy.
81 In general, directories are visited two distinguishable times; in pre-order
82 (before any of their descendants are visited) and in post-order (after all
83 of their descendants have been visited).
84 Files are visited once.
85 It is possible to walk the hierarchy
86 .Dq logically
87 (ignoring symbolic links)
88 or physically (visiting symbolic links), order the walk of the hierarchy or
89 prune and/or re-visit portions of the hierarchy.
90 .Pp
91 Two structures are defined (and typedef'd) in the include file
92 .In fts.h .
93 The first is
94 .Vt FTS ,
95 the structure that represents the file hierarchy itself.
96 The second is
97 .Vt FTSENT ,
98 the structure that represents a file in the file
99 hierarchy.
100 Normally, an
101 .Vt FTSENT
102 structure is returned for every file in the file
103 hierarchy.
104 In this manual page,
105 .Dq file
106 and
107 .Dq Vt FTSENT No structure
108 are generally
109 interchangeable.
110 .Pp
111 The
112 .Vt FTS
113 structure contains space for a single pointer, which may be used to
114 store application data or per-hierarchy state.
115 The
116 .Fn fts_set_clientptr
117 and
118 .Fn fts_get_clientptr
119 functions may be used to set and retrieve this pointer.
120 This is likely to be useful only when accessed from the sort
121 comparison function, which can determine the original
122 .Vt FTS
123 stream of its arguments using the
124 .Fn fts_get_stream
125 function.
126 The two
127 .Li get
128 functions are also available as macros of the same name.
129 .Pp
130 The
131 .Vt FTSENT
132 structure contains at least the following fields, which are
133 described in greater detail below:
134 .Bd -literal
135 typedef struct _ftsent {
136         int fts_info;                   /* status for FTSENT structure */
137         char *fts_accpath;              /* access path */
138         char *fts_path;                 /* root path */
139         size_t fts_pathlen;             /* strlen(fts_path) */
140         char *fts_name;                 /* file name */
141         size_t fts_namelen;             /* strlen(fts_name) */
142         long fts_level;                 /* depth (\-1 to N) */
143         int fts_errno;                  /* file errno */
144         long long fts_number;           /* local numeric value */
145         void *fts_pointer;              /* local address value */
146         struct ftsent *fts_parent;      /* parent directory */
147         struct ftsent *fts_link;        /* next file structure */
148         struct ftsent *fts_cycle;       /* cycle structure */
149         struct stat *fts_statp;         /* stat(2) information */
150 } FTSENT;
151 .Ed
152 .Pp
153 These fields are defined as follows:
154 .Bl -tag -width "fts_namelen"
155 .It Fa fts_info
156 One of the following values describing the returned
157 .Vt FTSENT
158 structure and
159 the file it represents.
160 With the exception of directories without errors
161 .Pq Dv FTS_D ,
162 all of these
163 entries are terminal, that is, they will not be revisited, nor will any
164 of their descendants be visited.
165 .Bl  -tag -width FTS_DEFAULT
166 .It Dv FTS_D
167 A directory being visited in pre-order.
168 .It Dv FTS_DC
169 A directory that causes a cycle in the tree.
170 (The
171 .Fa fts_cycle
172 field of the
173 .Vt FTSENT
174 structure will be filled in as well.)
175 .It Dv FTS_DEFAULT
176 Any
177 .Vt FTSENT
178 structure that represents a file type not explicitly described
179 by one of the other
180 .Fa fts_info
181 values.
182 .It Dv FTS_DNR
183 A directory which cannot be read.
184 This is an error return, and the
185 .Fa fts_errno
186 field will be set to indicate what caused the error.
187 .It Dv FTS_DOT
188 A file named
189 .Ql .\&
190 or
191 .Ql ..\&
192 which was not specified as a file name to
193 .Fn fts_open
194 (see
195 .Dv FTS_SEEDOT ) .
196 .It Dv FTS_DP
197 A directory being visited in post-order.
198 The contents of the
199 .Vt FTSENT
200 structure will be unchanged from when
201 the directory was visited in pre-order, except for the
202 .Fa fts_info
203 field.
204 .It Dv FTS_ERR
205 This is an error return, and the
206 .Fa fts_errno
207 field will be set to indicate what caused the error.
208 .It Dv FTS_F
209 A regular file.
210 .It Dv FTS_NS
211 A file for which no
212 .Xr stat 2
213 information was available.
214 The contents of the
215 .Fa fts_statp
216 field are undefined.
217 This is an error return, and the
218 .Fa fts_errno
219 field will be set to indicate what caused the error.
220 .It Dv FTS_NSOK
221 A file for which no
222 .Xr stat 2
223 information was requested.
224 The contents of the
225 .Fa fts_statp
226 field are undefined.
227 .It Dv FTS_SL
228 A symbolic link.
229 .It Dv FTS_SLNONE
230 A symbolic link with a non-existent target.
231 The contents of the
232 .Fa fts_statp
233 field reference the file characteristic information for the symbolic link
234 itself.
235 .El
236 .It Fa fts_accpath
237 A path for accessing the file from the current directory.
238 .It Fa fts_path
239 The path for the file relative to the root of the traversal.
240 This path contains the path specified to
241 .Fn fts_open
242 as a prefix.
243 .It Fa fts_pathlen
244 The length of the string referenced by
245 .Fa fts_path .
246 .It Fa fts_name
247 The name of the file.
248 .It Fa fts_namelen
249 The length of the string referenced by
250 .Fa fts_name .
251 .It Fa fts_level
252 The depth of the traversal, numbered from \-1 to N, where this file
253 was found.
254 The
255 .Vt FTSENT
256 structure representing the parent of the starting point (or root)
257 of the traversal is numbered
258 .Dv FTS_ROOTPARENTLEVEL
259 (\-1), and the
260 .Vt FTSENT
261 structure for the root
262 itself is numbered
263 .Dv FTS_ROOTLEVEL
264 (0).
265 .It Fa fts_errno
266 Upon return of a
267 .Vt FTSENT
268 structure from the
269 .Fn fts_children
270 or
271 .Fn fts_read
272 functions, with its
273 .Fa fts_info
274 field set to
275 .Dv FTS_DNR ,
276 .Dv FTS_ERR
277 or
278 .Dv FTS_NS ,
279 the
280 .Fa fts_errno
281 field contains the value of the external variable
282 .Va errno
283 specifying the cause of the error.
284 Otherwise, the contents of the
285 .Fa fts_errno
286 field are undefined.
287 .It Fa fts_number
288 This field is provided for the use of the application program and is
289 not modified by the
290 .Nm
291 functions.
292 It is initialized to 0.
293 .It Fa fts_pointer
294 This field is provided for the use of the application program and is
295 not modified by the
296 .Nm
297 functions.
298 It is initialized to
299 .Dv NULL .
300 .It Fa fts_parent
301 A pointer to the
302 .Vt FTSENT
303 structure referencing the file in the hierarchy
304 immediately above the current file, i.e., the directory of which this
305 file is a member.
306 A parent structure for the initial entry point is provided as well,
307 however, only the
308 .Fa fts_level ,
309 .Fa fts_bignum ,
310 .Fa fts_number
311 and
312 .Fa fts_pointer
313 fields are guaranteed to be initialized.
314 .It Fa fts_link
315 Upon return from the
316 .Fn fts_children
317 function, the
318 .Fa fts_link
319 field points to the next structure in the NULL-terminated linked list of
320 directory members.
321 Otherwise, the contents of the
322 .Fa fts_link
323 field are undefined.
324 .It Fa fts_cycle
325 If a directory causes a cycle in the hierarchy (see
326 .Dv FTS_DC ) ,
327 either because
328 of a hard link between two directories, or a symbolic link pointing to a
329 directory, the
330 .Fa fts_cycle
331 field of the structure will point to the
332 .Vt FTSENT
333 structure in the hierarchy that references the same file as the current
334 .Vt FTSENT
335 structure.
336 Otherwise, the contents of the
337 .Fa fts_cycle
338 field are undefined.
339 .It Fa fts_statp
340 A pointer to
341 .Xr stat 2
342 information for the file.
343 .El
344 .Pp
345 A single buffer is used for all of the paths of all of the files in the
346 file hierarchy.
347 Therefore, the
348 .Fa fts_path
349 and
350 .Fa fts_accpath
351 fields are guaranteed to be
352 .Dv NUL Ns -terminated
353 .Em only
354 for the file most recently returned by
355 .Fn fts_read .
356 To use these fields to reference any files represented by other
357 .Vt FTSENT
358 structures will require that the path buffer be modified using the
359 information contained in that
360 .Vt FTSENT
361 structure's
362 .Fa fts_pathlen
363 field.
364 Any such modifications should be undone before further calls to
365 .Fn fts_read
366 are attempted.
367 The
368 .Fa fts_name
369 field is always
370 .Dv NUL Ns -terminated .
371 .Pp
372 Note that the use of
373 .Fa fts_bignum
374 is mutually exclusive with the use of
375 .Fa fts_number
376 or
377 .Fa fts_pointer .
378 .Sh FTS_OPEN
379 The
380 .Fn fts_open
381 function takes a pointer to an array of character pointers naming one
382 or more paths which make up a logical file hierarchy to be traversed.
383 The array must be terminated by a
384 .Dv NULL
385 pointer.
386 .Pp
387 There are
388 a number of options, at least one of which (either
389 .Dv FTS_LOGICAL
390 or
391 .Dv FTS_PHYSICAL )
392 must be specified.
393 The options are selected by
394 .Em or Ns 'ing
395 the following values:
396 .Bl -tag -width "FTS_PHYSICAL"
397 .It Dv FTS_COMFOLLOW
398 This option causes any symbolic link specified as a root path to be
399 followed immediately whether or not
400 .Dv FTS_LOGICAL
401 is also specified.
402 .It Dv FTS_LOGICAL
403 This option causes the
404 .Nm
405 routines to return
406 .Vt FTSENT
407 structures for the targets of symbolic links
408 instead of the symbolic links themselves.
409 If this option is set, the only symbolic links for which
410 .Vt FTSENT
411 structures
412 are returned to the application are those referencing non-existent files.
413 Either
414 .Dv FTS_LOGICAL
415 or
416 .Dv FTS_PHYSICAL
417 .Em must
418 be provided to the
419 .Fn fts_open
420 function.
421 .It Dv FTS_NOCHDIR
422 As a performance optimization, the
423 .Nm
424 functions change directories as they walk the file hierarchy.
425 This has the side-effect that an application cannot rely on being
426 in any particular directory during the traversal.
427 The
428 .Dv FTS_NOCHDIR
429 option turns off this optimization, and the
430 .Nm
431 functions will not change the current directory.
432 Note that applications should not themselves change their current directory
433 and try to access files unless
434 .Dv FTS_NOCHDIR
435 is specified and absolute
436 pathnames were provided as arguments to
437 .Fn fts_open .
438 .It Dv FTS_NOSTAT
439 By default, returned
440 .Vt FTSENT
441 structures reference file characteristic information (the
442 .Fa statp
443 field) for each file visited.
444 This option relaxes that requirement as a performance optimization,
445 allowing the
446 .Nm
447 functions to set the
448 .Fa fts_info
449 field to
450 .Dv FTS_NSOK
451 and leave the contents of the
452 .Fa statp
453 field undefined.
454 .It Dv FTS_PHYSICAL
455 This option causes the
456 .Nm
457 routines to return
458 .Vt FTSENT
459 structures for symbolic links themselves instead
460 of the target files they point to.
461 If this option is set,
462 .Vt FTSENT
463 structures for all symbolic links in the
464 hierarchy are returned to the application.
465 Either
466 .Dv FTS_LOGICAL
467 or
468 .Dv FTS_PHYSICAL
469 .Em must
470 be provided to the
471 .Fn fts_open
472 function.
473 .It Dv FTS_SEEDOT
474 By default, unless they are specified as path arguments to
475 .Fn fts_open ,
476 any files named
477 .Ql .\&
478 or
479 .Ql ..\&
480 encountered in the file hierarchy are ignored.
481 This option causes the
482 .Nm
483 routines to return
484 .Vt FTSENT
485 structures for them.
486 .It Dv FTS_XDEV
487 This option prevents
488 .Nm
489 from descending into directories that have a different device number
490 than the file from which the descent began.
491 .El
492 .Pp
493 The argument
494 .Fn compar
495 specifies a user-defined function which may be used to order the traversal
496 of the hierarchy.
497 It
498 takes two pointers to pointers to
499 .Vt FTSENT
500 structures as arguments and
501 should return a negative value, zero, or a positive value to indicate
502 if the file referenced by its first argument comes before, in any order
503 with respect to, or after, the file referenced by its second argument.
504 The
505 .Fa fts_accpath ,
506 .Fa fts_path
507 and
508 .Fa fts_pathlen
509 fields of the
510 .Vt FTSENT
511 structures may
512 .Em never
513 be used in this comparison.
514 If the
515 .Fa fts_info
516 field is set to
517 .Dv FTS_NS
518 or
519 .Dv FTS_NSOK ,
520 the
521 .Fa fts_statp
522 field may not either.
523 If the
524 .Fn compar
525 argument is
526 .Dv NULL ,
527 the directory traversal order is in the order listed in
528 .Fa path_argv
529 for the root paths, and in the order listed in the directory for
530 everything else.
531 .Sh FTS_READ
532 The
533 .Fn fts_read
534 function returns a pointer to an
535 .Vt FTSENT
536 structure describing a file in
537 the hierarchy.
538 Directories (that are readable and do not cause cycles) are visited at
539 least twice, once in pre-order and once in post-order.
540 All other files are visited at least once.
541 (Hard links between directories that do not cause cycles or symbolic
542 links to symbolic links may cause files to be visited more than once,
543 or directories more than twice.)
544 .Pp
545 If all the members of the hierarchy have been returned,
546 .Fn fts_read
547 returns
548 .Dv NULL
549 and sets the external variable
550 .Va errno
551 to 0.
552 If an error unrelated to a file in the hierarchy occurs,
553 .Fn fts_read
554 returns
555 .Dv NULL
556 and sets
557 .Va errno
558 appropriately.
559 If an error related to a returned file occurs, a pointer to an
560 .Vt FTSENT
561 structure is returned, and
562 .Va errno
563 may or may not have been set (see
564 .Fa fts_info ) .
565 .Pp
566 The
567 .Vt FTSENT
568 structures returned by
569 .Fn fts_read
570 may be overwritten after a call to
571 .Fn fts_close
572 on the same file hierarchy stream, or, after a call to
573 .Fn fts_read
574 on the same file hierarchy stream unless they represent a file of type
575 directory, in which case they will not be overwritten until after a call to
576 .Fn fts_read
577 after the
578 .Vt FTSENT
579 structure has been returned by the function
580 .Fn fts_read
581 in post-order.
582 .Sh FTS_CHILDREN
583 The
584 .Fn fts_children
585 function returns a pointer to an
586 .Vt FTSENT
587 structure describing the first entry in a NULL-terminated linked list of
588 the files in the directory represented by the
589 .Vt FTSENT
590 structure most recently returned by
591 .Fn fts_read .
592 The list is linked through the
593 .Fa fts_link
594 field of the
595 .Vt FTSENT
596 structure, and is ordered by the user-specified comparison function, if any.
597 Repeated calls to
598 .Fn fts_children
599 will recreate this linked list.
600 .Pp
601 As a special case, if
602 .Fn fts_read
603 has not yet been called for a hierarchy,
604 .Fn fts_children
605 will return a pointer to the files in the logical directory specified to
606 .Fn fts_open ,
607 i.e., the arguments specified to
608 .Fn fts_open .
609 Otherwise, if the
610 .Vt FTSENT
611 structure most recently returned by
612 .Fn fts_read
613 is not a directory being visited in pre-order,
614 or the directory does not contain any files,
615 .Fn fts_children
616 returns
617 .Dv NULL
618 and sets
619 .Va errno
620 to zero.
621 If an error occurs,
622 .Fn fts_children
623 returns
624 .Dv NULL
625 and sets
626 .Va errno
627 appropriately.
628 .Pp
629 The
630 .Vt FTSENT
631 structures returned by
632 .Fn fts_children
633 may be overwritten after a call to
634 .Fn fts_children ,
635 .Fn fts_close
636 or
637 .Fn fts_read
638 on the same file hierarchy stream.
639 .Pp
640 .Em Option
641 may be set to the following value:
642 .Bl -tag -width FTS_NAMEONLY
643 .It Dv FTS_NAMEONLY
644 Only the names of the files are needed.
645 The contents of all the fields in the returned linked list of structures
646 are undefined with the exception of the
647 .Fa fts_name
648 and
649 .Fa fts_namelen
650 fields.
651 .El
652 .Sh FTS_SET
653 The function
654 .Fn fts_set
655 allows the user application to determine further processing for the
656 file
657 .Fa f
658 of the stream
659 .Fa ftsp .
660 The
661 .Fn fts_set
662 function
663 returns 0 on success, and \-1 if an error occurs.
664 .Em Option
665 must be set to one of the following values:
666 .Bl -tag -width FTS_PHYSICAL
667 .It Dv FTS_AGAIN
668 Re-visit the file; any file type may be re-visited.
669 The next call to
670 .Fn fts_read
671 will return the referenced file.
672 The
673 .Fa fts_stat
674 and
675 .Fa fts_info
676 fields of the structure will be reinitialized at that time,
677 but no other fields will have been changed.
678 This option is meaningful only for the most recently returned
679 file from
680 .Fn fts_read .
681 Normal use is for post-order directory visits, where it causes the
682 directory to be re-visited (in both pre and post-order) as well as all
683 of its descendants.
684 .It Dv FTS_FOLLOW
685 The referenced file must be a symbolic link.
686 If the referenced file is the one most recently returned by
687 .Fn fts_read ,
688 the next call to
689 .Fn fts_read
690 returns the file with the
691 .Fa fts_info
692 and
693 .Fa fts_statp
694 fields reinitialized to reflect the target of the symbolic link instead
695 of the symbolic link itself.
696 If the file is one of those most recently returned by
697 .Fn fts_children ,
698 the
699 .Fa fts_info
700 and
701 .Fa fts_statp
702 fields of the structure, when returned by
703 .Fn fts_read ,
704 will reflect the target of the symbolic link instead of the symbolic link
705 itself.
706 In either case, if the target of the symbolic link does not exist the
707 fields of the returned structure will be unchanged and the
708 .Fa fts_info
709 field will be set to
710 .Dv FTS_SLNONE .
711 .Pp
712 If the target of the link is a directory, the pre-order return, followed
713 by the return of all of its descendants, followed by a post-order return,
714 is done.
715 .It Dv FTS_SKIP
716 No descendants of this file are visited.
717 The file may be one of those most recently returned by either
718 .Fn fts_children
719 or
720 .Fn fts_read .
721 .El
722 .Sh FTS_CLOSE
723 The
724 .Fn fts_close
725 function closes a file hierarchy stream
726 .Fa ftsp
727 and restores the current directory to the directory from which
728 .Fn fts_open
729 was called to open
730 .Fa ftsp .
731 The
732 .Fn fts_close
733 function
734 returns 0 on success, and \-1 if an error occurs.
735 .Sh ERRORS
736 The function
737 .Fn fts_open
738 may fail and set
739 .Va errno
740 for any of the errors specified for the library functions
741 .Xr open 2
742 and
743 .Xr malloc 3 .
744 .Pp
745 The function
746 .Fn fts_close
747 may fail and set
748 .Va errno
749 for any of the errors specified for the library functions
750 .Xr chdir 2
751 and
752 .Xr close 2 .
753 .Pp
754 The functions
755 .Fn fts_read
756 and
757 .Fn fts_children
758 may fail and set
759 .Va errno
760 for any of the errors specified for the library functions
761 .Xr chdir 2 ,
762 .Xr malloc 3 ,
763 .Xr opendir 3 ,
764 .Xr readdir 3
765 and
766 .Xr stat 2 .
767 .Pp
768 In addition,
769 .Fn fts_children ,
770 .Fn fts_open
771 and
772 .Fn fts_set
773 may fail and set
774 .Va errno
775 as follows:
776 .Bl -tag -width Er
777 .It Bq Er EINVAL
778 The options were invalid.
779 .El
780 .Sh SEE ALSO
781 .Xr find 1 ,
782 .Xr chdir 2 ,
783 .Xr stat 2 ,
784 .Xr ftw 3 ,
785 .Xr qsort 3
786 .Sh HISTORY
787 The
788 .Nm
789 interface was first introduced in
790 .Bx 4.4 .
791 The
792 .Fn fts_get_clientptr ,
793 .Fn fts_get_stream ,
794 and
795 .Fn fts_set_clientptr
796 functions were introduced in
797 .Fx 5.0 ,
798 principally to provide for alternative interfaces to the
799 .Nm
800 functionality using different data structures.