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