bsde_add_rulebsde_get_rulebsde_set_rulebsde_delete_rule
- file system firewall rules list management
LIBRARY
Lb libugidfw
SYNOPSIS
#include <ugidfw.h> int
Fo bsde_add_rule
Fa int *rulenum struct mac_bsdextended_rule *rule
Fa size_t buflen char *errstr
Fc Ft int
Fo bsde_get_rule
Fa int rulenum struct mac_bsdextended_rule *rule
Fa size_t errlen char *errstr
Fc Ft int
Fo bsde_set_rule
Fa int rulenum struct mac_bsdextended_rule *rule
Fa size_t errlen char *errstr
Fc Ft int
bsde_delete_rule (int rulenum size_t errlen char *errstr);
DESCRIPTION
The
bsde_add_rule ();
function fills the next available
rule (in
Vt struct mac_bsdextended_rule
form, either from
bsde_get_rule ();
or
bsde_parse_rule3).
If an error occurs,
Fa *errstr
is filled with the error string
(up to
Fa errlen
characters, including the terminating
NUL )
If successful and
Fa rulenum
is
non- NULL
the rule number used will be returned in
Fa *rulenum .
The
bsde_get_rule ();
function fills in
Fa *rule
with the rule numbered
Fa rulenum .
If an error occurs,
Fa *errstr
is filled in with the error string
(up to
Fa errlen
characters, including the terminating
NUL )
The
bsde_set_rule ();
function fills the slot numbered
Fa rulenum
with the specified rule
(in
Vt struct mac_bsdextended_rule
form, either from
bsde_get_rule ();
or
bsde_parse_rule3).
If an error occurs,
Fa *errstr
is filled with the error string
(up to
Fa errlen
characters, including the terminating
NUL )
The
bsde_delete_rule ();
function deletes the rule numbered
Fa rulenum .
If an error occurs,
Fa *errstr
is filled with the error string
(up to
Fa errlen
characters, including the terminating
NUL )
RETURN VALUES
The
bsde_get_rule (,);
bsde_set_rule (,);
and
bsde_delete_rule ();
functions return 0 if successful;
otherwise the value -1 is returned and the value of
Fa *errstr
is filled in as documented in
Sx DESCRIPTION .
This software was contributed to the
Fx 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.