xref: /freebsd/lib/libugidfw/bsde_get_rule_count.3 (revision 13ea0450a9c8742119d36f3bf8f47accdce46e54)
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.\" $FreeBSD$
32.\"
33.Dd January 7, 2003
34.Dt BSDE_GET_RULE_COUNT 3
35.Os
36.Sh NAME
37.Nm bsde_get_rule_count ,
38.Nm bsde_get_rule_slots
39.Nd "file system firewall statistics"
40.Sh LIBRARY
41.Lb libugidfw
42.Sh SYNOPSIS
43.In ugidfw.h
44.Ft int
45.Fn bsde_get_rule_count "size_t errlen" "char *errstr"
46.Ft int
47.Fn bsde_get_rule_slots "size_t errlen" "char *errstr"
48.Sh DESCRIPTION
49The
50.Fn bsde_get_rule_count
51and
52.Fn bsde_get_rule_slots
53functions
54return the total number of enforced rules
55and the total number of used rule slots, respectively.
56If an error occurs,
57.Fa *errstr
58is filled in with the error string
59(up to
60.Fa errlen
61characters, including the terminating
62.Dv NUL ) .
63.Sh RETURN VALUES
64The
65.Fn bsde_get_rule_count
66and
67.Fn bsde_get_rule_slots
68functions return
69the number of enforced rules and rule slots (respectively)
70if successful;
71otherwise the value \-1 is returned and the value of
72.Fa *errstr
73is filled in as documented in
74.Sx DESCRIPTION .
75.Sh SEE ALSO
76.Xr bsde_delete_rule 3 ,
77.Xr bsde_get_rule 3 ,
78.Xr bsde_parse_rule 3 ,
79.Xr bsde_parse_rule_string 3 ,
80.Xr bsde_rule_to_string 3 ,
81.Xr bsde_set_rule 3 ,
82.Xr libugidfw 3 ,
83.Xr mac_bsdextended 4 ,
84.Xr ugidfw 8
85.Sh AUTHORS
86This software was contributed to the
87.Fx
88Project by Network Associates Labs,
89the Security Research Division of Network Associates
90Inc.
91under DARPA/SPAWAR contract N66001-01-C-8035
92.Pq Dq CBOSS ,
93as part of the DARPA CHATS research program.
94