BSDE_GET_RULE(3)
π BSDE_GET_RULE(3) β Library Functions Manual π
okay bestie, welcome to the file system firewall rules list management page β yes, we're doing this, and we're gonna keep every detail while making it cute π«Άβ¨
πΈ NAME πΈ
bsde_add_rule, bsde_get_rule, bsde_set_rule, bsde_delete_rule β file system firewall rules list management π
π¦ LIBRARY π¦
File System Firewall Interface Library (libugidfw, -lugidfw) β that's the exact library name and linker flag, no cap π
β¨ SYNOPSIS β¨
#include <ugidfw.h>
int
bsde_add_rule(int *rulenum, struct mac_bsdextended_rule *rule,
size_t buflen, char *errstr);
int
bsde_get_rule(int rulenum, struct mac_bsdextended_rule *rule,
size_t errlen, char *errstr);
int
bsde_set_rule(int rulenum, struct mac_bsdextended_rule *rule,
size_t errlen, char *errstr);
int
bsde_delete_rule(int rulenum, size_t errlen, char *errstr);
like, here is the include and the exact signatures, literally copy-paste exact bestie π
π DESCRIPTION π
okay so here's the tea on each function, one by one:
bsde_add_rule(int *rulenum, struct mac_bsdextended_rule *rule, size_t buflen, char *errstr)β this one fills the next available rule (instruct mac_bsdextended_ruleform, either frombsde_get_rule()orbsde_parse_rule(3)). If an error occurs,*errstris filled with the error string (up toerrlencharacters, including the terminating NUL). If successful andrulenumis non-NULL, the rule number used will be returned in*rulenumβ¨bsde_get_rule(int rulenum, struct mac_bsdextended_rule *rule, size_t errlen, char *errstr)β this one fills in*rulewith the rule numberedrulenum. If an error occurs,*errstris filled in with the error string (up toerrlencharacters, including the terminating NUL) πbsde_set_rule(int rulenum, struct mac_bsdextended_rule *rule, size_t errlen, char *errstr)β this one fills the slot numberedrulenumwith the specified rule (instruct mac_bsdextended_ruleform, either frombsde_get_rule()orbsde_parse_rule(3)). If an error occurs,*errstris filled with the error string (up toerrlencharacters, including the terminating NUL) periodt πbsde_delete_rule(int rulenum, size_t errlen, char *errstr)β this one deletes the rule numberedrulenum. If an error occurs,*errstris filled with the error string (up toerrlencharacters, including the terminating NUL) bye-bye rule π
π RETURN VALUES π
bsde_get_rule(), bsde_set_rule(), and bsde_delete_rule() return 0 if successful; otherwise the value -1 is returned and the value of *errstr is filled in as documented in βDESCRIPTIONβ ππ
π₯ SEE ALSO π₯
bsde_get_rule_count(3)bsde_get_rule_slots(3)bsde_parse_rule(3)bsde_parse_rule_string(3)bsde_rule_to_string(3)libugidfw(3)mac_bsdextended(4)ugidfw(8)
go read those next, bestie β the linked-list of lore is real fr fr π«Ά
π AUTHORS π
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 contribution behavior, honestly π«‘π
signing off from Debian on February 24, 2004, on the BSDE_GET_RULE(3) page β mwah πβ¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2003-2004 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