1101206Srwatson/*-
2126217Srwatson * Copyright (c) 2002, 2004 Networks Associates Technology, Inc.
3101206Srwatson * All rights reserved.
4101206Srwatson *
5106573Srwatson * This software was developed for the FreeBSD Project by Network Associates
6106573Srwatson * Laboratories, the Security Research Division of Network Associates, Inc.
7106573Srwatson * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
8106573Srwatson * DARPA CHATS research program.
9101206Srwatson *
10101206Srwatson * Redistribution and use in source and binary forms, with or without
11101206Srwatson * modification, are permitted provided that the following conditions
12101206Srwatson * are met:
13101206Srwatson * 1. Redistributions of source code must retain the above copyright
14101206Srwatson *    notice, this list of conditions and the following disclaimer.
15101206Srwatson * 2. Redistributions in binary form must reproduce the above copyright
16101206Srwatson *    notice, this list of conditions and the following disclaimer in the
17101206Srwatson *    documentation and/or other materials provided with the distribution.
18101206Srwatson *
19101206Srwatson * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
20101206Srwatson * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21101206Srwatson * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22101206Srwatson * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
23101206Srwatson * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24101206Srwatson * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25101206Srwatson * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26101206Srwatson * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27101206Srwatson * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28101206Srwatson * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29101206Srwatson * SUCH DAMAGE.
30101206Srwatson *
31101206Srwatson * $FreeBSD$
32101206Srwatson */
33101206Srwatson
34101206Srwatson#ifndef _UGIDFW_H
35101206Srwatson#define	_UGIDFW_H
36101206Srwatson
37101206Srwatson__BEGIN_DECLS
38101206Srwatsonint	bsde_rule_to_string(struct mac_bsdextended_rule *rule, char *buf,
39101206Srwatson	    size_t buflen);
40101206Srwatsonint	bsde_parse_mode(int argc, char *argv[], mode_t *mode, size_t buflen,
41101206Srwatson	    char *errstr);
42101206Srwatsonint	bsde_parse_rule(int argc, char *argv[],
43101206Srwatson	    struct mac_bsdextended_rule *rule, size_t buflen, char *errstr);
44101206Srwatsonint	bsde_parse_rule_string(const char *string,
45101206Srwatson	    struct mac_bsdextended_rule *rule, size_t buflen, char *errstr);
46104038Srwatsonint	bsde_get_mib(const char *string, int *name, size_t *namelen);
47101206Srwatsonint	bsde_get_rule_count(size_t buflen, char *errstr);
48101206Srwatsonint	bsde_get_rule_slots(size_t buflen, char *errstr);
49101206Srwatsonint	bsde_get_rule(int rulenum, struct mac_bsdextended_rule *rule,
50101206Srwatson	    size_t errlen, char *errstr);
51101206Srwatsonint	bsde_delete_rule(int rulenum, size_t buflen, char *errstr);
52101206Srwatsonint	bsde_set_rule(int rulenum, struct mac_bsdextended_rule *rule,
53101206Srwatson	    size_t buflen, char *errstr);
54126217Srwatsonint	bsde_add_rule(int *rulename, struct mac_bsdextended_rule *rule,
55126217Srwatson	    size_t buflen, char *errstr);
56101206Srwatson__END_DECLS
57101206Srwatson
58101206Srwatson#endif
59