]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/libugidfw/bsde_get_rule_count.3
Merge llvm-project main llvmorg-17-init-19304-gd0b54bb50e51
[FreeBSD/FreeBSD.git] / lib / libugidfw / bsde_get_rule_count.3
1 .\" Copyright (c) 2003 Networks Associates Technology, Inc.
2 .\" All rights reserved.
3 .\"
4 .\" This software was developed for the FreeBSD Project by Chris
5 .\" Costello at Safeport Network Services and Network Associates
6 .\" Laboratories, the Security Research Division of Network Associates,
7 .\" Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part
8 .\" of the DARPA CHATS research program.
9 .\"
10 .\" Redistribution and use in source and binary forms, with or without
11 .\" modification, are permitted provided that the following conditions
12 .\" are met:
13 .\" 1. Redistributions of source code must retain the above copyright
14 .\"    notice, this list of conditions and the following disclaimer.
15 .\" 2. Redistributions in binary form must reproduce the above copyright
16 .\"    notice, this list of conditions and the following disclaimer in the
17 .\"    documentation and/or other materials provided with the distribution.
18 .\"
19 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
23 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 .\" SUCH DAMAGE.
30 .\"
31 .Dd January 7, 2003
32 .Dt BSDE_GET_RULE_COUNT 3
33 .Os
34 .Sh NAME
35 .Nm bsde_get_rule_count ,
36 .Nm bsde_get_rule_slots
37 .Nd "file system firewall statistics"
38 .Sh LIBRARY
39 .Lb libugidfw
40 .Sh SYNOPSIS
41 .In ugidfw.h
42 .Ft int
43 .Fn bsde_get_rule_count "size_t errlen" "char *errstr"
44 .Ft int
45 .Fn bsde_get_rule_slots "size_t errlen" "char *errstr"
46 .Sh DESCRIPTION
47 The
48 .Fn bsde_get_rule_count
49 and
50 .Fn bsde_get_rule_slots
51 functions
52 return the total number of enforced rules
53 and the total number of used rule slots, respectively.
54 If an error occurs,
55 .Fa *errstr
56 is filled in with the error string
57 (up to
58 .Fa errlen
59 characters, including the terminating
60 .Dv NUL ) .
61 .Sh RETURN VALUES
62 The
63 .Fn bsde_get_rule_count
64 and
65 .Fn bsde_get_rule_slots
66 functions return
67 the number of enforced rules and rule slots (respectively)
68 if successful;
69 otherwise the value \-1 is returned and the value of
70 .Fa *errstr
71 is filled in as documented in
72 .Sx DESCRIPTION .
73 .Sh SEE ALSO
74 .Xr bsde_delete_rule 3 ,
75 .Xr bsde_get_rule 3 ,
76 .Xr bsde_parse_rule 3 ,
77 .Xr bsde_parse_rule_string 3 ,
78 .Xr bsde_rule_to_string 3 ,
79 .Xr bsde_set_rule 3 ,
80 .Xr libugidfw 3 ,
81 .Xr mac_bsdextended 4 ,
82 .Xr ugidfw 8
83 .Sh AUTHORS
84 This software was contributed to the
85 .Fx
86 Project by Network Associates Labs,
87 the Security Research Division of Network Associates
88 Inc.
89 under DARPA/SPAWAR contract N66001-01-C-8035
90 .Pq Dq CBOSS ,
91 as part of the DARPA CHATS research program.