BSDE_PARSE_RULE(3)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’– BSDE_PARSE_RULE(3) πŸ’–

okay bestie, welcome to the BSDE_PARSE_RULE(3) page from the Library Functions Manual β€” it’s giving file system firewall rule parsing, and we’re gonna get you comfy with it ✨


🌸 NAME 🌸

bsde_parse_rule, bsde_parse_rule_string β€” parse file system firewall rules


🫢 LIBRARY 🫢

File System Firewall Interface Library (libugidfw, -lugidfw) β€” iconic, no cap πŸ’…


✨ SYNOPSIS ✨

#include <ugidfw.h>

int
bsde_parse_rule(int argc, char *argv[],
    struct mac_bsdextended_rule *rule, size_t buflen, char *errstr);

int
bsde_parse_rule_string(const char *string,
    struct mac_bsdextended_rule *rule, size_t buflen, char *errstr);

πŸ’… DESCRIPTION πŸ’…

okay so the bsde_parse_rule() function parses an argument vector (e.g. argv as passed to main()) into rule. If an error occurs 😭, *errstr is filled in with the error string (up to errlen characters, including the terminating NUL). yes bestie, that’s the exact wording β€” periodt.

The bsde_parse_rule_string() function is identical to bsde_parse_rule(), except that it parses a single string rather than an array of arguments. lowkey convenient, highkey slay πŸ¦‹


πŸ”₯ RETURN VALUES πŸ”₯

The bsde_parse_rule_string() and bsde_parse_rule() functions return 0 if successful; otherwise the value -1 is returned and the value of *errstr is filled in as documented in β€œDESCRIPTION”. no cap β€” 0 means it ate, -1 means check the error string πŸ’€


πŸ¦‹ SEE ALSO πŸ¦‹


πŸŽ€ 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. shout-out to the main characters who made it happen πŸ‘‘


πŸ’– Sign-off: this page is from Debian, dated January 7, 2003, and it’s the BSDE_PARSE_RULE(3) man page. byeee bestie, go parse some rules! πŸ’…

πŸ“¦ where this page comes from