BSDE_GET_RULE_COUNT(3)
π BSDE_GET_RULE_COUNT(3) π
okay bestie, so this is a Library Functions Manual page (that's the manual name btw, in case you were wondering) and honestly? it's giving "tiny but mighty". let's get into it π«Ά
β¨ NAME β¨
bsde_get_rule_count, bsde_get_rule_slots β file system firewall statistics π
like⦠it's literally the stats girlies of the file system firewall world. no cap.
π LIBRARY π
File System Firewall Interface Library (libugidfw, -lugidfw) β yes you gotta link it, that's the vibe π
πΈ SYNOPSIS πΈ
#include <ugidfw.h>
int
bsde_get_rule_count(size_t errlen, char *errstr);
int
bsde_get_rule_slots(size_t errlen, char *errstr);
two functions, same shape, both returning int. slay β¨
π¦ DESCRIPTION π¦
so here's the tea, bestie β:
bsde_get_rule_count()returns the total number of enforced rules. periodt.bsde_get_rule_slots()returns the total number of used rule slots. also periodt.
they're two icons doing two different jobs and honestly I respect that π
and if something goes wrong? π *errstr gets filled in with the error string β up to errlen characters, including the terminating NUL. so like, budget your buffer accordingly, don't be doing the most with too few bytes π
ngl errlen counting the NUL is the kind of detail that'll bite you if you're not paying attention. read it twice. love u π
π₯ RETURN VALUES π₯
- on success:
bsde_get_rule_count()hands you the number of enforced rules, andbsde_get_rule_slots()hands you the number of rule slots (respectively, obviously β they don't swap jobs, this isn't that kind of library) π - on failure: the return value is
-1and*errstrgets filled in as documented in βDESCRIPTIONβ up above π
so basically: -1 = check your errstr, bestie. that's the whole signal. π©
π SEE ALSO π
the whole friend group, honestly β go say hi π
bsde_delete_rule(3)bsde_get_rule(3)bsde_parse_rule(3)bsde_parse_rule_string(3)bsde_rule_to_string(3)bsde_set_rule(3)libugidfw(3)mac_bsdextended(4)ugidfw(8)
like literally the entire squad. iykyk π§
π AUTHORS π
okay so this software was contributed to the FreeBSD Project by Network Associates Labs, the Security Research Division of Network Associates Inc., under DARPA/SPAWAR contract N66001-01-C-8035 (βCBOSSβ), as part of the DARPA CHATS research program. iconic sponsorship moment, we love to see it β
and that's the whole page bestie! this one's from Debian, dated January 7, 2003 β vintage but still absolutely eating ππ¦πΈ no cap, go read ugidfw(8) next π«Ά
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2003 Networks Associates Technology, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms